Viewing file: FrmEditStd.php (20.73 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); $Student_id = $rs[Student_id]; $sql2 = "Select * From advice_problem_tb Where Student_id='$Student_id'"; $result2 = mysql_query($sql2); $rs_2 = mysql_fetch_array($result2); ?> <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="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"><a href="EditStudentList.php">แก้ไขข้อมูลรายชื่อนักศึกษา</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"><a href="StudentList.php"> ข้อมูลนักศึกษา</a></font></legend> <label> <form id="form1" name="form1" method="post" action="EditStudent.php"> <table width="84%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#99CCFF"> <tr bgcolor="#AFCFEF"> <td height="25" colspan="3"><div align="center"><strong><font color="#FF0000" size="4" face="Tahoma">แก้ไข </font><font color="#003366" size="4" face="Tahoma">ข้อมูลนักศึกษา </font></strong></div></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma, MS Sans Serif">หลักสูตร</font></div></td> <td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td bgcolor="#EEEEEE"><font color="#003366" size="2" face="Tahoma"> <select name="Course_code" id="Course_code" class="input1" > <?php $Course_code = $rs[Course_code]; $strSQL7 = "SELECT * FROM course_tb Where Course_code='$Course_code' "; $result7 = mysql_query($strSQL7); $strSQL8 = "SELECT * FROM course_tb Where Course_code Order By Course_code "; $result8 = mysql_query($strSQL8); while( $rs7 = mysql_fetch_array($result7)) { echo"<option value=\"$rs7[Course_code]\" ><b>$rs7[Course_name]</b></option>\n"; while( $rs8 = mysql_fetch_array($result8)) { echo"<option value=\"$rs8[Course_code]\" ><b>$rs8[Course_name]</b></option>\n"; } } ?> </select> </font> <font color="#000000" size="2" face="Tahoma">รุ่นที่ <input name="Class" type="text" id="Class" value="<? echo $rs["Class"]?>" size="5" class="input1" /> </font></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font color="#000000" size="2" face="Tahoma">ลำดับ</font></div></td> <td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td bgcolor="#EEEEEE"><input name="Orderlist" type="text" id="Orderlist" value="<? echo $rs[Orderlist]?>" size="5" class="input1" /></td> </tr> <tr> <td width="27%" bgcolor="#EEEEEE"><div align="center"><font size="2">รหัสนักศึกษา</font></div></td> <td width="3%" bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td width="70%" bgcolor="#EEEEEE"><input name="Student_id" type="text" id="Student_id" value="<? echo $rs[Student_id]?>" size="20" class="input1" /></td> </tr> <tr> <td height="22" bgcolor="#EEEEEE"><div align="center"><font color="#000066" size="2" face="Tahoma">คำนำหน้า</font></div></td> <td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td bgcolor="#EEEEEE"><font size="2" face="Tahoma"> <input type="radio" name="First_name" <?php if (!(strcmp("$rs[First_name]","นาย"))) {echo "checked";} ?> value="นาย" onkeypress="return handleEnter(this, event)"> นาย <input type="radio" name="First_name" <?php if (!(strcmp("$rs[First_name]","นางสาว"))) {echo "checked";} ?> value="นางสาว" onkeypress="return handleEnter(this, event)"> นางสาว <input type="radio" name="First_name" <?php if (!(strcmp("$rs[First_name]","นาง"))) {echo "checked";} ?> value="นาง" onkeypress="return handleEnter(this, event)" /> นาง </font></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2">ชื่อ</font></div></td> <td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td bgcolor="#EEEEEE"><input name="Name" type="text" id="Name" value="<? echo $rs[Name]?>" size="30" class="input1" /> <font size="2">นามสกุล <input name="Lastname" type="text" id="Lastname" value="<? echo $rs[Lastname]?>" size="30" class="input1" /> </font></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2">เพศ</font></div></td> <td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td bgcolor="#EEEEEE"><font size="2"> <input type="radio" <?php if (!(strcmp("$rs[Sex]","ชาย"))) {echo "checked";} ?> name="Sex" value="ชาย" /> ชาย <input type="radio" <?php if (!(strcmp("$rs[Sex]","หญิง"))) {echo "checked";} ?> name="Sex" value="หญิง" /> หญิง</font></td> </tr> <tr> <td height="24" bgcolor="#EEEEEE"><div align="center"><font size="2">วัน-เดือน-ปี เกิด</font></div></td> <td nowrap="nowrap" bordercolor="#CCCCCC" bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td nowrap="nowrap" bordercolor="#CCCCCC" bgcolor="#EEEEEE"><font color="#000000" size="2" face="Tahoma">วันที่ <select name="mDate" id="mDate" class="select" > <?php $DateBirth = $rs[DateBirth]; $yearthai = explode("-",$DateBirth); $mDate = intval($yearthai[2]); $mMonth = intval($yearthai[1]); $mYear = intval($yearthai[0]); for($i=0;$i<=31;$i++) { if( $i == 0) echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n "; else echo"\n\t<option value=\"$i\">$i</option>\n "; } // getDay1to31(); ?> </select> เดือน <select name="mMonth" id="select3" class="select" > <?php $DateBirth = $rs[DateBirth]; $yearthai = explode("-",$DateBirth); $mDate= intval($yearthai[2]); $Month = intval($yearthai[1]); $mYear = intval($yearthai[0]); $mMonth = $Month; $CMonth = TxtThaiMonth($Month); for($i=-1;$i<=11;$i++) { $a = $i+1; if( $a == 0) echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n "; else echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n "; } // getThaiMonth(); ?> </select> ปี พ.ศ. <input name="mYear" type="text" class="input1" id="mYear" value="<? echo $mYear?>" size="10"> </font></td> </tr> <tr bordercolor="#CCCCCC"> <td nowrap="nowrap" bordercolor="#CCCCCC" bgcolor="#EEEEEE"><div align="center"><font color="#003366" size="2" face="Tahoma">ศาสนา</font></div></td> <td bordercolor="#CCCCCC" bgcolor="#EEEEEE"> </td> <td nowrap="nowrap" bordercolor="#CCCCCC" bgcolor="#EEEEEE"><font size="2" face="Tahoma"> <input type="radio" name="Religion" <?php if (!(strcmp("$rs[Religion]",พุทธ))) {echo "checked";} ?> value="พุทธ" onkeypress="return handleEnter(this, event)" /> พุทธ <input type="radio" name="Religion" <?php if (!(strcmp("$rs[Religion]",คริสต์))) {echo "checked";} ?> value="คริสต์" onkeypress="return handleEnter(this, event)" /> คริสต์ <input type="radio" name="Religion" <?php if (!(strcmp("$rs[Religion]",อิสลาม))) {echo "checked";} ?> value="อิสลาม" onkeypress="return handleEnter(this, event)" /> อิสลาม <input type="radio" name="Religion" <?php if (!(strcmp("$rs[Religion]",อื่นๆ))) {echo "checked";} ?> value="อื่นๆ" onkeypress="return handleEnter(this, event)" /> อื่นๆ</font></td> </tr> <tr> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><textarea name="Address" cols="40" rows="4" id="textarea" class="input1"><? echo $rs[Address]?></textarea></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2">ที่อยู่</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><strong><font size="2" face="Tahoma"><strong><font color="#003366" size="2" face="Tahoma"> <select name="ProvinceId" id="select" class="input1"> <?php $ProvinceId = $rs[ProvinceId]; $sql1 = "SELECT * FROM province Where ProvinceId='$ProvinceId' "; $result1= mysql_query($sql1); $sql2 = "SELECT * FROM province Order By ProvinceId "; $result2= mysql_query($sql2); while( $rss1 = mysql_fetch_array($result1)) { echo"<option value=\"$rss1[ProvinceId]\" ><b>$rss1[ProvinceName]</b></option>\n"; while( $rss2 = mysql_fetch_array($result2)) { echo"<option value=\"$rss2[ProvinceId]\" ><b>$rss2[ProvinceName]</b></option>\n"; } } ?> </select> </font></strong></font></strong></td> </tr> <tr> <td height="22" colspan="3" bgcolor="#FFFFFF"><div align="center"><strong><font size="4" face="Tahoma">ข้อมูลผู้ปกครอง</font></strong></div></td> </tr> <tr> <td height="22" bgcolor="#EEEEEE"><div align="center"><font size="2">ชื่อ -<font face="Tahoma, MS Sans Serif"> นาม</font>สกุล บิดา</font></div></td> <td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td bgcolor="#EEEEEE"><input name="Father_name" type="text" id="Father_name" value="<? echo $rs[Father_name]?>" size="30" class="input1" /> <font size="2" face="Tahoma">มารดา <input name="Mother_name" type="text" id="Mother_name" value="<? echo $rs[Mother_name]?>" size="30" class="input1" /> </font></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2">ที่อยู่</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><textarea name="Address2" cols="40" rows="5" id="Address2" class="input1"><? echo $rs[Address2]?></textarea></td> </tr> <tr> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"> </td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma">เบอร์โทรติดต่อ</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><input name="Telno" type="text" id="Telno" value="<? echo $rs[Telno]?>" class="input1" /></td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td colspan="3" bgcolor="#EEEEEE"><div align="center"><font size="4" face="Tahoma"><strong>ข้อมูลการศึกษา</strong></font></div></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma">สถาบันก่อนเข้าศึกษา</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><input name="Pre_inst" type="text" id="Pre_inst" value="<? echo $rs[Pre_inst]?>" size="50" class="input1" /></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma">Pre-G.P.A</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><input name="Pre_gpa" type="text" id="Pre_gpa" value="<? echo $rs[Pre_gpa]?>" /></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma">วิธีรับเข้า</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><select name="Select_Method" id="Select_Method" class="input1"> <option value="คัดเลือก">คัดเลือก</option> <option value="คัดเลือกจากโครงการ">คัดเลือกจากโครงการ</option> <option value="สอบ">สอบ</option> <option value="Entrance">Entrance</option> </select></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma">วันที่เข้าศึกษา</font></div></td> <td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td bgcolor="#EEEEEE"><font color="#000000" size="2" face="Tahoma">วันที่ <select name="mDate2" id="select4" class="select" > <?php $Date_in = $rs[Date_in]; $yearthai = explode("-",$Date_in); $mDate = intval($yearthai[2]); $mMonth = intval($yearthai[1]); $mYear = intval($yearthai[0]); for($i=0;$i<=31;$i++) { if( $i == 0) echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n "; else echo"\n\t<option value=\"$i\">$i</option>\n "; } // getDay1to31(); ?> </select> เดือน <select name="mMonth2" id="select5" class="select" > <?php $Date_in = $rs[Date_in]; $yearthai = explode("-",$Date_in); $mDate= intval($yearthai[2]); $Month = intval($yearthai[1]); $mYear2= intval($yearthai[0]); $mMonth = $Month; $CMonth = TxtThaiMonth($Month); for($i=-1;$i<=11;$i++) { $a = $i+1; if( $a == 0) echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n "; else echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n "; } // getThaiMonth(); ?> </select> ปี พ.ศ. <input name="mYear2" type="text" id="mYear2" size="10" class="input1" value="<? echo $mYear2?>"> </font></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2">สถาบันการศึกษา</font></div></td> <td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td bgcolor="#EEEEEE"><font size="2" face="Tahoma"> <input type="radio" name="Institute" <?php if (!(strcmp("$rs[Institute]",วิทยาลัยพยาบาล))) {echo "checked";} ?> value="วิทยาลัยพยาบาล" /> วิทยาลัยพยาบาล <input type="radio" name="Institute" <?php if (!(strcmp("$rs[Institute]",วิทยาลัยสาธารณสุข))) {echo "checked";} ?> value="วิทยาลัยสาธารณสุข" /> วิทยาลัยสาธารณสุข </font> </td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2">อาจารย์ที่ปรึกษา</font></div></td> <td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td> <td bgcolor="#EEEEEE"><select name="Teacher_code" id="Teacher_code" class="input1"> <?php $Teacher_code = $rs[Teacher_code]; $strSQL1 = "Select * From personal_tb Where Permision='2' AND Teacher_code='$Teacher_code'"; $result1 = mysql_query($strSQL1) or die("Error".mysql_error()); $strSQL2 = "SELECT * FROM personal_tb Where Permision='2' Order by Teacher_name "; $result2 = mysql_query($strSQL2) or die("Error".mysql_error()); while($rs1 = mysql_fetch_array($result1)) { echo"<option value=\"$rs1[Teacher_code]\" ><b>$rs1[Teacher_name] $rs1[Teacher_lastname]</b></option>\n"; while( $rs2 = mysql_fetch_array($result2)) { echo"<option value=\"$rs2[Teacher_code]\" ><b>$rs2[Teacher_name] $rs2[Teacher_lastname]</b></option>\n"; } } ?> </select></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2">สมรรถนะชั้นปี</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><textarea name="Affect_class" cols="50" id="Affect_class" class="input1"><? echo $rs[Affect_class]?></textarea></td> </tr> <tr> <td bgcolor="#EEEEEE"><div align="center"><font size="2">ข้อมูลเกี่ยวกับทุน</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><font size="2">ชื่อทุน <select name="Scholarship_code" id="Scholarship_code" class="input1" > <option></option> <?php $Scholarship_code = $rs[Scholarship_code]; $strSQL = "SELECT * FROM scholarship_tb "; $result1 = mysql_query($strSQL); $strSQL3 = "SELECT * FROM scholarship_tb Where Scholarship_code='$Scholarship_code' "; $result3 = mysql_query($strSQL3); while( $rss = mysql_fetch_array($result1)) { echo"<option value=\"$rss[Scholarship_code]\" ><b>$rss[Scholarship_name]</b></option>\n"; while($rss3 = mysql_fetch_array($result3)) { echo"<option value=\"$rss3[Scholarship_code]\" ><b>$rss3[Scholarship_name]</b></option>\n"; } } ?> </select> (ยังไม่มีในรายการ <font face="Tahoma, MS Sans Serif"><a href="#" class="g"><strong onclick="MM_openBrWindow('../Scholarship/AddScho.php','Scholarship','width=600,height=300')">Click</strong></a></font>)</font></td> </tr> <tr> <td rowspan="2" bgcolor="#EEEEEE"><div align="center"><font size="2">สถานที่พัก</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><font size="2"> <input type="radio" name="Address_cur" <?php if (!(strcmp("$rs[Address_cur]",ในวิทยาลัย))) {echo "checked";} ?> value="ในวิทยาลัย" /> ในวิทยาลัย <input name="Coll_in" type="text" id="Coll_in" value="<? echo $rs[Coll_in]?>" size="50" class="input1" /> </font></td> </tr> <tr> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><font size="2"> <input type="radio" name="Address_cur" <?php if (!(strcmp("$rs[Address_cur]",นอกวิทยาลัย))) {echo "checked";} ?> value="นอกวิทยาลัย" /> นอกวิทยาลัย <input name="Call_out" type="text" id="Call_out" value="<? echo $rs[Call_out]?>" size="50" class="input1" /> </font></td> </tr> <tr> <td rowspan="2" bgcolor="#EEEEEE"><div align="center"><font size="2">การเข้าร่วมกิจกรรม/ชมรม</font></div></td> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><font size="2"> <input type="radio" name="Circle_duty" <?php if (!(strcmp("$rs[Circle_duty]",เป็นกรรมการชมรม))) {echo "checked";} ?> value="เป็นกรรมการชมรม" /> เป็นกรรมการชมรม <input type="radio" name="Circle_duty" <?php if (!(strcmp("$rs[Circle_duty]",เป็นสมาชิกชมรม))) {echo "checked";} ?> value="เป็นสมาชิกชมรม" /> เป็นสมาชิกชมรม</font></td> </tr> <tr> <td bgcolor="#EEEEEE"> </td> <td bgcolor="#EEEEEE"><font size="2"> ชมรม <input name="Circle" type="text" id="Circle" value="<? echo $rs[Circle]?>" size="50" class="input1" /> </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 size="2"> <input name="Succ_Status" type="radio" <?php if (!(strcmp("$rs[Circle_duty]",กำลังศึกษา))) {echo "checked";} ?> value="0" checked="checked" /> <font face="Tahoma, MS Sans Serif">กำลังศึกษา</font> <input type="radio" name="Succ_Status" value="1" /> <font face="Tahoma, MS Sans Serif">สำเร็จการศึกษา</font> </font></td> </tr> <tr bgcolor="#AFCFEF"> <td colspan="3"><div align="center"> <input type="hidden" name="code" value="<? echo $rs[code]?>" /> <input type="submit" name="Submit" value=" บันทึก " /> </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 "; } ?>
|