Current File : /home/inlingua/public_html/dwarka/icentex/conveyance/corporate_conveyance.php
<?php
include("header_conveyance.php");
?>
<?php
$month=date("m");
$year=date("Y");
//$year=2011;
// Include the database connection details
require('../dbConnection.php');

// Include common functions
require('../commonFunc.php');

// Include common functions
require('../globalVars.php');

// Include the table handler class
require('../dbHandler.class.php');

// Init and connect to database
$dbObject = new dbHandler();
$dbObject->connect();
?>
<h3>&nbsp;&nbsp;&nbsp;Add New Corporate Conveyance</h3>
<script>
function validate(form) 
{	if (document.form.month.value=="")
	{	alert("Please Select month.");
		document.form.month.focus(); return false;
	}
	if (document.form.year.value=="")
	{	alert("Please Select Year.");
		document.form.year.focus(); return false;
	}
	if (document.form.location.value=="")
	{	alert("Please Select Location.");
		document.form.location.focus(); return false;
	}
	return true;
}	

function validate1(form) 
{	if (document.form1.month.value=="")
	{	alert("Please Select month.");
		document.form1.month.focus(); return false;
	}
	if (document.form1.year.value=="")
	{	alert("Please Select Year.");
		document.form1.year.focus(); return false;
	}
	if (document.form1.location.value=="")
	{	alert("Please Select Location.");
		document.form1.location.focus(); return false;
	}
	return true;
}
	</script>
	<font style="font-size:12px; color:#E84B1E"><?php if($_SESSION['existsheet1']) { echo $_SESSION['existsheet1']; unset ($_SESSION['existsheet1']); }?></font>
	<?php
	$queryKms="Select * from  ingl_conveyance_home_kms where  user_recNo='".$_SESSION['id']."'";
$resultKms=mysqli_query($conn,$queryKms);
$numKms=mysqli_fetch_array($resultKms);
$countKms=mysqli_num_rows($resultKms);

if($countKms>0)
{
?>
	
<table width="100%">

<tr><td width='23%'>
<form action="ingl_corporate_conveyance_main.main.php" method="post" name="form"  onsubmit=" return validate(this)">
Enter Conveyance for </td><td> <select name='month'>
<option value="">Select Month</option>
<option value="01" <?php if($month=='01') echo"selected"; ?>>Jan</option>
<option value="02" <?php if($month=='02') echo"selected"; ?>>Feb</option>
<option value="03" <?php if($month=='03') echo"selected"; ?>>Mar</option>
<option value="04" <?php if($month=='04') echo"selected"; ?>>Apr</option>
<option value="05" <?php if($month=='05') echo"selected"; ?>>May</option>
<option value="06" <?php if($month=='06') echo"selected"; ?>>Jun</option>
<option value="07" <?php if($month=='07') echo"selected"; ?>>Jul</option>
<option value="08" <?php if($month=='08') echo"selected"; ?>>Aug</option>
<option value="09" <?php if($month=='09') echo"selected"; ?>>Sep</option>
<option value="10" <?php if($month=='10') echo"selected"; ?>>Oct</option>
<option value="11" <?php if($month=='11') echo"selected"; ?>>Nov</option>
<option value="12" <?php if($month=='12') echo"selected"; ?>>Dec</option>
</select>

of  
<select name='year'>
<?php
$newyear=date("Y");
for($j=2010;$j<=$newyear;$j++)
{
echo"<option value='".$j."' ";
if($j==$year)
{
echo"selected";
}


echo">".$j."</option>";

}
?>
</select>


<input type='hidden' name='half' value="1">
<input type='submit' class="submit1" value=" Next ">
</form>
</td></tr>


</table>
<?php
}
else
{
echo"Your Kms from your home to centers are not defined.Please contact Administartor.";
}
?>
<?php
include("footer_conveyance.php");
?>