01.
<form name=
"frmMain"
action=
"PageMultiCheckbox2.php"
method=
"post"
OnSubmit=
"return onSave();"
>
02.
<?
03.
04.
$strSearch
=
$_POST
[
"txtSearch"
];
05.
06.
$objConnect
= mysql_connect(
"localhost"
,
"root"
,
"mb,lNwmp"
)
or
die
(
"Error Connect to Database"
);
07.
$objDB
= mysql_select_db(
"hr"
);
08.
mysql_query(
"SET NAMES UTF8"
);
09.
$strSQL
=
"SELECT * FROM employee WHERE (Code LIKE '%"
.
$strSearch
.
"%' or Section LIKE '%"
.
$strSearch
.
"%' )"
;
10.
$objQuery
= mysql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
11.
?>
12.
13.
14.
<table width=
"600"
>
15.
<tr>
16.
<th width=
"91"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px"
> <div align=
"center"
>
17.
<input name=
"CheckAll"
type=
"checkbox"
id=
"CheckAll"
value=
"Y"
onClick=
"ClickCheckAll(this);"
>
18.
</div></th>
19.
<th width=
"91"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px"
> <div align=
"center"
>รหัสพนักงาน<br />
20.
ID </div></th>
21.
<th width=
"98"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px"
> <div align=
"center"
>ชื่อพนักงาน<br />
22.
EMPLOYEE NAME </div></th>
23.
<th width=
"80"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px"
> <div align=
"center"
>ตำแหน่ง<br />
24.
POSITION TITLE</div></th>
25.
<th width=
"59"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px"
> <div align=
"center"
>วันที่<br />
26.
DATE
</div></th>
27.
<th width=
"59"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px"
> <div align=
"center"
>เริ่มเวลา<br />
28.
START </div></th>
29.
<th width=
"59"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px"
> <div align=
"center"
>ถึงเวลา<br />
30.
END
</div></th>
31.
<th width=
"100"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px"
> <div align=
"center"
>ฝ่าย<br />
32.
Department<br />
33.
</div></th>
34.
<th width=
"71"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px; color: #666;"
> <div align=
"center"
>ประเภทการทำโอที<br />
35.
OT TYPE<br />
36.
</div></th>
37.
<th width=
"71"
nowrap=
"nowrap"
bgcolor=
"#FFCC00"
style=
"font-size: 12px; color: #666;"
> <div align=
"center"
>ลักษณะงานที่ทำ<br />
38.
Mature of Job<br />
39.
</div></th>
40.
</tr>
41.
</tr>
42.
<?
43.
while
(
$objResult
= mysql_fetch_array(
$objQuery
))
44.
{
45.
$i
++;
46.
?>
47.
<tr>
48.
<td height=
"24"
align=
"center"
nowrap=
"nowrap"
bgcolor=
"#66CCFF"
><input type=
"checkbox"
name=
"chkAdd[]"
id=
"chkAdd<?=$i;?>"
value=
"<?=$objResult["
Code
"];?>"
></td>
49.
50.
<td nowrap=
"nowrap"
><div align=
"center"
><input type=
"text"
name=
"txtCode[]"
value=
"<?php echo $objResult["
Code
"];?>"
size=
"10"
readonly></div></td>
51.
52.
<td nowrap=
"nowrap"
><input type=
"text"
name=
"txtName_th[]"
value=
"<?php echo $objResult["
Name_th
"];?>"
size=
"20"
readonly></td>
53.
<td nowrap=
"nowrap"
><input type=
"text"
name=
"txtPosition[]"
value=
"<?php echo $objResult["
Position
"];?>"
size=
"20"
readonly></td>
54.
<td nowrap=
"nowrap"
><input name=
"txtdate[]"
type=
"text"
id=
"txtdate"
value=
"<?php echo date("
Y/m/d
"); ?>"
size=
"7"
readonly></td>
55.
<td align=
"right"
nowrap=
"nowrap"
style=
"font-size: 12px"
><label
for
=
"select"
></label>
56.
<label
for
=
"lblStart"
></label>
57.
<select name=
"lblStart[]"
id=
"lbltype"
>
58.
<option value=
"17:00:00"
>17:30</option>
59.
<option value=
"05:00:00"
>05:30</option>
60.
<option value=
"08:00:00"
>08:00</option>
61.
</select></td>
62.
<td align=
"right"
nowrap=
"nowrap"
style=
"font-size: 12px"
><label
for
=
"select"
></label>
63.
<label
for
=
"lblEnd"
></label>
64.
<select name=
"lblEnd[]"
id=
"lbltype"
>
65.
<option value=
"20:00:00"
>20:00</option>
66.
<option value=
"08:00:00"
>08:00</option>
67.
<option value=
"17:00:00"
>17:00</option>
68.
</select></td>
69.
<td nowrap=
"nowrap"
><input type=
"text"
name=
"txtSection[]"
value=
"<?php echo $objResult["
Section
"];?>"
size=
"20"
readonly></td>
70.
<td align=
"right"
nowrap=
"nowrap"
style=
"font-size: 12px"
><label
for
=
"select"
></label>
71.
<label
for
=
"lbltype"
></label>
72.
<select name=
"lbltype[]"
id=
"lbltype"
>
73.
<option value=
"ทำล่วงเวลาวันทำงานปกติ"
>A=ทำล่วงเวลาวันทำงานปกติ</option>
74.
<option value=
"ทำงานวันหยุด"
>B=ทำงานวันหยุด</option>
75.
<option value=
"ทำล่วงเวลาวันหยุด"
>C=ทำล่วงเวลาวันหยุด</option>
76.
</select></td>
77.
<td nowrap=
"nowrap"
style=
"font-size: 12px"
><textarea name=
"txtjob[]"
cols=
"35"
rows=
"1"
id=
"txtjob"
></textarea></td>
78.
</tr>
79.
<?
80.
}
81.
?>
82.
</table>
83.
<?
84.
mysql_close(
$objConnect
);
85.
?>
86.
<input type=
"submit"
name=
"btnSave"
value=
"Save"
>
87.
<input type=
"hidden"
name=
"hdnCount"
value=
"<?php echo $i;?>"
>
88.
</form>