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/report_stat_aumpur.php
<?
session_start();
include "../../config/config.inc.php";
include("function/function.php");
include ("graph.inc.php");
if(!isset($session_username)){
header("Location: ../document/login.php");
}
include("header_menu.php");
//insert timeQuery
include("../../common/common_system.inc.php"); 
$ApplicationName="ecomplain"; 
$time_start = getmicrotime();  
//insert timeQuery
$month_arr=array('','มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม');

if($yy == ""){
$yy = date("Y");
}else{
$yy = $yy;
}
addlog("แสดงหน้ารายงานเรื่องที่ค้างดำเนินการจำแนกตามอำเภอ",$app_id,$act7); // add log
//$sql_re = "SELECT month( date_start )  as mm FROM tbl_complain_approve  WHERE year( date_start )='$yy'";
$sql_re = "SELECT month(tbl_complain_approve.date_start ) as mm FROM tbl_complain_approve INNER JOIN tbl_complain_sent  ON tbl_complain_approve.runid=tbl_complain_sent.com_app_id WHERE year(tbl_complain_approve.date_start)='$yy' AND (tbl_complain_sent.org_main=tbl_complain_sent.org_id)  AND tbl_complain_sent.process_date_finish = '0000-00-00'";
//echo $sql_re;
$result_re = @mysql_db_query($dbname,$sql_re);
$num_c = @mysql_num_rows($result_re);
while($rs = @mysql_fetch_assoc($result_re)){
	$Arr_report[$rs[mm]] = $Arr_report[$rs[mm]] +1;
}
$xmonth_arr = $month_arr;
  for($m=1;$m<count($xmonth_arr);$m++){
  		if($daylist > "") $daylist .= ";";
		if($data1 > "") $data1 .= ";";
		$daylist .= $xmonth_arr[$m];
		$data1 .= intval($Arr_report[$m]);

  }

$txt_title = "สัดส่วนการรับเรื่องร้องทุกข์ที่ค้างดำเนินการจำแนกรายเดือน  ปี ".($yy+543);
$graphurl = $graph_path . "?category=$daylist&data1=$data1&outputstyle=&numseries=1&seriesname=&graphtype=pie&title=$txt_title&xname=เดือน&yname=จำนวน(เรื่องร้องเรียน)&subtitle=&graphstyle=srd_sf_004.scs";
$w1 = 250;
$h1 = 150;
?>
<html>
<head>
<title><?=$show_title?></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}
-->
</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 >
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" >
  <tr>
    <td valign="top" background="bimg/bg1.gif" style="background-repeat: no-repeat; background-position:right bottom ">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" bgcolor="#FFFFFF"><form name="form1" method="post" action="">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="6%" align="center" valign="middle">&nbsp;เลือกปี&nbsp;</td>
              <td width="89%"><label>
                <? $c_yy = date("Y");?>
                <select name="yy" id="yy">
                  <?
				for($n=2008;$n<=$c_yy;$n++){
					if($n == $yy){ $sel_e = "selected";}else{ $sel_e = "";}
					echo "<option value='$n' $sel_e>".($n+543)."</option>";
				}
				?>
                </select>
                <input type="submit" name="Submit" value="ตกลง">
              </label></td>
              <td width="5%" align="center"><img src="../../images/element_previous.png" width="24" height="24" alt="กลับหน้าหลัก" onClick="location.href='report_main.php'" style="cursor:hand"></td>
            </tr>
          </table>
        </form>		</td>
      </tr>
      <tr>
        <td align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="38%" align="center" valign="top">
			
			<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="<?=$w1?>" height="<?=$h1?>">
  <param name="movie" value="<?=$graphurl?>">
  <param name="quality" value="high">
  <embed src="<?=$graphurl?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<?=$w1?>" height="<?=$h1?>"></embed>
</object>
<BR><BR>
<button name="graph1" class="epm_button" style="width:120px;" onClick="window.open('<?=$graphurl?>')">กราฟขนาดใหญ่</button>			</td>
            <td width="62%" align="center" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td align="center" valign="top">&nbsp;</td>
            <td align="center" valign="top">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="ภ">
          <tr>
            <td colspan="4" align="center" bgcolor="#BDC9F9"><strong>การรับเรื่องความต้องการจำแนกตามอำเภอ ปี
              <?=$yy+543?>
            </strong></td>
          </tr>
          <tr>
            <td width="35%" align="center" bgcolor="#BDC9F9"><div align="center"><strong>อำเภอ</strong></div></td>
            <td width="32%" align="center" bgcolor="#BDC9F9"><div align="center"><strong>ระดับความต้องการน้อย</strong></div></td>
            <td width="33%" align="center" bgcolor="#BDC9F9"><div align="center"><strong>ระดับความต้องการปานกลาง</strong></div></td>
            <td width="65%" align="center" bgcolor="#BDC9F9"><div align="center"><strong>ระดับความต้องการมาก</strong></div></td>
          </tr>
           <?php    $am = mysql_query("SELECT ccDigi,ccName,ccType FROM ccaa WHERE ccType='Aumpur' AND ccDigi LIKE '13%' ");
					while( $ram = mysql_fetch_array($am) ) {?>
						
					
          <tr >
            <td align="left" bgcolor="#FFFFFF"><a href="report_stat_tambol.php?id=<?=$ram[ccDigi]?>" ><?=$ram['ccName']?></a></td>
            <td align="center" bgcolor="#FFFFFF"><? 

			 $sql1=mysql_query( "select count(request_level) As request from tbl_complain where  request_level='1' and public_province='13000000' and yy='$yy'  GROUP BY  request_level ");
		        $result1=mysql_db_query($dbname,$sql1);
				$row=mysql_num_rows($result1);
		    echo  number_format($row[request]);
			
			?></td>
            <td align="center" bgcolor="#FFFFFF"><?
			
			 $sql2=mysql_query("select  count(request_level) As r2 from tbl_complain  where request_level='2'and public_province='13000000' and yy='$yy'  GROUP BY  request_level ");
		        $result2 =@mysql_db_query($dbname,$sql2);
				$row2=mysql_num_rows($result2);
		       echo   number_format($row2[r2]);
			
			?></td>
            <td align="center" bgcolor="#FFFFFF"><? $sql3=mysql_query("select  count(request_level) As r3 from tbl_complain  where request_level='3' public_province='13000000' and yy='$yy'  GROUP BY request_level ");
		        $result3 =@mysql_db_query($dbname,$sql3);
				$row3=mysql_num_rows($result3);
		 echo    number_format($row3[r3]);
			
			?></td>
          </tr>
          <?
		  }
		  ?>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<?
//insert timeQuery
 $time_end = getmicrotime();
  writetime2db($timestart,$timeend);
//insert timeQuery
?>

Anon7 - 2021