<?php <? include "connect/connect.php"; $sql = "select * from $tb where $tb.id_group = '$group_search' order by $tb.id_no asc "; $dbquery = mysql_db_query($db, $sql); $num_rows = mysql_num_rows($dbquery); if ($num_rows<1) {echo "";} $i=0; while ($i<$num_rows){ $result=mysql_fetch_array($dbquery); $id_no=$result[id_no]; $pname=$result[pname]; $name=$result[name]; ?> <script language="javascript"> var obj= document.all; function sum(){ obj.t3.value=parseInt(obj.t1.value)+parseInt(obj.t2.value); if ((!obj.t1.value)||(!obj.t2.value)) { obj.t4.value='-'; } else if (obj.t3.value>100) { obj.t4.value='Error'; } else if ((obj.t3.value>=obj.a1.value)||(obj.t3.value==100)) { obj.t4.value='A'; } else if ((obj.t3.value>=obj.b1.value)&&(obj.t3.value<=obj.b2.value)) { obj.t4.value='B+'; } else if ((obj.t3.value>=obj.b3.value)&&(obj.t3.value<=obj.b4.value)) { obj.t4.value='B'; } else if ((obj.t3.value>=obj.c1.value)&&(obj.t3.value<=obj.c2.value)) { obj.t4.value='C+'; } else if ((obj.t3.value>=obj.c3.value)&&(obj.t3.value<=obj.c4.value)) { obj.t4.value='C'; } else if ((obj.t3.value>=obj.d1.value)&&(obj.t3.value<=obj.d2.value)) { obj.t4.value='D+'; } else if ((obj.t3.value>=obj.d3.value)&&(obj.t3.value<=obj.d4.value)) { obj.t4.value='D'; } else if (obj.t3.value<=obj.e2.value) { obj.t4.value='E'; } } </script> <? echo "$id_no $pname $name; "?> <input name="t1[]" type="text" id="t1" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" size="2" maxlength="2"/> <input name="t2[]" type="text" id="t2" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" size="2" maxlength="2" /> <input name="t3[]" type="text" id="t3" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" size="3" maxlength="3"/> <input name="t4[]" type="text" id="t4" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" size="1"/> <? $i++; } ?> <input name="a1" type="text" id="a1" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="800" size="1" maxlength="3"/> -100 <br> <input name="b1" type="text" id="b1" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="75" size="1" maxlength="2"/> - <input name="b2" type="text" id="b2" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="79" size="1" maxlength="2"/> <br> <input name="b3" type="text" id="b3" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="70" size="1" maxlength="2"/> - <input name="b4" type="text" id="b4" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="74" size="1" maxlength="2"/> <br> <input name="c1" type="text" id="c1" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="65" size="1" maxlength="2"/> - <input name="c2" type="text" id="c2" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="69" size="1" maxlength="2"/> <br> <input name="c3" type="text" id="c3" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="60" size="1" maxlength="2"/> - <input name="c4" type="text" id="c4" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="64" size="1" maxlength="2"/> <br> <input name="d1" type="text" id="d1" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="55" size="1" maxlength="2"/> - <input name="d2" type="text" id="d2" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="59" size="1" maxlength="2"/> <br> <input name="d3" type="text" id="d3" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="50" size="1" maxlength="2"/> - <input name="d4" type="text" id="d4" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="54" size="1" maxlength="2"/> <br> 0 - <input name="e2" type="text" id="e2" onFocus="sum()" onBlur="sum()" onChange="sum()" onKeyUp="sum()" value="49" size="1" maxlength="2"/> ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง