Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/irp/operator/
Upload File :
Current File : /var/www/html/mmishra/irp/operator/indentstatus.php

<?php
//operator/index.php
require("../init.inc.php");

if ($role != 'operator') {
        header("Location: /");
}
echo $header;

$tbl = 'indents';
$indent_no = $_POST["indent_no"];

?>
<h2>Indent Status</h2>

Enter Indent No. to locate indent record
<input type='text' name='indent_no' value='<?php echo $indent_no; ?>' size='10'>
<input type='submit' name='submit' value='FIND'>

<br><br>
<center>

<?php

$item_name = array('');
$specification = array('');
$qty_demanded = array('');
$approx_cost = array('');

if ($indent_no) {
	$rs = mysql_query("select indent_no,indent_head,date_format(indent_date,'%d/%m/%Y') as dated,purpose,indent_by,recommended_by from $tbl where indent_no=$indent_no");
	/* fetch values */
	while ($o = mysql_fetch_object($rs)) {
		$indent_head = $o->indent_head;
		$indent_date = $o->dated;
		$purpose = $o->purpose;
		$indent_by = $o->indent_by;
		$recommended_by = $o->recommended_by;
	}


	$rs = mysql_query("select * from indent_items where indent_no=$indent_no");
	/* fetch values */
	while ($o = mysql_fetch_object($rs)) {
		array_push($item_name, $o->item_name);
		array_push($specification, $o->specification);
		array_push($qty_demanded, $o->qty_demanded);
		array_push($approx_cost, $o->approx_cost);
	}
}

echo "<table width='95%' border='1' style='border-collapse: collapse'><tr><td align='center'>
Fund Head [ $indent_head ] Indent Date [ $indent_date ]
<br>Purpose [ $purpose ]
<br>Indent By [ $indent_by ]
Recommended By [ $recommended_by ]
</td></tr></table>
<br>";
		
//item list

echo "<table width='95%' border='1' style='border-collapse: collapse'>
<tr><th>Sr.</th><th>Item Name</th><th>Specification</th><th>Qty</th><th>Approx Cost</th></tr>
";

for ($i=1; $i < count($item_name); $i++) {
	echo "<tr><td>$i</td><td>$item_name[$i]</td><td>$specification[$i]</td><td>$qty_demanded[$i]</td><td>$approx_cost[$i]</td></tr>";
}

echo "</table>";

echo $footer;
?>