Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/iws8/html/pcstore/report/
Upload File :
Current File : /var/www/html/mmishra/iws8/html/pcstore/report/form_print.php

<?php
include "../page_header.inc";
echo "<br><b>Select Code to Print Form</b><br>";

$form_name = $_REQUEST["form_name"];
$sereis_code = $_REQUEST["series_code"];
$group_code = $_REQUEST["group_code"];

switch ($form_name){
case "product_issue":
  echo "</form><form method='post' action='report/form_computer_issue.php'>";

  $sql = "select row_id,name,stock_quantity as quantity from product_series order by name";
  $rs = mysql_query($sql, $con);
  echo "Select <select name='series_code' onchange=\"javascript:document.location.href='" . $_SERVER["SCRIPT_NAME"] . "?form_name=$form_name&series_code=' + this.value\">";
  echo "<option value=''>Product Series</option>";
  while ($qd = mysql_fetch_array($rs)){
    $row_id = $qd["row_id"];
    $name = $qd["name"];
    $quantity = $qd["quantity"];
    echo "<option value='$row_id'";
    if ($series_code == $row_id) echo " selected";
    echo ">$name</option>";
  }
  echo "</select> and ";
  echo "Select <select name='pc_code'>";
  $sql = "select row_id,pc_code,description from product_master where series_code=$series_code order by pc_code";
  $rs = mysql_query($sql, $con);
  echo "<option value=''>Product Code</option>";
  while ($qd = mysql_fetch_array($rs)){
    $row_id = $qd["row_id"];
    $pc_code1 = $qd["pc_code"];
    echo "<option value='$row_id'";
    if ($pc_code == $row_id) echo " selected";
    echo ">$pc_code1</option>";
  }
  echo "</select> ";
  break;

case "parts_issue":
  echo "</form><form method='post' action='report/form_parts_issue.php'>";

  $sql = "select row_id,name,strength from customer_group order by name";
  $rs = mysql_query($sql, $con);
  echo "Select <select name='group_code' onchange=\"javascript:document.location.href='" . $_SERVER["SCRIPT_NAME"] . "?form_name=$form_name&group_code=' + this.value\">";
  echo "<option value=''>Customer Group</option>";
  while ($qd = mysql_fetch_array($rs)){
    $row_id = $qd["row_id"];
    $strength = $qd["strength"];
    $name = $qd["name"];
    echo "<option value='$row_id'";
    if ($row_id == $group_code) echo " selected";
    echo ">$name</option>";
  }
  echo "</select> and ";

  $sql = "select row_id,name from customer_master where group_code=$group_code and status='online' order by name";
  $rs = mysql_query($sql, $con);
  echo " Select <select name='user_code'><option value=''>Customer Name</option>";
  while ($qd = mysql_fetch_array($rs)){
    $row_id = $qd["row_id"];
    $name = $qd["name"];
    echo "<option value='$row_id'";
    if ($row_id == $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";
?>