<!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"><!-- InstanceBegin template="/Templates/index1.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <style type="text/css"> <!-- .style30 { font-size: 16px; font-weight: bold; } .style32 {font-size: 18px; color: #FF0000; } .style32 {font-size: 18px; color: #FF0000; } .style32 {color: #FF0000; font-size: 18px;} .style33 {font-family: Tahoma} .style36 {font-size: 16px; font-weight: bold; font-family: Tahoma; } --> </style> <!-- InstanceEndEditable --> <style type="text/css"> <!-- .style19 {font-size: 18px} .style23 {color: #FF0000} a:link { text-decoration: none; color: #FF0000; } a:visited { text-decoration: none; color: #FF0000; } a:hover { text-decoration: none; color: #FF0000; } a:active { text-decoration: none; color: #FF0000; } .style27 {color: #FF0000; font-size: 18px;} .style28 { font-size: 16px; font-style: italic; } .style29 {color: #CC0000} --> </style> </head> <body> <div align="center"> <table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3"><img src="New folder/images/images/tem_01_01.gif" width="800" height="140" /></td> </tr> <tr> <td rowspan="2" valign="top"><table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="top"><img src="New folder/images/images/tem_01_02.gif" width="201" height="95" /></td> </tr> <tr> <td height="250" align="center" valign="top" background="New folder/images/images/tem_06.gif"><!-- InstanceBeginEditable name="EditRegion4" --> <table width="161" height="222" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td width="161" class="style7"><div align="center" class="style19 style23 style19"><a href="history_marai.php">เกี่ยวกับโรงเรียน</a></div></td> </tr> <tr> <td class="style7"><div align="center" class="style24 style19"><a href="register1.php">รับสมัครนักเรียน</a></div></td> </tr> <tr> <td class="style7"><div align="center" class="style24 style19"><a href="showteather1.php">รายชื่ออาจารย์</a></div></td> </tr> <tr> <td class="style7"><div align="center" class="style24 style19"><a href="showregister1.php">รายชื่อนักเรียน</a></div></td> </tr> <tr> <td class="style7"><div align="center" class="style24 style19"><a href="s_subject.php">วิชาเรียน</a></div></td> </tr> <tr> <td class="style7"><div align="center" class="style24 style19"><a href="Classroom_timetable.php">ตารางเรียน</a></div></td> </tr> <tr> <td class="style7"><div align="center" class="style24 style19"><a href="show_score.php">คะแนน</a></div></td> </tr> <tr> <td class="style7"><div align="center" class="style24 style19"><a href="history_1.php">ประวัติโรงเรียน</a></div></td> </tr> <tr> <td class="style7"><div align="center" class="style23 style19"><a href="PageUploadToMySQL3.php">ภาพกิจกรรม</a></div></td> </tr> <tr> <td class="style7"><div align="center"><a href="logout.php" class="style32">ออกจากระบบ</a></div></td> </tr> </table> <p> </p> <!-- InstanceEndEditable --></td> </tr> <tr> <td align="center" valign="top"><img src="New folder/images/images/tem_07.gif" width="201" height="111" /></td> </tr> </table></td> <td height="13" align="center" valign="top"><img src="New folder/images/images/tem_03.jpg" width="599" height="13" /></td> <td rowspan="2"><img src="New folder/images/images/tem_05.jpg" width="11" height="423" /></td> </tr> <tr> <td align="center" valign="top" background="New folder/images/images/tem_04.gif"><!-- InstanceBeginEditable name="EditRegion3" --> <form id="form1" name="form1" method="post" action=""> <p>คะแนน</p> <p> <label></label> <form name="frmSearch" method="post" action="<?=$_SERVER['SCRIPT_NAME'];?>"> <table width="599" border="1"> <tr> <th><strong>วิชา</strong> <select name="ddlSelect" id="ddlSelect"> </select> <label> <strong>ชั้น</strong> <select name="ddlSelect2" id="ddlSelect2"> <option>- Select -</option> <option value="ประถมศึกษาปีที่ 1" <?if($_POST["ddlSelect"]=="ประถมศึกษาปีที่ 1"){echo"selected";}?>>ประถมศึกษาปีที่ 1</option> <option>ประถมศึกษาปีที่ 2</option> <option>ประถมศึกษาปีที่ 3</option> <option>ประถมศึกษาปีที่ 4</option> <option>ประถมศึกษาปีที่ 5</option> <option>ประถมศึกษาปีที่ 6</option> </select> </label> <input type="submit" value="Search"></th> </tr> </table> </form> <? $objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database"); $objDB = mysql_select_db("banmarai"); mysql_query("SET NAMES utf-8"); mysql_query("SET character_set_results=utf8"); mysql_query("SET character_set_client=utf8"); mysql_query("SET character_set_connection=utf8"); //*** Update Condition ***// if($_GET["Action"] == "Save") { for($i=1;$i<=$_POST["hdnLine"];$i++) { $strSQL = "UPDATE register SET "; $strSQL .="grade = '".$_POST["t4"]."' "; $strSQL .="WHERE reg_id = '".$_POST["hdnCustomerID$i"]."' "; $objQuery = mysql_query($strSQL); } //header("location:$_SERVER[PHP_SELF]"); //exit(); } $strSQL = "SELECT * FROM register ORDER BY reg_id ASC"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); ?> <form name="frmMain" method="post" action="score2.php?Action=Save"> <table width="600" border="1"> <tr> <th width="80"> <div align="center">รหัส</div></th> <th width="127"> <div align="center">ชื่อ</div></th> <th width="133"> <div align="center">นามสกุล</div></th> <th width="87"> <div align="center">เกรด </div></th> <th width="27"> <div align="center"><span class="style36">Md</span></div></th> <th width="27"><span class="style36">Fn</span></th> <th width="31"> <div align="center"><span class="style36">Tt</span></div></th> <th width="36"><span class="style36">Gd</span></th> </tr> <? $i =0; while($objResult = mysql_fetch_array($objQuery)) { $i = $i + 1; ?> <tr> <td><div align="center"> <input type="hidden" name="hdnCustomerID<?=$i;?>" size="5" value="<?=$objResult["reg_id"];?>"><?=$objResult["reg_id"];?> </div></td> <td><?=$objResult["Name"];?> </td> <td><?=$objResult["Sername"];?></td> <td><div align="center"><?=$objResult["grade"];?></div></td> <td align="center"><span class="style33"> <input name="t1" type="text" id="t1[" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" size="1" maxlength="2" style="width:20px;border:none;text-align:center;" /> </span></td> <td align="right"><span class="style33"> <input name="t2" type="text" id="t2" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" size="1" maxlength="2" style="width:20px;border:none;text-align:center; "/> </span></td> <td align="right"><span class="style33"> <input name="t3" type="text" id="t3" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" size="1" maxlength="3" style="width:20px;border:none;text-align:center; "/> </span></td> <td align="center"><span class="style33"> <input name="t4" type="text" id="t4[$a]" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" size="1" style="width:20px;border:none; text-align:center;"/> </span></td> </tr> <? } ?> </table> <input type="submit" name="submit" value="submit"> <input type="hidden" name="hdnLine" value="<?=$i;?>"> </form> <? mysql_close($objConnect); ?> <meta http-equiv="Content-Type" content="text/html; charset=" /> </p> <div align="center"> <p> </p> <p> <font size="2"> </font><font size="2"> <script language="JavaScript" type="text/javascript"> var obj= document.all; function sum(){ for (var a=0; a<100 ;a++){ obj.t3[a].value=parseInt(obj.t1[a].value)+parseInt(obj.t2[a].value); if ((!obj.t1[a].value)||(!obj.t2[a].value)) { obj.t3[a].value='-'; obj.t4[a].value='-'; } else if (obj.t3[a].value>100) { obj.t4[a].value='Error'; } else if ((obj.t3[a].value>=obj.a1.value)||(obj.t3[a].value==100)) { obj.t4[a].value='4'; } else if ((obj.t3[a].value>=obj.b1.value)&&(obj.t3[a].value<=obj.b2.value)) { obj.t4[a].value='3.5'; } else if ((obj.t3[a].value>=obj.b3.value)&&(obj.t3[a].value<=obj.b4.value)) { obj.t4[a].value='3'; } else if ((obj.t3[a].value>=obj.c1.value)&&(obj.t3[a].value<=obj.c2.value)) { obj.t4[a].value='2.5'; } else if ((obj.t3[a].value>=obj.c3.value)&&(obj.t3[a].value<=obj.c4.value)) { obj.t4[a].value='2'; } else if ((obj.t3[a].value>=obj.d1.value)&&(obj.t3[a].value<=obj.d2.value)) { obj.t4[a].value='1.5'; } else if ((obj.t3[a].value>=obj.d3.value)&&(obj.t3[a].value<=obj.d4.value)) { obj.t4[a].value='1'; } else if (obj.t3[a].value<=obj.e2.value) { obj.t4[a].value='0'; } } } </script> <table border="0" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC" bgcolor="#000000" > <tr bordercolor="#000000" bgcolor="#FFFFFF"> <td width="150" height="15" align="center" bgcolor="#CCCCCC" ><span class="style30">ช่วงคะแนน</span></td> <td width="55" height="15" align="center" bgcolor="#CCCCCC" ><span class="style30">ระดับ</span></td> </tr> <tr bordercolor="#000000" bgcolor="#FFFFFF"> <td width="150" height="15" bgcolor="#FFFFFF"><div align="center"> <input name="a1" type="text" id="a1" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="80" size="1" maxlength="3" style="width:24px;border:none;text-align:center; "/> - 100</div></td> <td width="55" height="15" align="center" bgcolor="#99FF66" ><div align="center"><span class="style33">4</span></div></td> </tr> <tr bordercolor="#000000" bgcolor="#FFFFFF"> <td width="150" height="15" bgcolor="#FFFFFF"><div align="center"> <input name="b1" type="text" id="b1" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="75" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> - <input name="b2" type="text" id="b2" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="79" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> </div></td> <td width="55" height="15" align="center" bgcolor="#99FF66" ><div align="center"><span class="style33"> 3.5</span></div></td> </tr> <tr bordercolor="#000000" bgcolor="#FFFFFF"> <td width="150" height="15" bgcolor="#FFFFFF"><div align="center"> <input name="b3" type="text" id="b3" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="70" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> - <input name="b4" type="text" id="b4" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="74" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> </div></td> <td width="55" height="15" align="center" bgcolor="#99FF66" ><div align="center"><span class="style33">3</span></div></td> </tr> <tr bordercolor="#000000" bgcolor="#FFFFFF"> <td width="150" height="26" bgcolor="#FFFFFF"><div align="center"> <input name="c1" type="text" id="c1" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="65" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> - <input name="c2" type="text" id="c2" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="69" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> </div></td> <td width="55" height="26" align="center" bgcolor="#99FF66" ><div align="center"><span class="style33"> 2.5</span></div></td> </tr> <tr bordercolor="#000000" bgcolor="#FFFFFF"> <td width="150" height="15" bgcolor="#FFFFFF"><div align="center"> <input name="c3" type="text" id="c3" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="60" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> - <input name="c4" type="text" id="c4" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="64" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> </div></td> <td width="55" height="15" align="center" bgcolor="#99FF66" ><div align="center"><span class="style33">2</span></div></td> </tr> <tr bordercolor="#000000" bgcolor="#FFFFFF"> <td width="150" height="15" bgcolor="#FFFFFF"><div align="center"> <input name="d1" type="text" id="d1" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="55" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> - <input name="d2" type="text" id="d2" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="59" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> </div></td> <td width="55" height="15" align="center" bgcolor="#99FF66" ><div align="center"><span class="style33"> 1.5</span></div></td> </tr> <tr bordercolor="#000000" bgcolor="#FFFFFF"> <td width="150" height="15" bgcolor="#FFFFFF"><div align="center"> <input name="d3" type="text" id="d3" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="50" size="1" maxlength="2" style="width:24px;border:none; text-align:center;"/> - <input name="d4" type="text" id="d4" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="54" size="1" maxlength="2" style="width:24px;border:none; text-align:center; "/> </div></td> <td width="55" height="15" align="center" bgcolor="#99FF66" ><div align="center"><span class="style33">1</span></div></td> </tr> <tr bordercolor="#000000" bgcolor="#FFFFFF"> <td width="150" height="15" bgcolor="#FFFFFF"><div align="center"> 0 - <input name="e2" type="text" id="e2" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" value="49" size="1" maxlength="2" style="width:24px;border:none; text-align:center;"/> </div></td> <td width="55" height="15" align="center" bgcolor="#99FF66" ><div align="center"><span class="style33"> 0</span></div></td> </tr> </table> </div> </form> <!-- InstanceEndEditable --> <marquee class=text onmouseover='this.stop()' onmouseout='this.start()' scrollamount='5' scrolldelay='20' direction='left' height='40' align="middle" ><p align="center" class="style28 style19 style29">โรงเรียนบ้านเมรัย หมู่ที่ 5 ตำบลสินปุน อำเภอพระแสง จังหวัดสุราษฎร์ธานี </p> </marquee></td> </tr> <tr> <td colspan="3"><img src="New folder/images/images/tem_08.gif" width="800" height="24" /></td> </tr> </table> </div> </body> <!-- InstanceEnd --></html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง