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_eoffice/application/ecomplain/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/pathumthani_eoffice/application/ecomplain/report_repeatdly.inc.php
<?

$arrcaption[1]="รายงานประชาชนคนเดิมร้องเรียน เรื่องเดิม";	
$arrcaption[2]="รายงานประชาชนคนเดิมร้องเรียน เรื่องใหม่";	

function get_repeated1($dbname,$yy,$idcard=''){	
if($idcard!=""){$strwhere="and  tbl_complain.public_idcard='$idcard'";}else{$strwhere="";}
$sql_re = "SELECT tbl_complain.public_idcard,tbl_complain.complain_detail,tbl_complain.type_problem,Count(tbl_complain.public_idcard) AS ncount,tbl_type_problem.s_name 
FROM tbl_complain Left Join tbl_type_problem ON tbl_complain.type_problem = tbl_type_problem.type_id
where  (tbl_complain.public_idcard is not null and  tbl_complain.complain_detail is not null and tbl_complain.type_problem is not null) 
    and  (tbl_complain.public_idcard <>'' and  tbl_complain.complain_detail <>'' and tbl_complain.type_problem <>'') $strwhere
group by tbl_complain.public_idcard, tbl_complain.complain_detail, tbl_complain.type_problem
Having  ncount >1";
			$result_re = @mysql_db_query($dbname,$sql_re);
			$Arr_report=array();
			while($rs = @mysql_fetch_assoc($result_re)){
			$Arr_report[$rs['public_idcard']]['complain_detail'] = $rs[complain_detail] ;
			$Arr_report[$rs['public_idcard']]['type_problem'] = $rs[type_problem] ;
			$Arr_report[$rs['public_idcard']]['s_name'] = $rs[s_name] ;
			$Arr_report[$rs['public_idcard']]['ncount'] = $rs[ncount] ;
			}
			return $Arr_report;
	}
	

function get_repeated2($dbname,$yy,$idcard=''){	
if($idcard!=""){$strwhere="and  tbl_complain.public_idcard='$idcard'";}else{$strwhere="";}
$sql_re = "SELECT tbl_complain.public_idcard,Count(distinct tbl_complain.complain_detail) AS ncount 
FROM tbl_complain Left Join tbl_type_problem ON tbl_complain.type_problem = tbl_type_problem.type_id
where  (tbl_complain.public_idcard is not null and  tbl_complain.complain_detail is not null and tbl_complain.type_problem is not null) 
    and  (tbl_complain.public_idcard <>'' and  tbl_complain.complain_detail <>'' and tbl_complain.type_problem <>'')  $strwhere
group by tbl_complain.public_idcard
Having  ncount>1";

			$result_re = @mysql_db_query($dbname,$sql_re);
			$Arr_report=array();
			while($rs = @mysql_fetch_assoc($result_re)){
			$Arr_report[$rs['public_idcard']]['ncount'] = $rs[ncount] ;
			}
			return $Arr_report;
	}	
?>

Anon7 - 2021