
<?php 
$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++;
	}
	}
?>
<!--style sheets-->
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<link href="../css/wait.css" rel="stylesheet" type="text/css">



</head>

<body onLoad="MM_showHideLayers('wait','','hide')" onFocus="MM_showHideLayers('wait','','hide');">
<?php
$page_name = "HR-discipline";
include ("../navigation/access.php");

if ($permission_num==1) {
	 include('../include/wait.php') 
?>

<div class="wizard_page_middle_frame">
<form id="form1" name="form1" method="get" action="warningWizbase.php">
  <div class="wizard_frame"> 
     <div class="lay_out_frame_medium" style="width:250px;">
       <label class="label_std">Select type of warning</label>
        <label>&nbsp;&nbsp;<label class="star">*</label>
          <br>
          <input type="radio" name="warning_radio_group" value="Verbal warning" id="warning_radio_group_3" <?php if ($_SESSION['warning']=="Verbal warning") { ?> checked="checked" <?php } ?> >
          Verbal warning</label>
        <br>
        <label>
          <input type="radio" name="warning_radio_group" value="Written warning" id="warning_radio_group_4" <?php if ($_SESSION['warning']=="Written warning") { ?> checked="checked" <?php } ?>>
          Written warning</label>
        <br>
        <label>
          <input type="radio" name="warning_radio_group" value="Final warning" id="warning_radio_group_5" <?php if ($_SESSION['warning']=="Final warning") { ?> checked="checked" <?php } ?>>
          Final warning</label>
        <br>
      </div>
       <div class="lay_out_frame_medium" style="width:250px;">
          <label class="label_std">Select the offence</label>
        &nbsp;&nbsp;<label class="star">*</label>
          <br><br>
          <select name="offence_select" class="select200"  >
            <option value="<?php echo $_SESSION['offence'] ?>" selected="selected"><?php echo $_SESSION['offence'] ?></option>
            <?php
        	for ($j = 0; $j < count($arrId1); $j++) {
    		echo "<option value=" . "\"" . $arrId1[$j] . "\"" . ">" . $arrName1[$j] . "</option>";
	}
?>
          </select>
          <br>
          
          <br>
          </div>
       </div>  
 <div class="wizard_spacer_frame" style="height:120px;"></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">
              <input name="p" type="hidden" id="p" value="2" />
              <input name="error" type="hidden" id="error" value="0" />
              <input name="s" type="hidden" id="s" value="2" />
           </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'); 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>
<!--form validation-->
<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("warning_radio_group","selone","- type of warning.");
  frmvalidator.addValidation("offence_select","req","- offence for this warning.");
  </script>
<?php } else { 
    $_SESSION['denied_return'] = "hr_module/hr_main.php?date=";	?>
	<body onLoad="accessdenied(); return false">
</body>
<?php }
?>