|
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/ecomplain/ |
Upload File : |
<?
session_start();
include "../../config/config.inc.php";
//include("function/function.php");
include("../../common/function.php");
if(!isset($session_username)){
header("Location: ../document/login.php");
}
//insert timeQuery
include("../../common/common_system.inc.php");
$ApplicationName="ecomplain";
$time_start = getmicrotime();
//insert timeQuery
$month_arr=array('','มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม');
if($senttab != ""){ //
$strSQL = "SELECT
tbl_complain_approve.runid,
tbl_complain.complain_id,
tbl_complain.alleg_name,
tbl_complain.alleg_position,
tbl_complain.alleg_office_id,
tbl_complain.alleg_province,
tbl_complain.alleg_ministry,
tbl_complain.alleg_department,
tbl_complain.label_org,
tbl_complain.alleg_name_all,
tbl_complain.alleg_position_all,
tbl_complain.alleg_gov_all,
tbl_complain.type_problem,
tbl_complain.type_request_other,
tbl_complain.type_request,
tbl_complain.problem_comment ,
tbl_complain.alleg_province_all,
tbl_complain.complain_detail,
tbl_complain.complain_action,
tbl_complain.act_start_date,
tbl_complain.act_end_date,
tbl_complain.accept_date,
tbl_complain.type_user
FROM
tbl_complain_approve
Inner Join tbl_complain ON tbl_complain_approve.complain_id = tbl_complain.complain_id WHERE tbl_complain_approve.runid='$runid'";
}else{
$strSQL = "SELECT * FROM tbl_complain WHERE complain_id ='$runid'";
}
$Result = mysql_db_query($dbname,$strSQL);
$rs = mysql_fetch_assoc($Result);
?>
<HTML>
<HEAD>
<TITLE><?=$show_title_comp?></TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-874">
<LINK href="../../common/style.css" type="text/css" rel="stylesheet" />
<SCRIPT language='javascript' src='daily_popcalendar.js'></SCRIPT>
<SCRIPT language='javascript' src='displayelement.js'></SCRIPT>
<STYLE type="text/css">
<!--
body { margin: 0px 0px; padding: 0px 0px}
a:link { color: #005CA2; text-decoration: none}
a:visited { color: #005CA2; text-decoration: none}
a:active { color: #0099FF; text-decoration: underline}
a:hover { color: #0099FF; text-decoration: underline}
.style3 {color: #000000; text-decoration: none; font-size: 12px;}
-->
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
function CheckForm(){
var f1 = document.form;
a = Number(f1.date_late.value) ;
missinginfo = "";
missinginfo1 = "";
if (document.form.subject.value == "") {missinginfo1 += "\n- กรุณากรอก เรื่องร้องเรียน "; }
if (document.form.subject_no_in.value == "") {missinginfo1 += "\n- กรุณากรอก เลขที่หนังสือ "; }
if (document.form.date_start.value == "") {missinginfo1 += "\n- กรุณากรอก วันเริ่มต้น "; }
if (document.form.date_end.value == "") {missinginfo1 += "\n- กรุณากรอก สิ้นสุด "; }
if (document.form.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;
}
}
</SCRIPT>
<SCRIPT language="javascript">
function popWindow(url, w, h){
var popup = "Popup";
if(w == "") w = 420;
if(h == "") h = 300;
var newwin = window.open(url, popup,'location=0,status=no,scrollbars=no,resizable=no,width=' + w + ',height=' + h + ',top=20');
newwin.focus();
}
function popWindow1(url, w, h){
var popup = "Popup";
if(w == "") w = 420;
if(h == "") h = 300;
var newwin = window.open(url, popup,'location=0,status=no,scrollbars=no,resizable=no,width=' + w + ',height=' + h + ',top=20');
newwin.focus();
}
function popWindow2(url, w, h){
var popup = "Popup";
if(w == "") w = 420;
if(h == "") h = 300;
var newwin = window.open(url, popup,'location=0,status=no,scrollbars=no,resizable=no,width=' + w + ',height=' + h + ',top=20');
newwin.focus();
}
</SCRIPT>
<SCRIPT language="javascript">
function clearselect()
{
document.post.salary_day.disabled=true;
document.post.salary_month.disabled=true;
document.post.salary_year.disabled=true;
document.post.label_date.disabled=true;
if (document.post.salary_day.value!="")
{
document.post.salary_day.value="";
document.post.salary_day.disabled=true;
}
if (document.post.salary_month.value!="")
{
document.post.salary_month.value="";
document.post.salary_month.disabled=true;
}
if (document.post.salary_year.value!="")
{
document.post.salary_year.value="";
document.post.salary_year.disabled=true;
}
if (document.post.label_date.value!="")
{
document.post.label_date.value="";
document.post.label_date.disabled=true;
}
}
</SCRIPT>
</HEAD>
<BODY >
<?
$complain_id=$rs[complain_id];
$sql_Ticket = "SELECT * FROM tbl_complain WHERE complain_id ='$complain_id'";
$result_Ticket = mysql_db_query($dbname,$sql_Ticket);
$rs_t = mysql_fetch_assoc($result_Ticket);
?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD bgcolor="#CCCCCC"><TABLE width="100%" border="0" cellspacing="1" cellpadding="3">
<TR>
<TD colspan="2" bgcolor="#BDC9F9"><STRONG>รหัสสำหรับตรวจสอบเรื่องร้องเรียน
<?
if($session_apppermit[$app_id][10] == "on"){ ######### ผู้ดูแลระบบสามารถ สั่งพิมพ์นำเสนอนาย ได้
?>
<a href="report_print_tab4.php?runid=<?=$runid?>&type_user=<?=$type_user?>&action=<?=$action?>&senttab=<?=$senttab?>" target="_blank">
<img src="../../images/email_print.gif" width="15" height="12" border="0"></a>
<?
} ######### if($session_apppermit[$app_id][10] == "on"){
?>
</STRONG></TD>
</TR>
<TR>
<TD width="14%" align="left" bgcolor="#FFFFFF">Ticket_ID <br><nobr>(รหัสรับเรื่องร้องเรียน)</nobr></TD>
<TD width="86%" align="left" bgcolor="#FFFFFF"><?=$complain_id?></TD>
</TR>
<TR>
<TD colspan="2" align="left" bgcolor="#FFFFFF"><STRONG>ละเอียดเรื่องร้องเรียน<A href="form_manage_data.php?type_user=&complain_id=<?=$rs_t[complain_id]?>&action=EDIT&type_user=<?=$type_user?>"></A></STRONG></TD>
</TR>
<TR>
<TD colspan="2" align="left" bgcolor="#FFFFFF"><TABLE width="100%" border="0" cellspacing="1" cellpadding="3">
<TR>
<TD width="25%" align="right"><SPAN class="link_back">เรื่องร้องเรียน : </SPAN></TD>
<TD width="75%" align="left"><?=nl2br($rs_t[complain_detail])?></TD>
</TR>
<!--
<TR>
<TD align="right"><SPAN class="link_back">พฤติการณ์ของข้อกล่าวหา : </SPAN></TD>
<TD align="left"><?=$rs_t[complain_action]?></TD>
</TR>
-->
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">ชื่อสกุล : </TD>
<TD align="left"><?=$rs_t[public_name]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">อายุ : </TD>
<TD align="left"><?=$rs_t[public_age]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">อาชีพ : </TD>
<TD align="left"><?=$rs_t[public_job]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">ที่อยู่ : </TD>
<TD align="left"><?=$rs_t[public_address]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">หมู่ที่ : </TD>
<TD align="left"><?=$rs_t[public_moo]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">ตำบล : </TD>
<TD align="left"><?=$rs_t[public_tambol]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">อำเภอ : </TD>
<TD align="left"><?=$rs_t[public_amphur]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">จังหวัด : </TD>
<TD align="left"><!--<?=$rs_t[public_province]?>-->
<?
$sql_type_pro = "SELECT * FROM ccaa WHERE ccDigi='$rs_t[public_province]'";
//echo $sql_type_pro;
$result_type_pro = @mysql_db_query($dbname,$sql_type_pro);
$rs_pro = @mysql_fetch_assoc($result_type_pro);
echo $rs_pro[ccName];
?> </TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">รหัสไปรษณีย์ : </TD>
<TD align="left"><?=$rs_t[public_zipcode]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">หมายเลขโทรศัพท์ : </TD>
<TD align="left"><?=$rs_t[public_phone]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">E-mail (ถ้ามี) : </TD>
<TD align="left"><?=$rs_t[public_email]?></TD>
</TR>
<TR>
<TD align="right"> </TD>
<TD align="left"> </TD>
</TR>
<TR>
<TD align="right"><SPAN class="link_back">การดำเนินการที่ระบุ :</SPAN></TD>
<TD align="left"><? if($rs_t[feedback]==0){ echo "ไม่ต้องการให้แจ้งการดำเนินการ";}else{ echo "ต้องการให้แจ้งการดำเนินการ";} ?></TD>
</TR>
<TR>
<TD align="right"><SPAN class="link_back">ประเภทเรื่องร้องเรียน : </SPAN></TD>
<TD align="left"><?
$sql_type_pro = "SELECT * FROM tbl_type_problem WHERE type_id='$rs_t[type_problem]'";
//echo $sql_type_pro;
$result_type_pro = @mysql_db_query($dbname,$sql_type_pro);
$rs_pro = @mysql_fetch_assoc($result_type_pro);
echo nl2br($rs_pro[type_problem]);
?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">ข้อกล่าวหา / ข้อร้องเรียน : </TD>
<TD align="left"><?=$rs_t[problem_comment]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">การดำเนินการที่ระบุ :</TD>
<TD align="left"><?
$sql_type_pro = "SELECT * FROM tbl_type_process WHERE type_id='$rs_t[type_process]'";
//echo $sql_type_pro;
$result_type_pro = @mysql_db_query($dbname,$sql_type_pro);
$rs_pro = @mysql_fetch_assoc($result_type_pro);
echo $rs_pro[type_process];
?>
<BR>
<?=nl2br($rs_t[process_comment])?></TD>
</TR>
<TR>
<TD align="right"> </TD>
<TD align="left"> </TD>
</TR>
<?
$complain_id=$rs[complain_id];
$sql_Ticket2 = "SELECT * FROM tbl_complain_approve WHERE runid ='$runid'";
$result_Ticket2 = mysql_db_query($dbname,$sql_Ticket2);
$rs_t2 = mysql_fetch_assoc($result_Ticket2);
if($debug=="ON"){echo "<pre>"; print_r($rs_t2); echo "</pre>"; }
?>
<TR>
<TD align="right"><span class="link_back">วันกำหนดดำเนินการแล้วเสร็จ</span><span class="style3">:</span> </TD>
<TD align="left"><?=($rs_t2[date_end])?daythai2($rs_t2[date_end]):"";?></TD>
</TR>
<TR>
<TD align="right"><span class="link_back">วันแจ้งเตือนก่อนดำเนินการเสร็จ ครั้งที่ 1</span>:</TD>
<TD align="left"><? $r_1=($rs_t2[date_end])?date("Y-m-d" ,strtotime($rs_t2[date_end]." -$rs_t2[date_late] days")):"";?><?=($r_1)?daythai2($r_1):""; ?></TD>
</TR>
<TR>
<TD align="right"><span class="link_back">วันแจ้งเตือนก่อนดำเนินการเสร็จ ครั้งที่ 2</span>: </TD>
<TD align="left"><? $r_2=($rs_t2[date_end])?date("Y-m-d" ,strtotime($rs_t2[date_end]." -$rs_t2[date_late2] days")):"";?><?=($r_2)?daythai2($r_2):"";?></TD>
</TR>
<?
$sql_re = "SELECT * FROM tbl_complain WHERE public_idcard = '$rs_t[public_idcard]' AND public_idcard <> '' ORDER BY complain_id DESC";
//echo $sql_re;
$result_re = @mysql_db_query($dbname,$sql_re);
$num_re = @mysql_num_rows($result_re);
if($num_re > 1){ // กรณีเคยร้องเรียนก่อนหน้านี้
?>
<?
} // end if($num_re > 1){ // กรณีเคยร้องเรียนก่อนหน้านี้
?>
<TR>
<TD colspan="2" align="center"><? if($type_user != ""){?>
<INPUT type="button" name="btnB" value="กลับหน้าหลัก" onClick="window.close();">
<? } ?></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
</BODY>
</HTML>
<?
//insert timeQuery
$time_end = getmicrotime();
writetime2db($timestart,$timeend);
//insert timeQuery
?>