Viewing file: ReportOutreac.php (42.7 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
/** Define Validate Access */
define( '_VALID_ACCESS', 1 );
/** Check Session User Login */
if( !session_is_registered("valid_user") && !session_is_registered("Priority") ) {
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-874\" />";
echo "<p style=padding-top:115px><p align=center><br /><font color=red><strong>กรุณาทำการ Login ก่อน</strong></font></p></p>";
echo "<meta http-equiv=\"refresh\" content=\"1; URL=../login.php\" />";
exit();
}
else {
/** Configuration */
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "dev_his";
$Username = $valid_user;
} # else
?>
<!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="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<title>รายงานทั่วไป</title>
<script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
include("../templates/incHeader.php");
?>
<table width="1001" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="202" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include("./_incMainMenu.php");?></td>
<td width="799" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset>
<table width="772" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="772" height="5"></td>
</tr>
<tr>
<td height="30" background="../images/background/bg-head-topic-w780.gif" style="padding-left:15px;"><strong><a href="index.php">หน้าหลัก</a> » ข้อมูลรายเกี่ยวกับโครงการบริการวิชาการ</strong></td>
</tr>
<tr>
<td align="right"><span style="padding-bottom:5px;">เลือกปีงบประมาณ
<select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
<option>
<?php
$strSQL = " SELECT * FROM project_year ORDER by Budget_Year asc ";
$result4 = mysql_query($strSQL);
while( $rs4 = mysql_fetch_array($result4) ) {
?>
</option>
<option value="ReportOutreac.php?Budget_Year=<?=$rs4['Budget_Year'];?>" <?php if( $rs4['Budget_Year']==$Budget_Year ) echo 'selected'; ?>>
<?=$rs4['Budget_Year'];?>
</option>
<?php
} # while
?>
</select>
</span></td>
</tr>
<tr>
<td><span class="PADDING-TOP-10"><img src="../images/icons/arrow-circle-225-left.png" width="16" height="16" border="0" align="absmiddle" /> <a href="javascript:;" onclick="window.history.back();"><strong>‹ ย้อนกลับ</strong></a></span></td>
</tr>
<tr>
<td align="center"><table width="91%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td align="center"> </td>
<td height="20" colspan="4" align="left"><hr /></td>
</tr>
<tr>
<td height="20" colspan="5" align="left">๑. รายงานเกี่ยวกับโครงการ</td>
</tr>
<tr>
<td width="1" align="center"> </td>
<td width="30" height="20" align="left">๑.๑.</td>
<td width="451">จำนวนโครงการที่บูรณาการกับการเรียนการสอน</a></td>
<td width="175" align="center">
<?
$sql = " SELECT * FROM edu_service_tb WHERE M21='1' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum ). " "."โครงการ"."</font>"; else echo number_format( $countnum ); ?> [<?php
$sql = "SELECT COUNT(M21) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M21) AS sum FROM edu_service_tb WHERE M21='1' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?>]</td>
<td width="78" align="right"><a href="javascript:;" onclick="NewWindow('MIO101.php?Budget_Year=<?=$Budget_Year;?>&M21=1','Detail','800','450','yes');"><img src="../images/icons/table-money.png" alt="จำนวนโครงการที่บูรณาการการกับงานวิจัย/บทความ" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="left"> </td>
<td colspan="3"><table width="709" border="0" align="center" cellpadding="1" cellspacing="1">
<?php
$query = " SELECT * FROM edu_integration et , edu_service_tb es WHERE es.outreacId= et.outreacId and et.Mint='21' and et.Budget_Year='$Budget_Year' Group By et.courseId ";
$result1 = mysql_query($query);
$no = 1+($display-1)*$limit;
while($rs1 = mysql_fetch_array($result1)){ ;
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF" ;
?>
<tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#F5F9F9'" onmouseout="this.style.backgroundColor=''">
<td width="20" height="20" align="center"><?=$no;?></td>
<td width="608" align="left"><?php
$dbObj->RegDBConn();
$sql = "Select * From Course Where courseId ='$rs1[courseId]' ";
$result6= mysql_query($sql) or die("Error".mysql_error());
$rs6 = mysql_fetch_array($result6);
echo $rs6['courseCode'] ." ". $rs6['courseName'] ." ". $rs6['courseUnit'] ;
$dbObj->DBConn();
?></td>
<td width="71" align="right"><a href="javascript:;" onclick="NewWindow('ProjectDetailOutreac.php?outreacId=<?=$rs2['outreacId'];?>&Research_code=<?=$rs2['Research_code'];?>','Detail','800','450','yes');"><img src="../images/icons/table.png" alt="จำนวนโครงการที่บูรณาการการกับงานวิจัย/บทความ" width="16" height="16" border="0" /></a></td>
</tr>
<?php
$no ++;
} # while
?>
</table></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="left">๑.๒.</td>
<td>จำนวนโครงการที่บูรณาการการกับงานวิจัย/บทความ</a></td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M22='1' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?> [<?php
$sql = "SELECT COUNT(M22) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M22) AS sum FROM edu_service_tb WHERE M22='1' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?>]</td>
<td align="right"><a href="javascript:;" onclick="NewWindow('MIO102.php?Budget_Year=<?=$Budget_Year;?>&M22=1','Detail','800','450','yes');"><img src="../images/icons/table-money.png" alt="จำนวนโครงการที่บูรณาการการกับงานวิจัย/บทความ" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="left"> </td>
<td colspan="3"><table width="709" border="0" align="center" cellpadding="1" cellspacing="1">
<?php
$query = " SELECT * FROM edu_integration et , edu_service_tb es ,research_tb rt WHERE es.outreacId= et.outreacId and et.Research_code = rt.Research_code and et.Mint='22' and et.Budget_Year='$Budget_Year' Group By et.Research_code ";
$result2 = mysql_query($query);
$no = 1+($display-1)*$limit;
while($rs2 = mysql_fetch_array($result2)){ ;
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF" ;
?>
<tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#F5F9F9'" onmouseout="this.style.backgroundColor=''">
<td width="24" height="20" align="center"><?=$no;?></td>
<td width="605" align="left"><?php echo $rs2['Research_name'] ; ?></td>
<td width="70" align="right"><a href="javascript:;" onclick="NewWindow('MIO106.php?outreacId=<?=$rs2['outreacId'];?>&Research_code=<?=$rs2['Research_code'];?>','Detail','800','450','yes');"><img src="../images/icons/table.png" alt="จำนวนโครงการที่บูรณาการการกับงานวิจัย/บทความ" width="16" height="16" border="0" /></a></td><?php
$no ++;
} # while
?>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="left">๑.๓.</td>
<td>จำนวนโครงการที่บูรณาการทำนุบำรุงศิลปวัฒนธรรม</a></td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M23='1' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?> [<?php
$sql = "SELECT COUNT(M23) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M23) AS sum FROM edu_service_tb WHERE M23='1' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?>]</td>
<td align="right"><a href="javascript:;" onclick="NewWindow('MIO103.php?Budget_Year=<?=$Budget_Year;?>&M23=1','Detail','800','450','yes');"><img src="../images/icons/table-money.png" alt="จำนวนโครงการที่บูรณาการการกับงานวิจัย/บทความ" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="left"> </td>
<td colspan="3"><table width="709" border="0" align="center" cellpadding="1" cellspacing="1">
<?php
$query = " SELECT * FROM edu_integration et , edu_service_tb es ,project_plan pp WHERE es.outreacId= et.outreacId and pp.proId=et.proId and et.Mint='23' and et.Budget_Year='$Budget_Year' Group By et.proId ";
$result3 = mysql_query($query);
$no= 1+($display-1)*$limit;
while($rs3 = mysql_fetch_array($result3)){ ;
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF" ;
?>
<tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#F5F9F9'" onmouseout="this.style.backgroundColor=''">
<td width="20" height="20" align="center"><?=$no;?></td>
<td width="608" align="left"><?php echo $rs3['Project_plan'] ; ?></td>
<td width="71" align="right"><a href="javascript:;" onclick="NewWindow('MIO105.php?outreacId=<?=$rs3['outreacId'];?>&proId=<?=$rs3['proId'];?>','Detail','800','350','yes');"><img src="../images/icons/table.png" alt="จำนวนโครงการที่บูรณาการทำนุบำรุงศิลปวัฒนธรรม" width="16" height="16" border="0" /></a></td><?php
$no ++;
} # while
?>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="left">๑.๔.</td>
<td>จำนวนโครงการที่พัฒนาบุคลากรด้านสุขภาพ</a></td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M24='1' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?> [<?php
$sql = "SELECT COUNT(M24) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M24) AS sum FROM edu_service_tb WHERE M24='1' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?>]</td>
<td align="right"><a href="javascript:;" onclick="NewWindow('MIO104.php?Budget_Year=<?=$Budget_Year;?>&M24=1','Detail','800','450','yes');"><img src="../images/icons/table-money.png" alt="จำนวนโครงการที่บูรณาการการกับงานวิจัย/บทความ" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="left"> </td>
<td colspan="3"><table width="709" border="0" align="center" cellpadding="1" cellspacing="1">
<?php
$query = " SELECT * FROM edu_integration et , edu_service_tb es ,project_plan pp WHERE es.outreacId= et.outreacId and pp.proId=et.proId and et.Mint='24' and et.Budget_Year='$Budget_Year' Group By et.proId ";
$result3 = mysql_query($query);
$no= 1+($display-1)*$limit;
while($rs3 = mysql_fetch_array($result3)){ ;
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" : "#FFFFFF" ;
?>
<tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#F5F9F9'" onmouseout="this.style.backgroundColor=''">
<td width="20" height="20" align="center"><?=$no;?></td>
<td width="609" align="left"><?php
//$sql = "Select * From project_plan Where proId ='$rs3[proId]' ";
//$result6= mysql_query($sql) or die("Error".mysql_error());
//$rs6 = mysql_fetch_array($result6);
echo $rs3['Project_plan'] ; ?></td>
<td width="70" align="right"><a href="javascript:;" onclick="NewWindow('MIO105.php?outreacId=<?=$rs3['outreacId'];?>&proId=<?=$rs3['proId'];?>','Detail','800','350','yes');"><img src="../images/icons/table.png" alt="จำนวนโครงการที่พัฒนาบุคลากรด้านสุขภาพ" width="16" height="16" border="0" /></a></td>
<?php
$no ++;
} # while
?>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="left">๑.๕.</td>
<td>โครงการที่แยกตามกลุ่มเป้าหมาย</a></td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center"> </td>
<td> ๑.๕.๑. ประชาชนทั่วไป</td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M31='3' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center">
<?php
$sql = "SELECT COUNT(M31) AS sum31 FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M31) AS sum FROM edu_service_tb WHERE M31='3' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['sum31'] ;
echo number_format($per2,'2','.','')." %";
?>
</td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center"> </td>
<td>๑.๕.๒. นักเรียน/นักศึกษา</td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M32='3' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M31) AS sum31 FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M31) AS sum FROM edu_service_tb WHERE M32='3' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['sum31'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center"> </td>
<td>๑.๕.๓. พยาบาลวิชาชีพ </td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M33='3' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M31) AS sum31 FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M31) AS sum FROM edu_service_tb WHERE M33='3' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['sum31'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center"> </td>
<td>๑.๕.๔. อาจารย์พี่เลี้ยง</td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M34='3' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M31) AS sum31 FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M31) AS sum FROM edu_service_tb WHERE M34='3' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['sum31'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center"> </td>
<td>๑.๕.๕. ศิษย์เก่า</td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M36='3' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M31) AS sum31 FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M31) AS sum FROM edu_service_tb WHERE M36='3' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['sum31'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center"> </td>
<td> ๑.๕.๖. เจ้าหน้าที่สาธารณสุข </td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M37='3' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M31) AS sum31 FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M31) AS sum FROM edu_service_tb WHERE M37='3' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['sum31'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center"> </td>
<td>๑.๕.๗. อื่นๆ ระบุ</td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M35='3' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M31) AS sum31 FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M31) AS sum FROM edu_service_tb WHERE M35='3' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['sum31'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center">๑.๖. </td>
<td>จำนวนตามพันธกิจโครงการแสดงรายปีงบประมาณ</a></td>
<td align="center"> </td>
<td align="right"><a href="YearMission.php"><img src="../images/icons/table-money.png" alt="จำนวนตามพันธกิจโครงการแสดงรายปีงบประมาณ" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center">๑.๗. </td>
<td>จำนวนตามพันธกิจโครงการแสดงรายปีการศึกษา</a></td>
<td align="center"> </td>
<td align="right"><a href="YearAcademic.php?Budget_Year=<?=$Budget_Year;?>"><img src="../images/icons/table-money.png" alt="จำนวนตามพันธกิจโครงการแสดงรายปีการศึกษา" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td align="center"> </td>
<td height="18" colspan="4" align="center"><hr /></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" colspan="4" align="left">๒. ผลของโครงการ</td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center">๒.๑.</td>
<td>การบรรลุเป้าหมายครบทุกข้อ</a></td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M101='1' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?> [<?php
$sql = "SELECT COUNT(M101) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M101) AS sum FROM edu_service_tb WHERE M101='1' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?>]</td>
<td align="right"><a href="javascript:;" onclick="NewWindow('MIO03.php?Budget_Year=<?=$Budget_Year;?>&M101=1','Detail','800','450','yes');"><img src="../images/icons/table-money.png" alt="การบรรลุเป้าหมายครบทุกข้อ" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center">๒.๒.</td>
<td>คะแนนเฉลี่ยความพึงพอใจของผู้รับบริการ </td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center"> </td>
<td colspan="3"><table width="710" border="0" align="left">
<tr>
<td width="452">๒.๒.๑. มากกว่า 3.51 ขึ้นไป</a></td>
<td width="130" align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M102='1' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td width="71" align="center"><?php
$sql = "SELECT COUNT(M102) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M102) AS sum FROM edu_service_tb WHERE M102='1' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
<td width="39" align="right"><a href="javascript:;" onclick="NewWindow('MIO02.php?Budget_Year=<?=$Budget_Year;?>&M102=1','Detail','800','450','yes');"><img src="../images/icons/table.png" alt="มากกว่า 3.51 ขึ้นไป" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td>๒.๒.๒. เท่ากับ 3.51</a></td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M102='2' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M102) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M102) AS sum FROM edu_service_tb WHERE M102='2' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
<td align="right"><a href="javascript:;" onclick="NewWindow('MIO02.php?Budget_Year=<?=$Budget_Year;?>&M102=2','Detail','800','450','yes');"><img src="../images/icons/table.png" alt="เท่ากับ 3.51" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td>๒.๒.๓. น้อยกว่า 3.51</a></td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M102='3' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M102) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M102) AS sum FROM edu_service_tb WHERE M102='3' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
<td align="right"><a href="javascript:;" onclick="NewWindow('MIO02.php?Budget_Year=<?=$Budget_Year;?>&M102=3','Detail','800','450','yes');"><img src="../images/icons/table.png" alt="น้อยกว่า 3.51" width="16" height="16" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
<td height="18" align="center">๒.๓.</td>
<td>จำนวนผู้ เข้าร่วมโครงการ </td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
<td height="18" align="center"> </td>
<td colspan="3"><table width="669" border="0" align="left">
<tr>
<td width="451">- เป็นไปตามเป้าหมาย </td>
<td width="139" align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M103='1' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td width="65" align="center"><?php
$sql = "SELECT COUNT(M103) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M103) AS sum FROM edu_service_tb WHERE M103='1' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td>- มากกว่าเป้าหมาย</td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M103='2' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M103) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M103) AS sum FROM edu_service_tb WHERE M103='2' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td>- น้อยกว่าเป้าหมาย</td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M103='3' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M103) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M103) AS sum FROM edu_service_tb WHERE M103='3' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
<td height="18" align="center">๒.๔.</td>
<td>การสร้างรายรับให้กับสถาบัน </a> จำนวนเงิน <?php
$sql1 = " SELECT SUM(Budget_colleg) AS SumB1 FROM edu_service_tb WHERE M105='Y' and Budget_Year='$Budget_Year' ";
$result1 = mysql_query($sql1);
$rss1 = mysql_fetch_array($result1);
echo number_format($rss1['SumB1'],2,'.',',');
?>
</a></td>
<td align="center"> </td>
<td align="right"><a href="javascript:;" onclick="NewWindow('ProjectDetailOutreac.php?outreacId=<?=$rs2['outreacId'];?>&Research_code=<?=$rs2['Research_code'];?>','Detail','800','450','yes');"><img src="../images/icons/table-money.png" alt="จำนวนโครงการที่บูรณาการการกับงานวิจัย/บทความ" width="16" height="16" border="0" /></a></td>
</tr>
<tr>
<td align="center"> </td>
<td height="18" align="center">๒.๕.</td>
<td>งบประมาณที่ใช้ </td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
<td height="18" align="center"> </td>
<td colspan="3"><table width="668" border="0" align="left">
<tr>
<td width="477">-
<label></label>
เป็นไปตามที่กำหนด </td>
<td width="108" align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M104='Y' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td width="60" align="center"><?php
$sql = "SELECT COUNT(M104) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M104) AS sum FROM edu_service_tb WHERE M104='Y' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td>- มากกว่า</td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M1041='1' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M1041) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M1041) AS sum FROM edu_service_tb WHERE M1041='1' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
<tr>
<td>- น้อยกว่า</td>
<td align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M1041='2' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td align="center"><?php
$sql = "SELECT COUNT(M104) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M104) AS sum FROM edu_service_tb WHERE M1041='2' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center">๒.๖.</td>
<td colspan="3"><table width="672" border="0" align="left">
<tr>
<td width="479">การนำไปใช้ประโยชน์</td>
<td width="106" align="center"><?
$sql = " SELECT * FROM edu_service_tb WHERE M11='Y' and Budget_Year='$Budget_Year' " ;
$result3 = $dbObj->execQuery($sql);
$countnum = $dbObj->_numrows;
$dbObj->freeresult($result3);
$sum += $countnum;
?>
<?php if( $countnum != "0" ) echo "<font color=blue>".number_format( $countnum )." "."โครงการ"."</font>"; else echo number_format( $countnum ); ?></td>
<td width="61" align="center"><?php
$sql = "SELECT COUNT(M11) AS num FROM edu_service_tb WHERE Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$sql = "SELECT COUNT(M11) AS sum FROM edu_service_tb WHERE M11='Y' and Budget_Year='$Budget_Year' ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$per2= ( $rs2['sum'] * 100 ) / $rs3['num'] ;
echo number_format($per2,'2','.','')." %";
?></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" align="center"> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center"> </td>
<td height="20" colspan="4" align="center"><hr /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</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);
?>
|