Current File : /home/inlingua/www/noida/icentex_noida/pg-2APR/invoice_report.php
<?php
include("header_in.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 id="content-wrap" >
  <div id="content-box" >
		<div id="toolbar-title" >
			<h3>
Feesd Reports 

</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 type="text/javascript" src="js/student.js"></script>
<script>
function validate(form) 
{	if (document.form.startdate.value=="")
	{	alert("Please Select Start Date.");
		document.form.startdate.focus(); return false;
	}
	if (document.form.enddate.value=="")
	{	alert("Please Select end Date.");
		document.form.enddate.focus(); return false;
	}
	if (document.form.location.value=="")
	{	alert("Please Select Location.");
		document.form.location.focus(); return false;
	}
	return true;
}	

	</script>

        
<script language="javascript">
$(function() {
		$('#datepicker3').datepicker({
			changeMonth: true,
			changeYear: true
		});
	});
	$(function() {
		$('#datepicker4').datepicker({
			changeMonth: true,
			changeYear: true
		});
	});
</script>
	<font style="font-size:12px; color:#E84B1E"><?php if($_SESSION['existsheet']) { echo $_SESSION['existsheet']; unset ($_SESSION['existsheet']); }?></font>
<form action="invoice_report_result.php" method="post" name="form"  onsubmit=" return validate(this)">
<table width="100%">
<tr valign='top'><td>Start date : <input type='text' name='startdate' value="<?php echo $dbObject->getDbField('startdate');?>" size='12' maxlength='10' id="datepicker3">
&nbsp;&nbsp;From date: <input type='text' name='enddate' value="<?php echo $dbObject->getDbField('enddate');?>" size='12' maxlength='10' id="datepicker4">
</td></tr>

<tr>
  <td>Location: <select name='location'>

<?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 where status='1' && location='".$_SESSION['branch']."' order by 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>
</td>
</tr>
<tr>
  <td>Category: <?php
		$prodcat= new dbHandler();
                $prodcat->connect();
                $query_prodcat="select recNo,bill_category from ingl_billing_cat order by bill_category";
		
                $result_prodcat=$prodcat->select($query_prodcat);
		$prodcat_array=array();
		
		while($data_prodcat=$prodcat->SelectNext($result_prodcat)){
			  $prodcat_array[''.$data_prodcat[recNo].'']=$data_prodcat['bill_category'];
			}
			  
			$prodcat_selected=$numP['category_id'];
			$prodcat_extra='id="target" style="width:130px;" onchange="displaymain(this.value,\'prodcat1\');"';
			  
			echo select_drop($prodcat_array,'category[]','--  Select Category  --',0,$prodcat_selected,$prodcat_extra);
			  //print_r($customer_array);
			  
			  
?> </td></tr>
  <tr>
  <td>Product: <span id='prodcat1'><?php
  $subprodcat_array=array();
				$subprodcat_selected="";
				$subprodcat_extra='id="target" style="width:130px;"';  
  echo select_drop($subprodcat_array,'product[]','--  Select Product  --',0,$subprodcat_selected,$subprodcat_extra); ?></span></td></tr>
</tr>

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


</table>
</form>

<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>

<?php
include("footer_in.php");
?>