<?php 	include_once('../../config.php');
		 
?>  
<?php  include ABS_PATH.'/admin/header.php';	?>  

<script>
function del_record(val)
{

	var r = confirm("Do you really want to delete record !");
	if (r == true) {    
	$.ajax({
	type: 'POST',
	url: "../ajax/default.php",
	//async: false,			 
	data: {delLive:1,val:val},	  
	success: function(ajaxresult){	     
		location.reload();	 	
	},
	error: function(XMLHttpRequest, textStatus, errorThrown) { 
	alert('Error');
	}
	});
	
	}	
	
}

</script> 

		<div class="col-md-10">  
  			<div class="content-box-large">
  				<div class="panel-heading">
					<div class="panel-title"><h3> Star Line</h3></div>
					
					<!--div align="right">  <input type="button"    class="btn btn-warning" name="btnback" id="btnback" value=" Add New Result " onClick="javascript:location.href='add.php';" />
					</div--> 
					
				</div>
				
  				<div class="panel-body">
  					<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
						<thead>
							<tr>
								<th>Sr</th>  
								<th>Time</th>
								<th>Value</th>  
								<th>Date</th>  
								<th>Action</th> 
								 
							</tr>
						</thead>
						<tbody>
							<?php 
								  $Tdate = date("Y-m-d");      
								  $CtR =  mysql_num_rows(mysql_query("select * from starline  where  Tdate = '$Tdate' "));   
								  if($CtR < 1)
								  {   								
									mysql_query("insert into starline (StarTime,Result,Tdate) values('01:35PM','xxx','$Tdate')  ");									
									mysql_query("insert into starline (StarTime,Result,Tdate) values('02:35PM','xxx','$Tdate')  ");									
									mysql_query("insert into starline (StarTime,Result,Tdate) values('03:35PM','xxx','$Tdate')  ");									
									mysql_query("insert into starline (StarTime,Result,Tdate) values('04:35PM','xxx','$Tdate')  ");									
									mysql_query("insert into starline (StarTime,Result,Tdate) values('05:35PM','xxx','$Tdate')  ");	 
								  }  
								  
								  $result = mysql_query("select * from starline  where  Tdate  = '$Tdate' order by id");
								  $sr=1;
								  while($row = mysql_fetch_object($result))
								  {
							?>
							<tr class="odd gradeX">
								<td><?php echo $sr++;?> </td> 
								
								<td><?php echo  $row->StarTime;?> </td>
								<td><?php echo  $row->Result;?> </td> 
								<td><?php echo  date("d-M-Y");?> </td> 
								<td class="center" ><a   href="ediStart.php?id=<?php echo $row->id;?>&ids=<?php echo $_REQUEST['id'];?>"> <img src="<?php echo ADMINPATH;?>/images/edit_detail.jpg" title="Edit Record"/></a></td> 
							</tr>  
							<?php } ?>
						</tbody>
					</table>
  				</div>
  			</div> 


		  </div>
		</div>
    </div>  
<?php  include ABS_PATH.'/admin/footer.php';	?>    