<?php $pageno = 4; ?>
<!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'); ?>
	<script type="text/javascript">
	function ValidateForm(){
		var year=document.forms["frmUsers"]["year"].value;
		if (year==null || year=="")
			{
				alert("Please Enter Year");
				return false;
			}
		var month=document.forms["frmUsers"]["month"].value;
		if (month==null || month=="")
			{
				alert("Please Enter Month");
				return false;
			}
		var monthly_round=document.forms["frmUsers"]["monthly_round"].value;
		if (monthly_round==null || monthly_round=="")
			{
				alert("Please Enter Number Of Round");
				return false;
			}
		if(!validateNumeric(monthly_round)){
				alert("Enter a numeric value");
				return false;
			}
		
		function validateNumeric(numValue){
		if (!numValue.toString().match(/^[-]?\d*\.?\d*$/)) 
				return false;
		return 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</h1>
		</div>
		<div class="grid_15" id="textcontent">
			<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>
					<div style="margin: 0 auto;width: 47%;">
						<form action="<?php echo base_url(); ?>index.php/Administrator/BusRoundProcess" method="post" enctype="multipart/form-data" name="frmUsers" id="frmTransaction" onSubmit="return ValidateForm()">
							<fieldset class="topleft">
								<legend class="legend">Buses Monthly Round</legend>
								</br></br></br></br>
								<div  class="change_pwd_container_user_list">
									<label style="float: left;">Year<span style="color:red;">*</span></label>
									<input type="text"  class="smallInput medium" name="year" value="<?php echo $query['year']; ?>">
									<input type="hidden"  class="smallInput medium" name="Id" value="<?php echo $query['id']; ?>">
								</div>
								<div  class="change_pwd_container_user_list">
									<label style="float: left;">Notify when<span style="color:red;">*</span></label>
									<?php $month = $query['month']; ?>
									<select name="month" class="smallInput medium" style="width:264px;">
										<option value="01" <?PHP if($month==01) echo "selected";?>>January</option>
										<option value="02" <?PHP if($month==02) echo "selected";?>>February</option>
										<option value="03" <?PHP if($month==03) echo "selected";?>>March</option>
										<option value="04" <?PHP if($month==04) echo "selected";?>>April</option>
										<option value="05" <?PHP if($month==05) echo "selected";?>>May</option>
										<option value="06" <?PHP if($month==06) echo "selected";?>>June</option>
										<option value="07" <?PHP if($month==07) echo "selected";?>>July</option>
										<option value="08" <?PHP if($month==08) echo "selected";?>>August</option>
										<option value="09" <?PHP if($month==09) echo "selected";?>>September</option>
										<option value="10" <?PHP if($month==10) echo "selected";?>>October</option>
										<option value="11" <?PHP if($month==11) echo "selected";?>>November</option>
										<option value="12" <?PHP if($month==12) echo "selected";?>>December</option>
									</select>
								</div>
								<div  class="change_pwd_container_user_list">
									<label style="float: left;">Number Of Round<span style="color:red;">*</span></label>
									<input type="text"  class="smallInput medium" name="monthly_round" value="<?php echo $query['round']; ?>">
								</div>
							</fieldset>
							<div class="clear"></div>
							<div style="width:100%;float:left;">
								<span class="button" style="float: left;"><input type="submit" class="buttoncc" value="Update" name="btnPenaltyUpdate"></span>
								<a href="<?php echo base_url(); ?>index.php/Administrator/BusRoundList" class="button" style=";margin-left: 5px;float: left;"><span>Back</span></a>
								<p style="float:right;"><font color="Red">Fields marked with * are mandatory&nbsp;</font></p>
							</div>
						</form>	
					</div>
				</div>
			</div>
		</div>
		<div class="clear"> </div>		
	</div>
</div>
<?php include('template/footer.php'); ?>
</body>
</html>