001.
<?php
002.
003.
session_start();
004.
error_reporting
(~E_NOTICE);
005.
include
(
'../inc/connect.php'
);
006.
$objCon
->set_charset(
"utf8"
);
007.
$strSQL
=
"SELECT * FROM student_user WHERE id_std = '"
.
$_SESSION
['id_std
']."'
";
008.
$objQuery
= mysqli_query(
$objCon
,
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
009.
$objResult
= mysqli_fetch_array(
$objQuery
);
010.
011.
if
(
$_SESSION
[
'id_std'
] ==
""
)
012.
{
013.
echo
"Please Login!"
;
014.
exit
();
015.
}
016.
017.
if
(
$_SESSION
[
'status'
] !=
"admin"
)
018.
{
019.
echo
"This page for Admin only!"
;
020.
exit
();
021.
}
022.
023.
024.
$strSQL2
= "SELECT student_user.*,student_leave.* FROM student_user,student_leave
025.
WHERE student_leave.id_std_leave =
'".$_SESSION['
id_std
']."'
";
026.
$objQuery2
= mysqli_query(
$objCon
,
$strSQL2
);
027.
$objResult2
= mysqli_fetch_array(
$objQuery2
);
028.
029.
030.
$strSQL3
= "SELECT student_user.*,set_systems.* FROM student_user,set_systems
031.
WHERE set_systems.id_sets =
'cw111'
";
032.
$objQuery3
= mysqli_query(
$objCon
,
$strSQL3
);
033.
$objResult3
= mysqli_fetch_array(
$objQuery3
);
034.
035.
036.
?>
037.
<!DOCTYPE html>
038.
<html lang=
"en"
>
039.
040.
<head>
041.
<meta charset=
"utf-8"
>
042.
<meta name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
043.
<meta name=
"description"
content=
""
>
044.
<meta name=
"author"
content=
"Dashboard"
>
045.
<meta name=
"keyword"
content=
"Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina"
>
046.
<title>ตรวจงาน ให้คะแนน</title>
047.
048.
<!-- Favicons -->
049.
<link href=
"img/favicon.png"
rel=
"icon"
>
050.
<link href=
"img/apple-touch-icon.png"
rel=
"apple-touch-icon"
>
051.
052.
<!-- Bootstrap core CSS -->
053.
<link href=
"lib/bootstrap/css/bootstrap.min.css"
rel=
"stylesheet"
>
054.
<!--external css-->
055.
<link href=
"lib/font-awesome/css/font-awesome.css"
rel=
"stylesheet"
/>
056.
<!-- Custom styles
for
this template -->
057.
<link href=
"css/style.css"
rel=
"stylesheet"
>
058.
<link href=
"css/style-responsive.css"
rel=
"stylesheet"
>
059.
<link rel=
"stylesheet"
href=
"css/to-do.css"
>
060.
061.
<!-- =======================================================
062.
Template Name: Dashio
063.
Template URL: https:
064.
Author: TemplateMag.com
065.
License: https:
066.
======================================================= -->
067.
</head>
068.
069.
<body>
070.
<section id=
"container"
>
071.
<!-- **********************************************************************************************************************************************************
072.
TOP BAR CONTENT & NOTIFICATIONS
073.
*********************************************************************************************************************************************************** -->
074.
<!--header start-->
075.
<header
class
=
"header black-bg"
>
076.
<div
class
=
"sidebar-toggle-box"
>
077.
<div
class
=
"fa fa-bars tooltips"
data-placement=
"right"
data-original-title=
"สลับโหมดเมนู"
></div>
078.
</div>
079.
<!--logo start-->
080.
<a href=
"index.php"
class
=
"logo"
><b>MY<span> S+</span></b></a>
081.
<!--logo
end
-->
082.
<div
class
=
"top-menu"
>
083.
<ul
class
=
"nav pull-right top-menu"
>
084.
<li><a
class
=
"logout"
href=
"logout.php"
>Logout</a></li>
085.
</ul>
086.
</div>
087.
</header>
088.
<!--header
end
-->
089.
<!-- **********************************************************************************************************************************************************
090.
MAIN SIDEBAR MENU
091.
*********************************************************************************************************************************************************** -->
092.
<!--sidebar start-->
093.
<aside>
094.
<?php
include
'tab_menu_left.php'
;?>
095.
</aside>
096.
<!--sidebar
end
-->
097.
<!-- **********************************************************************************************************************************************************
098.
MAIN CONTENT
099.
*********************************************************************************************************************************************************** -->
100.
<!--main content start-->
101.
103.
<script type=
"text/javascript"
>
104.
$(document).ready(
function
(){
105.
$(
"#form"
).submit(
function
(e){
106.
e.preventDefault();
107.
if
(document.form.id_std_ws.value ==
""
) {
108.
alert(
'กรุณาใส่ รหัสนักศึกษา'
);
109.
document.form.id_std_ws.focus();
110.
}
else
111.
if
(document.form.id_class.value ==
""
){
112.
alert(
'กรุณาใส่ รหัสห้องเรียน'
);
113.
document.form.id_class.focus();
114.
}
else
115.
if
(document.form.id_works.value ==
""
){
116.
alert(
'กรุณาใส่่ รหัสใบงาน'
);
117.
document.form.id_works.focus();
118.
}
else
119.
if
(document.form.status_w.value ==
""
){
120.
alert(
'กรุณาใส่ สถานะใบงาน'
);
121.
document.form.status_w.focus();
122.
}
else
123.
if
(document.form.scr_w.value ==
""
){
124.
alert(
'กรุณาใส่่ คะแนน'
);
125.
document.form.scr_w.focus();
126.
}
else
127.
if
(document.form.note.value ==
""
){
128.
alert(
'กรุณาใส่่ หมายเหตุ'
);
129.
document.form.note.focus();
130.
}
else
131.
document.form.submit();
132.
133.
});
134.
});
135.
</script>
136.
137.
138.
<section id=
"main-content"
>
139.
<section
class
=
"wrapper"
>
140.
<h3><i
class
=
"fa fa-angle-right"
></i> ระบบตรวจงาน</h3>
141.
142.
<!-- /row -->
143.
<!--
DATE
TIME PICKERS -->
144.
<div
class
=
"row mt"
>
145.
<div
class
=
"col-lg-12"
>
146.
<div
class
=
"form-panel"
>
147.
<form
class
=
"form-horizontal style-form"
method=
"post"
name=
"form"
action=
"inc/save_check_work.php"
id=
"form"
>
148.
<BR>
149.
150.
<h4>** ตั้งค่าระบบก่อนตรวจงาน **</h4>
151.
<BR><BR>
152.
<div
class
=
"form-group"
>
153.
<label
class
=
"control-label col-md-1"
>รหัส นศ. :</label>
154.
<div
class
=
"col-md-4"
>
155.
<input type=
"text"
class
=
"form-control round-form"
name=
"id_std_ws"
id=
"id_std_ws"
placeholder=
"รหัส นศ."
>
156.
</div>
157.
</div>
158.
159.
160.
<div
class
=
"form-group"
>
161.
<label
class
=
"control-label col-md-1"
>รหัส Class :</label>
162.
<div
class
=
"col-md-4"
>
163.
<input type=
"text"
class
=
"form-control round-form"
name=
"id_class"
id=
"id_class"
value=
"<?php echo $objResult3['set_1'];?>"
>
164.
</div>
165.
</div>
166.
167.
168.
<div
class
=
"form-group"
>
169.
<label
class
=
"control-label col-md-1"
>รหัสใบงาน :</label>
170.
<div
class
=
"col-md-4"
>
171.
<input type=
"text"
class
=
"form-control round-form"
name=
"id_works"
id=
"id_works"
value=
"<?php echo $objResult3['set_2'];?>"
>
172.
</div>
173.
</div>
174.
175.
176.
<div
class
=
"form-group"
>
177.
<label
class
=
"control-label col-md-1"
><font color=
"#990000"
><b>สถานะงาน :</b></font></label>
178.
<div
class
=
"col-md-4"
>
179.
<select type=
"text"
class
=
"form-control round-form"
name=
"status_w"
id=
"status_w"
>
180.
<option value=
""
selected=
"selected"
>เลือก</option>
181.
<option value=
"ส่งแล้ว / ผ่าน"
>ส่งแล้ว / ผ่าน</option>
182.
<option value=
"แก้งาน"
>ส่งแล้ว / แก้งาน</option>
183.
<option value=
"ไม่ส่งงาน"
>ไม่ส่งงาน</option>
184.
185.
</select>
186.
187.
</div>
188.
</div>
189.
190.
191.
<HR>
192.
<div
class
=
"form-group"
>
193.
<label
class
=
"control-label col-md-1"
><font color=
"#990000"
><b>*ระบุคะแนน :</b></font></label>
194.
<div
class
=
"col-md-2"
>
195.
196.
<select type=
"text"
class
=
"form-control round-form"
name=
"scr_w"
id=
"scr_w"
>
197.
<option value=
""
selected=
"selected"
>เลือก</option>
198.
<option value=
"0"
>0</option>
199.
<option value=
"1"
>1</option>
200.
<option value=
"2"
>2</option>
201.
<option value=
"3"
>3</option>
202.
<option value=
"4"
>4</option>
203.
<option value=
"5"
>5</option>
204.
<option value=
"6"
>6</option>
205.
<option value=
"7"
>7</option>
206.
<option value=
"8"
>8</option>
207.
<option value=
"9"
>9</option>
208.
<option value=
"10"
>10</option>
209.
<option value=
"11"
>11</option>
210.
<option value=
"12"
>12</option>
211.
<option value=
"13"
>13</option>
212.
<option value=
"14"
>14</option>
213.
<option value=
"15"
>15</option>
214.
<option value=
"16"
>16</option>
215.
<option value=
"17"
>17</option>
216.
<option value=
"18"
>18</option>
217.
<option value=
"19"
>19</option>
218.
<option value=
"20"
>20</option>
219.
</select>
220.
</div>
221.
</div>
222.
<HR>
223.
224.
<div
class
=
"form-group"
>
225.
<label
class
=
"control-label col-md-1"
><font color=
"#990000"
><b>หมายเหตุ :</b></font></label>
226.
<div
class
=
"col-md-4"
>
227.
<select type=
"text"
class
=
"form-control round-form"
name=
"note"
id=
"note"
>
228.
<option value=
""
selected=
"selected"
>เลือก</option>
229.
<option value=
"มารับใบงานคืนได้"
>มารับใบงานคืน</option>
230.
<option value=
"มารับงาน ไปแก้ไขด่วน!!"
>มารับใบงานไปแก้ด่วน</option>
231.
<option value=
"*แก้ไขงานด่วน!!"
>*แก้ไขงานด่วน</option>
232.
<option value=
"*ติดต่ออาจารย์ เพื่อทำงานส่งด่วน"
>*ติดต่ออาจารย์เพื่อทำงานส่ง</option>
233.
</select>
234.
235.
</div>
236.
</div>
237.
238.
239.
<BR>
240.
<button type=
"submit"
class
=
"btn btn-theme"
>บันทึก ตรวจงาน</button>
241.
242.
<div
class
=
"pull-right"
>
243.
หรือไปยัง <a href=
"du_work_scores.php"
class
=
"btn btn-success"
><strong>รายการล่าสุด</strong></a>
244.
</div>
245.
</form>
246.
247.
</div>
248.
<!--/col-md-12 -->
249.
</div>
250.
<!-- /row -->
251.
</section>
252.
<!-- /wrapper -->
253.
</section>
254.
<!-- /MAIN CONTENT -->
255.
<!--main content
end
-->
256.
<!--footer start-->
257.
258.
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
259.
<footer
class
=
"site-footer"
>
260.
<div
class
=
"text-center"
>
261.
<p>
262.
Developed by <strong>STTK+</strong>.Database System
263.
</p>
264.
<div
class
=
"credits"
>
265.
266.
</div>
267.
<a href=
"buttons.html#"
class
=
"go-top"
>
268.
<i
class
=
"fa fa-angle-up"
></i>
269.
</a>
270.
</div>
271.
</footer>
272.
<!--footer
end
-->
273.
</section>
274.
<!-- js placed at the
end
of the document so the pages load faster -->
275.
<script src=
"lib/jquery/jquery.min.js"
></script>
276.
<script src=
"lib/bootstrap/js/bootstrap.min.js"
></script>
277.
<script
class
=
"include"
type=
"text/javascript"
src=
"lib/jquery.dcjqaccordion.2.7.js"
></script>
278.
<script src=
"lib/jquery.scrollTo.min.js"
></script>
279.
<script src=
"lib/jquery.nicescroll.js"
type=
"text/javascript"
></script>
280.
<!--common script
for
all pages-->
281.
<script src=
"lib/common-scripts.js"
></script>
282.
<!--script
for
this page-->
284.
<script src=
"lib/tasks.js"
type=
"text/javascript"
></script>
285.
<script>
286.
jQuery(document).ready(
function
() {
287.
TaskList.initTaskWidget();
288.
});
289.
290.
$(
function
() {
291.
$(
"#sortable"
).sortable();
292.
$(
"#sortable"
).disableSelection();
293.
});
294.
</script>
295.
296.
</body>
297.
</html>