|
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("../../common/function.php");
if(!isset($session_username)){
header("Location: ../document/login.php");
}
//insert timeQuery
//include("../../common/common_system.inc.php");
$ApplicationName="ecomplain";
//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.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 ,
note_detail ,
note_limitdate ,
note_bystaff
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);
$complain_id=$rs[complain_id];
$arr_rs = $rs ;
?>
<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='../../common/popcalendar.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}
-->
</STYLE>
</HEAD>
<BODY >
<?
# convert_2mysql($xdate){ ######## 12/03/2552 ==> 2009-03-12
if ($save_note != ""){ ### Save จาก Form
$mysql_limitdate= convert_2mysql($note_limitdate) ;
$sql = " UPDATE tbl_complain SET note_detail='$note_detail',note_limitdate='$mysql_limitdate' , note_bystaff='$note_bystaff' WHERE complain_id ='$complain_id' ";
$result = mysql_query($sql) ;
} ########################### END ### Save จาก Form
$arr_feedback = array("0"=>"ไม่ต้องการให้แจ้งการดำเนินการ","1"=>"ต้องการให้แจ้งการดำเนินการ");
$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);
$sql_print = "SELECT * FROM tbl_complain_print WHERE complain_id='$complain_id'";
$result_print = mysql_db_query($dbname,$sql_print);
$rs_p = mysql_fetch_assoc($result_print);
## เรื่องร้องเรียน
if($rs_p[complain_detail] != ""){
$txt_complain_detail = $rs_p[complain_detail];
}else{
$txt_complain_detail = $rs_t[complain_detail];
}
## ชื่อ - นามสกุล
if($rs_p[public_name] != ""){
$txt_public_name = $rs_p[public_name];
}else{
$txt_public_name = $rs_t[public_name];
}
## อายุ
if($rs_p[public_age] != ""){
$txt_public_age = $rs_p[public_age];
}else{
$txt_public_age = $rs_t[public_age];
}
## อาชีพ
if($rs_p[public_job] != ""){
$txt_public_job = $rs_p[public_job];
}else{
$txt_public_job = $rs_t[public_job];
}
## ที่อยู่
if($rs_p[public_address] != ""){
$txt_public_address = $rs_p[public_address];
}else{
$sql_type_pro = "SELECT * FROM ccaa WHERE ccDigi='$rs_t[public_province]'";
$result_type_pro = @mysql_db_query($dbname,$sql_type_pro);
$rs_pro = @mysql_fetch_assoc($result_type_pro);
if($rs_pro[ccName] != ""){
$txt_province = " จังหวัด$rs_pro[ccName]";
}else{
$txt_province = "";
}
if($rs_t[public_amphur] != ""){
$txt_amphur = " อำเภอ$rs_t[public_amphur] ";
}else{
$txt_amphur = "";
}
if($rs_t[public_tambol] != ""){
$txt_tambol = " ตำบล$rs_t[public_tambol]";
}else{
$txt_tambol = "";
}
if($rs_t[public_moo] != ""){
$txt_moo = " หมู่ที่$rs_t[public_moo]";
}else{
$txt_moo = "";
}
$txt_public_address = "$rs_t[public_address] $txt_moo $txt_tambol $txt_amphur $txt_province $rs_t[public_zipcode]";
}
## หมายเลขโทรศัพท์
if($rs_p[public_phone] != ""){
$txt_public_phone = $rs_p[public_phone];
}else{
$txt_public_phone = $rs_t[public_phone];
}
### E-mail
if($rs_p[public_email] != ""){
$txt_public_email = $rs_p[public_email];
}else{
$txt_public_email = $rs_t[public_email];
}
## การดำเนินการที่ระบุ
if($rs_p[feedback] != ""){
$txt_feedback = $rs_p[feedback];
}else{
$txt_feedback = $arr_feedback[$rs_t[feedback]];
}
##ประเภทเรื่องร้องเรียน
if($rs_p[type_problem] != ""){
$txt_type_problem = $rs_p[type_problem];
}else{
$sql_type_pro = "SELECT * FROM tbl_type_problem WHERE type_id='$rs_t[type_problem]'";
$result_type_pro = @mysql_db_query($dbname,$sql_type_pro);
$rs_pro = @mysql_fetch_assoc($result_type_pro);
$txt_type_problem = $rs_pro[type_problem];
}
## ข้อกล่าวหา / ข้อร้องเรียน
if($rs_p[problem_comment] != ""){
$txt_problem_comment = $rs_p[problem_comment];
}else{
$txt_problem_comment = $rs_t[problem_comment];
}
### การดำเนินการที่ระบ
if($rs_p[type_process] != ""){
$txt_type_process = $rs_p[type_process];
}else{
$sql_type_pro = "SELECT * FROM tbl_type_process WHERE type_id='$rs_t[type_process]'";
$result_type_pro = @mysql_db_query($dbname,$sql_type_pro);
$rs_pro = @mysql_fetch_assoc($result_type_pro);
$txt_type_process = "$rs_pro[type_process] $rs_t[process_comment]";
}
?>
<TABLE width="680" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD width="1320" bgcolor="#CCCCCC"><TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD width="20%" align="left" valign="top" bgcolor="#FFFFFF"><STRONG>เรื่องร้องเรียน</STRONG></TD>
<TD width="80%" align="left" valign="top" bgcolor="#FFFFFF"><?=$txt_complain_detail?>
<br></TD>
</TR>
<TR>
<TD align="left" bgcolor="#FFFFFF"><strong>Ticket_ID <br>
<nobr>(รหัสรับเรื่องร้องเรียน)</nobr></strong></TD>
<TD align="left" valign="top" bgcolor="#FFFFFF"><strong>
<?=$complain_id?>
<br>
</strong></TD>
</TR>
<TR>
<TD colspan="2" align="left" bgcolor="#FFFFFF"><STRONG><br>
ละเอียดเรื่องร้องเรียน<!--<A href="form_manage_data.php?type_user=&complain_id=<?//=$rs_t[complain_id]?>&action=EDIT&type_user=<?//=$type_user?>"><br>
</A>--></STRONG></TD>
</TR>
<TR>
<TD colspan="2" align="left" bgcolor="#FFFFFF"><TABLE width="100%" border="0" cellspacing="1" cellpadding="3">
<!-- <TR>
<TD width="23%" align="right" valign="top"><SPAN class="link_back">เรื่องร้องเรียน : </SPAN></TD>
<TD width="77%" align="left" valign="top"><?=$txt_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 width="22%" align="right" valign="top" bgcolor="#FFFFFF" class="link_back">ชื่อสกุล : </TD>
<TD width="78%" align="left" valign="top"><?=$txt_public_name?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">อายุ : </TD>
<TD align="left" valign="top"><?=$txt_public_age?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">อาชีพ : </TD>
<TD align="left" valign="top"><?=$txt_public_job?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">ที่อยู่ : </TD>
<TD align="left" valign="top"><?=$txt_public_address?></TD>
</TR>
<!-- <TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">ที่อยู่ : </TD>
<TD align="left" valign="top"><?//=$rs_t[public_address]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">หมู่ที่ : </TD>
<TD align="left" valign="top"><?//=$rs_t[public_moo]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">ตำบล : </TD>
<TD align="left" valign="top"><?//=$rs_t[public_tambol]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">อำเภอ : </TD>
<TD align="left" valign="top"><?//=$rs_t[public_amphur]?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">จังหวัด : </TD>
<TD align="left" valign="top"><?//=$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" valign="top"><?//=$rs_t[public_zipcode]?></TD>
</TR>
--> <TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">หมายเลขโทรศัพท์ : </TD>
<TD align="left" valign="top"><?=$txt_public_phone?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">E-mail (ถ้ามี) : </TD>
<TD align="left" valign="top"><?=$txt_public_email?></TD>
</TR>
<TR>
<TD align="right" valign="top"> </TD>
<TD align="left" valign="top"> </TD>
</TR>
<TR>
<TD align="right" valign="top"><SPAN class="link_back">การดำเนินการที่ระบุ :</SPAN></TD>
<TD align="left" valign="top"><? echo "$txt_feedback"; ?></TD>
</TR>
<TR>
<TD align="right" valign="top"><SPAN class="link_back">ประเภทเรื่องร้องเรียน : </SPAN></TD>
<TD align="left" valign="top"><?
echo "$txt_type_problem";
?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">ข้อกล่าวหา / ข้อร้องเรียน : </TD>
<TD align="left" valign="top"><?=$txt_problem_comment?></TD>
</TR>
<TR>
<TD align="right" valign="top" bgcolor="#FFFFFF" class="link_back">การดำเนินงานุ :</TD>
<TD align="left" valign="top"><?=$txt_type_process?></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>
<TR>
<TD colspan="2" align="left" valign="top" bgcolor="#FFFFFF"> </TD>
</TR>
<TR>
<TD colspan="2" align="left" valign="top" bgcolor="#FFFFFF"> </TD>
</TR>
<TR>
<TD colspan="2" align="left" valign="top" bgcolor="#FFFFFF">
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><span class="project_input style5">เรียน ผู้ว่าราชการจังหวัด<?=$provincename?>
</span><br><br></td>
</tr>
<tr>
<td colspan="3"><span class="project_input style5">
<?
$xstr = str_replace("\n" , "<br>" , $arr_rs[note_detail] ) ;
$xstr = str_replace(" " , " " , $xstr ) ;
?>
<?=$xstr?>
</span></td>
</tr>
<tr>
<td width="8%"> </td>
<td colspan="2">รายงานภายในวันที่ <?=($rs[note_limitdate])?daythai3($rs[note_limitdate]):"ไม่ระบุ"?><!--<?=$note_limitdate?>-->
<br><br>
<span class="project_input style5">
จึงเรียนมาเพื่อโปรดพิจารณา</span></td>
</tr>
<tr>
<td> </td>
<td width="34%"> </td>
<td width="58%" align="center"><br>
<br>
<span class="project_input style5">(.........................................)<br>
<br>
<?=$arr_rs[note_bystaff]?>
</span></td>
</tr>
</table>
<br></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
<?
#ALTER TABLE `tbl_complain` ADD `note_detail` TEXT NOT NULL ,
#ADD `note_limitdate` DATE NOT NULL ,
#ADD `note_bystaff` VARCHAR( 200 ) NOT NULL ;
?>
</BODY>
</HTML>