|
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 : |
<?
session_start();
include("../../config/config_epm.inc.php");
include("function.inc.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="../libary/style.css" type="text/css" rel="stylesheet">
<link href="../hr_report/images/style.css" type="text/css" rel="stylesheet">
<title></title>
</head>
<style type="text/css">
<!--
A:link {
FONT-SIZE: 12px;color: #000000; FONT-FAMILY: Tahoma, "Microsoft Sans Serif";TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:visited {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:active {
FONT-SIZE: 12px; COLOR: #014d5f; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:hover {
FONT-SIZE: 12px; COLOR: #f3960b; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
-->
</style>
<body>
<table width="300" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">
<tr bgcolor="#A3B2CC">
<td width="250" height="20"><div align="center"><strong>ความถี่ในการอัพเดตข้อมูล</strong></div></td>
<td width="50"><div align="center"><strong>จำนวน</strong></div></td>
<td width="50"><div align="center"><strong>ร้อยละ</strong></div></td>
</tr>
<?
$sql_select = "SELECT f.runid as upd_freq , f.freq_name , count(d.runid) as cnt FROM indicator_frequency f LEFT JOIN indicator i ON f.runid=i.upd_freq LEFT JOIN indicator_detail d ON i.runid = d.indicator_id WHERE 1=1 ".$cond_exsum." GROUP BY upd_freq,f.freq_name ORDER BY upd_freq";
//echo $sql_select;
//exit();
$res = mysql_db_query($dbname,$sql_select);
$allcnt = 0;
$arr_count = array();
$arr_upd_freq = array();
while($rs = mysql_fetch_assoc($res))
{
$allcnt+=$rs[cnt];
$arr_count[$rs[upd_freq]] = $rs[cnt];
$arr_upd_freq[$rs[upd_freq]] = $rs[freq_name];
}
if(count($arr_count) > 1)
{
}
$arr_percent = percentage($arr_count);
foreach($arr_count as $key => $value)
{
?>
<tr style="background-image:url(img/bgheader-3.png)">
<td height="20"> <?=$arr_upd_freq[$key]?></a></td>
<td>
<div align="right"><a href="index.php?upd_freq_search=<?=$key?>"><?=$value?></a> </div></td>
<td align="right"><a href="index.php?upd_freq_search=<?=$key?>"><?=$arr_percent[$key]?></a> </td>
</tr>
<?
}
?>
<tr style="background-image:url(img/bgheader-3.png)">
<td height="20"><strong> ทั้งหมด</strong></td>
<td><div align="right"><a href="index.php?upd_freq_search=<?=$key?>"><?=$allcnt?></a> </div></td>
<td align="right"><a href="index.php?upd_freq_search=<?=$key?>"><?=number_format(100,2)?></a> </td>
</tr>
</table>
</body>
</html>