Viewing file: StdProbDetail.php (16.27 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(); $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 advice_problem_tb Where Student_id='$Student_id'"; $result = mysql_query($sql) or die(" Error".mysql_error()); $num = mysql_num_rows($result);
?> <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="#EEEEEE" background="../../Image/bindertile.GIF"> <table width="90%" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td width="20%" background="../../Image/barad.jpg" class="table"> <div align="center"><strong><font size="2" face="Tahoma"><a href="AdviceStudentList.php?Teacher_code=<? echo $rs[Teacher_code]?>" class="d">กลับ</a></font></strong></div></td> <td width="20%" background="../../Image/barad.jpg" class="table"> <div align="center"><strong><font size="2" face="Tahoma"><a href="AddStdProb.php?Student_id=<? echo $rs[Student_id]?>" class="d">เพิ่มข้อมูล</a></font></strong></div></td> <td width="20%" background="../../Image/barad.jpg" class="table"> <div align="center"><strong><font size="2" face="Tahoma"><a href="EditProbList.php?Student_id=<? echo $rs[Student_id]?>" class="d">แก้ไข</a></font></strong></div></td> <td width="20%" background="../../Image/barad.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></td> </tr> <tr> <td> </td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE" style="border:1px solid gray"> <tr bgcolor="#B8ECB3"> <td colspan="2"> <div align="center"><font size="4" face="Tahoma"><strong>ข้อมูลนักศึกษา</strong></font></div></td> </tr> <tr bgcolor="#FFFFFF"> <td width="33%" bgcolor="#FFFEF4"> <div align="center"><strong><font color="#003366" size="2" face="Tahoma">รหัส</font></strong></div></td> <td width="67%" bgcolor="#FFFEF4"><font color="#003300" size="2" face="Tahoma"> <?=$rs["Student_id"]?> </font></td> </tr> <tr bgcolor="#FFFFFF"> <td bgcolor="#FFFEF4"> <div align="center"><strong><font color="#003366" size="2" face="Tahoma">ชื่อ-นามสกุล</font></strong></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"><strong><font color="#003366" size="2" face="Tahoma">หลักสูตร</font></strong></div></td> <td bgcolor="#FFFEF4"><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"><strong><font color="#003366" size="2" face="Tahoma">อายุ</font></strong></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 height="18" bgcolor="#FFFEF4"> <div align="center"><strong><font color="#003366" size="2" face="Tahoma">อาจารย์ที่ปรึกษา</font></strong></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> <tr bgcolor="#FFFFFF"> <td height="18" bgcolor="#FFFEF4"> <div align="center"><strong><font color="#003366" size="2" face="Tahoma">ชื่อบิดา</font></strong></div></td> <td bgcolor="#FFFEF4"><font color="#000000" size="2" face="Tahoma"> <?=$rs["Father_name"]?> </font></td> </tr> <tr bgcolor="#FFFFFF"> <td height="18" bgcolor="#FFFEF4"> <div align="center"><strong><font color="#003366" size="2" face="Tahoma">ชื่อมารดา</font></strong></div></td> <td bgcolor="#FFFEF4"><font color="#000000" size="2" face="Tahoma"> <?=$rs["Mother_name"]?> </font></td> </tr> <tr bgcolor="#FFFFFF"> <td height="18" bgcolor="#FFFEF4"> <div align="center"><strong><font color="#003366" size="2" face="Tahoma">ที่อยู่</font></strong></div></td> <td bgcolor="#FFFEF4"><font color="#000000" size="2" face="Tahoma"> <?=$rs["Address2"]?> </font></td> </tr> <tr bgcolor="#FFFFFF"> <td height="18" bgcolor="#FFFEF4"> <div align="center"><strong><font color="#003366" size="2" face="Tahoma">เบอร์โทรติดต่อ</font></strong></div></td> <td bgcolor="#FFFEF4"><font color="#000000" size="2" face="Tahoma"> <?=$rs["Telno"]?> </font></td> </tr> <tr bgcolor="#FFFFFF"> <td height="18" colspan="2" bgcolor="#FFFEF4"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" > <tr bgcolor="#E1F7DF" > <td colspan="4"> <div align="center"><font color="#003366" size="4" face="Tahoma"><strong>รายละเอียดปัญหาของนักศึกษา</strong></font></div></td> </tr> <tr bgcolor="#EEEEEE"> <td width="30" align="center" style="border:1px solid gray"><font color="#003366" size="1" face="Tahoma"><strong>No.</strong></font></td> <td width="130" align="center" bgcolor="#EEEEEE" style="border:1px solid gray"><font size="2" face="Tahoma"><strong>วันที่มาพบ</strong></font></td> <td width="127" align="center" bgcolor="#EEEEEE" style="border:1px solid gray"><font color="#000000" size="2" face="Tahoma"><b>ประเภทปัญหา</b></font></td> <td width="388" align="center" bgcolor="#EEEEEE" style="border:1px solid gray"><font 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 align=center bgcolor="#F7F7F7" ><font color="#003366" size="2" face="Tahoma"> <?=$i?> </font></td> <td align=center bgcolor="#F7F7F7" ><font color="#006633" size="2" face="Tahoma"> <?=$row["Date_meet"]?> </font></td> <td align=center 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> <div align="center"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td bgcolor="#F7F7F7"><div align="left"><font color="#993333" size="2" face="Tahoma"> <?=$row["Prob1"]?> </font></div></td> </tr> <tr> <td bgcolor="#F7F7F7"><div align="left"><font color="#993333" size="2" face="Tahoma"> <?=$row["Prob2"]?> </font></div></td> </tr> <tr> <td bgcolor="#F7F7F7"><div align="left"><font color="#993333" size="2" face="Tahoma"> <?=$row["Prob3"]?> </font></div></td> </tr> <tr> <td bgcolor="#F7F7F7"><div align="left"><font color="#993333" size="2" face="Tahoma"> <?=$row["Prob4"]?> </font></div></td> </tr> </table> </div></td> <td bgcolor="#F7F7F7" ><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> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td bgcolor="#F7F7F7"><font color="#990099" size="2" face="Tahoma"><a href="ProbDetail.php?Prob_code=<?=$row["Prob_code"]?>" title="Click to see Detail" class="d"> <?=$row["Prob_detail1"]?> </a></font></td> </tr> <tr> <td bgcolor="#F7F7F7"><font color="#990099" size="2" face="Tahoma"><a href="ProbDetail.php?Prob_code=<?=$row["Prob_code"]?>" title="Click to see Detail" class="d"> <?=$row["Prob_detail2"]?> </a></font></td> </tr> <tr> <td bgcolor="#F7F7F7"><font color="#990099" size="2" face="Tahoma"><a href="ProbDetail.php?Prob_code=<?=$row["Prob_code"]?>" title="Click to see Detail" class="d"> <?=$row["Prob_detail3"]?> </a></font></td> </tr> <tr> <td bgcolor="#F7F7F7"><font color="#990099" size="2" face="Tahoma"><a href="ProbDetail.php?Prob_code=<?=$row["Prob_code"]?>" title="Click to see Detail" class="d"> <?=$row["Prob_detail4"]?> </a></font></td> </tr> </table></td> </tr> <? $count=1; } else { ?> <tr bordercolor="#EEEEEE" bgcolor="#FFFFFF"> <td align="center" ><font color="#003366" size="2" face="Tahoma"> <?=$i?> </font></td> <td align="center" bgcolor="#FFFFFF" ><font color="#006633" size="2" face="Tahoma"> <?=$row["Date_meet"]?> </font></td> <td height="77" align="center" > <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> <div align="center"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td height="19" bgcolor="#FFFFFF"> <div align="left"><font color="#993333" size="2" face="Tahoma"> <?=$row["Prob1"]?> </font></div></td> </tr> <tr> <td bgcolor="#FFFFFF"> <div align="left"><font color="#993333" size="2" face="Tahoma"> <?=$row["Prob2"]?> </font></div></td> </tr> <tr> <td bgcolor="#FFFFFF"> <div align="left"><font color="#993333" size="2" face="Tahoma"> <?=$row["Prob3"]?> </font></div></td> </tr> <tr> <td bgcolor="#FFFFFF"> <div align="left"><font color="#993333" size="2" face="Tahoma"> <?=$row["Prob4"]?> </font></div></td> </tr> </table> </div></td> <td ><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> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td bgcolor="#FFFFFF"><font color="#990099" size="2" face="Tahoma"><a href="ProbDetail.php?Prob_code=<?=$row["Prob_code"]?>" title="Click to see Detail" class="d"> <?=$row["Prob_detail1"]?> </a></font></td> </tr> <tr> <td bgcolor="#FFFFFF"><font color="#990099" size="2" face="Tahoma"><a href="ProbDetail.php?Prob_code=<?=$row["Prob_code"]?>" title="Click to see Detail" class="d"> <?=$row["Prob_detail2"]?> </a></font></td> </tr> <tr> <td bgcolor="#FFFFFF"><font color="#990099" size="2" face="Tahoma"><a href="ProbDetail.php?Prob_code=<?=$row["Prob_code"]?>" title="Click to see Detail" class="d"> <?=$row["Prob_detail3"]?> </a></font></td> </tr> <tr> <td bgcolor="#FFFFFF"><font color="#990099" size="2" face="Tahoma"><a href="ProbDetail.php?Prob_code=<?=$row["Prob_code"]?>" title="Click to see Detail" class="d"> <?=$row["Prob_detail4"]?> </a></font></td> </tr> </table></td> </tr> <? $count=0; } $i++; } CloseDB(); ?> <tr bgcolor="#E1F7DF"> <td colspan="4" 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> </table></td> </tr> <tr bgcolor="#FFFEF4"> <td height="18" colspan="2"> </td> </tr> <tr bgcolor="#B8ECB3"> <td height="18" colspan="2"> </td> </tr> </table></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>"; } ?>
|