<?php 
$PageSecurity = 15;
include('includes/SQL_CommonFunctions.inc');
include('includes/session.inc');
//echo $_REQUEST['shift']."<br>";
$ID=$_REQUEST['ID'];
//echo $_REQUEST['branch'];

$sql=DB_query("select * from shift_master where site='".$_REQUEST['branch']."' and shift_for='Worker' and shift_category='".$_REQUEST['shift']."' ",$db);
$myrow=DB_fetch_array($sql);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="border:0;">
	<tr>
	  <td><input name="shift_start[<?php echo $ID;?>]" type="text" id="shift_start_<?php echo $ID;?>" value="<?php echo $myrow['shift_start'];?>" size="5" style="width:50%; float:left; margin-right:3px;" />
	  <select name="shiftstart_AMPM[<?php echo $ID;?>]" id="shiftstart_AMPM_<?php echo $ID;?>" style="width:40%; float:left;">
	  <option value="AM"<?php echo ($myrow['start_AMPM']=='AM'?'selected':'')?>>AM</option>
	  <option value="PM"<?php echo ($myrow['start_AMPM']=='PM'?'selected':'')?>>PM</option>
	  </select>
	  </td>
   	  <td><input name="shift_end[<?php echo $ID;?>]" type="text" id="shift_end_<?php echo $ID;?>" value="<?php echo $myrow['shift_end'];?>" size="5" style="width:50%; float:left; margin-right:3px;" />
   <select name="shiftend_AMPM[<?php echo $ID;?>]" id="shiftend_AMPM_<?php echo $ID;?>" style="width:40%; float:left;">
	  <option value="AM"<?php echo ($myrow['end_AMPM']=='AM'?'selected':'')?>>AM</option>
	  <option value="PM"<?php echo ($myrow['end_AMPM']=='PM'?'selected':'')?>>PM</option>
	  </select>
   </td>
   </tr>
   </table>