

<head>
<?php 
require_once('../include/tc_calendar.php');
$edit_date = strtotime($_SESSION['edit_date']);
$d1 = date("d", $edit_date ) ;
$m1 = date("m", $edit_date ) ;
$y1 = date("Y", $edit_date ) ;

$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++;
	}
?>

<script language="javascript" src="../jscript/calendar.js"></script>
</head>

<body>
<div class="page_middle_frame">
<form id="form1" method="get" action="editWizbase.php">

  <table id="tableMain" width="595">
    <!--begin of tableMain-->
    <tr>
      <td><!--center of tableMain-->
        <table width="595" border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
          <tr>
            <td width="525" valign="top" >
            
            <?php 
              if ($_SESSION['first_choice']=="employee") { ?>
               <div class="wizard_frame">
                <label class="label_std"> Type the name of the employee to edit: &nbsp;&nbsp;</label>
                <select name="employee_select" id="employee_select" class="select200" >
                  <option value="" ></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>
               </div>
                <?php ; } ?>
              <?php 
              if ($_SESSION['first_choice']=="time") { ?>
              <div class="wizard_frame">&nbsp;&nbsp;
                <table width="670" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <td width="226"><label class="label_std">Select date to edit the time keeping: </label></td>
                  <td><?php 
				  //instantiate class and set properties
		$myCalendar = new tc_calendar("edit_date", true);
		$myCalendar->setIcon("../images/iconCalendar.gif");
		$myCalendar->setDate($d1, $m1, $y1);
		$myCalendar->setYearInterval(2010, 2020);
		//output the calendar
		$myCalendar->writeScript();
?> </td>
                  </tr>
              </table>
              </div>   
             
            <br />
            
            <?php ;} ?>
            </td>
            <!--center of tableMain-->
          </tr>
          <tr>
            <td><!--center of tableMain-->
            <div class="wizard_frame">
              <table width="675" height="50" align="center" id="table_button_bar">
                <tr>
                  <td width="117"><input type="submit" name="prev_button" id="prev_button" class="imagebutton" value="Prev" onClick=" needToConfirm = false; " /></td>
                  <td width="115">&nbsp;</td>
                  <td width="99">
                    <input name="p" type="hidden" id="p" value="2" />
                    <input name="s" type="hidden" id="s" value="2" />
                  </td>
                  <td width="125" align="right"><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></td>
          </tr>
        </table>
  </table>
  <!--end of tableMain-->
</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>