|
|
|
ช่วยด้วยครับ อยากได้ code คำสั่ง ไม่ให้การดูข้อมูล error |
|
|
|
|
|
|
|
<?php require_once('Connections/worksystemclinic.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$colname_rs_patient = "1";
if (isset($_GET['coode_id'])) {
$colname_rs_patient = (get_magic_quotes_gpc()) ? $_GET['coode_id'] : addslashes($_GET['coode_id']);
}
mysql_select_db($database_worksystemclinic, $worksystemclinic);
$query_rs_patient = sprintf("SELECT * FROM patient WHERE coode_id = %s", $colname_rs_patient);
$rs_patient = mysql_query($query_rs_patient, $worksystemclinic) or die(mysql_error());
$row_rs_patient = mysql_fetch_assoc($rs_patient);
$totalRows_rs_patient = mysql_num_rows($rs_patient);
mysql_select_db($database_worksystemclinic, $worksystemclinic);
$query_Recordset1 = "SELECT * FROM patient ORDER BY coode_id DESC";
$Recordset1 = mysql_query($query_Recordset1, $worksystemclinic) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$maxRows_heal = 20;
$pageNum_heal = 0;
if (isset($_GET['pageNum_heal'])) {
$pageNum_heal = $_GET['pageNum_heal'];
}
$startRow_heal = $pageNum_heal * $maxRows_heal;
$colname_heal = "1";
if (isset($_GET['coode_id'])) {
$colname_heal = (get_magic_quotes_gpc()) ? $_GET['coode_id'] : addslashes($_GET['coode_id']);
}
mysql_select_db($database_worksystemclinic, $worksystemclinic);
$query_heal = sprintf("SELECT * FROM heal WHERE coode_id = %s", $colname_heal);
$query_limit_heal = sprintf("%s LIMIT %d, %d", $query_heal, $startRow_heal, $maxRows_heal);
$heal = mysql_query($query_limit_heal, $worksystemclinic) or die(mysql_error());
$row_heal = mysql_fetch_assoc($heal);
if (isset($_GET['totalRows_heal'])) {
$totalRows_heal = $_GET['totalRows_heal'];
} else {
$all_heal = mysql_query($query_heal);
$totalRows_heal = mysql_num_rows($all_heal);
}
$totalPages_heal = ceil($totalRows_heal/$maxRows_heal)-1;
$queryString_heal = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_heal") == false &&
stristr($param, "totalRows_heal") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_heal = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_heal = sprintf("&totalRows_heal=%d%s", $totalRows_heal, $queryString_heal);
?>
<html><!-- InstanceBegin template="/Templates/temp.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<style type="text/css">
<!--
.style2 {
font-size: small;
font-weight: bold;
}
.style3 {font-size: x-small}
.style4 {font-size: 12px}
.style5 {
font-size: 14px;
color: #660000;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.style6 {color: #FF0000}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style8 {color: #000000; font-size: x-small; }
.style10 {
color: #669966;
font-weight: bold;
}
.style11 {
font-size: small;
color: #FFFFFF;
font-weight: bold;
}
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body>
<table width="824" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr bgcolor="#1E9E23">
<td height="72" colspan="3" valign="top"><img src="images/indexclinic.jpg" width="824" height="72"></td>
</tr>
<tr background="images/upperban02.jpg">
<td height="23" colspan="3" valign="top"><table width="824" height="23" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="images/upperban02.jpg"> </td>
</tr>
</table></td>
</tr>
<tr>
<td width="200" rowspan="2" valign="top"><table width="200" border="0">
<tr>
<td> </td>
</tr>
<tr>
<td height="31" background="images/lb_02.jpg" bgcolor="#66CC00"><div align="center" class="style2">Main Menu </div></td>
</tr>
<tr>
<td bgcolor="#DDFF99"><div align="center" class="style4"><a href="index.php">หน้าหลัก</a></div></td>
</tr>
<tr>
<td bgcolor="#DDFF99"><div align="center" class="style4">ติดต่อผู้ดูแลระบบ</div></td>
</tr>
<tr>
<td bgcolor="#DDFF99"><div align="center"><span class="style3"><span class="style4"></span></span></div></td>
</tr>
<tr>
<td background="images/lb_02.jpg"> </td>
</tr>
</table></td>
<td height="26" colspan="2" valign="top">
<marquee scrollAmount=1 scrollDelay=30 onmouseover=this.stop() onmouseout=this.start()>
<span class="style5">ระบบงานจัดการข้อมูล คลินิก (ชื่อคลินิก) ที่อยู่9999999999999999999999
</span>
</marquee></td>
</tr>
<tr>
<td width="609" height="380" valign="top"><!-- InstanceBeginEditable name="EditRegion3" -->
<form action="mainheal_history.php" method="post" enctype="multipart/form-data" name="form1">
<table width="616" border="0" cellpadding="3" cellspacing="0" bgcolor="#669966">
<tr>
<td colspan="7"><div align="right"><span class="style6 style3"><a href="patient_insert.php">ลงทะเบียนผู้ป่วยใหม่</a> / <a href="main_nurse.php">กลับหน้าส่วนงานของพยาบาล</a> / <a href="mainheal_history.php"> ดูประวัติการรักษาของผู้ป่วย </a></span></div></td>
</tr>
<tr>
<td colspan="7"><div align="center" class="style11">กรอกข้อมูลลงในช่องที่ต้องการค้นหา</div></td>
</tr>
<tr bgcolor="#DDFF99">
<td width="89"><div align="right" class="style3">รหัสผู้ป่วย : </div></td>
<td width="60"><input name="coode_id" type="text" id="coode_id" size="10"></td>
<td width="77"><div align="right" class="style3">ชื่อผู้ป่วย : </div></td>
<td width="91"><input name="name" type="text" id="name" size="15"></td>
<td width="132"><div align="right" class="style3">นามสกุลผู้ป่วย : </div></td>
<td width="92"><input name="surname" type="text" id="surname" size="15"></td>
<td width="52"><input name="Submit" type="submit" value="ค้นหา"></td>
</tr>
</table>
</form>
<form name="form2" method="post" action="">
<table width="583" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td><div align="center" class="style10">รายชื่อผู้ป่วย</div></td>
</tr>
</table>
<table width="595" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#DDFF99">
<tr bgcolor="#DDFF99">
<td width="116"><span class="style3">รหัสผู้ป่วย</span></td>
<td width="107"><span class="style2 style3">ชื่อ</span></td>
<td width="178"><span class="style2 style3">นามสกุล</span></td>
<td width="65"><span class="style2 style3">เพศ</span></td>
</tr>
<tr>
<td><span class="style8"><?php echo $row_rs_patient['coode_id']; ?></span></td>
<td><span class="style8"><?php echo $row_rs_patient['name']; ?></span></td>
<td><span class="style8"><?php echo $row_rs_patient['surname']; ?></span></td>
<td><span class="style8"><?php echo $row_rs_patient['sex']; ?></span></td>
</tr>
</table>
</form>
<form name="form3" method="post" action="">
<div align="center" class="style10">ประวัติการรักษาทั้งหมด </div>
<table width="218" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#DDFF99">
<tr bgcolor="#DDFF99">
<td width="134"><span class="style3">วันที่รักษา</span></td>
<td width="70"><div align="center"><span class="style6 style3"><strong>ดูข้อมูล</strong></span></div></td>
</tr>
<?php do { ?>
<tr>
<td><span class="style3"><?php echo $row_heal['date_keep']; ?></span></td>
<td><div align="center"><span class="style8 style3"><a href="history.php?keep_id=<?php echo $row_heal['keep_id']; ?>"><img src="images/6.gif" width="16" height="16" border="0"></a></span></div></td>
</tr>
<?php } while ($row_heal = mysql_fetch_assoc($heal)); ?>
</table>
<div align="center"><br>
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center">
<?php if ($pageNum_heal > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_heal=%d%s", $currentPage, 0, $queryString_heal); ?>"><img src="First.gif" border=0></a>
<?php } // Show if not first page ?>
</td>
<td width="31%" align="center">
<?php if ($pageNum_heal > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_heal=%d%s", $currentPage, max(0, $pageNum_heal - 1), $queryString_heal); ?>"><img src="Previous.gif" border=0></a>
<?php } // Show if not first page ?>
</td>
<td width="23%" align="center">
<?php if ($pageNum_heal < $totalPages_heal) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_heal=%d%s", $currentPage, min($totalPages_heal, $pageNum_heal + 1), $queryString_heal); ?>"><img src="Next.gif" border=0></a>
<?php } // Show if not last page ?>
</td>
<td width="23%" align="center">
<?php if ($pageNum_heal < $totalPages_heal) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_heal=%d%s", $currentPage, $totalPages_heal, $queryString_heal); ?>"><img src="Last.gif" border=0></a>
<?php } // Show if not last page ?>
</td>
</tr>
</table>
</div>
</form>
<!-- InstanceEndEditable --></td>
<td width="21"> </td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($rs_patient);
mysql_free_result($Recordset1);
mysql_free_result($heal);
?>
นี่คือ code ครับ ช่วยด้วยครับ ทำยังไงให้มันหลุดจากไอเจ้าปุ่มตัวนี้เพื่อจะกลับไปหน้าเดิม
|
|
|
|
|
Date :
4 ก.พ. 2551 11:03:03 |
By :
chakrit |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|