403Webshell
Server IP : 134.236.49.22  /  Your IP : 216.73.216.114
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/Menu pusdu/showalladmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/Menu pusdu/showalladmin//mount6admin.php
<?php
$ebits = ini_get('error_reporting');
error_reporting($ebits ^ E_NOTICE);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<title>ระบบใบเบิกพัสดุโรงพยาบาลสัตหีบ กม.10</title> 
<style type="text/css">
<!--
.style6 {color: #FF0000}
.style9 {color: #FF3333; font-weight: bold; }
.style10 {
	color: #000000;
	font-size: 24px;
	font-weight: bold;
}
.style12 {font-size: 12px}
-->
</style>
</head>
<body>
<div align="center"><span class="style10"><br>
  <br>
  เดือน มิถุนายน 2557 </span><br>
  <br>
  <br>
</div>
<table width="1276" height="464" border="1">
  <tr>
    <td width="731" bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 1 ----------------------------------------------------------->
        <div align="left">
          <table width="728" border="0">
            <tr>
              <td width="722" height="83"><p align="center"> <span class="style9">หน่วยงาน สารสนเทศทางการแพทย์ศูนย์คอมพิวเตอร์และข้อมูล </span></p>
                  <p align="left"><br>
                      <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_com");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
                </p></td>
            </tr>
          </table>
        </div>
      <form name="frmMain" method="post" action="..\com\pusducom557.php?Action=Save">
          <table width="620" height="155" border="1" align="center">
            <tr bgcolor="#F1955C">
              <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
              <th width="49" rowspan="2" bgcolor="#FFAC91"> <div align="center">หน่วยนับ </div></th>
              <th width="61" rowspan="2" bgcolor="#FFAC91"> <div align="center">จำนวนที่<br>
                ต้องการเบิก </div></th>
              <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style6">ช่องนี้สำหรับ<br>
                เจ้าหน้าที่ศูนย์คอม</div></th>
            </tr>
            <tr>
              <th height="26" bgcolor="#FFAC91">อนุญาติให้<br>
                เบิกได้</th>
              <th width="38" bgcolor="#FFAC91">จ่ายจริง</th>
              <th width="60" bgcolor="#FFAC91">ราคาต่อ<br>
                หน่วย</th>
              <th width="134" bgcolor="#FFAC91">ราคารวม</th>
            </tr>
            <?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
            <tr>
              <td><div align="left">
                  <input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>">
              </div></td>
              <td width="51" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
              <td><div align="center">
                  <input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>">
              </div></td>
            </tr>
            <?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
          </table>
        <left> <br>
              <br>
          </left>
          <center>
            <input type="hidden" name="hdnLine" value="<?=$i;?>">
          </center>
      </form>
      <p>
          <?
mysql_close($objConnect);
?>
        </p>
      <!-- --------------------------------------------- จบหน่วยงานที่ 1 -----------------------------------------------------------></td>
    <td width="529" bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 2 ----------------------------------------------------------->
        <div align="center">
          <table width="728" border="0">
            <tr>
              <td width="722" height="83"><p align="center"> <span class="style9">หน่วยงาน เภสัชกรรม </span></p>
                  <p align="left"><br>
                      <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_pharma");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
                </p></td>
            </tr>
          </table>
        </div>
      <form name="frmMain" method="post" action="..\pharma\pusducom557.php?Action=Save">
          <table width="620" height="155" border="1" align="center">
            <tr>
             <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
              <th width="49" rowspan="2" bgcolor="#FFAC91"> <div align="center">หน่วยนับ </div></th>
              <th width="63" rowspan="2" bgcolor="#FFAC91"> <div align="center">จำนวนที่<br>
                ต้องการเบิก </div></th>
              <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style6">ช่องนี้สำหรับ<br>
                เจ้าหน้าที่ศูนย์คอม</div></th>
            </tr>
            <tr>
              <th height="26" bgcolor="#FFAC91">อนุญาติให้<br>
                เบิกได้</th>
              <th width="38" bgcolor="#FFAC91">จ่ายจริง</th>
              <th width="63" bgcolor="#FFAC91">ราคาต่อ<br>
                หน่วย</th>
              <th width="241" bgcolor="#FFAC91">ราคารวม</th>
            </tr>
            <?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
            <tr>
              <td><div align="left">
                  <input type="text" name="txtItem<?=$i;?>2" size="30" value="<?=$objResult["Item"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>">
              </div></td>
              <td width="51" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
              <td><div align="center">
                  <input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>">
              </div></td>
            </tr>
            <?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
          </table>
        <left> <br>
              <br>
          </left>
          <center>
            <input type="hidden" name="hdnLine" value="<?=$i;?>">
          </center>
      </form>
      <p>
          <?
mysql_close($objConnect);
?>
        </p>
      <!----------------------------------------จบหน่วยงานที่ 2 ---------------------------------------------------------------------------------------------></td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 3 ----------------------------------------------------------->
        <div align="center">
          <table width="728" border="0">
            <tr>
              <td width="722" height="83"><p align="center"> <span class="style6 style7"><strong>หน่วยงาน ชันสูตร </strong></span></p>
                  <p align="left"><br>
                      <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_lab");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
                </p></td>
            </tr>
          </table>
        </div>
      <form name="frmMain" method="post" action="..\lab\pusducom557.php?Action=Save">
          <table width="620" height="155" border="1" align="center">
            <tr>
              <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
            <?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
            <tr>
              <td><div align="left">
                  <input type="text" name="txtItem<?=$i;?>2" size="30" value="<?=$objResult["Item"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>">
              </div></td>
              <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
              <td><div align="center">
                  <input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>">
              </div></td>
            </tr>
            <?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
          </table>
        <left> <br>
              <br>
          </left>
          <center>
            <input type="hidden" name="hdnLine" value="<?=$i;?>">
          </center>
      </form>
      <p>
          <?
mysql_close($objConnect);
?>
        </p>
      <!----------------------------------------จบหน่วยงานที่ 3 --------------------------------------------------------------------------------------------->
      &nbsp;</td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 4 ----------------------------------------------------------->
        <div align="center">
          <table width="728" border="0">
            <tr>
              <td width="722" height="59"><p align="center"> <span class="style6 style7"><strong>หน่วยงาน ยุทธศาสตร์ </strong></span></p>
                  <p align="left"><br>
                      <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_yuth");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
                </p></td>
            </tr>
          </table>
        </div>
      <form name="frmMain" method="post" action="..\strategy\pusducom557.php?Action=Save">
          <table width="620" height="155" border="1" align="center">
            <tr>
              <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
            <?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
            <tr>
              <td><div align="left">
                  <input type="text" name="txtItem<?=$i;?>2" size="30" value="<?=$objResult["Item"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>">
              </div></td>
              <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
              <td><div align="center">
                  <input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>">
              </div></td>
            </tr>
            <?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
          </table>
        <left> <br>
              <br>
          </left>
          <center>
            <input type="hidden" name="hdnLine" value="<?=$i;?>">
          </center>
      </form>
      <p>
          <?
mysql_close($objConnect);
?>
        </p>
      <!----------------------------------------จบหน่วยงานที่ 4 ---------------------------------------------------------------------------------------------></td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 5 ----------------------------------------------------------->
        <div align="center">
          <table width="728" border="0">
            <tr>
              <td width="722" height="77"><p align="center"><span class="style7 style6"><strong>หน่วยงาน บริหารทั่วไป </strong></span></p>
                  <p align="left"><br>
                      <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_manage");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
                </p></td>
            </tr>
          </table>
        </div>
      <form name="frmMain" method="post" action="..\manage\pusducom557.php?Action=Save">
          <table width="620" height="155" border="1" align="center">
            <tr bgcolor="#FFAC91">              <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
            <?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
            <tr>
              <td><div align="left">
                  <input type="text" name="txtItem<?=$i;?>2" size="30" value="<?=$objResult["Item"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>">
              </div></td>
              <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
              <td><div align="center">
                  <input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>">
              </div></td>
            </tr>
            <?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
          </table>
        <left> <br>
          </left>
          <center>
            <input type="hidden" name="hdnLine" value="<?=$i;?>">
          </center>
      </form>
      <p>
          <?
mysql_close($objConnect);
?>
      </p></td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 6 ----------------------------------------------------------->
        <div align="center">
          <table width="728" border="0">
            <tr>
              <td width="722" height="83"><p align="center"><span class="style6 style7"><strong>หน่วยงาน ประกันสุขภาพ </strong></span></p>
                  <p align="left"><br>
                      <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_insure");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
                </p></td>
            </tr>
          </table>
        </div>
      <form name="frmMain" method="post" action="..\insuranc\pusducom557.php?Action=Save">
          <table width="620" height="155" border="1" align="center">
            <tr>
              <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
            <?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
            <tr>
              <td><div align="left">
                  <input type="text" name="txtItem<?=$i;?>2" size="30" value="<?=$objResult["Item"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>">
              </div></td>
              <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
              <td><div align="center">
                  <input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>">
              </div></td>
              <td><div align="center">
                  <input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>">
              </div></td>
            </tr>
            <?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
          </table>
        <left><br>
              <br>
          </left>
          <center>
            <input type="hidden" name="hdnLine" value="<?=$i;?>">
          </center>
      </form>
      <p>
          <?
mysql_close($objConnect);
?>
        </p>
      <!----------------------------------------จบหน่วยงานที่ 6 ---------------------------------------------------------------------------------------------></td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 7 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style6 style7"><strong>หน่วยงาน แพทย์แผนไทย </strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_massage");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\massage\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr bgcolor="#FFAC91">              <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
              <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
              <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
                ต้องการเบิก </div></th>
              <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12">ช่องนี้สำหรับ<br>
                เจ้าหน้าที่ศูนย์คอม</div></th>
          </tr>
            <tr>
              <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
                เบิกได้</th>
              <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
              <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
                หน่วย</th>
              <th bgcolor="#FFAC91" class="style12">ราคารวม</th> 
  </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
    <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
</td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 8 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style7 style6"><strong>หน่วยงาน ห้องผ่าตัด </strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_or");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\OR\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> 
  </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
  <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 8 --------------------------------------------------------------------------------------------->&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 9 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style6 style7"><strong>หน่วยงาน pcu พลูตาหลวง </strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_pcu");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\plutaluang\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
  <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 9 --------------------------------------------------------------------------------------------->&nbsp;</td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 10 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style7 style6"><strong>หน่วยงาน ศูนย์สุขภาพชุมชนตำบลสัตหีบ </strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_km1");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\km1\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left>
  <br>

    <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<center>
