003.
<head>
004.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
005.
<!-- InstanceBeginEditable name=
"doctitle"
-->
006.
<title>Untitled Document</title>
007.
<!-- InstanceEndEditable -->
008.
<!-- InstanceBeginEditable name=
"head"
-->
009.
<style type=
"text/css"
>
010.
<!--
011.
.style30 {
012.
font-size: 16px;
013.
font-weight: bold;
014.
}
015.
.style32 {font-size: 18px; color: #FF0000; }
016.
.style32 {font-size: 18px; color: #FF0000; }
017.
.style32 {color: #FF0000; font-size: 18px;}
018.
.style33 {font-family: Tahoma}
019.
.style36 {font-size: 16px; font-weight: bold; font-family: Tahoma; }
020.
-->
021.
</style>
022.
023.
024.
025.
<!-- InstanceEndEditable -->
026.
<style type=
"text/css"
>
027.
<!--
028.
.style19 {font-size: 18px}
029.
.style23 {color: #FF0000}
030.
a:link {
031.
text-decoration: none;
032.
color: #FF0000;
033.
}
034.
a:visited {
035.
text-decoration: none;
036.
color: #FF0000;
037.
}
038.
a:hover {
039.
text-decoration: none;
040.
color: #FF0000;
041.
}
042.
a:active {
043.
text-decoration: none;
044.
color: #FF0000;
045.
}
046.
.style27 {color: #FF0000; font-size: 18px;}
047.
.style28 {
048.
font-size: 16px;
049.
font-style: italic;
050.
}
051.
.style29 {color: #CC0000}
052.
-->
053.
</style>
054.
</head>
055.
056.
<body>
057.
<div align=
"center"
>
058.
<table width=
"200"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
059.
<tr>
060.
<td colspan=
"3"
><img src=
"New folder/images/images/tem_01_01.gif"
width=
"800"
height=
"140"
/></td>
061.
</tr>
062.
<tr>
063.
<td rowspan=
"2"
valign=
"top"
><table width=
"100"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
064.
<tr>
065.
<td align=
"center"
valign=
"top"
><img src=
"New folder/images/images/tem_01_02.gif"
width=
"201"
height=
"95"
/></td>
066.
</tr>
067.
<tr>
068.
<td height=
"250"
align=
"center"
valign=
"top"
background=
"New folder/images/images/tem_06.gif"
><!-- InstanceBeginEditable name=
"EditRegion4"
-->
069.
<table width=
"161"
height=
"222"
border=
"0"
align=
"right"
cellpadding=
"0"
cellspacing=
"0"
>
070.
<tr>
071.
<td width=
"161"
class
=
"style7"
><div align=
"center"
class
=
"style19 style23 style19"
><a href=
"history_marai.php"
>เกี่ยวกับโรงเรียน</a></div></td>
072.
</tr>
073.
<tr>
074.
<td
class
=
"style7"
><div align=
"center"
class
=
"style24 style19"
><a href=
"register1.php"
>รับสมัครนักเรียน</a></div></td>
075.
</tr>
076.
<tr>
077.
<td
class
=
"style7"
><div align=
"center"
class
=
"style24 style19"
><a href=
"showteather1.php"
>รายชื่ออาจารย์</a></div></td>
078.
</tr>
079.
<tr>
080.
<td
class
=
"style7"
><div align=
"center"
class
=
"style24 style19"
><a href=
"showregister1.php"
>รายชื่อนักเรียน</a></div></td>
081.
</tr>
082.
<tr>
083.
<td
class
=
"style7"
><div align=
"center"
class
=
"style24 style19"
><a href=
"s_subject.php"
>วิชาเรียน</a></div></td>
084.
</tr>
085.
<tr>
086.
<td
class
=
"style7"
><div align=
"center"
class
=
"style24 style19"
><a href=
"Classroom_timetable.php"
>ตารางเรียน</a></div></td>
087.
</tr>
088.
<tr>
089.
<td
class
=
"style7"
><div align=
"center"
class
=
"style24 style19"
><a href=
"show_score.php"
>คะแนน</a></div></td>
090.
</tr>
091.
<tr>
092.
<td
class
=
"style7"
><div align=
"center"
class
=
"style24 style19"
><a href=
"history_1.php"
>ประวัติโรงเรียน</a></div></td>
093.
</tr>
094.
<tr>
095.
<td
class
=
"style7"
><div align=
"center"
class
=
"style23 style19"
><a href=
"PageUploadToMySQL3.php"
>ภาพกิจกรรม</a></div></td>
096.
</tr>
097.
<tr>
098.
<td
class
=
"style7"
><div align=
"center"
><a href=
"logout.php"
class
=
"style32"
>ออกจากระบบ</a></div></td>
099.
</tr>
100.
</table>
101.
<p> </p>
102.
<!-- InstanceEndEditable --></td>
103.
</tr>
104.
<tr>
105.
<td align=
"center"
valign=
"top"
><img src=
"New folder/images/images/tem_07.gif"
width=
"201"
height=
"111"
/></td>
106.
</tr>
107.
</table></td>
108.
<td height=
"13"
align=
"center"
valign=
"top"
><img src=
"New folder/images/images/tem_03.jpg"
width=
"599"
height=
"13"
/></td>
109.
<td rowspan=
"2"
><img src=
"New folder/images/images/tem_05.jpg"
width=
"11"
height=
"423"
/></td>
110.
</tr>
111.
<tr>
112.
<td align=
"center"
valign=
"top"
background=
"New folder/images/images/tem_04.gif"
><!-- InstanceBeginEditable name=
"EditRegion3"
-->
113.
<form id=
"form1"
name=
"form1"
method=
"post"
action=
""
>
114.
<p>คะแนน</p>
115.
<p>
116.
<label></label>
117.
118.
<form name=
"frmSearch"
method=
"post"
action=
"<?=$_SERVER['SCRIPT_NAME'];?>"
>
119.
<table width=
"599"
border=
"1"
>
120.
<tr>
121.
<th><strong>วิชา</strong>
122.
<select name=
"ddlSelect"
id=
"ddlSelect"
>
123.
</select>
124.
<label>
125.
<strong>ชั้น</strong>
126.
<select name=
"ddlSelect2"
id=
"ddlSelect2"
>
127.
<option>- Select -</option>
128.
<option value=
"ประถมศึกษาปีที่ 1"
<?
if
(
$_POST
[
"ddlSelect"
]==
"ประถมศึกษาปีที่ 1"
){
echo
"selected"
;}?>>ประถมศึกษาปีที่ 1</option>
129.
<option>ประถมศึกษาปีที่ 2</option>
130.
<option>ประถมศึกษาปีที่ 3</option>
131.
<option>ประถมศึกษาปีที่ 4</option>
132.
<option>ประถมศึกษาปีที่ 5</option>
133.
<option>ประถมศึกษาปีที่ 6</option>
134.
</select>
135.
</label>
136.
<input type=
"submit"
value=
"Search"
></th>
137.
</tr>
138.
</table>
139.
</form>
140.
<?
141.
$objConnect
= mysql_connect(
"localhost"
,
"root"
,
"root"
)
or
die
(
"Error Connect to Database"
);
142.
$objDB
= mysql_select_db(
"banmarai"
);
143.
mysql_query(
"SET NAMES utf-8"
);
144.
mysql_query(
"SET character_set_results=utf8"
);
145.
mysql_query(
"SET character_set_client=utf8"
);
146.
mysql_query(
"SET character_set_connection=utf8"
);
147.
148.
if
(
$_GET
[
"Action"
] ==
"Save"
)
149.
{
150.
for
(
$i
=1;
$i
<=
$_POST
[
"hdnLine"
];
$i
++)
151.
{
152.
$strSQL
=
"UPDATE register SET "
;
153.
$strSQL
.=
"grade = '"
.
$_POST
[
"t4"
].
"' "
;
154.
$strSQL
.=
"WHERE reg_id = '"
.
$_POST
[
"hdnCustomerID$i"
].
"' "
;
155.
$objQuery
= mysql_query(
$strSQL
);
156.
}
157.
158.
159.
}
160.
161.
$strSQL
=
"SELECT * FROM register ORDER BY reg_id ASC"
;
162.
$objQuery
= mysql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
163.
?>
164.
<form name=
"frmMain"
method=
"post"
action=
"score2.php?Action=Save"
>
165.
<table width=
"600"
border=
"1"
>
166.
<tr>
167.
<th width=
"80"
> <div align=
"center"
>รหัส</div></th>
168.
<th width=
"127"
> <div align=
"center"
>ชื่อ</div></th>
169.
<th width=
"133"
> <div align=
"center"
>นามสกุล</div></th>
170.
<th width=
"87"
> <div align=
"center"
>เกรด </div></th>
171.
<th width=
"27"
> <div align=
"center"
><span
class
=
"style36"
>Md</span></div></th>
172.
<th width=
"27"
><span
class
=
"style36"
>Fn</span></th>
173.
<th width=
"31"
> <div align=
"center"
><span
class
=
"style36"
>Tt</span></div></th>
174.
<th width=
"36"
><span
class
=
"style36"
>Gd</span></th>
175.
</tr>
176.
<?
177.
$i
=0;
178.
while
(
$objResult
= mysql_fetch_array(
$objQuery
))
179.
{
180.
$i
=
$i
+ 1;
181.
?>
182.
<tr>
183.
<td><div align=
"center"
>
184.
<input type=
"hidden"
name=
"hdnCustomerID<?=$i;?>"
size=
"5"
value=
"<?=$objResult["
reg_id
"];?>"
><?=
$objResult
[
"reg_id"
];?>
185.
</div></td>
186.
<td><?=
$objResult
[
"Name"
];?> </td>
187.
<td><?=
$objResult
[
"Sername"
];?></td>
188.
<td><div align=
"center"
><?=
$objResult
[
"grade"
];?></div></td>
189.
<td align=
"center"
><span
class
=
"style33"
>
190.
<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;"
/>
191.
</span></td>
192.
<td align=
"right"
><span
class
=
"style33"
>
193.
<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; "
/>
194.
</span></td>
195.
<td align=
"right"
><span
class
=
"style33"
>
196.
<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; "
/>
197.
</span></td>
198.
<td align=
"center"
><span
class
=
"style33"
>
199.
<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;"
/>
200.
</span></td>
201.
</tr>
202.
<?
203.
}
204.
?>
205.
</table>
206.
<input type=
"submit"
name=
"submit"
value=
"submit"
>
207.
<input type=
"hidden"
name=
"hdnLine"
value=
"<?=$i;?>"
>
208.
</form>
209.
<?
210.
mysql_close(
$objConnect
);
211.
?>
212.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset="
/>
213.
</p>
214.
215.
<div align=
"center"
>
216.
<p> </p>
217.
<p> <font size=
"2"
> </font><font size=
"2"
>
218.
<script language=
"JavaScript"
type=
"text/javascript"
>
219.
var
obj= document.all;
220.
221.
function
sum(){
222.
for
(
var
a=0; a<100 ;a++){
223.
obj.t3[a].value=parseInt(obj.t1[a].value)+parseInt(obj.t2[a].value);
224.
if
((!obj.t1[a].value)||(!obj.t2[a].value))
225.
{
226.
obj.t3[a].value=
'-'
;
227.
obj.t4[a].value=
'-'
;
228.
}
229.
else
if
(obj.t3[a].value>100)
230.
{
231.
obj.t4[a].value=
'Error'
;
232.
}
233.
else
if
((obj.t3[a].value>=obj.a1.value)||(obj.t3[a].value==100))
234.
{
235.
obj.t4[a].value=
'4'
;
236.
}
237.
else
if
((obj.t3[a].value>=obj.b1.value)&&(obj.t3[a].value<=obj.b2.value))
238.
{
239.
obj.t4[a].value=
'3.5'
;
240.
}
241.
else
if
((obj.t3[a].value>=obj.b3.value)&&(obj.t3[a].value<=obj.b4.value))
242.
243.
{
244.
obj.t4[a].value=
'3'
;
245.
}
246.
else
if
((obj.t3[a].value>=obj.c1.value)&&(obj.t3[a].value<=obj.c2.value))
247.
{
248.
obj.t4[a].value=
'2.5'
;
249.
}
250.
else
if
((obj.t3[a].value>=obj.c3.value)&&(obj.t3[a].value<=obj.c4.value))
251.
{
252.
obj.t4[a].value=
'2'
;
253.
}
254.
else
if
((obj.t3[a].value>=obj.d1.value)&&(obj.t3[a].value<=obj.d2.value))
255.
{
256.
obj.t4[a].value=
'1.5'
;
257.
}
258.
else
if
((obj.t3[a].value>=obj.d3.value)&&(obj.t3[a].value<=obj.d4.value))
259.
{
260.
obj.t4[a].value=
'1'
;
261.
}
262.
else
if
(obj.t3[a].value<=obj.e2.value)
263.
{
264.
obj.t4[a].value=
'0'
;
265.
}
266.
}
267.
}
268.
269.
</script>
270.
<table border=
"0"
cellpadding=
"0"
cellspacing=
"1"
bordercolor=
"#CCCCCC"
bgcolor=
"#000000"
>
271.
<tr bordercolor=
"#000000"
bgcolor=
"#FFFFFF"
>
272.
<td width=
"150"
height=
"15"
align=
"center"
bgcolor=
"#CCCCCC"
><span
class
=
"style30"
>ช่วงคะแนน</span></td>
273.
<td width=
"55"
height=
"15"
align=
"center"
bgcolor=
"#CCCCCC"
><span
class
=
"style30"
>ระดับ</span></td>
274.
</tr>
275.
<tr bordercolor=
"#000000"
bgcolor=
"#FFFFFF"
>
276.
<td width=
"150"
height=
"15"
bgcolor=
"#FFFFFF"
><div align=
"center"
>
277.
<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; "
/>
278.
- 100</div></td>
279.
<td width=
"55"
height=
"15"
align=
"center"
bgcolor=
"#99FF66"
><div align=
"center"
><span
class
=
"style33"
>4</span></div></td>
280.
</tr>
281.
<tr bordercolor=
"#000000"
bgcolor=
"#FFFFFF"
>
282.
<td width=
"150"
height=
"15"
bgcolor=
"#FFFFFF"
><div align=
"center"
>
283.
<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; "
/>
284.
-
285.
<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; "
/>
286.
</div></td>
287.
<td width=
"55"
height=
"15"
align=
"center"
bgcolor=
"#99FF66"
><div align=
"center"
><span
class
=
"style33"
> 3.5</span></div></td>
288.
</tr>
289.
<tr bordercolor=
"#000000"
bgcolor=
"#FFFFFF"
>
290.
<td width=
"150"
height=
"15"
bgcolor=
"#FFFFFF"
><div align=
"center"
>
291.
<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; "
/>
292.
-
293.
<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; "
/>
294.
</div></td>
295.
<td width=
"55"
height=
"15"
align=
"center"
bgcolor=
"#99FF66"
><div align=
"center"
><span
class
=
"style33"
>3</span></div></td>
296.
</tr>
297.
<tr bordercolor=
"#000000"
bgcolor=
"#FFFFFF"
>
298.
<td width=
"150"
height=
"26"
bgcolor=
"#FFFFFF"
><div align=
"center"
>
299.
<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; "
/>
300.
-
301.
<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; "
/>
302.
</div></td>
303.
<td width=
"55"
height=
"26"
align=
"center"
bgcolor=
"#99FF66"
><div align=
"center"
><span
class
=
"style33"
> 2.5</span></div></td>
304.
</tr>
305.
<tr bordercolor=
"#000000"
bgcolor=
"#FFFFFF"
>
306.
<td width=
"150"
height=
"15"
bgcolor=
"#FFFFFF"
><div align=
"center"
>
307.
<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; "
/>
308.
-
309.
<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; "
/>
310.
</div></td>
311.
<td width=
"55"
height=
"15"
align=
"center"
bgcolor=
"#99FF66"
><div align=
"center"
><span
class
=
"style33"
>2</span></div></td>
312.
</tr>
313.
<tr bordercolor=
"#000000"
bgcolor=
"#FFFFFF"
>
314.
<td width=
"150"
height=
"15"
bgcolor=
"#FFFFFF"
><div align=
"center"
>
315.
<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; "
/>
316.
-
317.
<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; "
/>
318.
</div></td>
319.
<td width=
"55"
height=
"15"
align=
"center"
bgcolor=
"#99FF66"
><div align=
"center"
><span
class
=
"style33"
> 1.5</span></div></td>
320.
</tr>
321.
<tr bordercolor=
"#000000"
bgcolor=
"#FFFFFF"
>
322.
<td width=
"150"
height=
"15"
bgcolor=
"#FFFFFF"
><div align=
"center"
>
323.
<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;"
/>
324.
-
325.
<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; "
/>
326.
</div></td>
327.
<td width=
"55"
height=
"15"
align=
"center"
bgcolor=
"#99FF66"
><div align=
"center"
><span
class
=
"style33"
>1</span></div></td>
328.
</tr>
329.
<tr bordercolor=
"#000000"
bgcolor=
"#FFFFFF"
>
330.
<td width=
"150"
height=
"15"
bgcolor=
"#FFFFFF"
><div align=
"center"
>
331.
0 -
332.
<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;"
/>
333.
</div></td>
334.
<td width=
"55"
height=
"15"
align=
"center"
bgcolor=
"#99FF66"
><div align=
"center"
><span
class
=
"style33"
> 0</span></div></td>
335.
</tr>
336.
</table>
337.
</div>
338.
</form>
339.
<!-- InstanceEndEditable -->
340.
<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>
341.
</marquee></td>
342.
</tr>
343.
<tr>
344.
<td colspan=
"3"
><img src=
"New folder/images/images/tem_08.gif"
width=
"800"
height=
"24"
/></td>
345.
</tr>
346.
</table>
347.
</div>
348.
</body>
349.
<!-- InstanceEnd --></html>