<head>
<?php 

$table_name = $_SESSION['db_prefix']."_list_names";
    $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++;
	}
	}

require_once('../include/tc_calendar.php');
$exp_date = strtotime($_SESSION['exp_date']);
$d = date("d", $exp_date );
$m = date("m", $exp_date );
$y = date("Y", $exp_date );

?>
<script language="javascript" src="../jscript/calendar.js"></script>
</head>
<?php include('../include/wait.php') ?>
<link href="../css/wait.css" rel="stylesheet" type="text/css">
<body onLoad="MM_showHideLayers('wait','','hide')" onFocus="MM_showHideLayers('wait','','hide');">


<div class="page_middle_frame">
<form id="feedbackform" method="get"  >
     <div class="wizard_frame">
            
            <table width="612" id="table_display_wizard">
              <tr>
                <td width="108" valign="top">Warning:&nbsp;&nbsp;<label class="star">*</label></td>
                <td width="492" valign="top"><textarea name="warning_text" cols="70" rows="5" class="text_box" id="warning_text"><?php echo $_SESSION['warning_text'] ?> </textarea></td>
              </tr>
            </table>
          </div>
          <div class="wizard_frame">
              <table width="613" height="98" id="table_display_wizard">
                <tr>
                  <td width="166" height="45" valign="middle"><label class="label_std">Expiry Date of warning:</label>
&nbsp;&nbsp;
</td>
                  <td width="435" valign="middle"><?php 
				  //instantiate class and set properties
		$myCalendar = new tc_calendar("exp_date", true);
		$myCalendar->setIcon("../images/iconCalendar.gif");
		$myCalendar->setDate($d, $m, $y);
		$myCalendar->setYearInterval(2010, 2020);
		//output the calendar
		$myCalendar->writeScript();
?></td>
                  </tr>
                <tr>
                  <td height="45" valign="middle">Issued by:</td>
                  <td valign="middle"><select name="issued_select" class="select120"  >
                    <option value="<?php echo $_SESSION['issued_by'] ?>" selected="selected"><?php echo $_SESSION['issued_by'] ?></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_frame">
              <table width="640" height="50" align="center" id="table_button_bar">
                <tr>
                  <td width="117"><input type="button" name="lastprev_button" class="imagebutton" value="Prev" onclick="needToConfirm = false;MM_goToURL('parent','warningWizbase.php?s=&amp;p=2');return document.MM_returnValue; MM_showHideLayers('wait','','show');" /></td>
                  <td width="115">&nbsp;</td>
                  <td width="99">
                    <input name="s" type="hidden" id="s" value="3" />
                    <input name="p" type="hidden" id="p" value="3" />
                  </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'); MM_showHideLayers('wait','','show');" value="Cancel" /></td>
                  <td width="110" align="right"><input type="submit" name="next_button" class="imagebutton" value="Next" onclick="needToConfirm = false; MM_showHideLayers('wait','','show');" /></td>
                </tr>
              </table>
              </div>
  </form>
  </div>
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("feedbackform");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("warning_text","req","Please enter text for the warning.");
  frmvalidator.addValidation("issued_select","req","Please select the issuer.");
    
</script>

</body>    


