Viewing file: menu_std.php (13.4 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php session_start(); if (session_is_registered("valid_user")&&session_is_registered("password")&&session_is_registered("Priority")) { $Username = $valid_user; $Password = $password; include("../../include/FunctionDB.php"); include("../../include/Function.php"); ConnectDB(); $sql = "Select * From user_tb Where Username='$Username'"; $result = mysql_query($sql) or die(" Error".mysql_error()); $rs1 = mysql_fetch_array($result); $Username = $rs1[Username]; $sql1 = "Select * From student_tb Where Student_id='$Student_id'"; $result1 = mysql_query($sql1) or die(" Error".mysql_error()); $rs = mysql_fetch_array($result1); ?> <html> <head> <title>Student Detail</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <link href="../../css/style1.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/JavaScript"> <!--
function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } //--> </script> </head>
<body bgcolor="#FFFFFF"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td width="20%" background="../../Image/bare3.jpg" class="table"> <div align="center"><strong><font size="2" face="Tahoma"><a href="../Menu_Std_Acc.php" class="d">กลับหน้าหลัก</a></font></strong></div></td> <td width="20%" background="../../Image/bare3.jpg" class="table"> <div align="center"><font size="2" face="Tahoma"><strong><a href="AllDetail.php?Student_id=<? echo $rs[Student_id]?>" class="d">แสดงทั้งหมด</a></strong></font></div></td> <td width="20%" background="../../Image/bare3.jpg" class="table"> <div align="center"><font size="2" face="Tahoma"><strong><a href="FrmEditStd.php?Student_id=<? echo $rs[Student_id]?>" class="d">แก้ไข</a></strong></font></div></td> <td width="20%" background="../../Image/bare3.jpg" class="table"> <div align="center" ><strong><font size="2" face="Tahoma"><a href="../../logout.php" class="d">Logout</a></font></strong></div></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> </table> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:1px solid gray"> <tr> <td colspan="6" bgcolor="#AFCFEF"> <div align="center"><font size="4" face="Tahoma"><strong>ประวัตินักศึกษา</strong></font></div></td> </tr> <tr> <td colspan="5"> <table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#999999"> <tr bgcolor="#FFFFFF"> <td width="32%" bgcolor="#FFFEF4"> <div align="center"><font color="#003366" size="2" face="Tahoma">รหัส</font></div></td> <td width="68%" bgcolor="#FBF5E3"><strong><font color="#000000" 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 size="2" face="Tahoma">วันที่เข้ารับการศึกษา</font></div></td> <td bgcolor="#FBF5E3"><font color="#000000" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> <?php $dday = $rs[Date_in]; $yearthai = explode("-",$dday); $day = intval($yearthai[2]); $month = intval($yearthai[1]); $year = intval($yearthai[0]); ////////////////// // $yearthai = $day ; $m = getThaiSubMonth($month); echo"$day"." "."$m"." "."$year"; ?> </font><font color="#000000" size="2" face="Tahoma"> </font></td> </tr> <tr bgcolor="#FFFFFF"> <td height="20" bgcolor="#FFFEF4"> <div align="center"><font size="2" face="Tahoma">อาจารย์ที่ปรึกษา</font></div></td> <td bgcolor="#FFFEF4"><font color="#003300" size="2" face="Tahoma"> <strong> อ. </strong> <?php $Teacher_code = $rs[Teacher_code]; $sql3= "Select * From personal_tb Where Teacher_code='$Teacher_code'"; $result3 = mysql_query($sql3) or die("Error Select".mysql_query()); $rs3 = mysql_fetch_array($result3); echo"$rs3[Teacher_name] $rs3[Teacher_lastname]"; ?> </font></td> </tr> </table></td> <td width="22%" bgcolor="#FBF5E3"> <div align="center"> <?php echo"<center>"; echo"<img src=\"$rs[Img1]\" width=\"100\" height=\"110\" >"; echo"</center>"; ?> </div></td> </tr> <tr> <td bgcolor="#FBF5E3"> </td> <td width="8%" bgcolor="#FBF5E3"> </td> <td width="14%" bgcolor="#FBF5E3"> </td> <td width="14%" bgcolor="#FBF5E3"> </td> <td width="17%" bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td bgcolor="#FBF5E3"> </td> <td colspan="4" rowspan="8"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr bgcolor="#FDFBF4" onMouseOver="this.style.backgroundColor='#D8F8FA'" onMouseOut="this.style.backgroundColor='#FDFBF4'"> <td width="15%"> <div align="center"><img src="../../Image/Cannister.gif" width="16" height="16"></div></td> <td width="62%" ><font size="4" face="Tahoma"><strong><a href="History/StdDetail.php?Student_id=<? echo $rs[Student_id]?>" class="d">ข้อมูลนักศึกษา</a></strong></font></td> <td width="23%"> </td> </tr> <tr bgcolor="#FCF8EB" onMouseOver="this.style.backgroundColor='#D8F8FA'" onMouseOut="this.style.backgroundColor='#FCF8EB'" > <td> <div align="center"><img src="../../Image/Cannister.gif" width="16" height="16"></div></td> <td><font size="4" face="Tahoma"><strong><a href="History/StdParent.php?Student_id=<?echo $rs[Student_id]?>" class="d">ข้อมูลผู้ปกครอง</a></strong></font></td> <td> </td> </tr> <tr bgcolor="#FDFBF4" onMouseOver="this.style.backgroundColor='#D8F8FA'" onMouseOut="this.style.backgroundColor='#FDFBF4'"> <td> <div align="center"><img src="../../Image/Cannister.gif" width="16" height="16"></div></td> <td><font size="4" face="Tahoma"><strong><a href="Scholarship/Std_Scho.php?Student_id=<? echo $rs[Student_id]?>" class="d">ข้อมูลทุนการศึกษา</a></strong></font></td> <td><div align="center"><font color="#003300" size="2" face="Tahoma"> <?php $Student_id = $rs[Student_id]; $sql_5= "Select * From std_scholarship_tb Where Student_id='$Student_id' "; $result_5 = mysql_query($sql_5) or die("Error Select".mysql_query()); $Conscho = mysql_num_rows($result_5); echo"$Conscho"; ?> </font><font size="2" face="Tahoma">ระเบียน</font></div></td> </tr> <tr bgcolor="#FCF8EB" onMouseOver="this.style.backgroundColor='#D8F8FA'" onMouseOut="this.style.backgroundColor='#FCF8EB'" > <td> <div align="center"><img src="../../Image/Cannister.gif" width="16" height="16"></div></td> <td><strong><font size="4" face="Tahoma"><a href="Grade/GradeList.php?Student_id=<? echo $rs[Student_id]?>" class="d">ข้อมูลผลการเรียน</a><a href="Health/StdHealth.php?Student_id=<? echo $rs[Student_id]?>" class="d"></a></font></strong></td> <td><div align="center"><font color="#003300" size="2" face="Tahoma"> <?php $Student_id = $rs[Student_id]; $sql_3= "Select * From grade_tb Where Student_id='$Student_id'"; $result_3 = mysql_query($sql_3) or die("Error Select".mysql_query()); $CountG = mysql_num_rows($result_3); echo"$CountG"; ?> </font><font size="2" face="Tahoma">ระเบียน</font></div></td> </tr> <tr bgcolor="#FDFBF4" onMouseOver="this.style.backgroundColor='#D8F8FA'" onMouseOut="this.style.backgroundColor='#FDFBF4'"> <td> <div align="center"><img src="../../Image/Cannister.gif" width="16" height="16"></div></td> <td><strong><font size="4" face="Tahoma"><a href="Health/StdHealth.php?Student_id=<? echo $rs[Student_id]?>" class="d">ข้อมูลสุขภาพ</a></font></strong></td> <td><div align="center"><font color="#003300" size="2" face="Tahoma"> <?php $Student_id = $rs[Student_id]; $sql4= "Select * From std_health_tb Where Student_id='$Student_id'"; $result4 = mysql_query($sql4) or die("Error Select".mysql_query()); $CountH = mysql_num_rows($result4); echo"$CountH"; ?> </font><font size="2" face="Tahoma">ระเบียน</font></div></td> </tr> <tr bgcolor="#FCF8EB" onMouseOver="this.style.backgroundColor='#D8F8FA'" onMouseOut="this.style.backgroundColor='#FCF8EB'" > <td> <div align="center"><img src="../../Image/Cannister.gif" width="16" height="16"></div></td> <td><font color="#CCCCCC" size="4" face="Tahoma"><strong><a href="Furlough/StdFurlough.php?Student_id=<? echo $rs[Student_id]?>" class="d">ข้อมูลการลา</a></strong></font></td> <td><div align="center"><font color="#003300" size="2" face="Tahoma"> <?php $Student_id = $rs[Student_id]; $sql6= "Select * From std_absent_tb Where Student_id='$Student_id'"; $result6 = mysql_query($sql6) or die("Error Select".mysql_query()); $Count6 = mysql_num_rows($result6); echo"$Count6"; ?> </font><font size="2" face="Tahoma">ระเบียน</font></div></td> </tr> <tr bgcolor="#FDFBF4" onMouseOver="this.style.backgroundColor='#D8F8FA'" onMouseOut="this.style.backgroundColor='#FDFBF4'"> <td> <div align="center"><img src="../../Image/Cannister.gif" width="16" height="16"></div></td> <td><font color="#CCCCCC" size="4" face="Tahoma"><strong><a href="Punishment/StdPunish.php?Student_id=<? echo $rs[Student_id]?>" class="d">ข้อมูลพฤติกรรม และ วินัย นักศึกษา</a></strong></font></td> <td><div align="center"><font color="#003300" size="2" face="Tahoma"> <?php $Student_id = $rs[Student_id]; $sql_7= "Select * From std_punish_tb Where Student_id='$Student_id' "; $result_7 = mysql_query($sql_7) or die("Error Select".mysql_query()); $CountP = mysql_num_rows($result_7); echo"$CountP"; ?> </font><font size="2" face="Tahoma">ระเบียน</font></div></td> </tr> </table></td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td width="25%" bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> <td bgcolor="#FBF5E3"> </td> </tr> <tr> <td colspan="6" bgcolor="#AFCFEF"> </td> </tr> </table> </body> </html> <?php } else { echo"<body bgcolor=\"#CCCCCC\">"; echo"<meta http-equiv=\"refresh\" content=\"3;URL=../logout.php\" target=\"mainFrame\">\n"; echo"<center>"; echo"<br><br><br><b><font face=\"Tahoma\" size=\"4\" color=\"#FF0000\">Please Login</font> </b><br>"; echo"<br><br><font face=\"Tahoma\" size=\"10\" color=\"#000000\"> ERROR 404 PERMISION DENY</font><br>"; echo"<br><font face=\"Tahoma\" size=\"4\" color=\"#000000\"> คุณไม่มีสิทธ์ใช้งาน</font>"; echo"</center>"; echo"</body>"; } ?>
|