|
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_integration/requirement/application/ecomplain/ |
Upload File : |
<?
include ("../../config/config.inc.php");
include("function/function.php");
function LimitText($s,$n){
if (strlen($s) > $n){
$s = substr($s,0,$n) . "...";
}
return $s;
}
if($action == "save_late"){
// update รายการทั้งหมด
$strSQL_sl = "UPDATE tbl_complain SET date_late='$save_date_late'";
$Result_sl = mysql_db_query($dbname,$strSQL_sl);
addlog("บันทึกจำนวนวันแจ้งเตือนก่อนวันสิ้นสุด",$app_id,$act1,"all"); // add log บันทึกจำนวนแจ้งเตือนก่อนวันสิ้นสุดทุกโปรแกรม
echo "
<script language=\"javascript\">
location.href='report_index.php?action=report_group&num=bt';
</script>
";
exit();
}
if($action == "DEL"){
// ลบรายการเรื่องร้องเรียน
$strSQL_del ="DELETE FROM tbl_complain WHERE complain_id='$del_id'";
$Result_del = mysql_db_query($dbname,$strSQL_del);
addlog("ลบเรื่องเรียน - ร้องทุกข์",$app_id,$act3,$del_id); // add log
// ลบรายการไฟล์แนบ
$sql_select = "SELECT *FROM tbl_attachfile WHERE complain_id='$del_id'";
$result_select = mysql_db_query($dbname,$sql_select);
while($rs_s = mysql_fetch_assoc($result_select)){
if($rs_s[act_file] != ""){
@unlink($rs_s[act_file]);
}
$sql_del = "DELETE FROM tbl_attachfile WHERE runno='$rs_s[nunno]'";
$result_del = mysql_db_query($dbname,$sql_del);
}
if($Result_del){
echo "
<script language=\"javascript\">
alert(\"ลบรายการเรียบร้อย\\n \");
location.href='add.php';
</script>";
exit();
}
}
if($action_del == "del"){
$strSQL_del ="DELETE FROM tbl_complain WHERE complain_id='$complain_id'";
$Result_del = mysql_db_query($dbname,$strSQL_del);
addlog("ลบเรื่องเรียน - ร้องทุกข์",$app_id,$act3,$complain_id); // add log
$sql_select = "SELECT *FROM tbl_attachfile WHERE complain_id='$complain_id'";
$result_select = mysql_db_query($dbname,$sql_select);
while($rs_s = mysql_fetch_assoc($result_select)){
if($rs_s[act_file] != ""){
@unlink($rs_s[act_file]);
}
$sql_del = "DELETE FROM tbl_attachfile WHERE runno='$rs_s[nunno]'";
$result_del = mysql_db_query($dbname,$sql_del);
}
if($Result_del){
echo "
<script language=\"javascript\">
alert(\"ลบรายการเรียบร้อย\\n \");
location.href='add.php';
</script>";
exit();
}
}//end if($a
?>
<HTML>
<HEAD>
<TITLE><?=$show_title_comp?></TITLE>
<META http-equiv="Content-Type" content="text/html; charset=windows-874">
<LINK href="../../common/style.css" rel=stylesheet>
<LINK href="tabcss.css" rel="stylesheet" type="text/css">
<SCRIPT language='javascript' src='daily_popcalendar.js'></SCRIPT>
<SCRIPT language='javascript' src='displayelement.js'></SCRIPT>
<SCRIPT language='javascript' src='sorttable.js'></SCRIPT>
<SCRIPT type="text/javascript" src="tabber.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;
}
-->
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
document.write('<style type="text/css">.tabber{display:none;}<\/style>');
var tabberOptions = {
'onClick': function(argsObj) {
var t = argsObj.tabber; /* Tabber object */
var id = t.id; /* ID of the main tabber DIV */
var i = argsObj.index; /* Which tab was clicked (0 is the first tab) */
var e = argsObj.event; /* Event object */
if (id == 'tab2') {
// var lin = document.location.href="?senttab="+i ;
}
},
/* Optional: set an ID for each tab navigation link */
'addLinkId': true
};
function CheckForm(){
var f1 = document.form;
a = Number(f1.save_date_late.value) ;
missinginfo = "";
missinginfo1 = "";
if (document.form.save_date_late.value == "") {missinginfo1 += "\n- กรุณากรอก จำนวนวันที่แจ้งเตือน"; }
if (a == null || !a.toString().match(/^[-]?\d*\.?\d*$/)){ missinginfo1 += "\n- กรุณากรอกเป็นตัวเลขเท่านั้น "; }
if (missinginfo1 != "") {
missinginfo += "ไม่สามารถบันทึกข้อมูลได้ เนื่องจาก \n";
missinginfo +="_____________________________\n";
missinginfo = missinginfo + missinginfo1 ;
missinginfo += "\n___________________________";
missinginfo += "\nกรุณาตรวจสอบ อีกครั้ง";
alert(missinginfo);
return false;
}
}
function popWindow(url, w, h){
var popup = "Popup";
if(w == "") w = 640;
if(h == "") h = 480;
var newwin = window.open(url, popup,'location=0,status=no,scrollbars=yes,resizable=no,width=' + w + ',height=' + h + ',top=20');
newwin.focus();
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
</SCRIPT>
</HEAD>
<BODY >
<?
$year=date("Y");
?>
<H2>ระบบบันทึกข้อมูลปัญหาและความต้องการ</H2>
จำนวนรายการทั้งหมด<?
$sql2= "SELECT * FROM tbl_complain WHERE yy='$year' ORDER BY complain_id DESC";
$result2 = mysql_db_query($dbname,$sql2);
$num2 = mysql_num_rows($result2);
echo number_format($num2-1);
?> รายการ
<?php
include('news.class.php');
$split = new page_spilt("SELECT * FROM tbl_complain WHERE status_approve <> 1 AND yy='$year' AND type_user = '0' ORDER BY complain_id DESC ", $_GET["page"]);
$rs = $split->get_results();
if (is_array($rs)) {
foreach ($rs as $key => $value) {
}
$rs = $split->get_numbers();
echo "<b>[ <u><font size=+1><a href='add.php'>หน้าหลัก</a></font></u> ]</b>";
foreach ($rs as $key => $value) {
if ($key==$page){
echo "<b>[</b> คุณอยู่ที่หน้า <b><u><font size='+3'><font color='red'>".$key."</font></font></u></b> <b>]</b>". " ";}
else
{ echo "<a href=?page=$key&cat=$cat>$key</a> ";}
}
$pagere=((int)($split->totalresnumber/20));
// echo "$pagere";
} else {
echo "";
}
$pagerow=20;
if($page==1||$page==0||$page=="all"){$nexttest=0;}else{$nexttest=$page*$pagerow-$pagerow;}
$sql="SELECT * FROM tbl_complain WHERE status_approve <> 1 AND yy='$year' AND type_user = '0' ORDER BY complain_id DESC LIMIT $nexttest,$pagerow";
$res = mysql_query($sql);
$kk = 1;
?>
<TABLE width="99%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666" class="sortable" id="table0">
<TR onMouseOver="this.style.cursor='hand'; this.style.background='#EFEFEF';" onMouseOut="this.style.cursor='point'; this.style.background='#FFFFFF';">
<TD width="12%" align="center" valign="middle" bgcolor="#BDC9F9"><STRONG>ลำดับ</STRONG></TD>
<TD width="25%" align="center" valign="middle" bgcolor="#BDC9F9"><STRONG>ประเภทเรื่องร้องเรียน</STRONG></TD>
<TD width="24%" align="center" valign="middle" bgcolor="#BDC9F9"><STRONG>รายละเอียด</STRONG></TD>
<TD width="22%" align="center" valign="middle" bgcolor="#BDC9F9"><strong>ให้ความช่วยเหลือ</strong></TD>
<?php /*?> <TD width="20%" align="center" valign="middle" bgcolor="#BDC9F9"><STRONG>ผู้ร้องเรียน</STRONG></TD><?php */?>
<TD width="17%" align="center" valign="middle" bgcolor="#BDC9F9"><INPUT name="button3" type="button" onClick="location.href='form_manage_data.php?action=ADD&type_user=gov&senttab=0'" onMouseOver="this.style.cursor='hand'" value="เพิ่ม"></TD>
</TR>
<? while($rowcontent=mysql_fetch_row($res))
{
$idd= $rowcontent[8];
$comment=$rowcontent[22];
$level=$rowcontent[75];
?>
<?
$sql_type_pro = "SELECT * FROM tbl_type_request WHERE request_id ='$idd'";
//echo $sql_type_pro;
$result_type_pro = @mysql_db_query($dbname,$sql_type_pro);
$rs_pro = @mysql_fetch_assoc($result_type_pro);
$rs_pro[request_level];?>
<? if ($rowcontent[73]=="1"){
$color='#FFFF99';
}else if ($rowcontent[73]=="2"){
$color='#FFCC33';
}else{
$color='#FF0000';
}?>
<TR> <TD align="center" valign="top" bgcolor="<?=$color ?>" ><?=$rowcontent[0];?></TD>
<TD align="left" valign="top" bgcolor="#FFFFFF" >
<?
echo $rs_pro[type_request] ;
?>
</TD>
<TD align="left" valign="top" bgcolor="#FFFFFF"><A href="#" onClick="MM_openBrWindow('report_detail.php?runid=<?=$rowcontent[0]?>&type_user=pub&action=Ticket_ID','','status=yes,scrollbars=yes,resizable=yes,width=700,height=550')"><? echo LimitText($rowcontent[22],38);?></A></TD>
<TD align="center" valign="top" bgcolor="#FFFFFF">
<?
if($rowcontent[77]=='1'){
echo "<img src=\"../../images/email_new.gif\" width=\"15\" height=\"12\" border=\"0\">";
}else{
echo "<a href=\"add_help.php?id=$rowcontent[0]\"><img src=\"../../images/email_fwd.gif\" width=\"15\" height=\"12\" border=\"0\">";
}
?> </TD>
<?php /*?> <TD align="left" valign="top"><?=$rs_g[public_name]?> <?=$rs_g[public_lastname]?> </TD><?php */?>
<TD align="center" bgcolor="#FFFFFF"><?php /*?><IMG src="../../images_sys/pdf.gif" width="20" height="20" border="0" alt="แสดงรายงาน pdf" style="cursor:hand" onClick="location.href='view_pdf.php?coplain_id=<?=$rs_g[complain_id]?>'"><?php */?> <?
$link_del = " <a href=\"#\" ONCLICK=\"if (confirm('ต้องการลบข้อมูลนี้ใช่หรือไม่?')) location.href='add.php?action=DEL&del_id=$rowcontent[1]'\"><img src=\"../../images/b_drop.png\" width=\"16\" height=\"16\" border=\"0\"></a>";
$link_edit = "<a href=\"form_edit_data.php?action=EDIT&complain_id=$rowcontent[1]&type_user=gov&senttab=0\"><img src=\"../../images/document_edit.gif\" alt=\"แก้ไขรายการ\" width=\"20\" height=\"20\" border=\"0\"></a>";
echo $link_del." ".$link_edit;
?></TD>
</TR>
<?
}
?>
</TABLE>
<p><strong>หมายเหตุุ</strong></p>
<p><img src="../../images/email_fwd.gif" width="15" height="12" border="0">::ยังไม่ได้ดำเนินการช่วยเหลือ <br>
<img src="../../images/email_new.gif" width="15" height="12" border="0">:: ดำเนินการช่วยเหลือ เรียบร้อยเเล้ว</p>
<table width="329" border="0">
<tr>
<td width="40" bgcolor="#FF0000"> </td>
<td width="279">:: ระดับความต้องการ มาก</td>
</tr>
<tr>
<td bgcolor="#FF9900"> </td>
<td>:: ระดับความต้องการ ปานกลาง</td>
</tr>
<tr>
<td bgcolor="#FFFF99"> </td>
<td>:: ระดับความต้องการ น้อย</td>
</tr>
</table>
<p><br>
</p>
<?php /*?> </DIV>
<?
} // end if($session_apppermit[$app_id][$app100] == "on"){ // สิทธิในการบันทึกข้อมูล
if($session_apppermit[$app_id][$app200] == "on"){
?>
<?
} // end $session_apppermit[$app_id][$app200] == "on"
if($session_apppermit[$app_id][$app300] == "on"){ // สิทธการส่งเรื่องร้องทุกข์ให้กับหน่วยงานที่เกี่ยวข้อง
?>
<?
}// end $session_apppermit[$app_id][$app300] == "0n"
?><?php */?>
<!-- Start Tab ผลการดำเนินงาน -->
<!-- End Tab ผลการดำเนินงาน -->
<!-- <div class="tabbertab <?// if($senttab==4){echo " tabbertabdefault";}?>">
<h2>ติดตามเรื่องร้องเรียน</h2>
<?// include("report_index_admin.php");?>
</div>-->
</DIV>
</BODY>
</HTML>
<?php /*?><?
//insert timeQuery
$time_end = getmicrotime();
writetime2db($timestart,$timeend);
//insert timeQuery
if($debug=="ON"){
echo"<pre>";
foreach($_SESSION as $key => $val ){
if($key!="CCAA" && $key!="CCAA_village"){
print_r($_SESSION[$key]);
}
}
echo"</pre>";
}
?><?php */?>