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 :  /home/pathumthani_integration/integration/application/indicator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/pathumthani_integration/integration/application/indicator/bargraph.php
<?

	session_start();
	$nochecklogin=true;

//$graph_path = "http://202.129.35.106/graphservice/graphservice.php";  //Sapphire Graph
//$graph_path = "http://61.19.117.197/graphservice/graphservice.php";  //Sapphire Graph
$graph_path = "http://123.242.173.136/graphservice/graphservice.php";  //Sapphire Graph

include("../../config/config_epm.inc.php");

$daylist ="บุคคลากรทางการศึกษา 38 ค.(2);สายงานการสอน;สายงานนิเทศการศึกษา;สายงานบริหารสถานศึกษา;สายงานบริหารการศึกษา";

//http://61.19.117.197/graphservice/graphservice.php?category=11-6-10;12-6-10;13-6-10;14-6-10;15-6-10;16-6-10;17-6-10;18-6-10;&data1=914;831;1124;907;905;742;813;1170;;&data2=49;41;19;55;28;62;45;69;;&outputstyle=&numseries=2&seriesname=สะพานมิตรภาพ 2;ท่าเรือ;&graphtype=column&title=สถิติการ เข้าด่าน ตั้งแต่วันที่ 11 มิ.ย. 2553 ถึง 18 มิ.ย. 2553&xname=วันที่&yname=จำนวน(คน)&subtitle=&graphstyle=srd_sf_005

/*
$sum_h1 = $arr_value[1][total]+$arr_value[2][total];
$sum_h2 = $arr_value[4][total]+$arr_value[5][total];
$sum_h3 = $arr_value[3][total];
$sum_h4 = $arr_value[7][total];
$sum_h5 = $arr_value[6][total]+$arr_value[8][total];
$data1 = $sum_h4.";".$sum_h5.";".$sum_h3.";".$sum_h2.";".$sum_h1;
*/

###get parameter 
$runid_set = str_replace(",","','",$_GET[runid]);
$y_text = $_GET[year1];
$y_text2 = $_GET[year2];

$sql_select = "SELECT * FROM indicator i INNER JOIN indicator_detail d ON i.runid = d.indicator_id LEFT JOIN indicator_frequency f ON i.upd_freq = f.runid ";
$sql_select .= "WHERE d.y_text IN ('$y_text') AND i.runid in('$runid_set') order by d.runid";

$res = mysql_db_query($dbname,$sql_select);
$catagory="";
$data1="";
$data2="";
$arr = array();
$seq=0;
while($rs = mysql_fetch_assoc($res))
{
	$seq++;
	//$catagory.=$rs[index_name].";";
	$data1.=$rs[score].";";
	$arr[$rs[index_name]][0] = $rs[score];
	$arr[$rs[index_name]][2] = $seq;
	$arr[$rs[index_name]][source] = $rs[source];
	$arr[$rs[index_name]][freq_name] = $rs[freq_name];	
	$catagory.="ตัวชี้วัดที่".$seq.";";
}

$sql_select = "SELECT * FROM indicator i INNER JOIN indicator_detail d ON i.runid = d.indicator_id LEFT JOIN indicator_frequency f ON i.upd_freq = f.runid ";
$sql_select .= "WHERE d.y_text IN ('$y_text2') AND i.runid in('$runid_set') order by d.runid";
$res = mysql_db_query($dbname,$sql_select);

while($rs = mysql_fetch_assoc($res))
{
	//$catagory =$rs[index_name].";";
	$data2.=$rs[score].";";
	$arr[$rs[index_name]][1] = $rs[score];
}

$catagory = substr($catagory,0,strlen($catagory)-1);
$data1=substr($data1,0,strlen($data1)-1);
$data2=substr($data2,0,strlen($data2)-1);

	/*
$sum_h1 = 100;
$sum_h2 = 200;
$sum_h3 = 300;
$sum_h4 = 400;
$sum_h5 = 500;
*/
//$data1 = $sum_h5.";".$sum_h4.";".$sum_h3.";".$sum_h2.";".$sum_h1;
//$data2 = $sum_h5.";".$sum_h4.";".$sum_h3.";".$sum_h2.";".$sum_h1;

$txt_title = " ตัวชี้วัด";
$point_caption = "ค่าคะแนน";
$y_text="ปีพ.ศ.$y_text";
$y_text2="ปีพ.ศ.$y_text2";

//$xgraphurl = $graph_path . "?category=$daylist&data1=$data1&outputstyle=&numseries=1&seriesname=&graphtype=bar&graphstyle=srd_allvisible_cmss2.scs&title=&subtitle=";
$w1=375;
$h1=188;

if($y_text!=$y_text2)
{
$columntitle="เปรียบเทียบตัวชี้วัด$y_text "."และ $y_text2";
$xgraphurl = $graph_path ."?category=$catagory"."&data1="."$data1"."&data2="."$data2&outputstyle=&numseries=2&seriesname=$y_text;$y_text2&graphtype=line&title=$columntitle&xname=$txt_title&yname=$point_caption&subtitle=&graphstyle=srd_sf_005";

$xgraphurl_link = $graph_path ."?category=$catagory"."&data1="."$data1"."&data2="."$data2&outputstyle=&numseries=2&seriesname=$y_text;$y_text2&graphtype=line&title=$columntitle&xname=$txt_title&yname=$point_caption&subtitle=&graphstyle=srd_sf_005";
}
else
{
	$columntitle="เปรียบเทียบตัวชี้วัด$y_text";
	$xgraphurl = $graph_path ."?category=$catagory"."&data1="."$data1"."&outputstyle=&numseries=1&seriesname=$y_text&graphtype=line&title=$columntitle&xname=$txt_title&yname=$point_caption&subtitle=&graphstyle=srd_sf_005";
	
	$xgraphurl_link = $graph_path ."?category=$catagory"."&data1="."$data1"."&outputstyle=&numseries=1&seriesname=$y_text&graphtype=line&title=$columntitle&xname=$txt_title&yname=$point_caption&subtitle=&graphstyle=srd_sf_005";
}
/*
//$g_sum_m =$arr_value[9][man];
//$g_sum_f = $arr_value[9][woman];
$g_sum_m =50;
$g_sum_f =100;

$xdaylist = "ชาย;หญิง";
$xdata1 = $g_sum_m.";".$g_sum_f;
$xtitle1 = "จำนวนข้าราชการครูและบุคลากรทางการศึกษาจำแนกตามเพศ";
$xgraphurl1 = $graph_path . "?category=$xdaylist&data1=$xdata1&outputstyle=&numseries=1&seriesname=&graphtype=pie&graphstyle=srd_allvisible_cmss1.scs&title=&subtitle=";
$w2= "375";   $h2="188"; 
$xgraphurl1_link = $graph_path . "?category=$xdaylist&data1=$xdata1&outputstyle=&numseries=1&seriesname=&graphtype=pie&graphstyle=srd_allvisible_cmss1.scs&title=$xtitle1&subtitle=";
*/
?>
<html>

<head>
<title>ตัวชี้วัด
</title>
<link href="../../common/style.css" type="text/css" rel="stylesheet">
<link href="../libary/style.css" type="text/css" rel="stylesheet">
<link href="../hr_report/images/style.css" type="text/css" rel="stylesheet">
<style>
<!--
.fillcolor_headgraph{	
	padding: 2pt;
	background-color:#0063C9;
	filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#0063C9', EndColorStr='#000467');
}
.fillcolor_headgraph2{	
	padding: 2pt;
	background-color:#E6E6E6;
	filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#E6E6E6', EndColorStr='#8E8E8E');
	font-weight:bold;
}
-->
</style>
</head>
<table style="width:100%;height:30;background-image:url(img/bgheader-2.png);color:#CCCCCC;font-weight:900"><tr><td align="center">รายงานเปรียบเทียบตัวชี้วัด</td></tr></table>
 <table width="100%" border="0" align="center">
   <tr>
     <td><table width="100%" border="0" cellspacing="1" cellpadding="3">
       
       <tr>
         <td width="85%" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
           <tr>
             <td width="48%" align="center" valign="top"><table width="380" border="0" cellspacing="0" cellpadding="0">
               <tr>
                 <td align="center" class="fillcolor_headgraph"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                   <tr>
                     <td width="96%" align="center"><font color="#FFFFFF">
                       <?=$freq_name?>
                       <?=$txt_title?>
                     </font></td>
                     <td width="4%" align="center"><img src="../../images_sys/maximize.gif" width="15" height="15" onClick="window.open('<?=$xgraphurl_link?>')" style="cursor:hand" alt="แสดงกราฟขนาดใหญ่"></td>
                   </tr>
                 </table></td>
               </tr>
               <tr>
                 <td align="center"><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="800" height="500" >
  <param name="movie" value="<?=$xgraphurl?>">
  <param name="quality" value="high">
  <param name="wmode" value="transparent">
  <embed src="<?=$xgraphurl?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<?=$w1?>" height="<?=$h1?>"></embed>
</object></td>
               </tr>
			   
 
</table>

<table width="100%">
                  <tr>
                     <td align="center"><br />
					 <!--<div style="overflow:auto;height:230;width:100%;Z-INDEX:99;">-->
					 <?
					 	if($y_text!=$y_text2)
						{
					 ?>
					 <table width="90%" border="0" cellspacing="1" cellpadding="0" bgcolor="#999999">
  <tr style="background-image:url(img/bgheader-2.png);color:#CCCCCC;font-weight:900">
  <td width="100" height="24"><div align="center">ลำดับ</div></td>
    <td><div align="center">ตัวชี้วัด</div></td>
    <td width="100"><div align="center">แหล่งข้อมูล/หน่วยงาน</div></td>
    <td width="100"><div align="center">ความถี่ในการ อัพเดตข้อมูล </div></td>
    <td width="70"><div align="center">พ.ศ.<?=$year1?></div></td>
    <td width="70"><div align="center">พ.ศ.<?=$year2?></div></td>
  </tr>
	<?
		$seq=0;
		foreach($arr as $key=>$value)
		{
			$seq++;
			$score_year1 = $value[0];
			$score_year2 = $value[1];
			$source = $value[source];
			$freq_name = $value[freq_name];

	?>  
  <tr style="background-image:url(img/bgheader-3.png)">
    <td height="10">&nbsp;ตัวชี้วัดที่<?=$seq?></td>
    <td height="18">&nbsp;<?=$key?></td>
    <td>&nbsp;<?=$source?></td>
    <td>&nbsp;<?=$freq_name?></td>
    <td><div align="right"><?=$score_year1?>&nbsp;</div></td>
    <td><div align="right"><?=$score_year2?>&nbsp;</div></td>
  </tr>
  <?
  	}
  ?>
</table>
<?
	}else{
?>
 <table width="90%" border="0" cellspacing="1" cellpadding="0" bgcolor="#999999">
  <tr style="background-image:url(img/bgheader-2.png);color:#CCCCCC;font-weight:900">
  <td width="100" height="24"><div align="center">&nbsp;ลำดับ</div></td>
    <td><div align="center">ตัวชี้วัด</div></td>
    <td width="100"><div align="center">แหล่งข้อมูล/หน่วยงาน</div></td>
    <td width="100"><div align="center">ความถี่ในการ อัพเดตข้อมูล</div></td>
    <td width="70"><div align="center">พ.ศ.<?=$year1?></div></td>
  </tr>
	<?
		$seq=0;
		foreach($arr as $key=>$value)
		{
			$seq++;
			$score_year1 = $value[0];
			$source = $value[source];
			$upd_freq = $value[upd_freq];
	?>  
  <tr style="background-image:url(img/bgheader-3.png)">
  	<td height="10">&nbsp;ตัวชี้วัดที่<?=$seq?></td>
    <td height="18">&nbsp;<?=$key?></td>
    <td>&nbsp;<?=$source?></td>
    <td>&nbsp;<?=$freq_name?></td>
    <td><div align="right"><?=$score_year1?>&nbsp;</div></td>
  </tr>
  <?
  	}
  ?>
</table>
<?	
	}
?>
<!--</div>-->
</td>
</tr>
</table>
<br>
<a href="javascript:window.close();">ปิดหน้าต่าง</a>
</div>

Anon7 - 2021