Viewing file: TeachList.php (13.61 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include("../include/FunctionDB.php"); include("admin_menu.php"); include("../include/Function.php"); ConnectDB(); $sql= "Select * From teachplan_tb Where Person_code='$Person_code' Order By No_code ASC "; $result= mysql_query($sql) or die(" Error").mysql_error(); $rss = mysql_fetch_array($result); $num = mysql_num_rows($result); ?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620"> <script type="text/JavaScript"> <!-- function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } //--> </script> <table width="840" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="840" ><br /> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="index.php">หน้าหลัก</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="AddTeach.php?Person_code=<? echo $rss[Person_code]?>">บันทึกแผนการรักษา</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" />ข้อมูลแผนการรักษา</font></legend> <label> </label> <form id="form1" name="form1" method="post" action=""> <div align="center"> <table width="95%" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE" style="border:1px solid gray"> <tr bgcolor="#AFCFEF" > <td colspan="9"><div align="center"><font color="#003366" face="Tahoma"><span class="style22">รายละเอียด</span></font></div></td> </tr> <tr bgcolor="#EEEEEE"> <td width="27" align="center" class="style21" style="border:1px solid gray"><span class="style21"><font color="#003366" size="2" face="Tahoma"> No.</font></span></td> <td width="81" align="center" class="style21" style="border:1px solid gray"><span class="style21"><font color="#000000" size="2" face="Tahoma">เลขที่บัตร</font></span></td> <td width="80" align="center" class="style21" style="border:1px solid gray"><span class="style21"><font color="#000000" size="2" face="Tahoma">วันที่เข้ารักษา</font></span></td> <td width="66" align="center" class="style21" style="border:1px solid gray"><span class="style21"><font color="#000000" size="2" face="Tahoma">วันที่นัด</font></span></td> <td width="162" align="center" bgcolor="#EEEEEE" class="style21" style="border:1px solid gray"><span class="style21"><font color="#000000" size="2" face="Tahoma">ทันตแพทย์</font></span></td> <td width="85" align="center" class="style21" style="border:1px solid gray"><span class="style21"><font color="#003366" size="2" face="Tahoma">นัดครั้งต่อไป</font></span></td> <td width="221" align="center" class="style21" style="border:1px solid gray"><span class="style21"><font color="#003366" size="2" face="Tahoma">รายการ</font></span></td> <td colspan="2" align="center" class="style21" style="border:1px solid gray"><span class="style21"><font color="#000000" size="2" face="Tahoma">แก้ไข</font></span></td> </tr> <? $i = 1; while($row = mysql_fetch_array($result)) {
if($count==0) { ?> <tr bordercolor="#EEEEEE" bgcolor="#FDFAEE" onmouseover="this.style.backgroundColor='#D8F8FA'" onmouseout="this.style.backgroundColor='#FDFAEE'" > <td align="center" ><font color="#003366" size="2" face="Tahoma"> </font><font color="#000000" size="2" face="Tahoma"> <? $no = ($Per_Page * ( $Page -1))+$i ; echo $no; ?> </font><font color="#003366" size="2" face="Tahoma"> </font></td> <td align="center" ><div align="center"> <font color="#003333" size="2" face="Tahoma"><font size="2" face="Tahoma"><a href="FrmTeachDetail.php?Person_code=<? echo $row [Person_code]?>&&Teach_id=<? echo $row[Teach_id]?>"title="คลิกดูรายละเอียดแผนการรักษา " class="d" ><? echo $row["HN_code"]?></a></font></font><font size="2" face="Tahoma"></font></span></font><font color="#003333" size="2" face="Tahoma"> </font> </div></td> <td align="center" ><div align="center"><font color="#003333" size="2" face="Tahoma"> </font><font color="#003333" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> <?php $sday = $row[Date]; $yearthai = explode("-",$sday); $day = intval($yearthai[2]); $month = intval($yearthai[1]); $year = intval($yearthai[0]); ////////////////// // $yearthai = $day ; $m = getThaiSubMonth($month); echo"$day"." "."$m"." "."$year"; ?> </font></div></td> <td align="center" ><div align="center"><font color="#003333" size="2" face="Tahoma"> </font><font color="#003333" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> <?php $sday = $row[Date_1]; $yearthai = explode("-",$sday); $day = intval($yearthai[2]); $month = intval($yearthai[1]); $year = intval($yearthai[0]); ////////////////// // $yearthai = $day ; $m = getThaiSubMonth($month); echo"$day"." "."$m"." "."$year"; ?> </font></div></td> <td align="center" bgcolor="#FDFAEE" ><div align="left"><font size="2" face="Tahoma"><strong></strong></font> <div align="left"><font color="#003333" size="2" face="Tahoma"> </font><font size="2" face="Tahoma"><strong><a href="AddTearch.php?Person_code=<? echo $row[Person_code]?>" class="c" > </a></strong></font><font size="2" face="Tahoma"><span class="d style3"><font size="2" face="Tahoma"> <font size="2" face="Tahoma"><span class="style6"><font size="2" face="Tahoma"><font size="2" face="Tahoma"><font size="2" face="Tahoma"> <?php $Teacher_code = $row["Teacher_code"]; $sql = "Select * From personal_tb Where Teacher_code='$Teacher_code'"; $result1 = mysql_query($sql) or die("Error".mysql_error()); $rss = mysql_fetch_array($result1); echo "$rss[First_name] $rss[Teacher_name] $rss[Teacher_lastname]"; ?> </font></font></font></span></font> </font></span></font><font color="#003333" size="2" face="Tahoma"> </font></div></td> <td align="center" bgcolor="#FDFAEE" ><font size="2" face="Tahoma"><? echo $row["Religion"]?></a></font></font></font></font></font><font color="#003333" size="2" face="Tahoma"> </font></font></td> <td align="center" bgcolor="#FDFAEE" ><div align="left"> <div align="left"> <div align="left"><font color="#003333" size="2" face="Tahoma"><? echo $row["Teach_13"]?></a></font></div></td> <td width="26" bgcolor="#F7F7F7" ><div align="center"><font size="2" face="Tahoma"><strong><a href="FrmTeach.php?Person_code=<? echo $row [Person_code]?>&&Teach_id=<? echo $row[Teach_id]?>" class="c"><img src="../picture/edit.gif" width="16" height="16" border="0" alt="แก้ไข" /></a></strong></font></div></td> <td width="36" bgcolor="#F7F7F7" ><div align="center"><font size="2" face="Tahoma"><strong><font size="2" face="Tahoma"><a href="DelTeach.php?Person_code=<?php echo $row[Person_code]; ?>&&Teach_id=<? echo $row[Teach_id]?>" class="c"><img src="../picture/deletenew.gif" width="16" height="19" align="absmiddle" border="0" onclick="return Conf<?=$row[Teach_id];?>0(this)" alt="ลบข้อมูล" /></a></font></strong></font></div> <div align="center"><strong><font size="2" face="Tahoma"> <script language="JavaScript" type="text/javascript"> function Conf<?=$row[Teach_id];?>0(object) { if (confirm("คุณต้องการลบข้อมูล <?php echo " $row[HN_code]"; ?> หรือไม่?") == true) { return true; } return false; } </script> <a href="DelHistory.php?Person_code=<?php echo $row[Person_code]; ?>&&Person_code=<?php echo $row[Person_code];?>"> </a> </font></strong></div></td> </tr> <? $count=1; } else { ?> <tr bordercolor="#EEEEEE" bgcolor="#FFFEF4" onmouseover="this.style.backgroundColor='#D8F8FA'" onmouseout="this.style.backgroundColor='#FFFEF4'"> <td align="center" bgcolor="#FDFAEE" ><font color="#003366" size="2" face="Tahoma"> </font><font color="#000000" size="2" face="Tahoma"> <? $no = ($Per_Page * ( $Page -1))+$i ; echo $no; ?> </font><font color="#003366" size="2" face="Tahoma"> </font></td> <td align="center" bgcolor="#FDFAEE" ><div align="center"> <font color="#003333" size="2" face="Tahoma"><font size="2" face="Tahoma"><a href="FrmTeachDetail.php?Person_code=<? echo $row [Person_code]?>&&Teach_id=<? echo $row[Teach_id]?>"title="คลิกดูรายละเอียดแผนการรักษา " class="d" ><? echo $row["HN_code"]?></a></font></font><font size="2" face="Tahoma"></font></font><font color="#003333" size="2" face="Tahoma"> </font> </div></td> <td align="center" bgcolor="#FDFAEE" ><div align="center"><font color="#003333" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> <?php $sday = $row[Date]; $yearthai = explode("-",$sday); $day = intval($yearthai[2]); $month = intval($yearthai[1]); $year = intval($yearthai[0]); ////////////////// // $yearthai = $day ; $m = getThaiSubMonth($month); echo"$day"." "."$m"." "."$year"; ?> </font><font color="#003333" size="2" face="Tahoma"> </font></div></td> <td align="center" bgcolor="#FDFAEE" ><div align="center"><font color="#003333" size="2" face="Tahoma"> </font><font color="#003333" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> <?php $sday = $row[Date_1]; $yearthai = explode("-",$sday); $day = intval($yearthai[2]); $month = intval($yearthai[1]); $year = intval($yearthai[0]); ////////////////// // $yearthai = $day ; $m = getThaiSubMonth($month); echo"$day"." "."$m"." "."$year"; ?> </font></div></td> <td align="center" bgcolor="#FDFAEE" ><div align="left"><font size="2" face="Tahoma"><strong></strong></font> <div align="left"><font size="2" face="Tahoma"><strong></strong></font><font color="#003333" size="2" face="Tahoma"><span class="style6"><font size="2" face="Tahoma"><font size="2" face="Tahoma"> <span class="d style3"><font size="2" face="Tahoma"> <font size="2" face="Tahoma"><font size="2" face="Tahoma"><font size="2" face="Tahoma"><font size="2" face="Tahoma"> <?php $Teacher_code = $row["Teacher_code"]; $sql = "Select * From personal_tb Where Teacher_code='$Teacher_code'"; $result1 = mysql_query($sql) or die("Error".mysql_error()); $rss = mysql_fetch_array($result1); echo "$rss[First_name] $rss[Teacher_name] $rss[Teacher_lastname]"; ?> </font></font></font></font> </font></span> </font></font></span> </font></div></td> <td align="center" bgcolor="#FDFAEE" ><font size="2" face="Tahoma"><? echo $row["Religion"]?></a></font></font></font></font></font><font color="#003333" size="2" face="Tahoma"> </font></font></font></font></font></td> <td align="center" bgcolor="#FDFAEE" ><div align="left"> <div align="left"><font color="#003333" size="2" face="Tahoma"><? echo $row["Teach_13"]?></a></font></div> </div></td> <td bordercolor="#FFFFFF" bgcolor="#FFFFFF" ><div align="center"><font size="2" face="Tahoma"><strong><a href="FrmTeach.php?Person_code=<? echo $row [Person_code]?>&&Teach_id=<? echo $row[Teach_id]?>" class="c"><img src="../picture/edit.gif" width="16" height="16" border="0" alt="แก้ไข" /></a></strong></font></div></td> <td bordercolor="#FFFFFF" bgcolor="#FFFFFF" ><div align="center"><font size="2" face="Tahoma"><strong><font size="2" face="Tahoma"></font></strong></font> <div align="center"><strong><font size="2" face="Tahoma"> <script language="JavaScript" type="text/javascript"> function Conf<?=$row[Teach_id];?>0(object) { if (confirm("คุณต้องการลบข้อมูล <?php echo " $row[HN_code]"; ?> หรือไม่?") == true) { return true; } return false; } </script> <a href="DelHistory.php?Person_code=<?php echo $row[Person_code]; ?>&&Person_code=<?php echo $row[Person_code];?>"> </a><strong><font size="2" face="Tahoma"><a href="DelTeach.php?Person_code=<?php echo $row[Person_code]; ?>&&Teach_id=<? echo $row[Teach_id]?>" class="c"><img src="../picture/deletenew.gif" width="16" height="19" align="absmiddle" border="0" onclick="return Conf<?=$row[Teach_id];?>0(this)" alt="ลบข้อมูล" /></a></font></strong> </font></strong></div></td> </tr> <? $count=0; } $i++; }
?> <tr bgcolor="#AFCFEF"> <td colspan="9" align="center"><div align="center"><font color="#003366" size="2" face="Tahoma">ทั้งหมด</font><font color="#FFFFFF" size="2" face="Tahoma"> <? echo $num ?> <font color="#003366">รายการ</font> </font> </div></td> </tr> </table> </div> </form> <p> </p> </fieldset> <br /> <font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b><br /> </font></td> </tr> </table>
|