<!--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-->

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

if ($permission_num==1) {
	 

$table_name = $_SESSION['db_prefix']."_list_warnings";
    $position_query = "SELECT item_name FROM $table_name ORDER BY item_name ASC";
	$arrId1 = array ();
	$arrName1 = array ();
	$position_result = execsql($position_query);
	if ($position_result!="") {
	$position_num = mysql_num_rows($position_result);
	$b = 0;
	while ($b < $position_num) {
		$arrId1[$b] = mysql_result($position_result, $b, "item_name");
		$arrName1[$b] = mysql_result($position_result, $b, "item_name");
		$b++;
	}
	}
?>
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>

<link rel="stylesheet" type="text/css" href="../css/jquery.autocomplete.css" />
<script type="text/javascript" src="../jscript/jquery.autocomplete.js"></script>
<script type="text/javascript">
 $(document).ready(function(){
  $("#employee_name_text").autocomplete("employee_autocomplete.php", {
        selectFirst: true
  });
 });
</script>

<body>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<form id="form1" name="form1" method="get" action="leaveTakeWizbase.php">
  <table width="595">
    <tr>
      <td width="585" ><br>
      <?php if ($_SESSION['error']==1) { ?>
      <div class="wizard_frame">
        <table width="613" id="table_display_wizard">
                <tr>
                  <td width="253" height="45" valign="middle"><label class="label_std"><font color='red'><img src="../images/icon-error.png" width="30" height="30">&nbsp;&nbsp;&nbsp;&nbsp;An employee with the name "<?php echo $_SESSION['employee_name']?>" does not exists, please select another employee.</font></label>
        </td>
       </tr>
       </table>
       </div>
        <?php 
	// $_SESSION['comp_name'] = "";
	   } ?>

     <div class="wizard_frame">
     <table width="600"  id="table_display_wizard">
       <tr>
         <td width="183">
         
         <label class="label_std">
         
         Select employee:</label></td>
         <td width="405"><span class="wizard">
           <input name="employee_name_text" type="text" id="employee_name_text" class="text200" value="<?php echo $_SESSION['employee_name'] ?>"  "this.value='';" onclick = "this.value='';"/>
           </span></td>
       </tr>
     </table>
     </div>  <br><br><br>
<br>



      </td>
    </tr>
    <tr>
      <td><table width="675" 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" />
            </span></td>
            <td width="125"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; confirmRefresh();" value="Cancel" /></td>
            <td width="110" align="right"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; " /></td>
          </tr>
        </table></td>
    </tr>
  </table>
 </form>
<!--form validation-->
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("employee_name_text","req","Please select employee.");
</script>
<?php } else { 
    $_SESSION['denied_return'] = "hr_module/hr_main.php?date=";	?>
	<body onLoad="accessdenied(); return false">
</body>
<?php }
?>
