Hacked By AnonymousFox

Current Path : C:/AppServ/www/stato/
Upload File :
Current File : C:/AppServ/www/stato/doc.php

<? 
include("lib/config.php");
include("lib/connect.php");
include("lib/session.php");
include("lib/register_global.php");
function ShowDate($myDate) {
		$myDateArray=explode("-",$myDate);
		$myDay = sprintf("%d",$myDateArray[2]);
		switch($myDateArray[1]) {
			case "01" : $myMonth = "มกราคม";  break;
			case "02" : $myMonth = "กุมภาพันธ์";  break;
			case "03" : $myMonth = "มีนาคม"; break;
			case "04" : $myMonth = "เมษายน"; break;
			case "05" : $myMonth = "พฤษภาคม";   break;
			case "06" : $myMonth = "มิถุนายน";  break;
			case "07" : $myMonth = "กรกฎาคม";   break;
			case "08" : $myMonth = "สิงหาคม";  break;
			case "09" : $myMonth = "กันยายน";  break;
			case "10" : $myMonth = "ตุลาคม";  break;
			case "11" : $myMonth = "พฤศจิกายน";   break;
			case "12" : $myMonth = "ธันวาคม";  break;
		}
		$myYear = sprintf("%d",$myDateArray[0])+543;
        return($myDay . " " . $myMonth . " " . $myYear);
}
function thainumDigit($num){
    return str_replace(array( '0' , '1' , '2' , '3' , '4' , '5' , '6' ,'7' , '8' , '9' ),
    array( "o" , "๑" , "๒" , "๓" , "๔" , "๕" , "๖" , "๗" , "๘" , "๙" ),
    $num);
};

/*$deptsent=$_GET["deptsent"];
$fromdate=$_GET["fromdate"];
$todate=$_GET["todate"];
*/
$type=$_POST["type"];
$nodoc=$_POST["nodoc"];
$datedoc=$_POST["datedoc"];
$deptsent=$_POST["deptsent"];
$fromdate=$_POST["fromdate"];
$todate=$_POST["todate"];
$sign=$_POST["sign"];

$sql="update receive set Docreport='$nodoc',Datedocreport='$datedoc',Savebyr='$System_Session_FullName' where (Datereceive between '$fromdate' and '$todate') and Deptsend='$deptsent'";
$query=mysql_query($sql);

if($type=="1"){
$sql="insert into stat_print values (NULL,'$deptsent','$nodoc','$datedoc','$fromdate','$todate','$sign',NOW())";
$query=mysql_query($sql);

//$sql="update receive set Docreport='$nodoc',Datedocreport='$datedoc' where Deptsend='$deptsent' and Datereceive between '$fromdate' and '$todate'";
//$query=mysql_query($sql);

}

$sql="select * from deptsend where Id='$deptsent'";
$query=mysql_query($sql);
$row=mysql_fetch_array($query);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<link type="text/css" rel="stylesheet" href="css/style1.css"/>
<body onload=window.print()>
<p>&nbsp; </p>
<table width="80%" border="0" align="center">
  <tr>
    <td colspan="3" valign="top" align="center"><img src="cr.png" alt="" width="102" height="113" /></td>
  </tr>
  <tr>
    <td colspan="2" valign="top">ที่ สธ ๐๖๐๖/<?=thainumDigit($nodoc)?>      </td>
    <td width="45%">ศูนย์วิทยาศาสตร์การแพทย์ที่ ๗ ขอนแก่น<br />
      ๓๙๔  หมู่ที่ ๑๙   ตำบลศิลา  อำเภอเมือง       <br />
    จังหวัดขอนแก่น  ๔๐๐๐๐</td>
  </tr>
  <tr>
    <td width="11%">&nbsp;</td>
    <td width="44%" align="right"><?=thainumDigit(ShowDate($datedoc))?></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3"> เรื่อง  ขอส่งรายงานผลการทดสอบหาสารพันธุกรรมของเชื้อไวรัสโคโรนา  2019 (COVID-19)</td>
  </tr>
  <tr>
    <td colspan="2">เรียน  ผู้อำนวยการ<?=$row[Name]?></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">อ้างถึง</td>
    <td colspan="2">