</center>
</td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 11 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style6 style7"><strong>หน่วยงาน ห้องฉุกเฉิน </strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_er");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\er\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
  <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 11 --------------------------------------------------------------------------------------------->&nbsp;</td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 12 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style7 style6"><strong>ห้องซักฟอกหน่วยจ่ายกลาง </strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_supply");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\supply\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
  <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 12 --------------------------------------------------------------------------------------------->&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 13 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style6 style7"><strong>โภชนาการ</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_canteen");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\canteen\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 13 --------------------------------------------------------------------------------------------->&nbsp;</td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 14 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style7 style6"><strong>ห้องคลอด</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_lr");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\lr\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<center>
</center>
</td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 15 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style6 style7"><strong>ผู้ป่วยใน</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_ward");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\ward\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>

   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 15 --------------------------------------------------------------------------------------------->&nbsp;</td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 16----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style7 style6"><strong>ผู้ป่วยนอก</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_opd");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\opd\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>

   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<center>
</center>
</td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 17 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style6 style7"><strong>คลังยา</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_pharsto");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\pharmastore\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
  <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 17 --------------------------------------------------------------------------------------------->&nbsp;</td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 18 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style7 style6"><strong>ห้องคนขับรถ</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_driver");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\driver\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>

   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 18 --------------------------------------------------------------------------------------------->&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 19 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style6 style7"><strong>ทันตกรรม</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_dent");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\dental\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 19 --------------------------------------------------------------------------------------------->&nbsp;</td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 20 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style7 style6"><strong>ห้องพักแพทย์</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_doctor");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\doctor\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
  <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 20 --------------------------------------------------------------------------------------------->&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 21 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style7 style6"><strong>คลินิกพิเศษ</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_room4");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\room4\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
  <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 21 --------------------------------------------------------------------------------------------->&nbsp;</td>
    <td bgcolor="#B0FFFF"><!-- --------------------------------------------- หน่วยงานที่ 22 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style6 style7"><strong>ห้อง X-ray</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_xray");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_6 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_6 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\xray\pusducom557.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
  <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 22 --------------------------------------------------------------------------------------------->&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#E6CCFF"><!-- --------------------------------------------- หน่วยงานที่ 23 ----------------------------------------------------------->

