Viewing file: StdHealth.php (10.74 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php session_start(); if (session_is_registered("valid_user")&&session_is_registered("Priority")&&session_is_registered("password") ) { include("../include/FunctionDB.php"); include("admin_menu.php"); include("../include/Function.php"); ConnectDB(); $sql1 = "Select * From student_tb Where Student_id='$Student_id'"; $result1 = mysql_query($sql1) or die(" Error".mysql_error()); $rs = mysql_fetch_array($result1); $sql = "Select * From std_health_tb Where Student_id='$Student_id'"; $result = mysql_query($sql) or die(" Error".mysql_error()); $num = mysql_num_rows($result); ?> <meta http-equiv="Content-Type" content="text/html; charset=TIS-620"> <table width="835" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="835" ><br> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="Edu_Menu.php">˹éÒËÅÑ¡</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_std.php?Student_id=<? echo $rs[Student_id]?>">¢éÍÁÙÅ»ÃÐÇѵԹѡÈÖ¡ÉÒ</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="EditStudentList.php"></a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"><a href="AddHealthData.php?Student_id=<? echo $rs[Student_id]?>"> à¾ÔèÁ¢éÍÁÙÅÊØ¢ÀÒ¾¹Ñ¡ÈÖ¡ÉÒ</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="EditHealthList.php?Student_id=<? echo $rs[Student_id]?>">á¡é䢢éÍÁÙÅÊØ¢ÀÒ¾¹Ñ¡ÈÖ¡ÉÒ</a></font></legend> <label> <form id="form1" name="form1" method="post" action="EditStudent.php"> <table width="92%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2"> </td> </tr> <tr bgcolor="#D7EABD"> <td colspan="2"><div align="center"><font size="4" face="Tahoma"><strong>¢éÍÁÙÅÊØ¢ÀÒ¾</strong></font></div></td> </tr> <tr> <td width="76%"><table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#999999"> <tr bgcolor="#FFFFFF"> <td width="33%" bgcolor="#FFFEF4"><div align="center"><font color="#003366" size="2" face="Tahoma">ÃËÑÊ</font></div></td> <td width="67%" bgcolor="#FBF5E3"><strong><font color="#003300" size="2" face="Tahoma"> <?=$rs["Student_id"]?> </font></strong></td> </tr> <tr bgcolor="#FFFFFF"> <td bgcolor="#FFFEF4"><div align="center"><font color="#003366" size="2" face="Tahoma">ª×èÍ-¹ÒÁÊ¡ØÅ</font></div></td> <td bgcolor="#FFFEF4"><font color="#003300" size="2" face="Tahoma"> <?=$rs["First_name"]?> <?=$rs["Name"]?> <?=$rs["Lastname"]?> </font></td> </tr> <tr bgcolor="#FFFFFF"> <td bgcolor="#FFFEF4"><div align="center"><font color="#003366" size="2" face="Tahoma">ËÅÑ¡ÊÙµÃ</font></div></td> <td bgcolor="#FBF5E3"><font color="#003300" size="2" face="Tahoma"> <?php $Course_code = $rs["Course_code"]; $sql2= "Select * From course_tb Where Course_code='$Course_code'"; $result2 = mysql_query($sql2) or die("Error Select".mysql_query()); $rs2 = mysql_fetch_array($result2); echo"$rs2[Course_name]"; ?> ÃØè¹ </font><font color="#990099" size="2" face="Tahoma"> <?=$rs["Class"]?> </font></td> </tr> <tr bgcolor="#FFFFFF"> <td bgcolor="#FFFEF4"><div align="center"><font size="2" face="Tahoma">ÍÒÂ</font>Ø</div></td> <td bgcolor="#FFFEF4"><font color="#003366" size="2" face="Tahoma"> <?php //// Show Age $age = $rs[DateBirth]; $year = explode("-",$age); $year = intval($year[0]); $year = $year - 543; $currentyear = date("Y"); // $currentyear = intval($currentyear[0]); $age = $currentyear - $year ; echo"$age"; ?> </font><font color="#000000" size="2" face="Tahoma">»Õ</font></td> </tr> <tr bgcolor="#FFFFFF"> <td bgcolor="#FFFEF4"><div align="center"><font color="#003366" size="2" face="Tahoma">¡ÃØê»àÅ×Í´</font></div></td> <td bgcolor="#FBF5E3"><font color="#003366" size="2" face="Tahoma"> <?php //// Show Age $Student_id = $rs[Student_id]; $sql2 = "Select * From std_health_tb Where Student_id='$Student_id' GROUP By B_group"; $result2 = mysql_query($sql2) or die("Error".mysql_error()); $rss = mysql_fetch_array($result2); echo"$rss[B_group]"; ?> </font><font color="#000000" size="2" face="Tahoma"> </font></td> </tr> <tr bgcolor="#FFFFFF"> <td height="20" bgcolor="#FFFEF4"> </td> <td bgcolor="#FFFEF4"> </td> </tr> </table></td> <td width="24%" colspan="-2" bgcolor="#FBF5E3"><div align="center"> <?php echo"<center>"; echo"<img src=\"../$rs[Img1]\" width=\"100\" height=\"110\" >"; echo"</center>"; ?> </div></td> </tr> <tr> <td colspan="2"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE" > <tr bgcolor="#D7EABD" > <td colspan="5"><div align="center"><font color="#003366" size="4" face="Tahoma"><strong>ÃÒ¡Òúѹ·Ö¡ÊØ¢ÀÒ¾</strong></font></div></td> </tr> <tr bgcolor="#EEEEEE"> <td width="33" style="border:1px solid gray"><div align="center"><font color="#003366" size="1" face="Tahoma"><strong>No.</strong></font></div></td> <td width="96" bgcolor="#EEEEEE" style="border:1px solid gray"><div align="center"><font size="2" face="Tahoma"><strong>Çѹ·ÕèºÑ¹·Ö¡</strong></font></div></td> <td width="64" bgcolor="#EEEEEE" style="border:1px solid gray"><div align="center"><strong><font size="2" face="Tahoma">¹éÓ˹ѡ</font></strong></div></td> <td width="67" bgcolor="#EEEEEE" style="border:1px solid gray"><div align="center"><strong><font size="2" face="Tahoma">ÊèǹÊÙ§</font></strong></div></td> <td width="737" align="center" bgcolor="#EEEEEE" style="border:1px solid gray"><font color="#000000" size="2" face="Tahoma"><strong>âä»ÃШӵÑÇ</strong></font></td> </tr> <? $i = 1; while($row = mysql_fetch_array($result)) {
if($count==0) { ?> <tr bordercolor="#EEEEEE" bgcolor="#FFFFFF" > <td bgcolor="#F7F7F7" ><div align="center"><font color="#000000" size="2" face="Tahoma"> <? //(50*(currentpage-1))+i $no = ($Per_Page * ( $Page -1))+$i ; echo $no; ?> </font></div></td> <td bgcolor="#F7F7F7" ><div align="center"><font color="#006633" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> <?php $sday = $row[Date_note]; $yearthai = explode("-",$sday); $day = intval($yearthai[2]); $month = intval($yearthai[1]); $year = intval($yearthai[0]); ////////////////// $year = getYear($year); $m = getThaiSubMonth($month); echo"$day"." "."$m"." "."$year"; ?> </font><font color="#006633" size="2" face="Tahoma"> </font></div></td> <td bgcolor="#F7F7F7" ><div align="center"><font color="#003399" size="2" face="Tahoma"> <?=$row["Weight"]?> </font></div></td> <td bgcolor="#F7F7F7" ><div align="center"><font color="#993333" size="2" face="Tahoma"> <?=$row["Height"]?> </font></div></td> <td bgcolor="#F7F7F7" ><div align="left"><font color="#990099" size="2" face="Tahoma"> <a href="../Student/menu_std.php?Student_id=<?=$row["Student_id"]?>" title="Click to see Detail" class="d"> </a> </font> <div align="left"><font color="#000000" size="2" face="Tahoma"> <a href="HealthDetail.php?Student_id=<? echo $row["Student_id"]?>&code=<? echo $row[code]?>" class="black" > <?=$row["Disease"]?> </a> </font> </div></td> </tr> <? $count=1; } else { ?> <tr bordercolor="#EEEEEE" bgcolor="#FFFFFF"> <td ><div align="center"><font color="#000000" size="2" face="Tahoma"> <? //(50*(currentpage-1))+i $no = ($Per_Page * ( $Page -1))+$i ; echo $no; ?> </font></div></td> <td bgcolor="#FFFFFF" ><div align="center"><font color="#006633" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> <?php $sday = $row[Date_note]; $yearthai = explode("-",$sday); $day = intval($yearthai[2]); $month = intval($yearthai[1]); $year = intval($yearthai[0]); ////////////////// $year = getYear($year); $m = getThaiSubMonth($month); echo"$day"." "."$m"." "."$year"; ?> </font><font color="#006633" size="2" face="Tahoma"> </font></div></td> <td bgcolor="#FFFFFF" ><div align="center"><font color="#003399" size="2" face="Tahoma"> <?=$row["Weight"]?> </font></div></td> <td bgcolor="#FFFFFF" ><div align="center"><font color="#993333" size="2" face="Tahoma"> <?=$row["Height"]?> </font></div></td> <td bgcolor="#FFFFFF" ><div align="left"><font color="#990099" size="2" face="Tahoma"> <a href="../Student/menu_std.php?Student_id=<?=$row["Student_id"]?>" title="Click to see Detail" class="d"> </a> </font> <div align="left"><font color="#000000" size="2" face="Tahoma"> <a href="HealthDetail.php?Student_id=<? echo $row["Student_id"]?>&code=<? echo $row[code]?>" class="black" > <?=$row["Disease"]?> </a> </font> </div></td> </tr> <? $count=0; } $i++; } CloseDB(); ?> <tr bgcolor="#E7F2D9"> <td colspan="5" align="center"><div align="center"><font color="#003366" size="2" face="Tahoma">·Ñé§ËÁ´</font><font color="#FF0000" size="2" face="Tahoma"> <strong><? echo $num ?> </strong></font><font color="#003366" size="2" face="Tahoma">¤ÃÑé§</font></div></td> </tr> </table></td> </tr> <tr bgcolor="#D7EABD"> <td colspan="2"> </td> </tr> </table> </form> </fieldset> <br> <font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>ËÁÒÂà赯 :</b> ãªéàÁÒÊì¤ÅÔ¡·Õèª×èÍ<br> </font></td> </tr> </table> <?php } else { echo"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n"; echo"Please Login "; } ?>
|