<?php 	include_once('../../config.php');   	
		include_once(ABS_PATH.'/admin/login_check.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: {del_city_names: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>Bazzar  </h3></div>
					
					<!--div align="right">  <input type="button"    class="btn btn-warning" name="btnback" id="btnback" value=" Add New User " onClick="javascript:location.href='add_new.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>Name</th>  	  
								<th>Days Id</th> 
								<th>Open Time</th> 
								<th>Close Time </th> 
								<!--th>Todays Result </th--> 
								<th>Action</th> 
							</tr>
						</thead>
						<tbody>
							<?php
								  $result = mysql_query("select * from  Bazzar where is_active=1  order by priority ");
								  $sr=1; 
								  $datepicker = date("d-M-Y");
								  while($row = mysql_fetch_object($result))
								  { 
                            								      
                                        $datepicker = date("d-M-Y");
                            			$todayRes="";
										
										$bazzarIdData = mysql_fetch_object(mysql_query("select * from live_result where bazzarId = $row->id"));
								        
							?>
							<tr class="odd gradeX">
								<td><?php echo $sr++;?> </td>
								<td><?php echo $row->name;?>  </td>
								<td><?php echo $row->dys;?>  </td>
								<td><?php echo $bazzarIdData->open_time;?>  </td>
								<td><?php echo $bazzarIdData->close_time;?>  </td>   
								<!--td> <?php echo $todayRes;//$SingleOpenAnk->BidNo;?></td-->   
								<td><a href="edit.php?id=<?php echo $row->id;?>">  Update </a> / <a href="view_pdf.php?id=<?php echo $row->id;?>" target="_blank">View PDF</a></td> 
							</tr>  
							<?php } ?>
						</tbody>
					</table>
  				</div>
  			</div>



		  </div>
		</div>
    </div>

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