<!--Notice: (c)2013 This page is part of the management program for Tlhomeso Timbers, Gaborone, 
and developed by Customized Software (Pty) Ltd, Gaborone, Botswana. 
Customized Software holds the copyright on the source code on this and all other pages in the 
management program. For more info contact Customized Software on email: info@bwcustomized.com-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 


<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<!--form validation-->

<?php

include('../include/session.php');	
include('../include/formValidations.php');

 $table_name = $_SESSION['db_prefix']."_list_early";
    $reason_query = "SELECT item_name FROM $table_name ORDER BY item_name ASC";
	$arrId2 = array ();
	$arrName2 = array ();
	$reason_result = execsql($reason_query);
	if ($reason_result!="") {
	$reason_num = mysql_num_rows($reason_result);
	$b = 0;
	while ($b < $reason_num) {
		$arrId2[$b] = mysql_result($reason_result, $b, "item_name");
		$arrName2[$b] = mysql_result($reason_result, $b, "item_name");
		$b++;
	}
	}

$emp_id = $_GET['emp_id'];


?>
<script type="text/javascript">
function stopRKey(evt) {
  var evt = (evt) ? evt : ((event) ? event : null);
  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
}
document.onkeypress = stopRKey;
</script> 

<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>

<style>
 select.select160{
    background:#FFF;
    border: 1px solid #ddd;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 1px;
    outline: none;
    padding: 2px;
    width:160px;
	height:24px;
	color:#000;
}

 select.select50{
    background:#FFF;
    border: 1px solid #ddd;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 1px;
    outline: none;
    padding: 2px;
    width:50px;
	height:24px;
	color:#000;
}

label.label_std{
	margin-left:5px;
    line-height:20px;
	padding-top:6px;
    color:#000;
    text-shadow:1px 1px 1px #fff;
    font:bold 12px Arial;
}

input.imagebutton{
	background-color:#CCC;
    width: 75px;
    height: 24px;
	border:solid;
	border-width:1px;
	border-color:#000;
	cursor:pointer;
	color:#000;
	font:bold 12px Arial;
}
select.select1601 {    background:#FFEAEA;
    border: 1px solid #ddd;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 1px;
    outline: none;
    padding: 2px;
    width:160px;
	height:24px;
	color:#000;
}
select.select501 {    background:#FFF;
    border: 1px solid #ddd;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 1px;
    outline: none;
    padding: 2px;
    width:50px;
	height:24px;
	color:#000;
}
</style>


 

</head>
<form name="form1" id="form1" action="save_time_out_recording.php" method="get"  target="_top">
<body onload="document.getElementById(;MM_callJS('document.getElementById(\'quantityText\').focus();')"editText").focus();">
<table align="center" >
  <tr>
    <td width="290" height="56" align="center"><label class="label_std">Clock-out time:</label>
      <br />
      <label class="label_std">hours:&nbsp;</label>
<select name="out_hours_select" class="select50" id="out_hours_select" align='right' >
  <option value="17">17</option>
          <option value="16">16</option>
          <option value="15">15</option>
          <option value="14">14</option>
          <option value="13">13</option>
          <option value="12">12</option>
          <option selected="selected"> </option>
</select>
&nbsp;&nbsp;    <label class="label_std">  minutes: </label>
<select name="out_min_select" class="select501" id="out_min_select" align='right'>
  <option selected="selected"> </option>
  <option value="0">00</option>
  <option value="00">00</option>
  <option value="01">01</option>
  <option value="02">02</option>
  <option value="03">03</option>
  <option value="04">04</option>
  <option value="05">05</option>
  <option value="06">06</option>
  <option value="07">07</option>
  <option value="08">08</option>
  <option value="09">09</option>
  <?php 
  $i=10;
  while ($i<60) { ?>
  <option value="<?php echo $i?>"><?php echo $i?></option>
  <?php
  $i++;
  }
  ?>
</select>
<br /></td>
  </tr>
  <tr>
    <td height="35" align="center"><label class="label_std">Select reason for leaving early:</label>
      <br />
      <select name="reason_select" id="reason_select" class="select160"  >
        <option value="" selected="selected"></option>
        <?php
        	for ($j = 0; $j < count($arrId2); $j++) {
    		echo "<option value=" . "\"" . $arrId2[$j] . "\"" . ">" . $arrName2[$j] . "</option>";
	}
?>
      </select>
      <input name="status_out" type="hidden" id="status_out" value="E" />
      <input name="emp_id" type="hidden" id="emp_id" value="<?php echo $emp_id ?>"  /></td>
  </tr>
  <tr>
    <td align="center"><br />
      <input name="input" type="submit" value="Set" class="imagebutton"  />
      <input name="button" type="button" id="button" class="imagebutton" onclick="MM_goToURL('parent','timeOutWizbase.php?p=3&s=3');return document.MM_returnValue" value="Cancel" /></form>
    </td>
  </tr>
</table>

<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("out_hours_select","req","Please select hour.");
  frmvalidator.addValidation("out_min_select","req","Please select minutes.");
  frmvalidator.addValidation("reason_select","req","Please select a reason.");
</script>
</body>
</html>