<div align="center">
  <table width="728" border="0">
    <tr>
      <td width="722" height="83"><p align="center"><span class="style7 style6"><strong>หน่วยงาน IC</strong></span></p>
        <p align="left"><br>
  <?
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("pusducom_ic");

//*** Update Condition ***//
if($_GET["Action"] == "Save")
{
	for($i=1;$i<=$_POST["hdnLine"];$i++)
	{
		mysql_query("Set names 'tis620'");
		$strSQL = "UPDATE Month_1 SET ";
		$strSQL .="Seq = '".$_POST["txtSeq$i"]."' ";
		//$strSQL .=",Item = '".$_POST["txtItem$i"]."' ";
		//$strSQL .=",Unit = '".$_POST["txtUnit$i"]."' ";
		$strSQL .=",Req_num = '".$_POST["txtReq_num$i"]."' ";
		$strSQL .=",Allow = '".$_POST["txtAllow$i"]."' ";
		$strSQL .=",Pay = '".$_POST["txtPay$i"]."' ";
		$strSQL .=",Oneprice = '".$_POST["txtOneprice$i"]."' ";
		$strSQL .=",Totalprice = '".$_POST["txtTotalprice$i"]."' ";
		$strSQL .="WHERE Seq = '".$_POST["hdnSeq$i"]."' ";
		$objQuery = mysql_query($strSQL);
	}
	//header("location:$_SERVER[PHP_SELF]");
	//exit();
}

