<?php $pageno = 6; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php include('template/head.php'); ?>
	<!--DATA TABLE --> 
    <script type="text/javascript" src="<?php echo base_url(); ?>assets/data_table/js/jquery.dataTables.js"></script>
    <link href="<?php echo base_url(); ?>assets/data_table/css/demo_table_jui.css" rel="stylesheet" type="text/css"/>
    <link href="<?php echo base_url(); ?>assets/data_table/css/jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css"/>
    <!--DATA TABLE -->   
    <script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
		$('#datatables').dataTable({
			"sPaginationType":"full_numbers",
			"iDisplayLength": 100,
			"aaSorting":[[0, "asc"]],
			"bJQueryUI":true
		});
	});
    </script> 
</head>
<body>
<?php include('template/header.php'); ?> 
<div class="grid_16" id="navheader">
	<?php include('template/topnav.php'); ?>
</div>
<div class="grid_16" id="tabs">
	<div class="container">
		<ul>
			<?php if($LoginDetails[0] == 4)
			{ ?>
			<li><a href="<?php echo base_url(); ?>index.php/Administrator/logSearch/"><span>Log Details</span></a></li> 
			<?php } ?>
		</ul>
	</div>   
</div>
<div class="container_16" id="wrapper">	
    <div class="grid_16" id="content"> 
		<div class="grid_9">
			<h1 class="setting_edit">Log Details</h1>
		</div>
		<div class="grid_15" id="textcontent">
			<div id="table">
				<div id="user_profile_main_div">
					<div class="clear"></div>
					<form action="#" method="post" enctype="multipart/form-data" name="frmUsers" id="frmTransaction" >
					<table id="datatables" class="display">
						<thead>
							<tr>
								<th>Sno</th>
								<th>Update By</th>
								<th>Action</th> 
								<th>Tab</th>
								<th>Details</th>
								<th>Time</th>
							</tr>
						</thead>
						<tbody>
							<?php
							$i=0;
							foreach ($query as $row)
							{
								$i++;
								$proid  = $row->update_id;
							?>
							<tr>
								<td><?php echo $i;?></td>
								<td>
									<?php 
									$AdminName = Admin_details($row->update_by);
									echo $AdminName['name']; 
									?>
								</td>
								<td>
									<?php 
									if($row->update_type == 'S'){ echo "Created";}
									else if($row->update_type == 'E'){ echo "Updated";}
									?>
								</td>
								<td>
									<?php 
									if($row->update_tab == 'V'){ echo "On Vehicle Master";}
									else if($row->update_tab == 'P'){ echo "On Penalty";}
									else if($row->update_tab == 'R'){ echo "On Buses Monthly Charges";}
									?>
								</td>
								<td>
									<?php 
									if($row->update_tab == 'R')
									{
										echo "Buses Monthly Charges";
									}
									else
									{
										$VehicleNumber = Log_For_Vehicle($row->update_id);
										echo $VehicleNumber['vehicle_number'];
									} 
									?>
								</td>
								<td><?php echo $row->update_time; ?></td>	
							</tr>
							<?php
							}
							?>
						</tbody>
					</table>
					</form>	
				</div>
			</div>
		</div>
		<div class="clear"> </div>		
	</div>
</div>
<?php include('template/footer.php'); ?>
</body>
</html>
		