Hacked By AnonymousFox

Current Path : C:/AppServ/www/covid19/db/home/
Upload File :
Current File : C:/AppServ/www/covid19/db/home/export2.php

<? 
include("../lib/session.php"); 
include("../lib/config.php");
include("../lib/connect.php");
include("../lib/function.php");
//if($System_Session_User_ID=="") { 
//Header("Location:../home/index.php");
//}
?>
<!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=windows-874" />
<title>:: สำนักการแพทย์ กรุงเทพมหานคร ::</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #CCCCCC;
}
.style3 {
	font-size: 16px;
	font-weight: bold;
}
.style4 {
	color: #FF0000;
	font-weight: bold;
}
.style1 {	font-size: 16;
	font-weight: bold;
}
-->
</style>            
</head>
<body bgcolor="#E9E6DF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../../images/thai.gif','../../images/eng.gif','../../images/chaina.gif','../../images/object/topbar-thai-over.gif','../../images/object/topbar-english-over.gif','../images/bullet/lang_over_02_1.gif','../images/bullet/lang_over_01_1.gif')">

<table width="95%" height="26" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td background="../../images/main/main-t-bg.gif" bgcolor="#162C41" align="center"><p><img src="logo.png" width="150" height="150"><br>
    </p></td>
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="1" bgcolor="#10202F"><img src="../../images/blank.gif" width="1" height="1"></td>
    <td align="center" valign="top"><table width="100%" height="480" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" valign="top" bgcolor="#E9E6DF"> 
            <table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="16" valign="top" bgcolor="#C4BDB1">&nbsp;</td>
        <td align="center" valign="top" bgcolor="#C4BDB1">&nbsp;</td>
        <td valign="top" bgcolor="#C4BDB1">&nbsp;</td>
      </tr>
      <tr>
        <td width="20" valign="top" background="../images/object/border_03.gif"><img src="../images/object/border_16.gif" width="20" height="83"></td>
        <td align="center" valign="top" bgcolor="#FFFFFF">
		   <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="15" height="300">&nbsp;</td>
                  <td align="left" valign="top">
                  <div class="title1"> 
                    ยินดีต้อนรับเข้าสู่ระบบ &gt; โรงพยาบาลผู้ใช้งาน &gt;<?=$System_Session_FullName?>&nbsp;&nbsp;&nbsp;<input name="add" type="button" class="button_60" id="btPageSearch2" value="ออกจากระบบ" onclick="window.location='../system/logout.php'" /> <br />
                    <br>
                    <div align="center"><strong>
                      
                        ผู้ป่วยที่ยังรักษาตัวอยู่ที่โรงพยาบาล ประจำวันที่ <?
										$date1 = date("Y-m-d");	
										 $date = ShowDateLongTh($date1);
    $time = date("H:i:s");
     
    echo $date." เวลา ".$time;
										
										?></strong></div>
                    <br />
                    <div align="center"><strong>โรงพยาบาลสำนักการแพทย์</strong></div>
<table width="100%" border="1" align="center" style="border-collapse:collapse" bordercolor="#CCCCCC" cellpadding="10">
  <?
	
					  
	$sql_come1="select * from patient where Patient_level='5' AND (Hospitalname='1' OR Patient_status_hosrefer='1')";
	$query_come1=mysql_query($sql_come1);
	$num_come1=mysql_num_rows($query_come1);
	
	$sql_comea1="select * from patient where Patient_level='4' AND (Hospitalname='1' OR Patient_status_hosrefer='1')";
	$query_comea1=mysql_query($sql_comea1);
	$num_comea1=mysql_num_rows($query_comea1);
	
	$sql_comeb1="select * from patient where Patient_level='1' AND (Hospitalname='1' OR Patient_status_hosrefer='1')";
	$query_comeb1=mysql_query($sql_comeb1);
	$num_comeb1=mysql_num_rows($query_comeb1);

	$sql_comec1="select * from patient where Patient_level='2' AND (Hospitalname='1' OR Patient_status_hosrefer='1')";
	$query_comec1=mysql_query($sql_comec1);
	$num_comec1=mysql_num_rows($query_comec1);

	$sql_comed1="select * from patient where Patient_level='3' AND (Hospitalname='1' OR Patient_status_hosrefer='1')";
	$query_comed1=mysql_query($sql_comed1);
	$num_comed1=mysql_num_rows($query_comed1);
	
	$sql_at1="select * from patient where Hospitalname='1' and datetime_save like '%$date1%'";
	$query_at1=mysql_query($sql_at1);
	$num_at1=mysql_num_rows($query_at1);
					  
					  
$sql_come2="select * from patient where Patient_level='5' AND (Hospitalname='2' OR Patient_status_hosrefer='2')";
	$query_come2=mysql_query($sql_come2);
	$num_come2=mysql_num_rows($query_come2);
