
<?php 
$page_name = "HR-overtime";
include ("../navigation/access.php");

if ($permission_num==1) {
	 

$table_name = $_SESSION['db_prefix']."_employee";
$dropDownQuery = "SELECT emp_id, emp_no, emp_first_name, emp_last_name FROM $table_name  ORDER BY emp_no ASC";
$dropDownResult = execsql($dropDownQuery);
	$num = mysql_num_rows($dropDownResult);
	$a = 0;
	$arrId = array ();
	$arrName = array ();
	while ($a < $num) {
		$arrId[$a] = mysql_result($dropDownResult, $a, "emp_id");
		$arrName[$a] = mysql_result($dropDownResult, $a, "emp_first_name")." ".mysql_result($dropDownResult, $a, "emp_last_name")." (".mysql_result($dropDownResult, $a, "emp_no").")";
		
		
		$a++;
	}
?>
<!--jscript-->
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<!--style sheets-->


<body>
<form id="form1" name="form1" method="get" action="overtimeWizbase.php">
<div class="wizard_page_middle_frame">
   
 <div class="page_inside_frame">
     <table width="600"  id="table_display_wizard">
       <tr>
         <td width="266">
         
         <label class="label_std">
         
         Select employee to record overtime for:</label></td>
         <td width="322"><select name="employee_select" id="employee_select" class="select200" >
           <option value="<?php echo $_SESSION['emp_id']?>" ><?php echo $_SESSION['employee_name']?></option>
           <?php
    	for ($i = 0; $i < count($arrId); $i++) {
		echo "<option value=" . "\"" . $arrId[$i] . "\"" . ">" . $arrName[$i] . "</option>";
		$_SESSION['productName'] = $arrName[$i];
		//foreach($arrId as $key=>$value){
			//echo "<option value=\"delivery.php?store_item_id=".$arrId[$i]."&cat=$cat&formEnabled2=1&date=$date" . "\"" . ">" . $arrName[$i] . "</option>";	
	    }
     ?>
         </select></td>
       </tr>
     </table>
     </div>  
     <div class="lay_out_frame_small" style="border:hidden; width:400px;">
     <br>
     <br>
     <br>
     <br>
<br>
<br>
     <br>
     <br>
     <br>
     <br>
     <br>
     <br>
     <br>
<br>
</div>
<div class="wizard_frame">     
<table width="645" height="50" align="center" id="table_button_bar">
          <tr>
            <td width="117">&nbsp;</td>
            <td width="115">&nbsp;</td>
            <td width="99"><span class="wizard">
              <input name="p" type="hidden" id="p" value="1" />
              <input name="error" type="hidden" id="error" value="0" />
              <input name="s" type="hidden" id="s" value="1" />
            </td>
            <td width="125"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; cancel_confirmation(1, '../hr_module/hr_main.php?date=0');" value="Cancel" /></td>
            <td width="110" align="right"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; " /></td>
          </tr>
        </table> 
</div>       
</div>                
 </form> 
 </div>

<!--form validation-->
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("employee_select","req","Please select an employee.");
  </script>
  

</body>
<?php } else { 
    $_SESSION['denied_return'] = "hr_module/employee_list.php";	?>
	<body onLoad="accessdenied(); return false">
</body>
<?php }
?>