<?php $pageno = 4; error_reporting(0); ?>
<!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'); ?>
	<link rel="stylesheet" href="<?php echo base_url(); ?>assets/datepicker/jquery-ui.css" />
	<!--<script src="<?php echo base_url(); ?>assets/datepicker/jquery-1.9.1.js"></script>-->
	<script src="<?php echo base_url(); ?>assets/datepicker/jquery-ui.js"></script>
	<script type="text/javascript">
	$(function() {
		$( "#datepicker" ).datepicker({ dateFormat: "yy-mm-dd" }).val();
		$( "#datepicker1" ).datepicker({ dateFormat: "yy-mm-dd" }).val();
	});
	</script>
	<!--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>
			<li><a href="<?php echo base_url(); ?>index.php/Administrator/Billing/" ><span>Billing Details</span></a></li> 
			<li><a href="<?php echo base_url(); ?>index.php/Administrator/PenaltyList/"><span>Penalties</span></a></li>
			<li><a href="<?php echo base_url(); ?>index.php/Administrator/BusRoundList/" class="current"><span>Buses Monthly Round Details</span></a></li>
		</ul>
	</div>   
</div>
<div class="container_16" id="wrapper">	
    <div class="grid_16" id="content"> 
		<div class="grid_9">
			<h1 class="news_edit">Buses Monthly Round Details</h1>
		</div>
		<div class="grid_15" id="textcontent">
			<table style="float: right;">
				<tr> 			
					<td align="right" colspan="9">
						<a href="<?php echo base_url(); ?>index.php/Administrator/AddBusRound/" class="button" style="float:left;margin-top: -5px;margin-left: 5px;"><span>Add Monthly Round Details</span></a>
					</td>
				</tr>
			</table>
			<div id="table">
				<div id="user_profile_main_div">
					<div id="message">
					<?php 
					if($this->session->flashdata('flsh_msg')) {
						?><p id="success" class="info"><span class="info_inner"><?php echo $this->session->flashdata('flsh_msg'); ?></span></p> <?php
					} 
					if($this->session->flashdata('flsh_msg1')) {
						?><p id="error" class="info"><span class="info_inner"><?php echo $this->session->flashdata('flsh_msg1'); ?></span></p> <?php
					} 
					?>
					</div>
					<div class="clear"></div>
					<table id="datatables" class="display">
						<thead>
							<tr>
								<th>S.No.</th>
								<th>Year</th>
								<th>Month</th>
								<th>Round</th>
								<th></th>
							</tr>
						</thead>
						<tbody>
							<?php
							$i=0;
							foreach ($result as $row)
							{
								$i++;
								$Id = $row->id;
							?>
							<tr>
								<td><?php echo $i;?></td>
								<td><?php  echo $row->year;?></td>
								<td>
									<?php
										if($row->month==01) echo "January";
										if($row->month==02) echo "February";
										if($row->month==03) echo "March";
										if($row->month==04) echo "April";
										if($row->month==05) echo "May";
										if($row->month==06) echo "June";
										if($row->month==07) echo "July";
										if($row->month==08) echo "August";
										if($row->month==09) echo "September";
										if($row->month==10) echo "October";
										if($row->month==11) echo "November";
										if($row->month==12) echo "December";
									?>
								</td>
								<td><?php  echo $row->round;?></td>
								<td><a class="edit_icon" title="Edit" href="<?php echo base_url(); ?>index.php/Administrator/EditBusRound/<?php echo $Id; ?>"></a></td>
							</tr>
							<?php
							}
							?>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<div class="clear"> </div>		
	</div>
</div>
<?php include('template/footer.php'); ?>
</body>
</html>