Current File : /home/inlingua/public_html/icentex/admin/backup/conveyance_retain.php
<?php
include("header.php");
// 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();

?>
<div class="clear"></div>
<?php include("left.php"); ?>
<div id="content-wrap" style="padding-top:20px;" >
  <div id="content-box" >
		<div id="toolbar-title" >
			<h3>
Conveyance Excel Report

</h3>
			
			<div class="clear"></div>
		</div>
		<div id="toolbar-box">
		  <div class="toolbar" id="toolbar"></div>
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
		
		<div id="element-box">
			<div class="m">
				<table class="adminform">
					<tbody><tr>
												<td valign="top" width="100%">
												

<br>

<?php
$month=date("m");
$year=date("Y");
//$year=2011;
?>
<script>
function validate(form) 
{	if (document.form.month.value=="All")
	{
	         if (document.form.year.value!="All")
	{
	        alert("Either Select All for both Month and Year or Select a specific Month Year.");
		document.form.month.focus(); return false;
	}
	}
	
	if (document.form.year.value=="All")
	{
	         if (document.form.month.value!="All")
	{
	        alert("Either Select All for both Month and Year or Select a specific Month Year.");
		document.form.month.focus(); return false;
	}
	}
	
	if (document.form.year.value=="All" && document.form.month.value=="All" && document.form.user.value=="All")
	{
	  
	        alert("Either Select Any Instructor");
		document.form.user.focus(); return false;
	}
	return true;
}	

	</script>
	<font style="font-size:12px; color:#E84B1E"><?php if($_SESSION['existsheet']) { echo $_SESSION['existsheet']; unset ($_SESSION['existsheet']); }?></font>
<table width="100%">

<tr><td width='15%'>
<form action="conveyance_excel_retain.php" method="post" name="form"  onsubmit=" return validate(this)">
Conveyance Report of</td>
  <td>
<select name='user'>
<option value="All">All</option>
<?php
$queryloc="select * from timesheet_user where status='Active' and (usertype='user' || usertype='FD' || usertype='Business Assets' || usertype='Administration and Accounts' || usertype='Other') order by name";
$resultloc=mysql_query($queryloc) or die(mysql_error());
while ($numloc=mysql_fetch_array($resultloc))
{
echo"<option value='".$numloc[recNo]."' ";

echo">".$numloc[name]."</option>";
}
?>
</select>
  
  </td>
  <td>
     for duration
  </td>
  
  <td><select name='month'>
<option value="All">All</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 Year 
<select name='year'>
<option value="All">All</option>
<?php

for($j=2010;$j<=2020;$j++)
{
echo"<option value='".$j."' ";
if($j==$year)
{
echo"selected";
}


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

}
?>
</select>
for Location
<select name='location'>
<option value="All">All Location</option>
<?php
$querylocation="select primarycenter  from timesheet_user where recNo='".$_SESSION['id']."'";
$resultlocation=mysql_query($querylocation) or die(mysql_error());
$numlocation=mysql_fetch_array($resultlocation);
$queryloc="select * from timesheet_location";
$resultloc=mysql_query($queryloc) or die(mysql_error());
while ($numloc=mysql_fetch_array($resultloc))
{
echo"<option value='".$numloc[location]."' ";
if($numlocation[primarycenter]==$numloc[location])
{
echo"selected";
}
echo">".$numloc[location]."</option>";
}
?>
</select>




<input type='submit' value="Report">
</form>
</td></tr>



</table>
<div id="cpanel">
				<div style="float: left;">
			<div class="icon"></div>
		</div>
				<div style="float: left;">
			<div class="icon"></div>
		</div>
				
				<div style="float: left;"></div>
			</div>
	</td>
												<td valign="top" width="45%">&nbsp;</td>
					</tr>
				</tbody></table>
			</div>
		</div>
		<div class="clear"></div>
		<p class="copyright">&nbsp;</p>
  </div>
</div>
</body></html>
<?php
//include("footer.php");
?>