003.
<head>
004.
<title>::Admin-Active::</title>
005.
<!-- <meta http-equiv=
"refresh"
content=
"10"
/>refresh every 10 second -->
006.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=windows-874"
/>
007.
<link rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
/>
008.
<link rel=
"stylesheet"
type=
"text/css"
href=
"layout.css"
/>
009.
<link rel=
"stylesheet"
type=
"text/css"
href=
"../jQuery/datepicker/css/ui.all.css"
/>
010.
011.
<script language=
"javascript"
type=
"text/javascript"
src=
"../jQuery/jQuery-1.7.2.js"
></script>
012.
<script language=
"javascript"
type=
"text/javascript"
src=
"../jQuery/datepicker/ui/jQuery.ui.core.js"
></script>
013.
<script language=
"javascript"
type=
"text/javascript"
src=
"../jQuery/datepicker/ui/jQuery.ui.widget.js"
></script>
014.
<script language=
"javascript"
type=
"text/javascript"
src=
"../jQuery/datepicker/ui/jQuery.ui.datepicker.js"
></script>
015.
<script>
016.
$(
function
() {
017.
$(
"#datepicker"
).datepicker();
018.
$(
'#ShowHideTable1'
).hide();
019.
$(
'table.show1'
).click(
function
()
020.
{
021.
$(
'#ShowHideTable1'
).toggle(500);
022.
$(
'.advance'
).attr(
'src'
,
'images/delete_blue_icon.jpg'
);
023.
024.
025.
026.
027.
028.
029.
030.
031.
032.
033.
034.
});
035.
});
036.
</script>
037.
<script type=
"text/javascript"
>
038.
function
time_alert()
039.
{
040.
var
x = setTimeout(
"window_open()"
,1000);
041.
}
042.
function
window_open()
043.
{
044.
window.open(
'window_open.php'
,
''
,
'menubar=no,toolbar=no,location=no,scrollbars=no, status=no,resizable=yes,width=900,height=800,top=220,left=650 '
);
045.
}
046.
</script>
047.
048.
<style type=
"text/css"
>
049.
<!--.style1 {color: #FF0000}-->
050.
</style>
051.
</head>
052.
053.
<body id=
"page1"
>
054.
<div
class
=
"tail-top-right"
></div>
055.
<div id=
"main"
>
056.
<!-- header -->
057.
<div id=
"header"
>
058.
<ul
class
=
"site-nav"
>
059.
<li><a href=
"index.php"
style=
"text-decoration:none"
>Home</a></li>
060.
<li
class
=
"last"
><a href=
"admin_active.php"
class
=
"act"
style=
"text-decoration:none"
>Admin-Active</a></li>
061.
</ul>
062.
</div>
063.
064.
<!-- content -->
065.
<div id=
"content"
>
066.
<div
class
=
"inner_copy"
>
067.
<a href=
""
></a> <a href=
""
></a> <a href=
""
></a> <a href=
""
></a>
068.
</div><!-- don't
delete
this ice-->
069.
<div
class
=
"wrapper"
>
070.
<div
class
=
"col-1"
>
071.
<div
class
=
"box"
>
072.
<div
class
=
"border-top"
>
073.
<div
class
=
"border-right"
>
074.
<div
class
=
"border-bot"
>
075.
<div
class
=
"border-left"
>
076.
<div
class
=
"inner"
>
077.
<?php
include
'menu_left2.php'
; ?><!--
include
menu left -->
078.
</div>
079.
</div><!-- close border-left -->
080.
</div><!-- close border-bot -->
081.
</div><!-- close border-right -->
082.
</div><!-- close border-top -->
083.
</div><!-- close box -->
084.
<div
class
=
"banner"
>
086.
</div>
087.
</div><!-- close col-1 -->
088.
<div
class
=
"col-2"
>
089.
<div
class
=
""
>
090.
</div>
091.
<div
class
=
"box"
>
092.
<div
class
=
"border-top"
>
093.
<div
class
=
"border-right"
>
094.
<div
class
=
"border-bot"
>
095.
<div
class
=
"border-left"
>
096.
<div
class
=
"inner"
>
097.
<ul
class
=
"list1"
>
098.
<!-- <li><h3>รายชื่อรายละเอียดการแก้ไขใบงาน</h3></li> -->
099.
<li>
100.
<?php
101.
require_once
"../../config.inc.php"
;
102.
require_once
"../../functions/public_global_function.php"
;
103.
104.
$result
= mssql_query(
"select max(pro_new) from pro_sv_mstr "
);
105.
$new
= mssql_result(
$result
,0,
$pro_new
);
106.
echo
"<h4><font color=red>รายชื่อรายละเอียดการแก้ไขใบงาน</font></h4>"
;
107.
if
(
$new
==1)
108.
{
109.
mssql_query(
"UPDATE pro_sv_mstr Set pro_new=0"
);
110.
$new
=0;
111.
echo
"<script> time_alert()</script>"
;
112.
}
113.
else
114.
{
115.
echo
"สถานะปัจจุบัน: ไม่มีงานใหม่"
;
116.
}
117.
?>
118.
119.
<table border=
"0"
width=
"520"
class
=
"show1"
>
120.
<tr>
121.
<td width=
"15"
>
122.
<img src=
"images/add_blue_icon.png"
class
=
"advance"
width=
"15"
height=
"16"
border=
"0"
style=
"cursor:pointer"
/>
123.
124.
</td>
125.
<td align=
"left"
width=
"505"
>
126.
<font color=
"blue"
style=
"cursor:pointer"
><u>advanced</u></font>
127.
<font size=
"1"
color=
"red"
>หมายเหตุ : ก่อนการใช้งานส่วน advanced จะต้องปิด Auto refresh ก่อนทุกครั้ง !</font>
128.
</td>
129.
</tr>
130.
</table>
131.
<div id=
"ShowHideTable1"
>
133.
<table border=
"1"
width=
"250"
style=
"color:gray;"
>
134.
<tr onMouseMove=this.bgColor=
"red"
;this.style.color=
"white"
onMouseOut=this.bgColor=
"transparent"
;this.style.color=
"gray"
>
135.
<td colspan=
"2"
align=
"center"
><b>ระบุวันที่ค้นหา</b> <input type=
"text"
id=
"datepicker"
name=
"date_fix"
style=
"width:100px;"
/></td>
136.
</tr>
137.
<tr onMouseMove=this.bgColor=
"red"
;this.style.color=
"white"
onMouseOut=this.bgColor=
"transparent"
;this.style.color=
"gray"
>
138.
<td width=
"15"
><input type=
"checkbox"
name=
"non_fix"
value=
"check1"
/></td>
139.
<td align=
"left"
width=
"235"
> แสดงงานที่ยังไม่ได้รับเรื่อง</td>
140.
</tr>
141.
<tr onMouseMove=this.bgColor=
"red"
;this.style.color=
"white"
onMouseOut=this.bgColor=
"transparent"
;this.style.color=
"gray"
>
142.
<td width=
"15"
><input type=
"checkbox"
name=
"con_fix"
value=
"check2"
/></td>
143.
<td align=
"left"
width=
"235"
> แสดงงานที่กำลังดำเนินการ</td>
144.
</tr>
145.
<tr onMouseMove=this.bgColor=
"red"
;this.style.color=
"white"
onMouseOut=this.bgColor=
"transparent"
;this.style.color=
"gray"
>
146.
<td width=
"15"
><input type=
"checkbox"
name=
"end_fix"
value=
"check3"
/></td>
147.
<td align=
"left"
width=
"235"
> แสดงงานที่แก้ไขเสร็จสิ้น</td>
148.
</tr>
149.
<tr onMouseMove=this.bgColor=
"red"
;this.style.color=
"white"
onMouseOut=this.bgColor=
"transparent"
;this.style.color=
"gray"
>
150.
<td width=
"15"
><input type=
"checkbox"
name=
"cancle_fix"
value=
"check4"
/></td>
151.
<td align=
"left"
width=
"235"
> แสดงงานที่ยกเลิกปัญหา</td>
152.
</tr>
153.
<tr onMouseMove=this.bgColor=
"red"
;this.style.color=
"white"
onMouseOut=this.bgColor=
"transparent"
;this.style.color=
"gray"
>
154.
<td width=
"15"
><input type=
"checkbox"
name=
"all_fix"
value=
"check5"
/></td>
155.
<td align=
"left"
width=
"235"
> แสดงงานทั้งหมด</td>
156.
</tr>
157.
<tr onMouseMove=this.bgColor=
"red"
;this.style.color=
"white"
onMouseOut=this.bgColor=
"transparent"
;this.style.color=
"gray"
>
158.
<td colspan=
"2"
align=
"center"
><input type=
"submit"
value=
"ค้นหา"
style=
"font-size:13px;width:50px;cursor:pointer"
></td>
159.
</tr>
160.
</table>
161.
</form>
162.
</div>
163.
<?
164.
echo
'<table border="1" width="750" style="table-layout:fixed;">'
;
165.
echo
'<tr bgcolor="#CCCCCC">'
;
166.
echo
'<th width="100">No.การแจ้ง</th>'
;
167.
echo
'<th width="300">ชื่อปัญหา</th>'
;
168.
echo
'<th width="150">วัน-เวลาที่แจ้ง</th>'
;
169.
echo
'<th width="150">เปลี่ยนสถานะ</th>'
;
170.
echo
'<th width="50">ลบ</th>'
;
171.
echo
"</tr>"
;
172.
173.
$today_date
=
date
(
"d/m/Y"
);
174.
$date_fix
=
$_POST
[
"date_fix"
];
175.
$non_fix
=
$_POST
[
"non_fix"
];
176.
$con_fix
=
$_POST
[
"con_fix"
];
177.
$end_fix
=
$_POST
[
"end_fix"
];
178.
$cancle_fix
=
$_POST
[
"cancle_fix"
];
179.
$all_fix
=
$_POST
[
"all_fix"
];
180.
181.
$select
=
"(pro_id<>'55052100' and pro_date='"
.
$today_date
.
"')or pro_status = 1"
;
182.
if
(
$date_fix
<>
""
)
183.
{
184.
$select
=
"pro_date='"
.
$date_fix
.
"'"
;
185.
}
186.
if
(
$date_fix
<>
""
&&
$non_fix
<>
""
)
187.
{
188.
$select
=
"pro_date='"
.
$date_fix
.
"' and pro_status = 1"
;
189.
}
190.
if
(
$date_fix
<>
""
&&
$con_fix
<>
""
)
191.
{
192.
$select
=
"pro_date='"
.
$date_fix
.
"' and pro_status = 2"
;
193.
}
194.
if
(
$date_fix
<>
""
&&
$end_fix
<>
""
)
195.
{
196.
$select
=
"pro_date='"
.
$date_fix
.
"' and pro_status = 3"
;
197.
}
198.
if
(
$date_fix
<>
""
&&
$cancle_fix
<>
""
)
199.
{
200.
$select
=
"pro_date='"
.
$date_fix
.
"' and pro_status = 4"
;
201.
}
202.
if
(
$date_fix
<>
""
&&
$con_fix
<>
""
)
203.
{
204.
$select
=
"pro_date='"
.
$date_fix
.
"' and pro_status = 2"
;
205.
}
206.
if
(
$date_fix
<>
""
&&
$end_fix
<>
""
)
207.
{
208.
$select
=
"pro_date='"
.
$date_fix
.
"' and pro_status = 3"
;
209.
}
210.
if
(
$date_fix
<>
""
&&
$cancle_fix
<>
""
)
211.
{
212.
$select
=
"pro_date='"
.
$date_fix
.
"' and pro_status = 4"
;
213.
}
214.
if
(
$date_fix
==
""
&&
$non_fix
<>
""
)
215.
{
216.
$select
=
"pro_status = 1"
;
217.
}
218.
if
(
$date_fix
==
""
&&
$con_fix
<>
""
)
219.
{
220.
$select
=
"pro_status = 2"
;
221.
}
222.
if
(
$date_fix
==
""
&&
$end_fix
<>
""
)
223.
{
224.
$select
=
"pro_status = 3"
;
225.
}
226.
if
(
$date_fix
==
""
&&
$cancle_fix
<>
""
)
227.
{
228.
$select
=
"pro_status = 4"
;
229.
}
230.
if
(
$date_fix
==
""
&&
$all_fix
<>
""
)
231.
{
232.
$select
=
"pro_id<>'55052100'"
;
233.
}
234.
235.
$sql_mstr
=
"SELECT * FROM pro_sv_mstr WHERE "
.
$select
;
236.
$result_mstr
= mssql_query(
$sql_mstr
);
237.
238.
while
(
$data
= mssql_fetch_array(
$result_mstr
))
239.
{
240.
$sql_pbm
= mssql_query(
"SELECT * FROM pro_sv_pbm WHERE pbm_id='"
.
$data
[pbm_id].
"'"
);
241.
$result_pbm
= mssql_fetch_array(
$sql_pbm
);
242.
243.
if
(
$data
[pro_status]==1)
244.
{
245.
$status
=
'<a href="resolve.php?pro_id='
.
$data
[pro_id].
'&status='
.
$data
[pro_status].
'"><font color="orange">รับเรื่อง</font></a>'
;
246.
}
247.
if
(
$data
[pro_status]==2)
248.
{
249.
$status
=
'<a href="resolve.php?pro_id='
.
$data
[pro_id].
'&status='
.
$data
[pro_status].
'"><font color="blue">กำลังดำเนินการ</font></a>'
;
250.
}
251.
if
(
$data
[pro_status]==3)
252.
{
253.
$status
=
'<font color="green">ดำเนินการเสร็จสิ้น</font>'
;
254.
}
255.
if
(
$data
[pro_status]==4)
256.
{
257.
$status
=
'<font color="gray">ยกเลิกการแก้ไข</font>'
;
258.
}
259.
260.
echo
'<tr align="center">'
;
261.
echo
'<td><a href="detail.php?action=resolve&pro_id='
.
$data
[pro_id].
'"><font color="blue">'
.
$data
[pro_id].
'</font></a></td>'
;
262.
echo
'<td align="left"> '
.
$result_pbm
[pbm_desc].
'</td>'
;
263.
echo
'<td>'
.
$data
[pro_date].
'<font color="blue">|</font>'
.
$data
[pro_time].
'</td>'
;
264.
echo
'<td>'
.
$status
.
'</a></td>'
;
265.
?>
266.
<td><a href=
"pro_del.php?pro_id=<?=$data['pro_id'];?>"
onclick=
"return confirm('ยืนยันการลบ?')"
><font color=
"red"
>ลบ</font></a></td>
267.
<?
268.
echo
'</tr>'
;
269.
}
270.
echo
'</table>'
;
271.
?>
272.
273.
</li>
274.
<li>
275.
</li>
276.
</ul>
277.
</div>
278.
</div>
279.
</div>
280.
</div>
281.
</div>
282.
</div>
283.
</div>
284.
<div
class
=
"title"
><img src=
"images/banner_saijo.jpg"
alt=
""
width=
"850"
height=
"100"
align=
"center"
/></div>
285.
</div>
286.
</div>
287.
<!-- footer -->
288.
<div id=
"footer"
>
289.
<div
class
=
"indent"
></div>
290.
</div>
291.
</div>
292.
</body>
293.
</html>