|
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/people/ |
Upload File : |
<?
include "../../config/config.inc.php";
include("function/function.php");
$month_arr=array('','มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม');
$yy = date("Y");
$mm =date("m");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
<head>
<title>รายงานข้อมูลโรงงานอุตสาหกรรมของจังหวัดปธุมธานี</title>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-874" />
<link rel="stylesheet" type="text/css" href="hiliterow.css" />
</head>
<body>
<table width="100%" align="center" class="datatable" style="width:96%;">
<caption>
<form name="form1" method="post" action=""> ข้อมูลปัญหาและความต้องการของประชาชน
ประจำปี <? $c_yy = date("Y");?>
<select name="yy" id="yy">
<?
for($n=2010;$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="ตกลง">
</form>
</caption>
<tr>
<td width="58" rowspan="2" align="center" bgcolor="#CCCCCC"><strong>ลำดับ</strong></td>
<td width="238" rowspan="2" align="center" bgcolor="#CCCCCC"><strong> ปัญหาความต้องการ</strong></td>
<td colspan="12" align="center" bgcolor="#CCCCCC"><strong>ปี
<?=$yy+543?>
</strong></td>
<td width="72" rowspan="2" align="center" bgcolor="#CCCCCC"><strong>รวม</strong></td>
</tr>
<tr>
<? for($m1=1;$m1< count($month_arr);$m1++){ ?>
<td align="center" bgcolor="#CCCCCC"><strong>
<?=$month_arr[$m1]?>
</strong></td>
<? }?>
</tr>
<?php /*?> <?
$sql= "SELECT * FROM tbl_type_request Inner Join tbl_complain ON tbl_complain.type_request =tbl_type_request.request_id ";
$query=@mysql_db_query($dbname,$sql);
$n=1;
while($fetch=mysql_num_rows($query)) {
?><?php */?>
<?
$sql= mysql_query("SELECT * from tbl_type_request order by request_id desc ");
$n=1;
while( $ram = mysql_fetch_array($sql) ) {
?>
<tr>
<td align="center"><? echo $n; $n++;?></td>
<td align="left"><?=$ram[type_request]?></td>
<?
$month=array('','01','02','03','04','05','06','07','08','09','10','11','12');
for($m1=1;$m1< count($month);$m1++){ ?>
<? $sql1= "SELECT type_request from tbl_complain where mm='$month[$m1]' and yy='$yy' and type_request='$ram[request_id]' ";
$result_re = mysql_db_query($dbname,$sql1);
$rs =mysql_num_rows($result_re);
?>
<td align="center"><? echo number_format($rs)?></td>
<? }?>
<? $sql1= "SELECT type_request from tbl_complain where yy='$yy' and type_request='$ram[request_id]' ";
$result_re = mysql_db_query($dbname,$sql1);
$rs =mysql_num_rows($result_re);
?>
<td align="center"><? echo number_format($rs)?></td>
</tr>
<? } ?>
<tr>
<td colspan="2" align="center" bgcolor="#CCCCCC"><strong>รวม</strong></td>
<?
$month=array('','01','02','03','04','05','06','07','08','09','10','11','12');
for($m1=1;$m1< count($month);$m1++){ ?>
<? $sql1= "SELECT type_request from tbl_complain where mm='$month[$m1]' and yy='$yy' ";
$result_re = mysql_db_query($dbname,$sql1);
$rs =mysql_num_rows($result_re);
?>
<td align="center" bgcolor="#CCCCCC"><strong><? echo number_format($rs) ?></strong></td>
<? }?>
<? $sql1= "SELECT type_request from tbl_complain where yy='$yy' ";
$result_re = mysql_db_query($dbname,$sql1);
$rs =mysql_num_rows($result_re);
?>
<td align="center" bgcolor="#CCCCCC"><strong><? echo number_format($rs) ?></strong></td>
</tr>
</table>
<script type="text/javascript">
var rows = document.getElementsByTagName('tr');
for (var i = 0; i < rows.length; i++) {
rows[i].onmouseover = function() {
this.className += ' hilite';
}
rows[i].onmouseout = function() {
this.className = this.className.replace('hilite', '');
}
}
</script>
</body>
</html>