$sql_comea2="select * from patient where Patient_level='4' AND (Hospitalname='2' OR Patient_status_hosrefer='2')";
	$query_comea2=mysql_query($sql_comea2);
	$num_comea2=mysql_num_rows($query_comea2);
	
	$sql_comeb2="select * from patient where Patient_level='1' AND (Hospitalname='2' OR Patient_status_hosrefer='2')";
	$query_comeb2=mysql_query($sql_comeb2);
	$num_comeb2=mysql_num_rows($query_comeb2);

	$sql_comec2="select * from patient where Patient_level='2' AND (Hospitalname='2' OR Patient_status_hosrefer='2')";
	$query_comec2=mysql_query($sql_comec2);
	$num_comec2=mysql_num_rows($query_comec2);

	$sql_comed2="select * from patient where Patient_level='3' AND (Hospitalname='2' OR Patient_status_hosrefer='2')";
	$query_comed2=mysql_query($sql_comed2);
	$num_comed2=mysql_num_rows($query_comed2);
	
	$sql_at2="select * from patient where Hospitalname='2' and datetime_save like '%$date1%'";
	$query_at2=mysql_query($sql_at2);
	$num_at2=mysql_num_rows($query_at2);
	
$sql_come3="select * from patient where Patient_level='5' AND (Hospitalname='3' OR Patient_status_hosrefer='3')";
	$query_come3=mysql_query($sql_come3);
	$num_come3=mysql_num_rows($query_come3);
$sql_comea3="select * from patient where Patient_level='4' AND (Hospitalname='3' OR Patient_status_hosrefer='3')";
	$query_comea3=mysql_query($sql_comea3);
	$num_comea3=mysql_num_rows($query_comea3);
	
	$sql_comeb3="select * from patient where Patient_level='1' AND (Hospitalname='3' OR Patient_status_hosrefer='3')";
	$query_comeb3=mysql_query($sql_comeb3);
	$num_comeb3=mysql_num_rows($query_comeb3);

	$sql_comec3="select * from patient where Patient_level='2' AND (Hospitalname='3' OR Patient_status_hosrefer='3')";
	$query_comec3=mysql_query($sql_comec3);
	$num_comec3=mysql_num_rows($query_comec3);

	$sql_comed3="select * from patient where Patient_level='3' AND (Hospitalname='3' OR Patient_status_hosrefer='3')";
	$query_comed3=mysql_query($sql_comed3);
	$num_comed3=mysql_num_rows($query_comed3);
	
	$sql_at3="select * from patient where Hospitalname='3' and datetime_save like '%$date1%'";
	$query_at3=mysql_query($sql_at3);
	$num_at3=mysql_num_rows($query_at3);
	
$sql_come5="select * from patient where Patient_level='5' AND (Hospitalname='5' OR Patient_status_hosrefer='5')";
	$query_come5=mysql_query($sql_come5);
	$num_come5=mysql_num_rows($query_come5);
$sql_comea5="select * from patient where Patient_level='4' AND (Hospitalname='5' OR Patient_status_hosrefer='5')";
	$query_comea5=mysql_query($sql_comea5);
	$num_comea5=mysql_num_rows($query_comea5);
	
	$sql_comeb5="select * from patient where Patient_level='1' AND (Hospitalname='5' OR Patient_status_hosrefer='5')";
	$query_comeb5=mysql_query($sql_comeb5);
	$num_comeb5=mysql_num_rows($query_comeb5);

	$sql_comec5="select * from patient where Patient_level='2' AND (Hospitalname='5' OR Patient_status_hosrefer='5')";
	$query_comec5=mysql_query($sql_comec5);
	$num_comec5=mysql_num_rows($query_comec5);

	$sql_comed5="select * from patient where Patient_level='3' AND (Hospitalname='5' OR Patient_status_hosrefer='5')";
	$query_comed5=mysql_query($sql_comed5);
	$num_comed5=mysql_num_rows($query_comed5);
	
	$sql_at5="select * from patient where Hospitalname='5' and datetime_save like '%$date1%'";
	$query_at5=mysql_query($sql_at5);
	$num_at5=mysql_num_rows($query_at5);
	
$sql_come7="select * from patient where Patient_level='5' AND (Hospitalname='7' OR Patient_status_hosrefer='7')";
	$query_come7=mysql_query($sql_come7);
	$num_come7=mysql_num_rows($query_come7);	
$sql_comea7="select * from patient where Patient_level='4' AND (Hospitalname='7' OR Patient_status_hosrefer='7')";
	$query_comea7=mysql_query($sql_comea7);
	$num_comea7=mysql_num_rows($query_comea7);
	
	$sql_comeb7="select * from patient where Patient_level='1' AND (Hospitalname='7' OR Patient_status_hosrefer='7')";
	$query_comeb7=mysql_query($sql_comeb7);
	$num_comeb7=mysql_num_rows($query_comeb7);

	$sql_comec7="select * from patient where Patient_level='2' AND (Hospitalname='7' OR Patient_status_hosrefer='7')";
	$query_comec7=mysql_query($sql_comec7);
	$num_comec7=mysql_num_rows($query_comec7);

	$sql_comed7="select * from patient where Patient_level='3' AND (Hospitalname='7' OR Patient_status_hosrefer='7')";
	$query_comed7=mysql_query($sql_comed7);
	$num_comed7=mysql_num_rows($query_comed7);
	
	$sql_at7="select * from patient where Hospitalname='7' and datetime_save like '%$date1%'";
	$query_at7=mysql_query($sql_at7);
	$num_at7=mysql_num_rows($query_at7);
	
