| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/reportservice/3/ |
Upload File : |
<?php
$ebits = ini_get('error_reporting');
error_reporting($ebits ^ E_NOTICE);
include("dbconfig.php");
include( "function.php" );
if (isset($_GET['RType'])) $TypeRep = $_GET['RType'];
else $TypeRep = 'All';
if (isset($_GET['RDate'])) $DateRep = $_GET['RDate'];
else $DateRep = 'All';
$comp = '';
$nRecords = 0;
$nComplete=0;
$nPerC = 0;
$nSum =0;
$ThaiDow = array('จ.', 'อ.', 'พ.', 'พฤ.','ศ.','ส.','อา.');
if ($DateRep == 'All'){
$dd1 = date('d',strtotime("-1 years"));
$mm1 = date('m',strtotime("-1 years")) ;
$yy1 = date('Y',strtotime("-1 years"))+543 ;
$dd2 = date("d") ;
$mm2 = date("m") ;
$yy2 = date("Y")+543 ;
} else {
$dd1 = substr($DateRep,6,2);
$mm1 = substr($DateRep,4,2);
$yy1 = substr($DateRep,0,4);
$dd2 = substr($DateRep,14,2);
$mm2 = substr($DateRep,12,2);
$yy2 = substr($DateRep,8,4);
}
$date_start = "$dd1/$mm1/$yy1";
$date_end = "$dd2/$mm2/$yy2";
?>
<script type="text/javascript">
<!--
function getValue(vname) {
var n = document.getElementById(vname).value
return n;
}
function changeFunc() {
var URL;
URL= "<?php echo $_SERVER['PHP_SELF'] ?>";
URL+="?&RType=";
URL+=getValue('TypeID');
URL+="&RDate=";
URL+=getValue('yy1');
URL+=getValue('mm1');
URL+=getValue('dd1');
URL+=getValue('yy2');
URL+=getValue('mm2');
URL+=getValue('dd2');
window.location=URL;
}
</SCRIPT>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ติดตามการขอซ่อม</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<style type="text/css">
<!--
.style4 {font-size: 16pt;
color: #3399FF;
}
.style5 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style6 {font-size: 16pt;
color: #FFFFFF;
}
.style16 {font-size: 16pt; color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; }
.style17 {color: #FFFFFF}
-->
</style>
</head>
<body>
<TABLE height=47 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD style="BACKGROUND-COLOR: #f0f7ff" colSpan=2></TD>
</TR>
<TR bgColor=#c7d2e7>
<TD width="8%" height=21 bgcolor="#FFFFFF" class=thwbold><div align="center"><img src="../img/service_icon.jpg" width="102" height="111"></div></TD>
<TD width="92%" height=21 align=right vAlign=center bgColor=#FFFFFF class=thsans><A href=""></A>
<table width="41%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><span class="style4">สรุปรายงานบันทึกขอซ่อมทั้งหมด</span></div></td>
</tr>
</table>
<A href=""></A> <A href=""></A> </TD>
</TR>
<TR>
<TD style="BACKGROUND-COLOR: black" colSpan=2></TD>
</TR>
<TR>
<TD style="BACKGROUND-COLOR: #f0f8ff" colSpan=2></TD>
</TR>
<TR vAlign=center bgColor=#216289>
<TD height=20 colSpan=2 bgcolor="#00CCCC" class=thwbold><a href="index.php" target="_parent"> <span class="style5"><font color="#FFFFFF">หน้าแรก</font></span></a><span class="style5"><span class="style6"> || </span><span class="style17"><a href="followcom.php" target="_parent" class="style5"><font color="#FFFFFF">งานซ่อมศูนย์คอมพิวเตอร์</font></a></span><span class="style6"> || </span></span> <span class="style5"><span class="style5"><a href="rep_driver3.php" target="_parent"><font color="#FFFFFF">ดูผลการประเมินและรายงาน</font></a></font></span><font color="#FFFFFF"><SPAN
class=style16 id=n5>|| </span> <a href="logout.php" class="style5"><font color="#FFFFFF">Logout
ออกจากระบบ</font></a></TD>
</TD>
</TR>
<TR>
<TD style="BACKGROUND-COLOR: black; heigth: 1" colSpan=2></TD>
</TR>
</TBODY>
</TABLE><br><br>
<form name="form1" method="post" action="follow3.php"> <div align="center">
<table width="27%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="26%"><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">ระหว่างวันที่</font></td>
<td width="74%">
<font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
<select name="dd1" id="dd1">
<option value="01" <?php if($dd1 == '01'){echo("selected");}?> >01</option>
<option value="02" <?php if($dd1 == '02'){echo("selected");}?>>02</option>
<option value="03" <?php if($dd1 == '03'){echo("selected");}?>>03</option>
<option value="04" <?php if($dd1 == '04'){echo("selected");}?>>04</option>
<option value="05" <?php if($dd1 == '05'){echo("selected");}?>>05</option>
<option value="06" <?php if($dd1 == '06'){echo("selected");}?>>06</option>
<option value="07" <?php if($dd1 == '07'){echo("selected");}?>>07</option>
<option value="08" <?php if($dd1 == '08'){echo("selected");}?>>08</option>
<option value="09" <?php if($dd1 == '09'){echo("selected");}?>>09</option>
<option value="10" <?php if($dd1 == '10'){echo("selected");}?>>10</option>
<option value="11" <?php if($dd1 == '11'){echo("selected");}?>>11</option>
<option value="12" <?php if($dd1 == '12'){echo("selected");}?>>12</option>
<option value="13" <?php if($dd1 == '13'){echo("selected");}?>>13</option>
<option value="14" <?php if($dd1 == '14'){echo("selected");}?>>14</option>
<option value="15" <?php if($dd1 == '15'){echo("selected");}?>>15</option>
<option value="16" <?php if($dd1 == '16'){echo("selected");}?>>16</option>
<option value="17" <?php if($dd1 == '17'){echo("selected");}?>>17</option>
<option value="18" <?php if($dd1 == '18'){echo("selected");}?>>18</option>
<option value="19" <?php if($dd1 == '19'){echo("selected");}?>>19</option>
<option value="20" <?php if($dd1 == '20'){echo("selected");}?>>20</option>
<option value="21" <?php if($dd1 == '21'){echo("selected");}?>>21</option>
<option value="22" <?php if($dd1 == '22'){echo("selected");}?>>22</option>
<option value="23" <?php if($dd1 == '23'){echo("selected");}?>>23</option>
<option value="24" <?php if($dd1 == '24'){echo("selected");}?>>24</option>
<option value="25" <?php if($dd1 == '25'){echo("selected");}?>>25</option>
<option value="26" <?php if($dd1 == '26'){echo("selected");}?>>26</option>
<option value="27" <?php if($dd1 == '27'){echo("selected");}?>>27</option>
<option value="28" <?php if($dd1 == '28'){echo("selected");}?>>28</option>
<option value="29" <?php if($dd1 == '29'){echo("selected");}?>>29</option>
<option value="30" <?php if($dd1 == '30'){echo("selected");}?>>30</option>
<option value="31" <?php if($dd1 == '31'){echo("selected");}?>>31</option>
</select>
เดือน
<select name="mm1" id="mm1">
<option value="01" <?php if($mm1 == '01'){echo("selected");}?>>มกราคม</option>
<option value="02" <?php if($mm1 == '02'){echo("selected");}?>>กุมภาพันธ์</option>
<option value="03" <?php if($mm1 == '03'){echo("selected");}?>>มีนาคม</option>
<option value="04" <?php if($mm1 == '04'){echo("selected");}?>>เมษายน</option>
<option value="05" <?php if($mm1 == '05'){echo("selected");}?>>พฤษภาคม</option>
<option value="06" <?php if($mm1 == '06'){echo("selected");}?>>มิถุนายน</option>
<option value="07" <?php if($mm1 == '07'){echo("selected");}?>>กรกฎาคม</option>
<option value="08" <?php if($mm1 == '08'){echo("selected");}?>>สิงหาคม</option>
<option value="09" <?php if($mm1 == '09'){echo("selected");}?>>กันยายน</option>
<option value="10" <?php if($mm1 == '10'){echo("selected");}?>>ตุลาคม</option>
<option value="11" <?php if($mm1 == '11'){echo("selected");}?>>พฤศจิกายน</option>
<option value="12" <?php if($mm1 == '12'){echo("selected");}?>>ธันวาคม</option>
</select>
พ.ศ.<input name="yy1" type="text" id="yy1" value="<?php echo $yy1; ?>" size="4" maxlength="4">
</font>
</td>
</tr>
<tr>
<td height="21"><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">ถึง</font></td>
<td><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
<select name="dd2" id="dd2">
<option value="01" <?php if($dd2 == '01'){echo("selected");}?> >01</option>
<option value="02" <?php if($dd2 == '02'){echo("selected");}?>>02</option>
<option value="03" <?php if($dd2 == '03'){echo("selected");}?>>03</option>
<option value="04" <?php if($dd2 == '04'){echo("selected");}?>>04</option>
<option value="05" <?php if($dd2 == '05'){echo("selected");}?>>05</option>
<option value="06" <?php if($dd2 == '06'){echo("selected");}?>>06</option>
<option value="07" <?php if($dd2 == '07'){echo("selected");}?>>07</option>
<option value="08" <?php if($dd2 == '08'){echo("selected");}?>>08</option>
<option value="09" <?php if($dd2 == '09'){echo("selected");}?>>09</option>
<option value="10" <?php if($dd2 == '10'){echo("selected");}?>>10</option>
<option value="11" <?php if($dd2 == '11'){echo("selected");}?>>11</option>
<option value="12" <?php if($dd2 == '12'){echo("selected");}?>>12</option>
<option value="13" <?php if($dd2 == '13'){echo("selected");}?>>13</option>
<option value="14" <?php if($dd2 == '14'){echo("selected");}?>>14</option>
<option value="15" <?php if($dd2 == '15'){echo("selected");}?>>15</option>
<option value="16" <?php if($dd2 == '16'){echo("selected");}?>>16</option>
<option value="17" <?php if($dd2 == '17'){echo("selected");}?>>17</option>
<option value="18" <?php if($dd2 == '18'){echo("selected");}?>>18</option>
<option value="19" <?php if($dd2 == '19'){echo("selected");}?>>19</option>
<option value="20" <?php if($dd2 == '20'){echo("selected");}?>>20</option>
<option value="21" <?php if($dd2 == '21'){echo("selected");}?>>21</option>
<option value="22" <?php if($dd2 == '22'){echo("selected");}?>>22</option>
<option value="23" <?php if($dd2 == '23'){echo("selected");}?>>23</option>
<option value="24" <?php if($dd2 == '24'){echo("selected");}?>>24</option>
<option value="25" <?php if($dd2 == '25'){echo("selected");}?>>25</option>
<option value="26" <?php if($dd2 == '26'){echo("selected");}?>>26</option>
<option value="27" <?php if($dd2 == '27'){echo("selected");}?>>27</option>
<option value="28" <?php if($dd2 == '28'){echo("selected");}?>>28</option>
<option value="29" <?php if($dd2 == '29'){echo("selected");}?>>29</option>
<option value="30" <?php if($dd2 == '30'){echo("selected");}?>>30</option>
<option value="31" <?php if($dd2 == '31'){echo("selected");}?>>31</option>
</select>
เดือน
<select name="mm2" id="mm2">
<option value="01" <?php if($mm2 == '01'){echo("selected");}?>>มกราคม</option>
<option value="02" <?php if($mm2 == '02'){echo("selected");}?>>กุมภาพันธ์</option>
<option value="03" <?php if($mm2 == '03'){echo("selected");}?>>มีนาคม</option>
<option value="04" <?php if($mm2 == '04'){echo("selected");}?>>เมษายน</option>
<option value="05" <?php if($mm2 == '05'){echo("selected");}?>>พฤษภาคม</option>
<option value="06" <?php if($mm2 == '06'){echo("selected");}?>>มิถุนายน</option>
<option value="07" <?php if($mm2 == '07'){echo("selected");}?>>กรกฎาคม</option>
<option value="08" <?php if($mm2 == '08'){echo("selected");}?>>สิงหาคม</option>
<option value="09" <?php if($mm2 == '09'){echo("selected");}?>>กันยายน</option>
<option value="10" <?php if($mm2 == '10'){echo("selected");}?>>ตุลาคม</option>
<option value="11" <?php if($mm2 == '11'){echo("selected");}?>>พฤศจิกายน</option>
<option value="12" <?php if($mm2 == '12'){echo("selected");}?>>ธันวาคม</option>
</select>
พ.ศ. <input name="yy2" type="text" id="yy2" value="<?php echo $yy2; ?>" size="4" maxlength="4">
</font>
</td>
</tr>
</table>
<p><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
<input type="submit" name="Submit" value="ดูรายงาน">
</font><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
</font> </p>
<?php
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
$date1 = strtotime( substr($begin,0,4)-543 . substr($begin,4,6) );
$fDow = date('N',$date1);
$nDays = floor((strtotime( substr($end,0,4)-543 . substr($end,4,6) )-$date1)/ 86400)+1;//seconds to Days
$nHolidays = floor($nDays/7); //weeks
$nOTs = $nDays - ($nHolidays*7);
$nHolidays = $nHolidays *2;
if ( $nOTs > 0){
$nJobs = $fDow+$nOTs-1;
if ($nJobs = 6) $nHolidays=$nHolidays+1; //เสาร์
else if ($nJobs > 6) $nHolidays=$nHolidays+2; //อาทิตย์
}
$nOTs =0;
$nJobs=0;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select count(*) as items from tran where date1 between '$begin' and '$end' and ( not com ='computer' or com is null )";
$result = mysql_query($sql);
while ($object = mysql_fetch_object($result)) {
$nRecords = $object ->items ;
}
$sql="select count(*) as items from tran where date1 between '$begin' and '$end' and ( not com ='computer' or com is null ) and substr(complete,1,12)='งานซ่อมเสร็จ'";
$result = mysql_query($sql);
while ($object = mysql_fetch_object($result)) {
$nComplete = $object ->items ;
}
if ($nRecords > 0 ){
$nPerC= $nComplete*100/$nRecords;
}
?>
<!-- <p align="center"><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">เลือกแสดงข้อมูล
<select name="TypeID" id="TypeID" onChange="changeFunc()" >
<option value="All" <?php if($TypeRep == 'All'){echo("selected");}?> onClick="changeFunc()"> ทั้งหมด</option>
<option value="Wai" <?php if($TypeRep == 'Wai'){echo("selected");}?> onClick="changeFunc()"> รออนุมัติ</option>
<option value="Not" <?php if($TypeRep == 'Not'){echo("selected");}?> onClick="changeFunc()"> กำลังดำเนินการ</option>
<option value="Com" <?php if($TypeRep == 'Com'){echo("selected");}?> onClick="changeFunc()"> ซ่อมเสร็จแล้ว</option>
</select>
</font>
</p>-->
</div>
<p align="center"><font color="#000066" size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><strong>แสดงการยื่นใบขออนุมัติซ่อมตั้งแต่วันที่ <?php echo $dd1."-".$mm1."-".$yy1 ; ;?> ถึงวันที <?php echo $dd2."-".$mm2."-".$yy2 ; ; ?> จำนวน <?php echo $nRecords ; ?>
ซ่อมเสร็จ <?php echo $nComplete ; ?> = <?php echo number_format($nPerC, 2).' %'; ?> </strong></font> </p>
<table width="50%" border="1" align="center" bordercolor="#CC99CC">
<tr background="Background6.jpg">
<td width="15%" height="30" background="Background2.jpg">
<div align="center" class="style1"><font size="3" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">รายการ</font></div> </td>
<td width="5%" height="30" background="Background2.jpg">
<div align="center" class="style1"><font size="3" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">จำนวน</font></div></td>
<td width="10%" height="30" background="Background2.jpg">
<div align="center" class="style1"><font size="3" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">งานที่รอดำเนินการ</font></div></td>
<td width="10%" height="30" background="Background2.jpg">
<div align="center" class="style1"><font size="3" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">งานที่กำลังดำเนินการซ่อม</font></div></td>
<td width="10%" height="30" background="Background2.jpg">
<div align="center" class="style1"><font size="3" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">งานที่ซ่อมเสร็จแล้ว</font></div></td>
</tr>
<tr>
<td align="center">
คอมพิวเตอร์ </td>
<td align="center">
<?php
$sumRes=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='01' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes=$sumRes +1;
{
echo $sumRes;
}
?> </td>
<td align="center">
<?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='01' and complete = 'งานที่รอดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?> </td>
<td align="center"><?php
$sumRes2=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='01' and complete = ' งานที่กำลังดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes2=$sumRes2 +1;
{
echo $sumRes2;
}
?></td>
<td align="center"><?php
$sumRes3=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='01' and complete = 'งานซ่อมเสร็จแล้ว' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes3=$sumRes3 +1;
{
echo $sumRes3;
}
?></td>
</tr>
<tr>
<td align="center">วัสดุ/ครุภัณฑ์ วิทยาศาสตร์และการแพทย์ </td>
<td align="center">
<?php
$sumRes=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='02' and date between '$begin' and '$end' ";$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes=$sumRes +1;
{
echo $sumRes;
}
?> </td>
<td align="center">
<?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='02' and complete = 'งานที่รอดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?> </td>
<td align="center"><?php
$sumRes2=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='02' and complete = ' งานที่กำลังดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes2=$sumRes2 +1;
{
echo $sumRes2;
}
?></td>
<td align="center"><?php
$sumRes3=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='02' and complete = 'งานซ่อมเสร็จแล้ว' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes3=$sumRes3 +1;
{
echo $sumRes3;
}
?></td>
</tr>
<tr>
<td align="center">วัสดุ/ครุภัณฑ์ สำนักงาน </td>
<td align="center">
<?php
$sumRes=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='03' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes=$sumRes +1;
{
echo $sumRes;
}
?> </td>
<td align="center">
<?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='03' and complete = 'งานที่รอดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?> </td>
<td align="center"><?php
$sumRes2=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='03' and complete = ' งานที่กำลังดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes2=$sumRes2 +1;
{
echo $sumRes2;
}
?></td>
<td align="center"><?php
$sumRes3=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='03' and complete = 'งานซ่อมเสร็จแล้ว' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes3=$sumRes3 +1;
{
echo $sumRes3;
}
?></td>
</tr>
<tr>
<td align="center">วัสดุ/ครุภัณฑ์ งานบ้านงานครัว </td>
<td align="center">
<?php
$sumRes=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='04' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes=$sumRes +1;
{
echo $sumRes;
}
?> </td>
<td align="center">
<?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='04' and complete = 'งานที่รอดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?> </td>
<td align="center"><?php
$sumRes2=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='04' and complete = ' งานที่กำลังดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes2=$sumRes2 +1;
{
echo $sumRes2;
}
?></td>
<td align="center"><?php
$sumRes3=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='04' and complete = 'งานซ่อมเสร็จแล้ว' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes3=$sumRes3 +1;
{
echo $sumRes3;
}
?></td>
</tr>
<tr>
<td align="center">อาคารสถานที่</td>
<td align="center">
<?php
$sumRes=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='05' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes=$sumRes +1;
{
echo $sumRes;
}
?> </td>
<td align="center">
<?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='05' and complete = 'งานที่รอดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?> </td>
<td align="center"><?php
$sumRes2=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='05' and complete = ' งานที่กำลังดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes2=$sumRes2 +1;
{
echo $sumRes2;
}
?></td>
<td align="center"><?php
$sumRes3=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='05' and complete = 'งานซ่อมเสร็จแล้ว' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes3=$sumRes3 +1;
{
echo $sumRes3;
}
?></td>
</tr>
<tr>
<td align="center">ระบบไฟฟ้า</td>
<td align="center">
<?php
$sumRes=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='06' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes=$sumRes +1;
{
echo $sumRes;
}
?> </td>
<td align="center">
<?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='06' and complete = 'งานที่รอดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?> </td>
<td align="center"><?php
$sumRes2=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='06' and complete = ' งานที่กำลังดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes2=$sumRes2 +1;
{
echo $sumRes2;
}
?></td>
<td align="center"><?php
$sumRes3=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='06' and complete = 'งานซ่อมเสร็จแล้ว' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes3=$sumRes3 +1;
{
echo $sumRes3;
}
?></td>
</tr>
<tr>
<td align="center">ระบบประปาและสุขาภิบาล</td>
<td align="center">
<?php
$sumRes=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='07' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes=$sumRes +1;
{
echo $sumRes;
}
?> </td>
<td align="center">
<?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='07' and complete = 'งานที่รอดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?> </td>
<td align="center"><?php
$sumRes2=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='07' and complete = ' งานที่กำลังดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes2=$sumRes2 +1;
{
echo $sumRes2;
}
?></td>
<td align="center"><?php
$sumRes3=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='07' and complete = 'งานซ่อมเสร็จแล้ว' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes3=$sumRes3+1;
{
echo $sumRes3;
}
?></td>
</tr>
<tr>
<td align="center">อื่นๆ</td>
<td align="center">
<?php
$sumRes=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='08' and date between '$begin' and '$end' ";$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes=$sumRes +1;
{
echo $sumRes;
}
?> </td>
<td align="center">
<?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='08' and complete = 'งานที่รอดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?> </td>
<td align="center"><?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='08' and complete = ' งานที่กำลังดำเนินการ' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?></td>
<td align="center"><?php
$sumRes1=0;
$begin = $yy1."-".$mm1."-".$dd1 ;
$end = $yy2."-".$mm2."-".$dd2 ;
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql="select * from tran where idjob='08' and complete = 'งานซ่อมเสร็จแล้ว' and status<>'N' and date between '$begin' and '$end' ";
$result=mysql_query($sql);
//echo 'h'.$resutl ;
while ($object = mysql_fetch_object($result))
$sumRes1=$sumRes1 +1;
{
echo $sumRes1;
}
?></td>
</tr>
</table>
</form>
</body>
</html>