Viewing file: SchoDetail.php (6.29 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(); $sql ="Select * From student_tb Where Student_id='$Student_id' "; $result = mysql_query($sql) or die("Error".mysql_error()); $rs = mysql_fetch_array($result); $sql1= " SELECT * FROM std_scholarship_tb Where Student_id='$Student_id' "; $result1= mysql_query($sql1) or die("Select Has Error".mysql_error()); $rss = mysql_fetch_array($result1); ?> <meta http-equiv="Content-Type" content="text/html; charset=TIS-620"> <script language="JavaScript"> <!--
function formCheck(formobj){ // Enter name of mandatory fields var fieldRequired = Array("mDate","mMonth","mYear","Punish_type","Perform", "Consider"); // Enter field description to appear in the dialog box var fieldDescription = Array("Date","Month","Year","Punish type","Perform", "Consider"); // dialog message var alertMsg = "Please complete the following fields:\n"; var l_Msg = alertMsg.length; for (var i = 0; i < fieldRequired.length; i++){ var obj = formobj.elements[fieldRequired[i]]; if (obj){ switch(obj.type){ case "select-one": if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){ alertMsg += " - " + fieldDescription[i] + "\n"; } break; case "select-multiple": if (obj.selectedIndex == -1){ alertMsg += " - " + fieldDescription[i] + "\n"; } break; case "text": case "textarea": if (obj.value == "" || obj.value == null){ alertMsg += " - " + fieldDescription[i] + "\n"; } break; default: } if (obj.type == undefined){ var blnchecked = false; for (var j = 0; j < obj.length; j++){ if (obj[j].checked){ blnchecked = true; } } if (!blnchecked){ alertMsg += " - " + fieldDescription[i] + "\n"; } } } }
if (alertMsg.length == l_Msg){ return true; }else{ alert(alertMsg); return false; } } // --> //--> </script> <table width="832" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="832" ><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"><a href="EditStudentList.php">ข้อมูลนักศึกษา</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"><a href="AddScho.php?Student_id=<? echo $rs[Student_id];?>">เพิ่มข้อมูลทุนนักศึกษา</a></font></legend> <label> <form id="form1" name="form1" method="post" action="InsertStdScho.php"> <table width="66%" border="0" align="center" cellpadding="0" cellspacing="1" style="border:1px solid gray"> <tr bgcolor="#DDF3DC"> <td height="25" colspan="3"><div align="center"><font color="#003366" size="4" face="Tahoma"><strong><font color="#000000">รายละเอียด</font></strong></font><font size="4" face="Tahoma"><strong><font color="#000000" size="4" face="Tahoma">ข้อมูลทุนการศึกษา</font></strong></font></div></td> </tr> <tr> <td width="27%" bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma, MS Sans Serif">รหัสนักศึกษา</font></div></td> <td width="3%" bgcolor="#EEEEEE"> </td> <td width="70%" bgcolor="#EEEEEE"><font face="Tahoma, MS Sans Serif"><strong><font size="2"><? echo $rs[Student_id]?></font></strong></font></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma, MS Sans Serif">ชื่อ-นามสกุล</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><font face="Tahoma, MS Sans Serif"><strong><font size="2"><? echo $rs[First_name]?> <? echo $rs[Name]?> <? echo $rs[Lastname]?></font></strong></font></td> </tr> <tr> <td colspan="3" bgcolor="#EEEEEE"><div align="center"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC" style="border:1px solid gray"> <tr bgcolor="#FFFEF4"> <td width="25%" bgcolor="#FFFEF4"><div align="center"><strong><font size="2" face="Tahoma">วันที่รับทุน</font></strong></div></td> <td width="3%"> </td> <td width="72%"><font color="#003366" size="2" face="Tahoma"> <?php $dday = $rss[Date_rec]; $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> <td bgcolor="#FBF5E3"><div align="center"><strong><font size="2" face="Tahoma, MS Sans Serif">ชื่อทุนการศึกษา</font></strong></div></td> <td bgcolor="#FBF5E3"><font size="2" face="Tahoma"> </font></td> <td bgcolor="#FBF5E3"><div align="left"><font color="#003399" size="2" face="Tahoma"> <? $Scholarship_code = $rss[Scholarship_code]; $strSQL = "SELECT * FROM scholarship_tb Where Scholarship_code='$Scholarship_code' "; $result1 = mysql_query($strSQL) or die("Error".mysql_error()); $rss = mysql_fetch_array($result1); echo"$rss[Scholarship_name]"; ?> </font></div></td> </tr> <tr bgcolor="#FFFEF4"> <td><div align="center"><strong><font color="#003366" size="2" face="Tahoma, MS Sans Serif">การพิจารณา</font></strong></div></td> <td><font size="2" face="Tahoma"> </font></td> <td><div align="left"><font size="2" face="Tahoma"><? echo $rss[Consider]?></font></div></td> </tr> <tr bgcolor="#DDF3DC"> <td colspan="3"> </td> </tr> </table> </div></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 "; } ?>
|