| Current Path : /var/www/html/mmishra/irp/irp/pcstore/ |
| Current File : /var/www/html/mmishra/irp/irp/pcstore/print_form.php |
<?php
include "page_header.inc";
echo "<br><b>Select Code to Print Form</b><br>";
$form_name = $_REQUEST["form_name"];
$pc_sereis = $_REQUEST["pc_series"];
$category = $_REQUEST["category"];
switch ($form_name){
case "pc_configuration":
echo "</form><form method='post' action='configuration_form.php'>";
$sql = "select pc_series, count(pc_code) as qty from pc_master group by pc_series";
$rs = mysql_query($sql, $link_id);
echo "Select PC Series <select name='pc_series' onchange=\"javascript:document.location.href='" . $_SERVER["SCRIPT_NAME"] . "?form_name=$form_name&pc_series=' + this.value\">";
echo "<option value=''>Select</option>";
while ($qd = mysql_fetch_array($rs)){
$pc_series1 = $qd["pc_series"];
$qty = $qd["qty"];
echo "<option value='$pc_series1'";
if ($pc_series == $pc_series1) echo " selected";
echo ">$pc_series1 ($qty)</option>";
}
echo "</select> and ";
echo "Select PC Code <select name='pc_code'>";
$sql = "select row_id, pc_code from pc_master where pc_series='$pc_series' order by pc_code";
$rs = mysql_query($sql, $link_id);
while ($qd = mysql_fetch_array($rs)){
$pc_code1 = $qd["row_id"];
$description = $qd["pc_code"];
echo "<option value='$pc_code1'";
if ($pc_code == $pc_code1) echo " selected";
echo ">$description</option>";
}
echo "</select>";
break;
case "pc_issue":
break;
case "parts_issue":
echo "</form><form method='post' action='issue_form.php'>";
$sql = "select category, count(row_id) as no from user_master group by category";
$rs = mysql_query($sql, $link_id);
echo "Select Category <select name='category' onchange=\"javascript:document.location.href='" . $_SERVER["SCRIPT_NAME"] . "?form_name=$form_name&category=' + this.value\"><option value=''>Select</option>";
while ($qd = mysql_fetch_array($rs)){
$category1 = $qd["category"];
$no = $qd["no"];
echo "<option value='$category1'";
if ($category1 == $category) echo " selected";
echo ">$category1 ($no)</option>";
}
echo "</select> and ";
$sql = "select row_id, name from user_master where category='$category' and status='present'";
$rs = mysql_query($sql, $link_id);
echo "Select User <select name='user_code'>";
while ($qd = mysql_fetch_array($rs)){
$row_id1 = $qd["row_id"];
$name = $qd["name"];
echo "<option value='$row_id1'";
if ($row_id1 == $user_code) echo " selected";
echo ">$name</option>";
}
echo "</select>";
break;
}
echo "<input type='submit' name='submit' value='PRINT'>";
echo "<input type='hidden' name='form_name' value='$form_name'>";
include "../page_footer.inc";
?>