$sql_come8="select * from patient where Patient_level='5' AND (Hospitalname='8' OR Patient_status_hosrefer='8')";
	$query_come8=mysql_query($sql_come8);
	$num_come8=mysql_num_rows($query_come8);
$sql_comea8="select * from patient where Patient_level='4' AND (Hospitalname='8' OR Patient_status_hosrefer='8')";
	$query_comea8=mysql_query($sql_comea8);
	$num_comea8=mysql_num_rows($query_comea8);
	
	$sql_comeb8="select * from patient where Patient_level='1' AND (Hospitalname='8' OR Patient_status_hosrefer='8')";
	$query_comeb8=mysql_query($sql_comeb8);
	$num_comeb8=mysql_num_rows($query_comeb8);

	$sql_comec8="select * from patient where Patient_level='2' AND (Hospitalname='8' OR Patient_status_hosrefer='8')";
	$query_comec8=mysql_query($sql_comec8);
	$num_comec8=mysql_num_rows($query_comec8);

	$sql_comed8="select * from patient where Patient_level='3' AND (Hospitalname='8' OR Patient_status_hosrefer='8')";
	$query_comed8=mysql_query($sql_comed8);
	$num_comed8=mysql_num_rows($query_comed8);
	
	$sql_at8="select * from patient where Hospitalname='8' and datetime_save like '%$date1%'";
	$query_at8=mysql_query($sql_at8);
	$num_at8=mysql_num_rows($query_at8);
	
$sql_come11="select * from patient where Patient_level='5' AND (Hospitalname='11' OR Patient_status_hosrefer='11')";
	$query_come11=mysql_query($sql_come11);
	$num_come11=mysql_num_rows($query_come11);
	
$sql_comea11="select * from patient where Patient_level='4' AND (Hospitalname='11' OR Patient_status_hosrefer='11')";
	$query_comea11=mysql_query($sql_comea11);
	$num_comea11=mysql_num_rows($query_comea11);
	
	$sql_comeb11="select * from patient where Patient_level='1' AND (Hospitalname='11' OR Patient_status_hosrefer='11')";
	$query_comeb11=mysql_query($sql_comeb11);
	$num_comeb11=mysql_num_rows($query_comeb11);

	$sql_comec11="select * from patient where Patient_level='2' AND (Hospitalname='11' OR Patient_status_hosrefer='11')";
	$query_comec11=mysql_query($sql_comec11);
	$num_comec11=mysql_num_rows($query_comec11);

	$sql_comed11="select * from patient where Patient_level='3' AND (Hospitalname='11' OR Patient_status_hosrefer='11')";
	$query_comed11=mysql_query($sql_comed11);
	$num_comed11=mysql_num_rows($query_comed11);
	
	$sql_at11="select * from patient where Hospitalname='11' and datetime_save like '%$date1%'";
	$query_at11=mysql_query($sql_at11);
	$num_at11=mysql_num_rows($query_at11);
	
$sql_come12="select * from patient where Patient_level='5' AND (Hospitalname='12' OR Patient_status_hosrefer='12')";
	$query_come12=mysql_query($sql_come12);
	$num_come12=mysql_num_rows($query_come12);												 
$sql_comea12="select * from patient where Patient_level='4' AND (Hospitalname='12' OR Patient_status_hosrefer='12')";
	$query_comea12=mysql_query($sql_comea12);
	$num_comea12=mysql_num_rows($query_comea12);
	
	$sql_comeb12="select * from patient where Patient_level='1' AND (Hospitalname='12' OR Patient_status_hosrefer='12')";
	$query_comeb12=mysql_query($sql_comeb12);
	$num_comeb12=mysql_num_rows($query_comeb12);

	$sql_comec12="select * from patient where Patient_level='2' AND (Hospitalname='12' OR Patient_status_hosrefer='12')";
	$query_comec12=mysql_query($sql_comec12);
	$num_comec12=mysql_num_rows($query_comec12);

	$sql_comed12="select * from patient where Patient_level='3' AND (Hospitalname='12' OR Patient_status_hosrefer='12')";
	$query_comed12=mysql_query($sql_comed12);
	$num_comed12=mysql_num_rows($query_comed12);
	
	$sql_at12="select * from patient where Hospitalname='12' and datetime_save like '%$date1%'";
	$query_at12=mysql_query($sql_at12);
	$num_at12=mysql_num_rows($query_at12);
	
$sql_come13="select * from patient where Patient_level='5' AND (Hospitalname='13' OR Patient_status_hosrefer='13')";
	$query_come13=mysql_query($sql_come13);
	$num_come13=mysql_num_rows($query_come13);												 
$sql_comea13="select * from patient where Patient_level='4' AND (Hospitalname='13' OR Patient_status_hosrefer='13')";
	$query_comea13=mysql_query($sql_comea13);
	$num_comea13=mysql_num_rows($query_comea13);
	
	$sql_comeb13="select * from patient where Patient_level='1' AND (Hospitalname='13' OR Patient_status_hosrefer='13')";
	$query_comeb13=mysql_query($sql_comeb13);
	$num_comeb13=mysql_num_rows($query_comeb13);

	$sql_comec13="select * from patient where Patient_level='2' AND (Hospitalname='13' OR Patient_status_hosrefer='13')";
	$query_comec13=mysql_query($sql_comec13);
	$num_comec13=mysql_num_rows($query_comec13);

	$sql_comed13="select * from patient where Patient_level='3' AND (Hospitalname='13' OR Patient_status_hosrefer='13')";
	$query_comed13=mysql_query($sql_comed13);
	$num_comed13=mysql_num_rows($query_comed13);
	
	$sql_at13="select * from patient where Hospitalname='13' and datetime_save like '%$date1%'";
	$query_at13=mysql_query($sql_at13);
	$num_at13=mysql_num_rows($query_at13);
	
$sql_come14="select * from patient where Patient_level='5' AND (Hospitalname='14' OR Patient_status_hosrefer='14')";
	$query_come14=mysql_query($sql_come14);
	$num_come14=mysql_num_rows($query_come14);												 
$sql_comea14="select * from patient where Patient_level='4' AND (Hospitalname='14' OR Patient_status_hosrefer='14')";
	$query_comea14=mysql_query($sql_comea14);
	$num_comea14=mysql_num_rows($query_comea14);
	
	$sql_comeb14="select * from patient where Patient_level='1' AND (Hospitalname='14' OR Patient_status_hosrefer='14')";
	$query_comeb14=mysql_query($sql_comeb14);
	$num_comeb14=mysql_num_rows($query_comeb14);

	$sql_comec14="select * from patient where Patient_level='2' AND (Hospitalname='14' OR Patient_status_hosrefer='14')";
	$query_comec14=mysql_query($sql_comec14);
	$num_comec14=mysql_num_rows($query_comec14);

	$sql_comed14="select * from patient where Patient_level='3' AND (Hospitalname='14' OR Patient_status_hosrefer='14')";
	$query_comed14=mysql_query($sql_comed14);
	$num_comed14=mysql_num_rows($query_comed14);
	
	$sql_at14="select * from patient where Hospitalname='14' and datetime_save like '%$date1%'";
	$query_at14=mysql_query($sql_at14);
	$num_at14=mysql_num_rows($query_at14);
	
$sql_come15="select * from patient where Patient_level='5' AND (Hospitalname='15' OR Patient_status_hosrefer='15')";
	$query_come15=mysql_query($sql_come15);
	$num_come15=mysql_num_rows($query_come15);												 
$sql_comea15="select * from patient where Patient_level='4' AND (Hospitalname='15' OR Patient_status_hosrefer='15')";
	$query_comea15=mysql_query($sql_comea15);
	$num_comea15=mysql_num_rows($query_comea15);
	
	$sql_comeb15="select * from patient where Patient_level='1' AND (Hospitalname='15' OR Patient_status_hosrefer='15')";
	$query_comeb15=mysql_query($sql_comeb15);
	$num_comeb15=mysql_num_rows($query_comeb15);

	$sql_comec15="select * from patient where Patient_level='2' AND (Hospitalname='15' OR Patient_status_hosrefer='15')";
	$query_comec15=mysql_query($sql_comec15);
	$num_comec15=mysql_num_rows($query_comec15);

	$sql_comed15="select * from patient where Patient_level='3' AND (Hospitalname='15' OR Patient_status_hosrefer='15')";
	$query_comed15=mysql_query($sql_comed15);
	$num_comed15=mysql_num_rows($query_comed15);
	
	$sql_at15="select * from patient where Hospitalname='15' and datetime_save like '%$date1%'";
	$query_at15=mysql_query($sql_at15);
	$num_at15=mysql_num_rows($query_at15);
	
$sql_come16="select * from patient where Patient_level='5' AND (Hospitalname='16' OR Patient_status_hosrefer='16')";
	$query_come16=mysql_query($sql_come16);
	$num_come16=mysql_num_rows($query_come16);
$sql_comea16="select * from patient where Patient_level='4' AND (Hospitalname='16' OR Patient_status_hosrefer='16')";
	$query_comea16=mysql_query($sql_comea16);
	$num_comea16=mysql_num_rows($query_comea16);
	
	$sql_comeb16="select * from patient where Patient_level='1' AND (Hospitalname='16' OR Patient_status_hosrefer='16')";
	$query_comeb16=mysql_query($sql_comeb16);
	$num_comeb16=mysql_num_rows($query_comeb16);

	$sql_comec16="select * from patient where Patient_level='2' AND (Hospitalname='16' OR Patient_status_hosrefer='16')";
	$query_comec16=mysql_query($sql_comec16);
	$num_comec16=mysql_num_rows($query_comec16);

	$sql_comed16="select * from patient where Patient_level='3' AND (Hospitalname='16' OR Patient_status_hosrefer='16')";
	$query_comed16=mysql_query($sql_comed16);
	$num_comed16=mysql_num_rows($query_comed16);
	
	$sql_at16="select * from patient where Hospitalname='16' and datetime_save like '%$date1%'";
	$query_at16=mysql_query($sql_at16);
	$num_at16=mysql_num_rows($query_at16);
	
$sql_come17="select * from patient where Patient_level='5' AND (Hospitalname='17' OR Patient_status_hosrefer='17')";
	$query_come17=mysql_query($sql_come17);
	$num_come17=mysql_num_rows($query_come17);
	$sql_comea17="select * from patient where Patient_level='4' AND (Hospitalname='17' OR Patient_status_hosrefer='17')";
	$query_comea17=mysql_query($sql_comea17);
	$num_comea17=mysql_num_rows($query_comea17);
	
	$sql_comeb17="select * from patient where Patient_level='1' AND (Hospitalname='17' OR Patient_status_hosrefer='11')";
	$query_comeb17=mysql_query($sql_comeb17);
	$num_comeb17=mysql_num_rows($query_comeb17);

	$sql_comec17="select * from patient where Patient_level='2' AND (Hospitalname='17' OR Patient_status_hosrefer='17')";
	$query_comec17=mysql_query($sql_comec17);
	$num_comec17=mysql_num_rows($query_comec17);

	$sql_comed17="select * from patient where Patient_level='3' AND (Hospitalname='17' OR Patient_status_hosrefer='17')";
	$query_comed17=mysql_query($sql_comed17);
	$num_comed17=mysql_num_rows($query_comed17);
	
	$sql_at17="select * from patient where Hospitalname='17' and datetime_save like '%$date1%'";
	$query_at17=mysql_query($sql_at17);
	$num_at17=mysql_num_rows($query_at17);
	
$sql_come18="select * from patient where Patient_level='5' AND (Hospitalname='18' OR Patient_status_hosrefer='18')";
	$query_come18=mysql_query($sql_come18);
	$num_come18=mysql_num_rows($query_come18);		
$sql_comea18="select * from patient where Patient_level='4' AND (Hospitalname='18' OR Patient_status_hosrefer='18')";
	$query_comea18=mysql_query($sql_comea18);
	$num_comea18=mysql_num_rows($query_comea18);
	
	$sql_comeb18="select * from patient where Patient_level='1' AND (Hospitalname='18' OR Patient_status_hosrefer='18')";
	$query_comeb18=mysql_query($sql_comeb18);
	$num_comeb18=mysql_num_rows($query_comeb18);

	$sql_comec18="select * from patient where Patient_level='2' AND (Hospitalname='18' OR Patient_status_hosrefer='18')";
	$query_comec18=mysql_query($sql_comec18);
	$num_comec18=mysql_num_rows($query_comec18);

	$sql_comed18="select * from patient where Patient_level='3' AND (Hospitalname='18' OR Patient_status_hosrefer='18')";
	$query_comed18=mysql_query($sql_comed18);
	$num_comed18=mysql_num_rows($query_comed18);
	
	$sql_at18="select * from patient where Hospitalname='18' and datetime_save like '%$date1%'";
	$query_at18=mysql_query($sql_at18);
	$num_at18=mysql_num_rows($query_at18);
	
	$sql_come19="select * from patient where Patient_level='5' AND (Hospitalname='19' OR Patient_status_hosrefer='19')";
	$query_come19=mysql_query($sql_come19);
	$num_come19=mysql_num_rows($query_come19);

	$sql_comea19="select * from patient where Patient_level='4' AND (Hospitalname='19' OR Patient_status_hosrefer='19')";
	$query_comea19=mysql_query($sql_comea19);
	$num_comea19=mysql_num_rows($query_comea19);
	
	$sql_comeb19="select * from patient where Patient_level='1' AND (Hospitalname='19' OR Patient_status_hosrefer='19')";
	$query_comeb19=mysql_query($sql_comeb19);
	$num_comeb19=mysql_num_rows($query_comeb19);

	$sql_comec19="select * from patient where Patient_level='2' AND (Hospitalname='19' OR Patient_status_hosrefer='19')";
	$query_comec19=mysql_query($sql_comec19);
	$num_comec19=mysql_num_rows($query_comec19);

	$sql_comed19="select * from patient where Patient_level='3' AND (Hospitalname='19' OR Patient_status_hosrefer='11')";
	$query_comed19=mysql_query($sql_comed19);
	$num_comed19=mysql_num_rows($query_comed19);
	
	$sql_at19="select * from patient where Hospitalname='19' and datetime_save like '%$date1%'";
	$query_at19=mysql_query($sql_at19);
	$num_at19=mysql_num_rows($query_at19);	
	
	$cometotal=$num_come1+$num_come2+$num_come3+$num_come5+$num_come7+$num_come8;
	$cometotala=$num_comea1+$num_comea2+$num_comea3+$num_comea5+$num_comea7+$num_comea8;
	$cometotalb=$num_comeb1+$num_comeb2+$num_comeb3+$num_comeb5+$num_comeb7+$num_comeb8;
	$cometotalc=$num_comec1+$num_comec2+$num_comec3+$num_comec5+$num_comec7+$num_comec8;
	$cometotald=$num_comed1+$num_comed2+$num_comed3+$num_comed5+$num_comed7+$num_comed8;
	$cometotale=$num_comee1+$num_comee2+$num_comee3+$num_comee5+$num_comee7+$num_comee8;
	$cometotalf=$num_comef1+$num_comef2+$num_comef3+$num_comef5+$num_comef7+$num_comef8;
	$cometotal1=$num_come11+$num_come12+$num_come13+$num_come14+$num_come15+$num_come16+$num_come17+$num_come18+$num_come19;
	
	$cometotal2a=$num_comea11+$num_comea12+$num_comea13+$num_comea14+$num_comea15+$num_comea16+$num_comea17+$num_comea18+$num_comea19;
	$cometotal2b=$num_comeb11+$num_comeb12+$num_comeb13+$num_comeb14+$num_comeb15+$num_comeb16+$num_comeb17+$num_comeb18+$num_comeb19;
	$cometotal2c=$num_comec11+$num_comec12+$num_comec13+$num_comec14+$num_comec15+$num_comec16+$num_comec17+$num_comec18+$num_comec19;
	$cometotal2d=$num_comed11+$num_comed12+$num_comed13+$num_comed14+$num_comed15+$num_comed16+$num_comed17+$num_comed18+$num_comed19;
	$cometotal2e=$num_comee11+$num_comee12+$num_comee13+$num_comee14+$num_comee15+$num_comee16+$num_comee17+$num_comee18+$num_comee19;
	
	$cometotal2f=$num_comef11+$num_comef12+$num_comef13+$num_comef14+$num_comef15+$num_comef16+$num_comef17+$num_comef18+$num_comef19;
	
	?>
  <tbody>
                        <tr align="center">
                          <td rowspan="2" bgcolor="#d9d9d9"><strong>โรงพยาบาล</strong></td>
                          <td rowspan="2" bgcolor="#d9d9d9"><strong>ผู้ป่วยเข้าเกณฑ์<br />
                            สงสัย (PUI) </strong></td>
                          <td colspan="4" bgcolor="#d9d9d9"><div title="Page 1">
                            <div>
                              <div>
                                <div>
                                  <p><strong>ผู้ป่วยยืนยัน(Confirm case) </strong></p>
                                  </div>
                                </div>
                              </div>
                          </div></td>
                          <td rowspan="2" bgcolor="#d9d9d9"><strong>รวม</strong></td>
                          <td rowspan="2" bgcolor="#d9d9d9"><strong>รับใหม่</strong></td>
                          <td rowspan="2" bgcolor="#d9d9d9"><strong>หมายเหตุ</strong></td>
                          </tr>
                        <tr align="center">
                          <td bgcolor="#d2e1f1"><div title="Page 1">
                            <div>
                              <div>
                                <div>
                                  <p><strong>ไม่มีอาการ (Asymptomatic) </strong></p>
                                </div>
                              </div>
                            </div>
                          </div></td>
                          <td bgcolor="#dce9d5"><div title="Page 1">
                            <div>
                              <div>
                                <div>
                                  <p><strong>อาการระบบ<br />
                                    ทางเดินหายใจ
(Mild case) </strong></p>
                                </div>
                              </div>
                            </div>
                          </div></td>
                          <td bgcolor="#fdf2d0"><div title="Page 1">
                            <div>
                                <div>
                                  <div>
                                    <p><strong>ปอดอักเสบ<br />
                                        (Pneumonia case ) </strong></p>
                                  </div>
                                </div>
                              </div>
                          </div></td>
                          <td bgcolor="#eecdcd"><div title="Page 1">
                            <div>
                              <div>
                                <div>
                                  <p><strong>อาการรุนแรง
                                      <br />
                                      (Severe case) </strong></p>
                                  </div>
                                </div>
                              </div>
                          </div></td>
                          </tr>
                        <tr>
                          <td width="18%">กลาง<br /></td>
                          <td width="11%" align="center"><?=$num_come1?></td>
                          <td width="14%" align="center" bgcolor="#d2e1f1"><?=$num_comea1?></td>
                          <td width="14%" align="center" bgcolor="#dce9d5"><?=$num_comeb1?></td>
                          <td width="12%" align="center" bgcolor="#fdf2d0"><?=$num_comec1?></td>
                          <td width="13%" align="center" bgcolor="#eecdcd"><?=$num_comed1?></td>
                          <td width="4%" align="center"><? echo $total1=$num_come1+$num_comea1+$num_comeb1+$num_comec1+$num_comed1;?></td>
                          <td width="6%" align="center"><?=$num_at1?></td>
                          <td width="8%" align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>ตากสิน<br /></td>
                          <td align="center"><?=$num_come2?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea2?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb2?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec2?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed2?></td>
                          <td align="center"><? echo $total2=$num_come2+$num_comea2+$num_comeb2+$num_comec2+$num_comed2;?></td>
                          <td align="center"><?=$num_at2?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>เจริญกรุงประชารักษ์<br /></td>
                          <td align="center"><?=$num_come3?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea3?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb3?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec3?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed3?></td>
                          <td align="center"><? echo $total3=$num_come3+$num_comea3+$num_comeb3+$num_comec3+$num_comed3;?></td>
                          <td align="center"><?=$num_at3?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>เวชการุณย์รัศมิ์<br /></td>
                          <td align="center"><?=$num_come5?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea5?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb5?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec5?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed5?></td>
                          <td align="center"><? echo $total5=$num_come5+$num_comea5+$num_comeb5+$num_comec5+$num_comed5;?></td>
                          <td align="center"><?=$num_at5?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>ราชพิพัฒน์<br /></td>
                          <td align="center"><?=$num_come7?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea7?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb7?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec7?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed7?></td>
                          <td align="center"><? echo $total7=$num_come7+$num_comea7+$num_comeb7+$num_comec7+$num_comed7;?></td>
                          <td align="center"><?=$num_at7?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>สิรินธร<br /></td>
                          <td align="center"><?=$num_come8?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea8?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb8?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec8?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed8?></td>
                          <td align="center"><? echo $total8=$num_come8+$num_comea8+$num_comeb8+$num_comec8+$num_comed8;?></td>
                          <td align="center"><?=$num_at8?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td><strong>รวม</strong></td>
                          <td align="center"><?=$cometotal?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$cometotala?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$cometotalb?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$cometotalc?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$cometotald?></td>
                          <td align="center">
							  <? $cometotale=$total1+$total2+$total3+$total5+$total7+$total8; ?>
							  <?=$cometotale?></td>
                          <td align="center">
							  <? $cometotalf=$numat1+$numat2+$numat3+$numat5+$numat7+$numat8; ?>
							  <?=$cometotalf?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                      </tbody>
                  </table>
                    <br />
                    <div align="center"><strong>โรงพยาบาลสนาม</strong></div>
                    <table width="100%" border="1" align="center" style="border-collapse:collapse" bordercolor="#CCCCCC" cellpadding="10">
                      	
	
                      <tbody>
                        <tr align="center">
                          <td width="18%" rowspan="2" bgcolor="#d9d9d9"><strong>โรงพยาบาล</strong></td>
                          <td width="11%" rowspan="2" bgcolor="#d9d9d9"><strong>ผู้ป่วยเข้าเกณฑ์<br />
                            สงสัย (PUI) </strong></td>
                          <td colspan="4" bgcolor="#d9d9d9"><div title="Page 1">
                            <div>
                              <div>
                                <div>
                                  <p><strong>ผู้ป่วยยืนยัน(Confirm case) </strong></p>
                                </div>
                              </div>
                            </div>
                          </div></td>
                          <td width="4%" rowspan="2" bgcolor="#d9d9d9"><strong>รวม</strong></td>
                          <td width="6%" rowspan="2" bgcolor="#d9d9d9"><strong>รับใหม่</strong></td>
                          <td width="8%" rowspan="2" bgcolor="#d9d9d9"><strong>หมายเหตุ</strong></td>
                        </tr>
                        <tr align="center">
                          <td width="14%" bgcolor="#d2e1f1"><div title="Page 1">
                            <div>
                              <div>
                                <div>
                                  <p><strong>ไม่มีอาการ (Asymptomatic) </strong></p>
                                </div>
                              </div>
                            </div>
                          </div></td>
                          <td width="14%" bgcolor="#dce9d5"><div title="Page 1">
                            <div>
                              <div>
                                <div>
                                  <p><strong>อาการระบบ<br />
                                    ทางเดินหายใจ
                                    (Mild case) </strong></p>
                                </div>
                              </div>
                            </div>
                          </div></td>
                          <td width="12%" bgcolor="#fdf2d0"><div title="Page 1">
                            <div>
                              <div>
                                <div>
                                  <p><strong>ปอดอักเสบ<br />
                                    (Pneumonia case ) </strong></p>
                                </div>
                              </div>
                            </div>
                          </div></td>
                          <td width="13%" bgcolor="#eecdcd"><div title="Page 1">
                            <div>
                              <div>
                                <div>
                                  <p><strong>อาการรุนแรง
                                    (Severe case) </strong></p>
                                </div>
                              </div>
                            </div>
                          </div></td>
                        </tr>
                        <tr>
                          <td>ผู้สูงอายุบางขุนเทียน<br /></td>
                          <td align="center"><?=$num_come11?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea11?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb11?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec11?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed11?></td>
                          <td align="center"><? echo $total11=$num_come11+$num_comea11+$num_comeb11+$num_comec11+$num_comed11;?></td>
                          <td align="center"><?=$num_at11?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>ราชพิพัฒน์  (สนาม)<br /></td>
                          <td align="center"><?=$num_come12?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea12?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb12?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec12?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed12?></td>
                          <td align="center"><? echo $total12=$num_come12+$num_comea12+$num_comeb12+$num_comec12+$num_comed12;?></td>
                          <td align="center"><?=$num_at12?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>เอราวัณ 1</td>
                          <td align="center"><?=$num_come13?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea13?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb13?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec13?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed13?></td>
                          <td align="center"><? echo $total13=$num_come13+$num_comea13+$num_comeb13+$num_comec13+$num_comed13;?></td>
                          <td align="center"><?=$num_at13?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>เอราวัณ 2</td>
                          <td align="center"><?=$num_come14?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea14?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb14?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec14?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed14?></td>
                          <td align="center"><? echo $total14=$num_come14+$num_comea14+$num_comeb14+$num_comec14+$num_comed14;?></td>
                          <td align="center"><?=$num_at14?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>เอราวัณ 3</td>
                          <td align="center"><?=$num_come15?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea15?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb15?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec15?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed15?></td>
                          <td align="center"><? echo $total15=$num_come15+$num_comea15+$num_comeb15+$num_comec15+$num_comed15;?></td>
                          <td align="center"><?=$num_at15?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>รพ.กลาง (Hospitel)</td>
                          <td align="center"><?=$num_come16?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea16?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb16?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec16?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed16?></td>
                          <td align="center"><? echo $total16=$num_come16+$num_comea16+$num_comeb16+$num_comec16+$num_comed16;?></td>
                          <td align="center"><?=$num_at16?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>Elegant Airport Hospitel</td>
                          <td align="center"><?=$num_come17?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea17?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb17?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec17?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed17?></td>
                          <td align="center"><? echo $total17=$num_come17+$num_comea17+$num_comeb17+$num_comec17+$num_comed17;?></td>
                          <td align="center"><?=$num_at17?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>โรงแรมบ้านไทย</td>
                          <td align="center"><?=$num_come18?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea18?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb18?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec18?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed18?></td>
                          <td align="center"><? echo $total18=$num_come18+$num_comea18+$num_comeb18+$num_comec18+$num_comed18;?></td>
                          <td align="center"><?=$num_at18?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>โรงแรมข้าวสารพาเลซ</td>
                          <td align="center"><?=$num_come19?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$num_comea19?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$num_comeb19?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$num_comec19?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$num_comed19?></td>
                          <td align="center"><? echo $total19=$num_come19+$num_comea19+$num_comeb19+$num_comec19+$num_comed19;?></td>
                          <td align="center"><?=$num_at19?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td><strong>รวม</strong></td>
                          <td align="center"><?=$cometotal1?></td>
                          <td align="center" bgcolor="#d2e1f1"><?=$cometotal2a?></td>
                          <td align="center" bgcolor="#dce9d5"><?=$cometotal2b?></td>
                          <td align="center" bgcolor="#fdf2d0"><?=$cometotal2c?></td>
                          <td align="center" bgcolor="#eecdcd"><?=$cometotal2d?></td>
                          <td align="center"><? $cometotal2e=$total11+$total12+$total13+$total14+$total15+$total16+$total17+$total18+$total19; ?>
                            <?=$cometotal2e?></td>
                          <td align="center"><? $cometotal2f=$numat11+$numat12+$numat13+$numat14+$numat15+$numat16+$numat17+$numat18+$numat19; ?>
                            <?=$cometotal2f?></td>
                          <td align="center">&nbsp;</td>
                        </tr>
                      </tbody>
                    </table>
						<div align="right">
						  <strong><br />
						  สำนักงานพัฒนาระบบบริการทางการแพทย์<br />
                      ตัดข้อมูล วันที่ 
                      <?
										$date1 = date("Y-m-d");	
										 $date = ShowDateLongTh($date1);
    $time = date("H:i:s");
     
    echo $date." เวลา ".$time;
										
										?>
					    </strong>                        </div>
                    </p></td>
                  <td align="left" valign="top">&nbsp;</td>
                  <td width="15">&nbsp;</td>
                </tr>
            </table>		</td>
        <td width="17" valign="top" background="../images/object/border_07.gif"><img src="../images/object/border_17.gif" width="17" height="119"></td>
      </tr>
      <tr>
        <td height="16"><img src="../images/object/border_09.gif" width="20" height="16"></td>
        <td height="16" background="../images/object/border_11.gif"><img src="../images/object/border_11.gif" width="1" height="16"></td>
        <td><img src="../images/object/border_13.gif" width="17" height="16"></td>
      </tr>
    </table></td>
        </tr>
      </table></td>
    <td width="1" bgcolor="#10202F"><img src="../../images/blank.gif" width="1" height="1"></td> 
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="4" height="30" align="left" valign="bottom" background="../../images/main/main-t-bg.gif">&nbsp;</td>
    <td height="30" align="center" background="../../images/main/main-t-bg.gif">&nbsp;</td>
    <td width="4" height="30" align="right" valign="bottom" background="../../images/main/main-t-bg.gif">&nbsp;</td>
  </tr>
	
</table>
</body>
</html>
<? 
include("../lib/disconnect.php");
?>

Hacked By AnonymousFox1.0, Coded By AnonymousFox