<!--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 
$table_name = $_SESSION['db_prefix']."_time_record";
$resetQuery = "UPDATE $table_name SET checked = '". 1 ."' WHERE  date = '". $_SESSION['out_date']." '  ";
$resetResult = mySQL_query($resetQuery);

$table_name = $_SESSION['db_prefix']."_time_record";
$unknownQuery = "UPDATE $table_name SET status_2 = 'U', checked = '2' WHERE  date = '". $_SESSION['out_date']." ' AND status='U' ";
$unknownResult = mySQL_query($unknownQuery);

$table_name = $_SESSION['db_prefix']."_time_record";
$absentQuery = "UPDATE $table_name SET status_2 = 'A', checked = '2'  WHERE  date = '". $_SESSION['out_date']." ' AND status='A' ";
$absentResult = mySQL_query($absentQuery);

$table_name = $_SESSION['db_prefix']."_time_record";
$sickQuery = "UPDATE $table_name SET status_2 = 'S', checked = '2'  WHERE  date = '". $_SESSION['out_date']." ' AND status='S' ";
$sickResult = mySQL_query($sickQuery);


$table_name = $_SESSION['db_prefix']."_time_record";
$count_query = "SELECT emp_id FROM $table_name WHERE date = '".$_SESSION['out_date']."' AND (status='P' OR status='L') AND status_2='' ";
$count_result = mySQL_query($count_query);
$count_num = mysql_num_rows($count_result);

?>


</head>

<body>

<div class="page_middle_frame"> 
<form id="feedbackform" method="get" action="timeOutWizbase.php">
  
      <div class="wizard_frame">
        <br>
        <table width="600" border="0" cellspacing="0" cellpadding="0">
            <tr>
                  <td width="67"><img src="../images/Info.png" width="32" height="32"></td>
                  <td width="533"><label class="label_std"><?php echo $count_num ?> employees need to be clocked out on <?php echo date("l, d-m-Y", strtotime($_SESSION['out_date'] )) ?>.<br>
                    <br>
                  To begin recording clock-out times, click <strong>Next</strong></label></td>
            </tr>
          </table>
          </div>    
              <br><br>
            <br />
<div class="lay_out_frame_small" style="border:hidden;">
<br>
<br>
<br>
<br><br>
<br>
<br><br>
<br>


</div>
            <div class="wizard_frame">
              <table width="675" 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="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>
             
 
</form>
 </div>
	
    </body>