<?    


$sqlp="select * from receive where (Datereceive Between '$fromdate' and '$todate') AND Deptsend='$row[Id]'";
$queryp=mysql_query($sqlp);
$i++;
while($rowp=mysql_fetch_array($queryp)){?>
    <?=$i?>. หนังสือ<?=$row[Name]?> ที่ <?=thainumDigit($rowp[Nodoc])?> ลงวันที่ <?=thainumDigit(ShowDate($rowp[Datedoc]))?><br />
  <? $i++; } ?>
    </td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ตามหนังสือที่อ้างถึง  โรงพยาบาลกาฬสินธุ์ ได้ส่งตัวอย่างเพื่อทดสอบหาสารพันธุกรรมของเชื้อไวรัสโคโรนา  2019 (COVID-19) ด้วยเทคนิค Real time RT-PCR รวมจำนวนทั้งสิ้น..<strong>

<? $sqlp="select sum(Amounsend) from receive where Deptsend='$row[Id]' and Datereceive Between '$fromdate' and '$todate'";
$queryp=mysql_query($sqlp);
$rowp=mysql_fetch_array($queryp); ?><?=thainumDigit($rowp[0])?>

</strong>..ตัวอย่าง แล้วนั้น </td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ในการนี้  ศูนย์วิทยาศาสตร์การแพทย์ที่ 7 ขอนแก่น ได้ดำเนินการทดสอบตัวอย่างดังกล่าวเรียบร้อยแล้ว โดยท่านสามารถเรียกดูรายงานผลการทดสอบผ่านระบบ CO-LAB2 หรือ QR Code ด้านล่างนี้</td>
  </tr>
  <tr>
    <td colspan="3">จึงเรียนมาเพื่อโปรดทราบ <br /></td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3" align="center">ขอแสดงความนับถือ </td>
  </tr>
  <tr>
    <td colspan="3" align="center"><p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>( 
      <? if($sign=="1"){?>
      นางสาวพรทิพย์  ลัภนะกุล
      <? } if($sign=="2"){?>นางวาทิณี    ดรบุญล้น<? } if($sign=="3"){?>นางเพียงใจ   วงศ์สุวรรณ<? } if($sign=="4"){?>นางสาวดาราวรรณ  เวียงยศ	<? } ?>
      )<br />
     <? if($sign=="1"){?>ผู้อำนวยการศูนย์วิทยาศาสตร์การแพทย์ที่  ๗ ขอนแก่น <? } if($sign=="2"){?>รองผู้อำนวยการด้านบริหาร<br />
     ศูนย์วิทยาศาสตร์การแพทย์ที่  ๗ ขอนแก่น
<? } if($sign=="3"){?>รองผู้อำนวยการด้านวิชาการ<br />
ศูนย์วิทยาศาสตร์การแพทย์ที่  ๗ ขอนแก่น
<? } if($sign=="4"){?>รองผู้อำนวยการด้านบริการ<br />
ศูนย์วิทยาศาสตร์การแพทย์ที่  ๗ ขอนแก่น
<? } ?></p></td>
  </tr>
</table>
<p>                                                     <br />
</p>
<table width="80%" border="0" align="center">
  <tr>
    <td width="67%">ฝ่ายบริหารทั่วไป <br />
โทร.  ๐ ๔๓๒๔  ๐๘๐๐ ต่อ ๑๓๒ <br />
โทรสาร  ๐  ๔๓๒๔ ๐๘๔๕ <br />
Line official account ID : @510usqbr</td>
    <td width="33%"><div>
      <p align="center"><strong><img src="qrcode.png" width="81" height="81" /><br />
        ระบบ </strong><strong>CO-LAB</strong><strong>2</strong><br />
        <strong> </strong><strong> </strong></p>
      <p align="center"><strong>https://co-lab2.moph.go.th</strong></p>
    </div></td>
  </tr>
</table>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
</p>
<p>&nbsp;</p>
</body>
</html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox