| Server IP : 172.67.189.169 / Your IP : 216.73.216.59 Web Server : Apache/2 System : Linux cat167-197.static.lnwhostname.com 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) x86_64 User : paphayomho ( 1042) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/paphayomho/domains/paphayomhospital.go.th/private_html/HHC/ |
Upload File : |
<html>
<head>
<title>--ระบบบันทึกข้อมูลมารดาหลังคลอด โรงพยาบาลป่าพะยอม จังหวัดพัทลุง---</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<?php
$objConnect = mysql_connect("localhost","pmhc_root","123456") or die("Error Connect to Database");
$objDB = mysql_select_db("pmhc_test");
$strSQL = "SELECT * FROM members ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
$Per_Page = 2; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$strSQL .=" order by member_id DESC LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($strSQL);
?>
<table width="1245" border="1">
<tr>
<th width="52"> <div align="center">ลำดับ</div></th>
<th width="123"> <div align="center">รหัสการเยี่ยม</div></th>
<th width="85"> <div align="center">HN/AN</div></th>
<th width="313"> <div align="center">ชื่อ-สกุล</div></th>
<th width="158"> <div align="center">วันที่คลอด</div></th>
<th width="125"> <div align="center">วันนัดตรวจ</div></th>
<th width="190"> <div align="center">ผู้รับผิดชอบ</div></th>
<th width="147"> <div align="center">สถานะการเยี่ยม</div></th>
</tr>
<?php
while($objResult = mysql_fetch_array($objQuery))
{
?>
<tr>
<td><div align="center"><?php echo $objResult["HC_3"];?></div></td>
<td><?php echo $objResult["HN"];?></td>
<td><?php echo $objResult["surname"];?></td>
<td><div align="center"><?php echo $objResult["date_of_birth"];?></div></td>
<td align="right"><?php echo $objResult["voters_id"];?></td>
<td align="right"><?php echo $objResult["hos"];?></td>
<td div align="center"> <?php if($objResult['hos31'] != '') {
echo '<div style="color:blue">ตอบแล้ว</div>';
}
else{
echo '<div style="color:red">ยังไม่ตอบ</div>';
} ?></td>
</tr>
<?php
}
?>
</table>
<br>
Total <?php echo $Num_Rows;?> Record : <?php echo $Num_Pages;?> Page :
<?php
if($Prev_Page)
{
echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><< Back</a> ";
}
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'>$i</a> ]";
}
else
{
echo "<b> $i </b>";
}
}
if($Page!=$Num_Pages)
{
echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>Next>></a> ";
}
mysql_close($objConnect);
?>
</body>
</html>