Viewing file: ProjectReport.php (46.54 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/** Define Validate Access */
define( '_VALID_ACCESS', 1 );
/** Configuration */
include( "configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$sql_1 = " SELECT * FROM project_tb ";
$result_1 = mysql_query($sql_1);
$Total = mysql_num_rows($result_1);
/** Education */
$sql_2 = " SELECT * FROM edu_project_tb ";
$result_2 = mysql_query($sql_2);
$Total2= mysql_num_rows($result_2);
/** Develop */
$sql_3 = " SELECT * FROM edu_service_tb ";
$result_3 = mysql_query($sql_3);
$Total3 = mysql_num_rows($result_3);
/** Stdac */
$sql_4 = " SELECT * FROM std_activity_tb ";
$result_4 = mysql_query($sql_4);
$Total4 = mysql_num_rows($result_4);
/** Research */
$sql_5 = " SELECT * FROM foreign_relation_tb ";
$result_5 = mysql_query($sql_5);
$Total5 = mysql_num_rows($result_5);
/** QA */
$sql_7 = " SELECT * FROM qa_project_tb ";
$result_7 = mysql_query($sql_7);
$Total7 = mysql_num_rows($result_7);
$AllTotal = $Total + $Total2 + $Total3 + $Total4 + $Total5 + $Total7;
?>
<!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" />
<title><?=$_Config_sitename;?> - สรุปการจัดโครงการ/กิจกรรมแยกตามฝ่ายงาน</title>
<script type="text/javascript" src="./js/utilities.js"></script>
<link href="./css/default.css" rel="stylesheet" type="text/css" />
</head>
<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
include( "templates/incHeader.php" );
?>
<table width="1003" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="215" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include( "templates/incMainMenuLeft.php" );?></td>
<td width="788" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset><table width="770" border="0" cellspacing="0" cellpadding="0">
<form id="myForm" name="myForm" method="post" action="<?=$PHP_SELF;?>">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="30" background="images/background/bg-head-topic-w780.gif" class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a> » <span class="NOTE">สรุปการจัดโครงการ/กิจกรรมแยกตามฝ่ายงาน</span></strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="center" valign="top"><table width="760" border="0" cellspacing="0" cellpadding="0" style="font-size:11px" class="BORDER-GREY">
<tr bgcolor="#F0F0F0">
<td width="160" height="22" align="center" bgcolor="#E4E7F2" class="TEXT-DARK-BLUE10"><strong>ฝ่ายงาน</strong></td>
<td width="200" class="BORDER-LEFT-RIGHT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" style="font-size:11px">
<tr>
<td height="20" colspan="3" align="center" bgcolor="#DBFFBD">จัดทำเสร็จตามเวลาที่กำหนด</td>
</tr>
<tr>
<td width="33%" height="20" align="center" bgcolor="#F0F0F0">เสร็จทัน</td>
<td width="34%" height="20" align="center" bgcolor="#F0F0F0">ไม่เสร็จ</td>
<td width="33%" height="20" align="center" bgcolor="#F0F0F0">ไม่ได้ทำ</td>
</tr>
</table></td>
<td width="200"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" style="font-size:11px">
<tr>
<td height="20" colspan="3" align="center" bgcolor="#E9FFFF">งบประมาณที่ใช้ เทียบกับที่ประมาณการ</td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center">เสร็จทัน</td>
<td width="34%" height="20" align="center">ไม่เสร็จ</td>
<td width="33%" height="20" align="center">ไม่ได้ทำ</td>
</tr>
</table></td>
<td width="200" class="BORDER-LEFT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" style="font-size:11px">
<tr>
<td height="20" colspan="3" align="center" bgcolor="#FFFFC1">การบรรลุวัตุประสงค์ของโครงการ</td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center">เสร็จทัน</td>
<td width="34%" height="20" align="center">ไม่เสร็จ</td>
<td width="33%" height="20" align="center">ไม่ได้ทำ</td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="center" class="BORDER-TOP TEXT-DARK-BLUE10">งานบริหาร</td>
<td align="center" class="BORDER-TOP-LEFT-RIGHT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Faculty_code='01' AND Result_oper ='1' ";
$result1 = mysql_query($sql);
$Count1 = mysql_num_rows($result1);
echo $Count1;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Faculty_code='01' AND Result_oper ='2' ";
$result2 = mysql_query($sql);
$Count2 = mysql_num_rows($result2);
echo $Count2;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Faculty_code='01' AND Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count3 = mysql_num_rows($result3);
echo $Count3;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center" bgcolor="#F0F0F0"><?php
$Percent1 = ($Count1 * 100) / $Total;
echo number_format($Percent1,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent2 = ($Count2 * 100) / $Total;
echo number_format($Percent2,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent3 = ($Count3 * 100) / $Total;
echo number_format($Percent3,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Faculty_code='01' OR Dif_result <= Budget ";
$result4 = mysql_query($sql);
$Count4 = mysql_num_rows($result4);
echo $Count4;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Faculty_code='01' OR Dif_result > Budget ";
$result5 = mysql_query($sql);
$Count5 = mysql_num_rows($result5);
echo $Count5;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Faculty_code='01' OR Result_oper ='3' ";
$result6 = mysql_query($sql);
$Count6 = mysql_num_rows($result6);
echo $Count6;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent4 = ($Count4 * 100) / $Total;
echo number_format($Percent4,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent5 = ($Count5 * 100) / $Total;
echo number_format($Percent5,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent6 = ($Count6 * 100) / $Total;
echo number_format($Percent6,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP-LEFT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Faculty_code='01' OR Dif_result <= Budget ";
$result7 = mysql_query($sql);
$Count7 = mysql_num_rows($result7);
echo $Count7;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Faculty_code='01' OR Dif_result <= Budget ";
$result8 = mysql_query($sql);
$Count8 = mysql_num_rows($result8);
echo $Count8;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Faculty_code='01' OR Dif_result <= Budget ";
$result9 = mysql_query($sql);
$Count9 = mysql_num_rows($result9);
echo $Count9;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent7 = ($Count7 * 100) / $Total;
echo number_format($Percent7,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent8 = ($Count8 * 100) / $Total;
echo number_format($Percent8,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent9 = ($Count9 * 100) / $Total;
echo number_format($Percent9,2,'.',',');
?> %</td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="center" class="BORDER-TOP TEXT-DARK-BLUE10">งานวิชาการ</td>
<td align="center" class="BORDER-TOP-LEFT-RIGHT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Result_oper ='1' ";
$result1 = mysql_query($sql);
$Count21 = mysql_num_rows($result1);
echo $Count21;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Result_oper ='2' ";
$result2 = mysql_query($sql);
$Count22 = mysql_num_rows($result2);
echo $Count22;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count23 = mysql_num_rows($result3);
echo $Count23;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent21 = ($Count21 * 100) / $Total2;
echo number_format($Percent21,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent22 = ($Count22 * 100) / $Total2;
echo number_format($Percent22,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent23 = ($Count23 * 100) / $Total2;
echo number_format($Percent23,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Dif_result <= Budget ";
$result1 = mysql_query($sql);
$Count24 = mysql_num_rows($result1);
echo $Count24;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Dif_result > Budget ";
$result2 = mysql_query($sql);
$Count25 = mysql_num_rows($result2);
echo $Count25;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Dif_result > Budget AND Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count26 = mysql_num_rows($result3);
echo $Count26;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent24 = ($Count24 * 100) / $Total2;
echo number_format($Percent24,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent25 = ($Count25 * 100) / $Total2;
echo number_format($Percent25,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent26 = ($Count26 * 100) / $Total2;
echo number_format($Percent26,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP-LEFT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Result_oper ='1' ";
$result1 = mysql_query($sql);
$Count27 = mysql_num_rows($result1);
echo $Count27;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Result_oper ='2' ";
$result2 = mysql_query($sql);
$Count28 = mysql_num_rows($result2);
echo $Count28;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_project_tb WHERE Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count29 = mysql_num_rows($result3);
echo $Count29;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent27 = ($Count27 * 100) / $Total2;
echo number_format($Percent27,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent28 = ($Count28 * 100) / $Total2;
echo number_format($Percent28,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent29 = ($Count29 * 100) / $Total2;
echo number_format($Percent29,2,'.',',');
?> %</td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="center" class="BORDER-TOP TEXT-DARK-BLUE10">งานพัฒนาบุคลากร</td>
<td align="center" class="BORDER-TOP-LEFT-RIGHT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM edu_service_tb WHERE Result_oper ='1' ";
$result1 = mysql_query($sql);
$Count31 = mysql_num_rows($result1);
echo $Count31;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_service_tb WHERE Result_oper ='2' ";
$result2 = mysql_query($sql);
$Count32 = mysql_num_rows($result2);
echo $Count32;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_service_tb WHERE Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count33 = mysql_num_rows($result3);
echo $Count33;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent31 = ($Count31 * 100) / $Total3;
echo number_format($Percent31,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent32 = ($Count32 * 100) / $Total3;
echo number_format($Percent32,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent33 = ($Count33 * 100) / $Total3;
echo number_format($Percent33,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM edu_service_tb WHERE Dif_result <= Budget ";
$result1 = mysql_query($sql);
$Count34 = mysql_num_rows($result1);
echo $Count34;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_service_tb WHERE Dif_result > Budget ";
$result2 = mysql_query($sql);
$Count35 = mysql_num_rows($result2);
echo $Count35;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_service_tb WHERE Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count36 = mysql_num_rows($result3);
echo $Count36;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent34 = ($Count34 * 100) / $Total3;
echo number_format($Percent34,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent35 = ($Count35 * 100) / $Total3;
echo number_format($Percent35,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent36 = ($Count36 * 100) / $Total3;
echo number_format($Percent36,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP-LEFT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM edu_service_tb WHERE Result_oper ='1' ";
$result1 = mysql_query($sql);
$Count37 = mysql_num_rows($result1);
echo $Count37;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_service_tb WHERE Result_oper ='2' ";
$result2 = mysql_query($sql);
$Count38 = mysql_num_rows($result2);
echo $Count38;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM edu_service_tb WHERE Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count39 = mysql_num_rows($result3);
echo $Count39;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent37 = ($Count37 * 100) / $Total3;
echo number_format($Percent37,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent38 = ($Count38 * 100) / $Total3;
echo number_format($Percent38,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent39 = ($Count39 * 100) / $Total3;
echo number_format($Percent39,2,'.',',');
?> %</td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="center" class="BORDER-TOP TEXT-DARK-BLUE10">งานกิจการนักศึกษา</td>
<td align="center" class="BORDER-TOP-LEFT-RIGHT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM std_activity_tb WHERE Result_oper ='1' ";
$result1 = mysql_query($sql);
$Count41 = mysql_num_rows($result1);
echo $Count41;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM std_activity_tb WHERE Result_oper ='2' ";
$result2 = mysql_query($sql);
$Count42 = mysql_num_rows($result2);
echo $Count42;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM std_activity_tb WHERE Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count43 = mysql_num_rows($result3);
echo $Count43;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent41 = ($Count41 * 100) / $Total4;
echo number_format($Percent41,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent42 = ($Count42 * 100) / $Total4;
echo number_format($Percent42,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent43 = ($Count43 * 100) / $Total4;
echo number_format($Percent43,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM std_activity_tb WHERE Dif_result <= Budget ";
$result1 = mysql_query($sql);
$Count44 = mysql_num_rows($result1);
echo $Count44;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM std_activity_tb WHERE Dif_result > Budget ";
$result2 = mysql_query($sql);
$Count45 = mysql_num_rows($result2);
echo $Count45;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM std_activity_tb WHERE Dif_result > Budget AND Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count46 = mysql_num_rows($result3);
echo $Count46;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent44 = ($Count44 * 100) / $Total4;
echo number_format($Percent44,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent45 = ($Count45 * 100) / $Total4;
echo number_format($Percent45,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent46 = ($Count46 * 100) / $Total4;
echo number_format($Percent46,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP-LEFT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM std_activity_tb WHERE Dif_result <= Budget ";
$result1 = mysql_query($sql);
$Count47 = mysql_num_rows($result1);
echo $Count47;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM std_activity_tb WHERE Dif_result > Budget ";
$result2 = mysql_query($sql);
$Count48 = mysql_num_rows($result2);
echo $Count48;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM std_activity_tb WHERE Dif_result > Budget AND Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count49 = mysql_num_rows($result3);
echo $Count49;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
$Percent47 = ($Count47 * 100) / $Total4;
echo number_format($Percent47,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
$Percent48 = ($Count48 * 100) / $Total4;
echo number_format($Percent48,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
$Percent49 = ($Count49 * 100) / $Total4;
echo number_format($Percent49,2,'.',',');
?> %</td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="center" class="BORDER-TOP TEXT-DARK-BLUE10">งานวิจัย</td>
<td align="center" class="BORDER-TOP-LEFT-RIGHT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM foreign_relation_tb WHERE Result_oper ='1' ";
$result1 = mysql_query($sql);
$Count51 = mysql_num_rows($result1);
echo $Count51;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM foreign_relation_tb WHERE Result_oper ='2' ";
$result2 = mysql_query($sql);
$Count52 = mysql_num_rows($result2);
echo $Count52;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM foreign_relation_tb WHERE Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count53 = mysql_num_rows($result3);
echo $Count53;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
if( $Total5 == 0 )
$Percent51 = 0;
else
$Percent51 = ($Count51 * 100) / $Total5;
echo number_format($Percent51,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
if( $Total5 == 0 )
$Percent52 = 0;
else
$Percent52 = ($Count52 * 100) / $Total5;
echo number_format($Percent52,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
if( $Total5 == 0 )
$Percent53 = 0;
else
$Percent53 = ($Count53 * 100) / $Total5;
echo number_format($Percent53,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM foreign_relation_tb WHERE Dif_result <= Budget ";
$result1 = mysql_query($sql);
$Count44 = mysql_num_rows($result1);
echo $Count44;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM foreign_relation_tb WHERE Dif_result > Budget ";
$result2 = mysql_query($sql);
$Count45 = mysql_num_rows($result2);
echo $Count45;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM foreign_relation_tb WHERE Dif_result > Budget AND Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count46 = mysql_num_rows($result3);
echo $Count46;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
if( $Total5 == 0 )
$Percent54 = 0;
else
$Percent54 = ($Count54 * 100) / $Total5;
echo number_format($Percent54,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
if( $Total5 == 0 )
$Percent55 = 0;
else
$Percent55 = ($Count55 * 100) / $Total5;
echo number_format($Percent55,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
if( $Total5 == 0 )
$Percent56 = 0;
else
$Percent56 = ($Count56 * 100) / $Total5;
echo number_format($Percent56,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP-LEFT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM foreign_relation_tb WHERE Dif_result <= Budget ";
$result1 = mysql_query($sql);
$Count57 = mysql_num_rows($result1);
echo $Count57;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM foreign_relation_tb WHERE Dif_result > Budget ";
$result2 = mysql_query($sql);
$Count58 = mysql_num_rows($result2);
echo $Count58;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM foreign_relation_tb WHERE Dif_result > Budget AND Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count59 = mysql_num_rows($result3);
echo $Count59;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
if( $Total5 == 0 )
$Percent57 = 0;
else
$Percent57 = ($Count57 * 100) / $Total5;
echo number_format($Percent57,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
if( $Total5 == 0 )
$Percent58 = 0;
else
$Percent58 = ($Count58 * 100) / $Total5;
echo number_format($Percent58,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
if( $Total5 == 0 )
$Percent59 = 0;
else
$Percent59 = ($Count59 * 100) / $Total5;
echo number_format($Percent59,2,'.',',');
?> %</td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="center" class="BORDER-TOP TEXT-DARK-BLUE10">งานประกัน</td>
<td align="center" class="BORDER-TOP-LEFT-RIGHT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM qa_project_tb WHERE Result_oper ='1' ";
$result1 = mysql_query($sql);
$Count71 = mysql_num_rows($result1);
echo $Count71;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM qa_project_tb WHERE Result_oper ='2' ";
$result2 = mysql_query($sql);
$Count72 = mysql_num_rows($result2);
echo $Count72;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM qa_project_tb WHERE Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count73 = mysql_num_rows($result3);
echo $Count73;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
if( $Total7 == 0 )
$Percent71 = 0;
else
$Percent71 = ($Count71 * 100) / $Total7;
echo number_format($Percent71,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
if( $Total7 == 0 )
$Percent72 = 0;
else
$Percent72 = ($Count72 * 100) / $Total7;
echo number_format($Percent72,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
if( $Total7 == 0 )
$Percent73 = 0;
else
$Percent73 = ($Count73 * 100) / $Total7;
echo number_format($Percent73,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM qa_project_tb WHERE Dif_result <= Budget ";
$result1 = mysql_query($sql);
$Count74 = mysql_num_rows($result1);
echo $Count74;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM qa_project_tb WHERE Dif_result > Budget ";
$result2 = mysql_query($sql);
$Count75 = mysql_num_rows($result2);
echo $Count75;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM qa_project_tb WHERE Dif_result > Budget AND Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count76 = mysql_num_rows($result3);
echo $Count76;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
if( $Total7 == 0 )
$Percent74 = 0;
else
$Percent74 = ($Count74 * 100) / $Total7;
echo number_format($Percent74,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
if( $Total7 == 0 )
$Percent75 = 0;
else
$Percent75 = ($Count75 * 100) / $Total7;
echo number_format($Percent75,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
if( $Total7 == 0 )
$Percent76 = 0;
else
$Percent76 = ($Count76 * 100) / $Total7;
echo number_format($Percent76,2,'.',',');
?> %</td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP-LEFT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td height="20" align="center" bgcolor="#F6F6F6"><?php
$sql = " SELECT * FROM qa_project_tb WHERE Dif_result <= Budget ";
$result1 = mysql_query($sql);
$Count77 = mysql_num_rows($result1);
echo $Count77;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM qa_project_tb WHERE Dif_result > Budget ";
$result2 = mysql_query($sql);
$Count78 = mysql_num_rows($result2);
echo $Count78;
?></td>
<td height="20" align="center"><?php
$sql = " SELECT * FROM qa_project_tb WHERE Dif_result > Budget AND Result_oper ='3' ";
$result3 = mysql_query($sql);
$Count79 = mysql_num_rows($result3);
echo $Count79;
?></td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><?php
if( $Total7 == 0 )
$Percent77 = 0;
else
$Percent77 = ($Count77 * 100) / $Total7;
echo number_format($Percent77,2,'.',',');
?> %</td>
<td width="34%" height="20" align="center"><?php
if( $Total7 == 0 )
$Percent78 = 0;
else
$Percent78 = ($Count78 * 100) / $Total7;
echo number_format($Percent78,2,'.',',');
?> %</td>
<td width="33%" height="20" align="center"><?php
if( $Total7 == 0 )
$Percent79 = 0;
else
$Percent79 = ($Count79 * 100) / $Total7;
echo number_format($Percent79,2,'.',',');
?> %</td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="center" bgcolor="#E4E7F2" class="BORDER-TOP TEXT-CLIMSON10"><strong>รวม</strong></td>
<td align="center" class="BORDER-TOP-LEFT-RIGHT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td width="33%" height="20" align="center" bgcolor="#F6F6F6"><strong>
<?php
$Sum1 = $Count1 + $Count21 + $Count31 + $Count41 + $Count51 + $Count71 ;
echo number_format($Sum1,2,'.',',');
?>
</strong></td>
<td width="34%" height="20" align="center"><strong>
<?php
$Sum2 = $Count2 + $Count22 + $Count32 + $Count42 + $Count52 + $Count72 ;
echo number_format($Sum2,2,'.',',');
?>
</strong></td>
<td width="33%" height="20" align="center"><strong>
<?php
$Sum3 = $Count3 + $Count23 + $Count33 + $Count43 + $Count53 + $Count73 ;
echo number_format($Sum3,2,'.',',');
?>
</strong></td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td width="33%" height="20" align="center" bgcolor="#F6F6F6"><strong>
<?php
$Sum4 = $Count4 + $Count24 + $Count34 + $Count44 + $Count54 + $Count74 ;
echo number_format($Sum4,2,'.',',');
?>
</strong></td>
<td width="34%" height="20" align="center"><strong>
<?php
$Sum5 = $Count5 + $Count25 + $Count35 + $Count45 + $Count55 + $Count75 ;
echo number_format($Sum5,2,'.',',');
?>
</strong></td>
<td width="33%" height="20" align="center"><strong>
<?php
$Sum6 = $Count6 + $Count26 + $Count36 + $Count46 + $Count56 + $Count76 ;
echo number_format($Sum6,2,'.',',');
?>
</strong></td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP-LEFT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F6F6F6">
<td width="33%" height="20" align="center" bgcolor="#F6F6F6"><strong>
<?php
$Sum7 = $Count7 + $Count27 + $Count37 + $Count47 + $Count57 + $Count77 ;
echo number_format($Sum7,2,'.',',');
?>
</strong></td>
<td width="34%" height="20" align="center"><strong>
<?php
$Sum8 = $Count8 + $Count28 + $Count38 + $Count48 + $Count58 + $Count78 ;
echo number_format($Sum8,2,'.',',');
?>
</strong></td>
<td width="33%" height="20" align="center"><strong>
<?php
$Sum9 = $Count9 + $Count29 + $Count39 + $Count49 + $Count59 + $Count79 ;
echo number_format($Sum9,2,'.',',');
?>
</strong></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="center" bgcolor="#E4E7F2" class="BORDER-TOP TEXT-DARK-BLUE10"><strong>คิดเป็นเปอร์เซ็นต์</strong></td>
<td align="center" class="BORDER-TOP-LEFT-RIGHT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><strong>
<?php
$PerSum1 = ($Sum1 * 100) / $AllTotal;
echo number_format($PerSum1,2,'.',',');
?>
%</strong></td>
<td width="34%" height="20" align="center"><strong>
<?php
$PerSum2 = ($Sum2 * 100) / $AllTotal;
echo number_format($PerSum2,2,'.',',');
?>
%</strong></td>
<td width="33%" height="20" align="center"><strong>
<?php
$PerSum3 = ($Sum3 * 100) / $AllTotal;
echo number_format($PerSum3,2,'.',',');
?>
%</strong></td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><strong>
<?php
$PerSum4 = ($Sum4 * 100) / $AllTotal;
echo number_format($PerSum4,2,'.',',');
?>
%</strong></td>
<td width="34%" height="20" align="center"><strong>
<?php
$PerSum5 = ($Sum5 * 100) / $AllTotal;
echo number_format($PerSum5,2,'.',',');
?>
%</strong></td>
<td width="33%" height="20" align="center"><strong>
<?php
$PerSum6 = ($Sum6 * 100) / $AllTotal;
echo number_format($PerSum6,2,'.',',');
?>
%</strong></td>
</tr>
</table></td>
<td align="center" class="BORDER-TOP-LEFT"><table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE" style="font-size:11px">
<tr bgcolor="#F0F0F0">
<td width="33%" height="20" align="center"><strong>
<?php
$PerSum7 = ($Sum7 * 100) / $AllTotal;
echo number_format($PerSum7,2,'.',',');
?>
%</strong></td>
<td width="34%" height="20" align="center"><strong>
<?php
$PerSum8 = ($Sum8 * 100) / $AllTotal;
echo number_format($PerSum8,2,'.',',');
?>
%</strong></td>
<td width="33%" height="20" align="center"><strong>
<?php
$PerSum9 = ($Sum9 * 100) / $AllTotal;
echo number_format($PerSum9,2,'.',',');
?>
%</strong></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr></form>
</table>
</fieldset></td>
</tr>
</table>
<?php include( "./templates/incFooter.php" ); ?>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|