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


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

</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="form1" name="form1" method="get" action="warningWizbase.php">
  <div class="wizard_frame"> 
     <table width="600" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td width="288"><div class="standard_frame">
       <label class="label_std">Select type of warning</label>
        <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></td>
         <td width="312"> <div class="standard_frame">
          <label class="label_std">Select the offence</label>
        <br>
          <br>
          <select name="offence_select" class="select160"  >
            <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>
          </td>
       </tr>
     </table>
     </div>  
 <div class="wizard_spacer_frame" style="height:150px;"></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'); 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","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/hr_main.php?date=";	?>
	<body onLoad="accessdenied(); return false">
</body>
<?php }
?>