<head>
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
</head>
<body>
<?php 
$page_name = "HR-time recording";
include ("../navigation/access.php");


$today = date("Y-m-d");
$m = date("m");
$month = date("F");
$year = date("Y");

if (($m==1) OR ($m==3) OR ($m==5) OR ($m==7) OR ($m==8) OR ($m==10) OR ($m==12)) { $day_no = 32; }
if (($m==4) OR ($m==6) OR ($m==9) OR ($m==11) ) { $day_no = 31; }
if (($m==2) ) { $day_no = 29; }


if ($permission_num==1) {
	 
	?>
<div class="wizard_page_middle_frame">
   <div class="wizard_frame">
    
      <p>Time recording for <?php echo $month.' '.$year ?>      </p>
      <table width="470" id="table_details_display">
       
        <tr>
          <th width="55">&nbsp;</th>
          <th width="107">&nbsp;</th>
          <th width="136" align="center">&nbsp;</th>
          <th width="152" align="center">&nbsp;</th>
        </tr>
       
       <tbody>
       <?php
	   $i=1;
	   while ($i<$day_no) {
	   $day = date("l", strtotime('2015-06-'.$i));
	   $day_date = $i;
	   if (($day=='Saturday') OR ($day =='Sunday')) {
		      $day_date = '';
			  $day = '';
			  $i++;
	   }
	   ?>
        <tr>
          <td><?php echo $day_date ?></td>
          <td><?php echo $day ?></td>
          <td align="center"><a href="timeWiz0.php?day_no=<?php echo $day_no ?>"><input type="button" name="clock_in_button" id="clock_in_button" value="Clock in" class="imagebutton"></a></td>
          <td align="center"><input type="button" name="clock_out_button" id="clock_out_button" value="Clock out" class="imagebutton"></td>
        </tr>
      <?php
	  $i++;
	   }
	   ?>
      </table>
      
    </div>
        <div class="wizard_spacer_frame" style="height:130px;"></div>
      <div class="wizard_frame">
      <table width="606" height="50" align="center" id="table_button_bar">
          <tr>
            <td width="128">&nbsp;</td>
            <td width="126">&nbsp;</td>
            <td width="115"><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" />
            </span></td>
            <td width="130"><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="122" align="right"><input type="submit" name="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; " /></td>
          </tr>
        </table>
    </div>

 
</div>

<?php } else { 
    $_SESSION['denied_return'] = "hr_module/hr_main.php?date=";	?>
	<body onLoad="accessdenied(); return false">
</body>
<?php }
?>