Viewing file: AddStudent.php (16.59 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 course_tb Where Course_code='$Course_code'"; $result = mysql_query($sql) or die("Error".mysql_error()); $row = mysql_fetch_array($result); ?> <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="InsertStudent.php"> <table width="82%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#99CCFF"> <tr bgcolor="#FFCC99"> <td height="35" colspan="3"><div align="center"><strong><font color="#003366" size="4" face="Tahoma">เพิ่มข้อมูลนักศึกษา </font></strong></div></td> </tr> <tr bgcolor="#86ade2"> <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"><select name="Course_code"> <?php $strSQL = "SELECT * FROM course_tb "; $result1 = mysql_query($strSQL); while( $rss = mysql_fetch_array($result1)) { echo"<option value=\"$rss[Course_code]\" ><b>$rss[Course_name]</b></option>\n"; } ?> </select> <font color="#000000" size="2" face="Tahoma">รุ่นที่ <input name="Class" type="text" id="Class" size="5" maxlength="2" /> </font></td> </tr> <tr bgcolor="#86ade2"> <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" size="3" maxlength="3" /></td> </tr> <tr bgcolor="#86ade2"> <td width="27%" bgcolor="eeeeee"><div align="center"><font size="2" face="Tahoma">รหัสนักศึกษา</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" size="9" maxlength="9" /></td> </tr> <tr bgcolor="#86ade2"> <td 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" value="นาย" onkeypress="return handleEnter(this, event)"> นาย <input type="radio" name="First_name" value="นางสาว" onkeypress="return handleEnter(this, event)"> นางสาว <input type="radio" name="First_name" value="นาง" onkeypress="return handleEnter(this, event)" /> นาง </font></td> </tr> <tr bgcolor="#86ade2"> <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" size="25" /> <font size="2">นามสกุล <input name="Lastname" type="text" id="Lastname" size="25" /> </font></td> </tr> <tr bgcolor="#86ade2"> <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" name="Sex" value="ชาย" /> ชาย <input type="radio" name="Sex" value="หญิง" /> หญิง</font></td> </tr> <tr bgcolor="#86ade2"> <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" > <? getDay1to31();?> </select> เดือน <select name="mMonth" id="mMonth" class="select" > <? getThaiMonth();?> </select> ปี พ.ศ. <input name="mYear" type="text" class="input" id="mYear" size="5" maxlength="4"> </font></td> </tr> <tr bordercolor="#CCCCCC" bgcolor="#86ade2"> <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" value="พุทธ" onkeypress="return handleEnter(this, event)" /> พุทธ <input type="radio" name="Religion" value="คริสต์" onkeypress="return handleEnter(this, event)" /> คริสต์ <input type="radio" name="Religion" value="อิสลาม" onkeypress="return handleEnter(this, event)" /> อิสลาม <input type="radio" name="Religion" value="อื่นๆ" onkeypress="return handleEnter(this, event)" /> อื่นๆ</font></td> </tr> <tr bgcolor="#86ade2"> <td bgcolor="eeeeee"><div align="center"><font size="2">ที่อยู่</font></div></td> <td bgcolor="eeeeee"> </td> <td bgcolor="eeeeee"><textarea name="Address" cols="40" rows="3" id="Address"></textarea></td> </tr> <tr bgcolor="#86ade2"> <td bgcolor="eeeeee"><div align="center"><font size="2" face="Tahoma">จังหวัด</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="select5" class="input1"> <?php $sql3 = "SELECT * FROM province Order By ProvinceId "; $result3= mysql_query($sql3); while( $rss = mysql_fetch_array($result3)) { echo"<option value=\"$rss[ProvinceId]\" ><b>$rss[ProvinceName]</b></option>\n"; } ?> </select> </font></strong></font></strong></td> </tr> <tr bgcolor="#86ade2"> <td bgcolor="eeeeee"><div align="center"><font size="2" face="Tahoma">รูปภาพ</font></div></td> <td bgcolor="eeeeee"> </td> <td bgcolor="eeeeee"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="73%"><div align="center"> <input name="Img1" type="file" id="Img1" onchange="browse()" /> </div></td> <td width="27%"><div align="center"><img src=" " name="Imag1" width="100" height="100" id="Imag1" /></div></td> </tr> </table></td> </tr> <tr bgcolor="#FFCC99"> <td height="30" colspan="3" bgcolor="eeeeee"><div align="center"><font face="Tahoma">ข้อมูลผู้ปกครอง</font></div></td> </tr> <tr bgcolor="#86ade2"> <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" size="30" /> <font size="2" face="Tahoma">มารดา <input name="Mother_name" type="text" id="Mother_name" size="30" /> </font></td> </tr> <tr bgcolor="#86ade2"> <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="3" id="Address2"></textarea></td> </tr> <tr bgcolor="#86ade2"> <td bgcolor="eeeeee"><div align="center"><font size="2" face="Tahoma">จังหวัด</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="ProvinceIdFarter" id="select3" class="input1"> <?php $sql3 = "SELECT * FROM province Order By ProvinceId "; $result3= mysql_query($sql3); while( $rss = mysql_fetch_array($result3)) { echo"<option value=\"$rss[ProvinceId]\" ><b>$rss[ProvinceName]</b></option>\n"; } ?> </select> </font></strong></font></strong></td> </tr> <tr bgcolor="#86ade2"> <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" /></td> </tr> <tr bgcolor="#FFCC99"> <td height="30" colspan="3" bgcolor="eeeeee"><div align="center"><font size="4" face="Tahoma"><strong>ข้อมูลการศึกษา</strong></font></div></td> </tr> <tr bgcolor="#86ade2"> <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" size="50" /></td> </tr> <tr bgcolor="#86ade2"> <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" /></td> </tr> <tr bgcolor="#86ade2"> <td height="24" 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"> <option value="คัดเลือก">คัดเลือก</option> <option value="คัดเลือกจากโครงการ">คัดเลือกจากโครงการ</option> <option value="สอบ">สอบ</option> <option value="Entrance">Entrance</option> </select></td> </tr> <tr bgcolor="#86ade2"> <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"><input name="Term" type="text" id="Term" size="5" /></td> </tr> <tr bgcolor="#86ade2"> <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="select" class="select" > <? getDay1to31();?> </select> เดือน <select name="mMonth2" id="select2" class="select"> <? getThaiMonth();?> </select> ปี พ.ศ. <input name="mYear2" type="text" class="input" id="mYear2" size="5" maxlength="4"> </font></td> </tr> <tr bgcolor="#86ade2"> <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"><select name="Teacher_code" id="Teacher_code"> <?php $strSQL2 = "SELECT * FROM personal_tb Where Permision='2' Order by Teacher_name "; $result2 = mysql_query($strSQL2); 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 bgcolor="#86ade2"> <td bgcolor="eeeeee"><div align="center"><font size="2" face="Tahoma">สมรรถนะชั้นป</font><font size="2">ี</font></div></td> <td bgcolor="eeeeee"> </td> <td bgcolor="eeeeee"><textarea name="Affect_class" cols="50" id="Affect_class"></textarea></td> </tr> <tr bgcolor="#86ade2"> <td bgcolor="eeeeee"><div align="center"><font size="2" face="Tahoma">ข้อมูลเกี่ยวกับทุน</font></div></td> <td bgcolor="eeeeee"> </td> <td bgcolor="eeeeee"><font size="2">ชื่อทุน <select name="Scholarship_code" id="Scholarship_code"> <option></option> <?php $strSQL = "SELECT * FROM scholarship_tb "; $result1 = mysql_query($strSQL); while( $rss = mysql_fetch_array($result1)) { echo"<option value=\"$rss[Scholarship_code]\" ><b>$rss[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>) <input name="Call_out" type="text" id="Call_out" size="20" /> </font></td> </tr> <tr bgcolor="#86ade2"> <td rowspan="2" bgcolor="eeeeee"><div align="center"><font size="2" face="Tahoma">สถานที่พัก</font></div></td> <td bgcolor="eeeeee"> </td> <td bgcolor="eeeeee"><font size="2"> <input type="radio" name="Address_cur" value="ในวิทยาลัย" /> ในวิทยาลัย <input name="Coll_in" type="text" id="Coll_in" size="50"> </font></td> </tr> <tr> <td bgcolor="eeeeee"> </td> <td bgcolor="eeeeee"><font size="2"> <input type="radio" name="Address_cur" value="นอกวิทยาลัย" /> นอกวิทยาลัย </font></td> </tr> <tr bgcolor="#86ade2"> <td rowspan="2" bgcolor="eeeeee"><div align="center"><font size="2" face="Tahoma">การเข้าร่วมกิจกรรม/ชมรม</font></div></td> <td bgcolor="eeeeee"> </td> <td bgcolor="eeeeee"><font size="2"> <input type="radio" name="Circle_duty" value="เป็นกรรมการชมรม" /> เป็นกรรมการชมรม <input type="radio" name="Circle_duty" value="เป็นสมาชิกชมรม" /> เป็นสมาชิกชมรม</font></td> </tr> <tr> <td bgcolor="eeeeee"> </td> <td bgcolor="eeeeee"><font size="2"> ชมรม <input name="Circle" type="text" id="Circle" size="50" /> </font></td> </tr> <tr bgcolor="#86ade2"> <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" 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="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 "; } ?>
|