|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /var/www/html/pathumthani_eoffice/application/agenda/ |
Upload File : |
<?
session_start();
include("../../config/config.inc.php");
include("function/function.php");
if(!isset($session_username)){
header("Location:login.php");
}
include("header_menu.php");
$month_arr=array('','มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title><?=$show_title?></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<LINK href="common/style.css" rel=stylesheet>
<script language='javascript' src='daily_popcalendar.js'></script>
<script language='javascript' src='displayelement.js'></script>
<style type="text/css">
<!--
.header1 { font-family:"MS Sans Serif", Tahoma, Arial;
font-size:1em;
font-weight:bold;
color: #FFFFFF;
}
.main { font-family:"MS Sans Serif", Tahoma, Arial;
font-size:0.8em;
color:#FF0000;
font-weight:bold;
}
.normal { font-family:"MS Sans Serif", Tahoma, Arial;
font-size:0.8em;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style5 {
font-size: 14px;
font-weight: bold;
}
-->
</style>
</head>
<body bgcolor="#A3B2CC">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<table width="550" border="0" cellspacing="1" cellpadding="1">
<tr>
<td bgcolor="#000000"><table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td colspan="5" align="center" bgcolor="#8DA0C0"><span class="style5">ตรวจสอบการติดตามงาน</span></td>
</tr>
<?
$strSQL = "SELECT COUNT(*) AS num_all FROM tbl_request";
$Result = mysql_db_query($dbname,$strSQL);
$Rs = mysql_fetch_object($Result);
?>
<tr>
<td colspan="5" align="right" bgcolor="#ECEFF4"><label></label></td>
</tr>
<tr>
<td width="24" align="center" bgcolor="#ECEFF4"> </td>
<td width="140" align="left" bgcolor="#ECEFF4">จำนวนเรื่องทั้งหมด</td>
<td colspan="2" align="center" bgcolor="#ECEFF4"><a href="report_system.php?action=report_group&num=all"><?=$Rs->num_all?></a></td>
<td width="128" align="center" bgcolor="#ECEFF4">รายการ</td>
</tr>
<?
$c_md = date("m-d");
$c_y = date("Y")+543;
$c_date = $c_y."-".$c_md;
$strSQL1 = "SELECT * FROM tbl_request WHERE date_late <> '' or date_late <> NULL";
$Result1 = mysql_db_query($dbname,$strSQL1);
$nk = 0;
while($Rs1 = mysql_fetch_object($Result1)){
$date_end[$nk] = $Rs1->date_end;
$date_late[$nk] = $Rs1->date_late;
$nk++;
}
$num_late = 0;
for($j=0;$j<count($date_end);$j++){
$strSQL2 = "SELECT DATEDIFF('$date_end[$j] 23:59:59','$c_date') as t1";
$Result2 = mysql_db_query($dbname,$strSQL2);
$Rs2 = mysql_fetch_object($Result2);
//echo $Rs2->t1."<<<======".$date_late[$j]."<br>";
if($Rs2->t1 <= $date_late[$j]){
$num_late++;
}
}
?>
<tr>
<td align="center" bgcolor="#ECEFF4"><img src="images/document_view.gif" width="24" height="24"></td>
<td align="left" bgcolor="#ECEFF4">จำนวนเรื่องที่ล่าช้า</td>
<td colspan="2" align="center" bgcolor="#ECEFF4"><a href="?action=report_late"><?=$num_late?></a></td>
<td align="center" bgcolor="#ECEFF4">รายการ</td>
</tr>
<?
$strSQL3 = "SELECT COUNT(*) AS num_comp FROM tbl_request WHERE status <> '' or status <> NULL";
$Result3 = mysql_db_query($dbname,$strSQL3);
$Rs3 = mysql_fetch_object($Result3);
?>
<tr>
<td align="center" bgcolor="#ECEFF4"><img src="images/document_view.gif" width="24" height="24"></td>
<td align="left" bgcolor="#ECEFF4">จำนวนเรื่องที่สำเร็จ</td>
<td colspan="2" align="center" bgcolor="#ECEFF4"><a href="report_system.php?action=report_group&num=complate"><?=$Rs3->num_comp?></a></td>
<td align="center" bgcolor="#ECEFF4">รายการ</td>
</tr>
<tr>
<td rowspan="2" align="center" bgcolor="#ECEFF4"><img src="images/document_view.gif" width="24" height="24"></td>
<td rowspan="2" align="left" bgcolor="#ECEFF4">แสดงรายงานตามช่วงเวลา </td>
<td width="202" align="left" bgcolor="#ECEFF4"><input name="date_s" type="text" onFocus="blur();" value="<?=$date_s?>" size="15" readonly>
<input name="button2" type="button" class="index2" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, form.date_s, 'yyyy-mm-dd')" value='วันเดือนปี'>
</td>
<td width="22" rowspan="2" align="left" valign="middle" bgcolor="#ECEFF4">ถึง </td>
<td rowspan="2" align="center" valign="middle" bgcolor="#ECEFF4"><label>
<input type="submit" name="Submit" value="แสดงรายการ">
<input type="hidden" name="action" value="report_group">
<input type="hidden" name="num" value="bt">
</label></td>
</tr>
<tr>
<td align="left" bgcolor="#ECEFF4"><input name="date_e" type="text" onFocus="blur();" value="<?=$date_e?>" size="15" readonly>
<input name="button" type="button" class="index2" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, form.date_e, 'yyyy-mm-dd')" value='วันเดือนปี'></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td> </td>
</tr>
<tr valign="top">
<td>
<?
if($action == "report_group"){
if($num == "bt"){
$strSQL_group = "SELECT * FROM tbl_request WHERE date_start >= '$date_s' AND date_end <= '$date_e'";
}else if($num == "all"){
$strSQL_group = "SELECT * FROM tbl_request ORDER BY runid DESC";
}else if($num == "complate"){
$strSQL_group = "SELECT * FROM tbl_request WHERE status <> '' or status <> NULL";
}else{
$strSQL_group = "SELECT * FROM tbl_request WHERE date_late <> '' or date_late <> NULL ";
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="6%" align="center" bgcolor="#8DA0C0"><strong>ลำดับ</strong></td>
<td width="23%" align="center" bgcolor="#8DA0C0"><strong>ชื่อเรื่อง</strong></td>
<td width="15%" align="center" bgcolor="#8DA0C0"><strong>เลขที่หนังสือ/ลว.</strong></td>
<td width="14%" align="center" bgcolor="#8DA0C0"><strong>จาก</strong></td>
<td width="14%" align="center" bgcolor="#8DA0C0"><strong>ผู้รับผิดชอบ</strong></td>
<td width="14%" align="center" bgcolor="#8DA0C0"><strong>เลขที่หนังสือออก</strong></td>
<td width="14%" align="center" bgcolor="#8DA0C0"><strong>ส่งที่ไหน</strong></td>
</tr>
<?
$Result_group = mysql_db_query($dbname,$strSQL_group);
$kk = 0;
while($Rs_g = mysql_fetch_object($Result_group)){
$bg_color = ($i%2)?'#F1F1F1':'FFFFFF';$kk++;
$check_status = Check_subject_late($Rs_g->date_end,$Rs_g->date_late);
?>
<tr bgcolor="<? if($check_status){ echo"#FF6600";}else{ echo $bg_color;}?>">
<td align="center"><?=$kk?></td>
<td align="left"><?=$Rs_g->subject?></td>
<td align="left"><?=$Rs_g->subject_no_in?></td>
<td align="left"><?=$Rs_g->subject_form?></td>
<td align="left">
<?
$strSQL_res = "SELECT prename,staffname,staffsurname FROM epm_staff WHERE staffid = '".$Rs_g->person_res."'";
$Result_res = mysql_db_query($dbname,$strSQL_res);
$Rs_res = mysql_fetch_object($Result_res);
echo $Rs_res->prename."".$Rs_res->staffname." ".$Rs_res->staffsurname;
?>
</td>
<td align="left"><?=$Rs_g->subject_no_out?></td>
<td align="left"><??></td>
</tr>
<?
}
?>
</table></td>
</tr>
</table>
<?
}
?>
</td>
</tr>
<tr>
<td>
<?
if($action == "report_late"){
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="6%" align="center" bgcolor="#8DA0C0"><strong>ลำดับ</strong></td>
<td width="23%" align="center" bgcolor="#8DA0C0"><strong>ชื่อเรื่อง</strong></td>
<td width="15%" align="center" bgcolor="#8DA0C0"><strong>เลขที่หนังสือ/ลว.</strong></td>
<td width="14%" align="center" bgcolor="#8DA0C0"><strong>จาก</strong></td>
<td width="14%" align="center" bgcolor="#8DA0C0"><strong>ผู้รับผิดชอบ</strong></td>
<td width="14%" align="center" bgcolor="#8DA0C0"><strong>เลขที่หนังสือออก</strong></td>
<td width="14%" align="center" bgcolor="#8DA0C0"><strong>ส่งที่ไหน</strong></td>
</tr>
<?
$strSQL_group = "SELECT * FROM tbl_request WHERE date_late <> '' or date_late <> NULL ";
echo $Result_group;
$Result_group = mysql_db_query($dbname,$strSQL_group);
$kk = 0;
while($Rs_g = mysql_fetch_object($Result_group)){
$bg_color = ($i%2)?'#F1F1F1':'FFFFFF';$kk++;
$check_status = Check_subject_late($Rs_g->date_end,$Rs_g->date_late);
if($check_status){
?>
<tr bgcolor="<? if($check_status){ echo"#FF6600";}else{ echo $bg_color;}?>">
<td align="center"><?=$kk?></td>
<td align="left"><?=$Rs_g->subject?></td>
<td align="left"><?=$Rs_g->subject_no_in?></td>
<td align="left"><?=$Rs_g->subject_form?></td>
<td align="left"><?
$strSQL_res = "SELECT prename,staffname,staffsurname FROM epm_staff WHERE staffid = '".$Rs_g->person_res."'";
$Result_res = mysql_db_query($dbname,$strSQL_res);
$Rs_res = mysql_fetch_object($Result_res);
echo $Rs_res->prename."".$Rs_res->staffname." ".$Rs_res->staffsurname;
?>
</td>
<td align="left"><?=$Rs_g->subject_no_out?></td>
<td align="left"><??></td>
</tr>
<?
}
}
?>
</table></td>
</tr>
</table>
<?
}
?> </td>
</tr>
</table>
</body>
</html>