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

if ($permission_num==1) {
	 

$table_name2 = $_SESSION['db_prefix']."_employee";
$employee_query = "SELECT emp_id, emp_first_name, emp_last_name FROM $table_name2 ORDER BY emp_first_name ASC";
	$employee_result = execsql($employee_query);
	$employee_num = mysql_num_rows($employee_result);
	$v = 0;
	$arrId1 = array ();
	$arrName1 = array ();
	while ($v < $employee_num) {
		$arrId1[$v] = mysql_result($employee_result, $v, "emp_id");
		$arrName1[$v] = mysql_result($employee_result, $v, "emp_first_name")." ".mysql_result($employee_result, $v, "emp_last_name");
		$v++;
	}

?>

<body>
<div class="wizard_page_middle_frame">
<form id="form1" name="form1" method="get" action="returnFromWizbase.php">
   <?php if ($_SESSION['error']==1) { ?>
      <div class="wizard_frame"></div>
        <?php 
	 $_SESSION['employee_name'] = "";
	   } ?>

     <div class="wizard_frame">
     <table width="600"  id="table_display_wizard">
       <tr>
         <td width="151">
         
         <label class="label_std">
         
         Select to return from:</label></td>
         <td width="449"><select name="employee_select" id="employee_select" class="select200" >
           <option selected> </option>
           <?php
    	for ($j = 0; $j < count($arrId1); $j++) {
		echo "<option value=" . "\"" . $arrId1[$j] . "\"" . ">" . $arrName1[$j] . "</option>";
		}
     ?>
         </select></td>
       </tr>
     </table>
     </div>  
<div class="wizard_spacer_frame" style="height:230px;"></div>

    
      <div class="wizard_frame"><table width="640" 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>
 </form>
 </div>
<!--form validation-->
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("warning_radio_group","selone","Please select type of warning.");
  frmvalidator.addValidation("offence_select","req","Please select the offence for this warning.");
  </script>
<?php } else { 
    $_SESSION['denied_return'] = "hr_module/employee_list.php";	?>
	<body onLoad="accessdenied(); return false">
</body>
<?php }
?>
