<?php require_once('../../Connections/config.php'); ?> <?php $colname_rsStd = "-1"; if (isset($_GET['idstudent'])) { $colname_rsStd = (get_magic_quotes_gpc()) ? $_GET['idstudent'] : addslashes($_GET['idstudent']); } mysql_select_db($database_config, $config); $query_rsStd = sprintf("SELECT * FROM student WHERE idstudent = '%s'", $colname_rsStd); $rsStd = mysql_query($query_rsStd, $config) or die(mysql_error()); $row_rsStd = mysql_fetch_assoc($rsStd); $totalRows_rsStd = mysql_num_rows($rsStd); mysql_select_db($database_config, $config); $query_rsGroup = "SELECT * FROM group_reg ORDER BY name_group ASC"; $rsGroup = mysql_query($query_rsGroup, $config) or die(mysql_error()); $row_rsGroup = mysql_fetch_assoc($rsGroup); $totalRows_rsGroup = mysql_num_rows($rsGroup); $colname_rsStd = "-1"; if (isset($_GET['idstudent'])) { $colname_rsStd = (get_magic_quotes_gpc()) ? $_GET['idstudent'] : addslashes($_GET['idstudent']); } mysql_select_db($database_config, $config); mysql_query("SET character_set_results=utf8"); $query_rsStd = sprintf("SELECT * FROM student WHERE idstudent = '%s'", $colname_rsStd); $rsStd = mysql_query($query_rsStd, $config) or die(mysql_error()); $row_rsStd = mysql_fetch_assoc($rsStd); $totalRows_rsStd = mysql_num_rows($rsStd); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <title>;</title> <style type="text/css"> <!-- .style2 { font-family: "MS Sans Serif"; font-size: 14px; } .style4 {font-size: 12px} .style5 {font-weight: bold; color: #F0F0F0; font-family: "MS Sans Serif";} .style10 {font-family: "MS Sans Serif"; font-size: 14px; color: #FF0000; } .style14 { font-family: "MS Sans Serif"; font-size: 12px; } .style15 {font-family: "MS Sans Serif"; font-size: 12px; color: #0000FF; } .style16 {color: #0000FF} .style17 { color: #FF0000; font-weight: bold; } --> </style> </head> <body> <table width="469" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="469" height="27" valign="top" class="style4"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#009900"> <!--DWLayoutTable--> <tr> <td width="469" height="27" valign="middle"></td> </tr> </table></td> </tr> <script language="JavaScript"> function resutName(strCusName) { frmMain.txtID.value = strCusName.split("|")[0]; frmMain.txtName.value = strCusName.split("|")[1]; } </script> <tr> <td height="399" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="468" height="399" valign="top"><form id="fm_regis" name="fm_regis" method="post" action=""> <p class="style2"> <strong><br /> ชื่อ-นามสกุล </strong> <label> <input name="name" type="text" id="name" value="<?php echo $row_rsStd['prename']; ?>" size="7" /> </label> <input name="firstname" type="text" id="firstname" value="<?php echo $row_rsStd['firstname']; ?>" size="10" /> <label> <input name="lastname" type="text" id="lastname" value="<?php echo $row_rsStd['lastname']; ?>" /> </label> <br /> <br /> <strong>ระดับชั้น <label> </label> <label> </label> <label> </label> <label></label> <label> <input name="classnow" type="text" id="classnow" value="<?php echo $row_rsStd['classnow']; ?>" /> </label> รหัส <label> <input name="idstudent" type="text" id="idstudent" value="<?php echo $row_rsStd['idstudent']; ?>" size="5" /> </label> เลขที่ <input name="no" type="text" id="no" value="<?php echo $row_rsStd['no']; ?>" size="5" /> <br /> <br /> ปีการศึกษา </strong> <label> <select name="year" id="year"> <option>เลือกปีการศึกษา</option> <option value="2556">2556</option> <option value="2557">2557</option> <option value="2558">2558</option> </select> </label> <strong>ภาคเรียน <select name="term" id="term"> <option>กรุณาเลือกภาคเรียน</option> <option value="1">1</option> <option value="2">2</option> </select> </strong></p> <p class="style2"><fieldset><legend class="style10">เลือกรายการที่ลงทะเบียน</legend> <p> <span class="style2"> <label></label> </span><span class="style2 style13"><label><form action="registere-form.php" method="POST" name="frmMain"> <p class="style15">กรุณาเลือกุล่มลงทะเบียน <select name="lmName1" OnChange="window.location='?item='+this.value;"> <option value=""><-- Please Select Item --></option> <? $strSQL = "SELECT * FROM group_reg ORDER BY id ASC"; mysql_query("SET character_set_results=utf8"); $objQuery = mysql_query($strSQL); while($objResult = mysql_fetch_assoc($objQuery)) { if($_GET["item"] == $objResult["id"]) { $sel = "selected"; } else { $sel = ""; } ?> <option value="<?=$objResult["id"];?>" <?=$sel;?>> <?=$objResult["name_group"];?> </option> <? } ?> </select> <span class="style17"><================เลือก</span></p> <p class="style15">กลุ่มที่ถูกเลือก <? if($_GET[""] != "") { $strSQL = "SELECT * FROM group_reg WHERE id = '".$_GET[""]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input name="name_group" type="text" id="name_group" value="<?=$objResult2["name_group"];?>"> </p> <p class="style15">ค่าธรรมเนียมการเรียน <? if($_GET["item"] != "") { $strSQL = "SELECT * FROM group_reg WHERE id = '".$_GET["item"]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input name="learning" type="text" id="learning" value="<?=$objResult2["learning"];?>" size="10" /> บาท </p> <p class="style15">ค่าอาหารกลางวัน <? if($_GET["item"] != "") { $strSQL = "SELECT * FROM group_reg WHERE id = '".$_GET["item"]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input name="food" type="text" id="food" value="<?=$objResult2["food"];?>" size="10" /> บาท</p> <p class="style15">ค่าเรียนคอมพิวเตอร์ <? if($_GET["item"] != "") { $strSQL = "SELECT * FROM group_reg WHERE id = '".$_GET["item"]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input name="computer" type="text" id="computer" value="<?=$objResult2["computer"];?>" size="10" /> บาท</p> <p class="style15">ค่าเรียนภาษาอังกฤษ <? if($_GET["item"] != "") { $strSQL = "SELECT * FROM group_reg WHERE id = '".$_GET["item"]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input name="english" type="text" id="english" value="<?=$objResult2["english"];?>" size="10" /> บาท</p> <p class="style15">ค่าตรวจสุขภาพ <? if($_get["item"] != "") { $strSQL = "SELECT * FROM group_reg WHERE id = '".$_GET["item"]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input name="health" type="text" id="health" value="<?=$objResult2["health"];?>" size="10" /> บาท</p> <p class="style14"><span class="style16">ค่ากิจกรรมเสริม <? if($_GET["item"] != "") { $strSQL = "SELECT * FROM group_reg WHERE id = '".$_GET["item"]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input name="special" type="text" id="special" value="<?=$objResult2["special"];?>" size="10" /> </span><span class="style15">บาท</span></p> <p class="style14"><span class="style16">ค่าธรรมเนียมแรกเข้า <? if($_GET["item"] != "") { $strSQL = "SELECT * FROM group_reg WHERE id = '".$_GET["item"]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input name="first" type="text" id="first" value="<?=$objResult2["first"];?>" size="10" /> </span><span class="style15">บาท</span></p> <p class="style14"><span class="style16">ค่ารถรับ-ส่ง <? if($_GET["item"] != "") { $strSQL = "SELECT * FROM group_reg WHERE id = '".$_GET["item"]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input name="car" type="text" id="car" value="<?=$objResult2["car"];?>" size="10" /> </span><span class="style15">บาท</span><br /> </label> </span> </p> </fieldset> </p> </form> <div align="center"> <label> <input type="submit" name="Submit" value="บันทึก" /> </label> </div> </form></td> <td width="1"> </td> </tr> </table></td> </tr> </table> </body> </html> <?php mysql_free_result($rsStd); mysql_free_result($rsGroup); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง