Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/istore/
Upload File :
Current File : /var/www/html/mmishra/istore/home.inc

<?php
$indentno = $_REQUEST["indent_no"];
$user = $_SESSION['loginID'];

if ($indentno) {
	$rs = mysql_query("select * from indents where indent_no=$indentno");
	if (mysql_num_rows($rs)) {
		$o = mysql_fetch_object($rs);
		echo "<h3 align='left'>Requisition Form</h3>
    	<center>
		<table width='90%' border='0' height='60pt' style='border-collapse: collapse' bgcolor='white'>
		<tr><th>Indent No.: $o->indent_no</a></th><th>Indentor: ".employee_detail($o->emp_no)."</th>
		<th>Location: $o->location</th><th>Dated: $o->date_indent</th></tr>
		<tr><td>Account: $o->account</td><td>Purpose: $o->purpose</td><td>Recommendor: $o->recommendation</td>
		<th>Status: $o->status</th></tr>
 	       	</table>
	
        	<table width='90%' border='1' style='border-collapse: collapse' bgcolor='white'>
	        <tr height='30pt'><th width='5%'>Sr.</th><th width='55%'>Particulars</th><th width='10%'>Qty Demand</th>
		<th width='10%'>Qty Approve</th><th width='10%'>Qty Out</th><th>Approx Cost</th></tr>";

        	$sr = mysql_query("select * from indent_items where indent_no=$o->indent_no order by item");
        	while ($q = mysql_fetch_object($sr)) {
                	$i++;
                	echo "<tr><td>$i</td><td>".item_detail($q->item)."</td><td>$q->qty_demand $q->unit</td>
                	<td>$q->qty_approve $q->unit</td><td>$q->qty_out $q->unit</td><td>$q->approx_cost</td></tr>";
        	}
        	echo "</table>";
	}
} else if ($user) {
	echo "<h3 align='left'>Requisition Summary</h3>
	<center>
	<table width='90%' border='1' style='border-collapse: collapse' bgcolor='white'>
	<tr><th>Sr.</th><th>Indent No.</th><th>Dated</th><th>Indentor</th><th>Account</th><th>Account Summary</th></tr>";

	$rs = mysql_query("select * from indents where emp_no=(select emp_no from employees where email='$user@iiita.ac.in') order by date_indent desc");
	while ($o = mysql_fetch_object($rs)) {
		$i++;
		$j = 0;
		echo "<tr><td>$i</td><th><a href='?pg=$pg&indent_no=$o->indent_no'>$o->indent_no</a></th>
		<td>$o->date_indent</td><td>".employee_detail($o->emp_no)."<br>Recommendor: $o->recommendation</td>
		<td>$o->account<br><br>[ $o->status ]</td><td>
		<table width='100%' border='1' style='border-collapse: collapse' bgcolor='white'>
		<tr><th width='5%'>Sr.</th><th width='55%'>Particulars</th><th width='10%'>Demand Qty</th>
		<th width='10%'>Approve Qty</th><th width='10%'>Out Qty</th><th>Approx Cost</th></tr>";

		$sr = mysql_query("select * from indent_items where indent_no=$o->indent_no order by item");
		while ($q = mysql_fetch_object($sr)) {
			$j++;
			echo "<tr><td>$j</td><td>".item_detail($q->item)."</td><td>$q->qty_demand $q->unit</td>
			<td>$q->qty_approve $q->unit</td><td>$q->qty_out $q->unit</td><td>$q->approx_cost</td></tr>";
		}	
		echo "</table>
		</td></tr>";
	}
	echo "</table>";
} else {
	echo "<h3 align='left'>Welcome to Store & Purchase portal</h3>
	<center>Please login to access the portal services.";
/*
	echo "<h2 align='left'>Inventory Items</h2>
	Central Store provides these items on eligible demand after due recommendation and approval.
	<table width='90%' border='1' style='border-collapse: collapse' bgcolor='white'>
	<tr><th>Sr.</th><th>Category</th><th>Subcategory</th><th>Code</th><th>Description</th><th>Head</th></tr>";

	$rs = mysql_query("select i.code,i.description,c.code as cat,s.code as subcat,s.item_type as head from st_items as i, st_category as c, st_subcategory as s where i.category=c.id and i.subcategory=s.id order by c.code,s.code,i.code");
	while ($o = mysql_fetch_object($rs)) {
		$i++;
		echo "<tr><td>$i</td><td>$o->cat</td><td>$o->subcat</td><td>$o->code</td><td>$o->description</td><td>$o->head</td></tr>";
	}
	echo "</table>
	";
*/
}
?>

</center>