<link rel="stylesheet" href="css/font.css" type="text/css" />
<?php error_reporting(0);
include("../../include/db.php");
$show = 20;
$num_links = 19;
$from = $_GET['from'];
if (empty($from))
	 {
		$from = "0";
	 } 
else 
	{
	$html_query = $html_query. "&from=$from";
	}
$sql12="select * from  shift_creation order by id DESC LIMIT $from,20"; 
$html_query = "main_fram.php?file=shift_creation";
$result=mysql_query($sql12);
$num_results=mysql_num_rows($result);

if ($num_results == 0) 
{
 $confirmation = "No Records!";
} 
elseif ($num_results == 1) 
{
$confirmation = "Found 1 Record.";
} 
else 
{
$confirmation = "Found $num_results Records.";
} 
?>


<style type="text/css">
.style1 {font-size: 16px}
</style>

<div class="container">
<div class="row-fluid">
<div class="span12">
<div class="table-responsive">
<div class="CSSTableGenerator">  
<table border="0" width="98%"  align="center" cellpadding="0" cellspacing="0" style="border:1px solid #ddd" >
<thead>
<tr>
     <th align="center" width="49"  style="border:1px solid #ddd" >S.no</th>
     <th width="264"  align="left" style="border:1px solid #ddd" > From Time</th>
     <th width="199"  align="left" style="border:1px solid #ddd" >To Time</th>
     <th width="286"  align="left" style="border:1px solid #ddd" >Shift Name</th>
     <th width="337"  align="left" style="border:1px solid #ddd" >Description</th>
    <th  width="89" style="border:1px solid #ddd" >Edit</th>
    <th  width="93" style="border:1px solid #ddd" >Delete</th>
</tr>
  <?php
include("../../include/db.php");
 $sql="select * from  shift_creation order by id DESC LIMIT $from,20 ";
    $rs=mysql_query($sql);
	$sno=0;
   while($rsdata=mysql_fetch_array($rs))
  {
   $sno=$sno+1;
   $id=$rsdata['id'];
   $from_time=$rsdata['from_time'];
   $to_time=$rsdata['to_time'];
   $shift_name=$rsdata['shift_name'];
   $description=$rsdata['description'];
 ?>
  <tr>
    <td width="49"  align="center" style="border:1px solid #ddd" ><?php echo $sno; ?></td>
    <td align="left" style="border:1px solid #ddd;" >&nbsp;&nbsp;<?php echo date('h:i a',strtotime($from_time ));?></td>
    <td align="left" style="border:1px solid #ddd;" >&nbsp;&nbsp;<?php echo date('h:i a',strtotime($to_time))?></td>
    <td align="left" style="border:1px solid #ddd;" >&nbsp;&nbsp;<?php echo $shift_name;?></td>
    <td align="left" style="border:1px solid #ddd;" >&nbsp;&nbsp;<?php echo $description;?></td>
    <td align="center" style="border:1px solid #ddd"  ><img src="img/edit.png" style="cursor:pointer"width="13" height="15" title="EDIT" onclick="javascript:add_place_creation('master_entry/shift_creation/shift_entry.php?edit_id=<?php echo $id;?>')"/></td>
    <td align="center" style="border:1px solid #ddd" ><a href="#" onClick="shift_delete('<?php echo $id;?>');"><img src="img/cross_deletes.png" alt="delete" title="DELETE" border="0" width="13px;" height="14px;" /></a>   </td>
  </tr>
  <?php } ?>
  </thead>
</table>
<table border="0" width="99%"  align="center" cellpadding="0" cellspacing="0" >

 <tr>
    <th height="19" align="left" style="font-size:12px; font-family:sans-serif; padding-top:10px;" scope="col"><?php echo $confirmation;?></th>
	<th scope="cols" width="8%" align="right"><?php  
			  if ($num_results > $show) 
			  {
			  $show;
			  include("footer_links1.php");
			  }
	?></th>
 </tr>
</table>
</div>
</div>
</div>
</div>