$strSQL = "SELECT * FROM Month_1 WHERE Req_num > 0 ORDER BY Id_num ASC";
mysql_query("Set names 'tis620'");
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
      </p></td>
    </tr>
  </table>
</div>
<form name="frmMain" method="post" action="..\ic\pusducom157.php?Action=Save">
<table width="620" height="155" border="1" align="center">
  <tr>
    <th width="205" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">รายการ </div></th>
    <th width="76" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">หน่วยนับ </div></th>
    <th width="108" rowspan="2" bgcolor="#FFAC91"> <div align="center" class="style12">จำนวนที่<br>
      ต้องการเบิก </div></th>
    <th height="48" colspan="4" bgcolor="#FFAC91"> <div align="center" class="style12"">ช่องนี้สำหรับ<br>
      เจ้าหน้าที่ศูนย์คอม</div> </th>
    </tr>
  <tr>
    <th height="26" bgcolor="#FFAC91" class="style12">อนุญาติให้<br>
      เบิกได้</th>
    <th bgcolor="#FFAC91" class="style12">จ่ายจริง</th>
    <th bgcolor="#FFAC91" class="style12">ราคาต่อ<br>
      หน่วย</th>
    <th bgcolor="#FFAC91" class="style12">ราคารวม</th> </tr>
<?
$i =0;
while($objResult = mysql_fetch_array($objQuery))
{
	$i = $i + 1;
?>
  <tr>
    <td><div align="left"><input type="text" name="txtItem<?=$i;?>" size="30" value="<?=$objResult["Item"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtUnit<?=$i;?>" size="3" value="<?=$objResult["Unit"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtReq_num<?=$i;?>" size="2" value="<?=$objResult["Req_num"];?>"></div></td>
 <td width="84" align="center"><input type="text" name="txtAllow<?=$i;?>" size="5" value="<?=$objResult["Allow"];?>"></td>
 <td><div align="center"><input type="text" name="txtPay<?=$i;?>" size="5" value="<?=$objResult["Pay"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtOneprice<?=$i;?>" size="5" value="<?=$objResult["Oneprice"];?>"></div></td>
 <td><div align="center"><input type="text" name="txtTotalprice<?=$i;?>" size="5" value="<?=$objResult["Totalprice"];?>"></div></td>
  </tr>
<?
}
?>
<tr bgcolor="#FFDED2">
      <td colspan="6" align="center">ราคารวม Total price </td>
      <td align="center"><?php
// Make a MySQL Connection

$query = "SELECT SUM(Totalprice) FROM Month_6"; 
	 
$result = mysql_query($query) or die(mysql_error());

// Print out result
while($row = mysql_fetch_array($result)){
	echo "". $row['SUM(Totalprice)'];
	echo "<br />";
}
?></td>
</table>
<left><br>
  <br>
</left>
   <center>
     <input type="hidden" name="hdnLine" value="<?=$i;?>">
  </center>
</form>
<p>
  <?
mysql_close($objConnect);
?>
</p>
<!----------------------------------------จบหน่วยงานที่ 23 --------------------------------------------------------------------------------------------->&nbsp;</td>
    <td bgcolor="#B0FFFF">&nbsp;</td>

  </tr>
</table>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit