Viewing file: SumPesonal.php (15.67 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" );
require_once( "../include/Function.php" );
/** Create Database Object */
$dbObj = new DBConn;
$myTable = "personal_tb";
//=== salary_repot_tb
$query = " SELECT * FROM $myTable ORDER BY Teacher_name ASC ";
$result = $dbObj->execQuery($query);
//$rs = $dbObj->fetchArray($result);
$total = $dbObj->_numrows;
} # 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>ข้อมูลสถานะบุคลากร - <?=urldecode($topic);?></title>
<style type="text/css ">
<!--
.style1 {font-weight: bold}
.style2 {font-weight: bold}
-->
</style>
</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="203" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include("./_incMainMenu.php");?></td>
<td width="800" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset><table width="780" border="0" cellspacing="0" cellpadding="0">
<form id="myForm" name="myForm" method="post" action="<?=$PHP_SELF;?>?Budget_Year=<?=$Budget_Year;?>&MoneyId=<?=$MoneyId;?>&page=<?=$page;?>&topic=<?=urlencode($topic);?>">
<tr>
<td height="5" colspan="2"></td>
</tr>
<tr>
<td width="630" height="30" background="../images/background/bg-head-topic-w780.gif" class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a></strong> <strong>» <span class="NOTE">ข้อมูลสรุปสถานะบุคลากร</span></strong></td>
<td width="150" align="right" class="PADDING-RIGHT-10"> </td>
</tr>
<tr>
<td colspan="2" align="right"> </td>
</tr>
<tr>
<td height="370" colspan="2" align="center" valign="top">
<table width="95%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="10"></td>
<td height="10"></td>
<td height="10"></td>
<td height="10" align="center"><input type="button" name="button" id="button" value="แผนภูมิ" onclick="location.href='<?=$_Config_live_site;?>/GrapDegree.php'" /></td>
</tr>
<tr>
<td width="4%" height="20" align="center"><img src="../images/icons/icon-people-24.gif" width="24" height="24" border="0" align="absmiddle" /></td>
<td class="TEXT-DARK-BLUE10"><strong>จำนวนระดับการศึกษาของบุคลากรทุกสายงานทั้งหมด</strong></td>
<td align="center" class="TEXT-DARK-BLUE10">จำนวน</td>
<td align="center" class="TEXT-DARK-BLUE10">ร้อยละ</td>
</tr>
<tr>
<td height="20" align="center"> </td>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3%" height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td width="72%" height="20"><a href="PersonalData1.php?Degree_code=1">ปริญญาตรี</a></td>
<td width="13%" align="center"><?php
$sql = " SELECT COUNT(Degree_code) AS num1 FROM personal_tb WHERE StatusId='1' AND Degree_code=1 ";
$result1 = $dbObj->execQuery($sql);
$rs1 = $dbObj->fetchArray($result1);
$dbObj->freeresult($result1);
echo $rs1['num1'];
?></td>
<td width="12%" align="center"><?php
$per1 = ( $rs1['num1'] * 100 ) / $total;
echo number_format($per1,2,'.','.');
?></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td height="20"><a href="PersonalData1.php?Degree_code=2">ปริญญาโท</a></td>
<td height="20" align="center"><?php
$sql = " SELECT COUNT(Degree_code) AS num2 FROM personal_tb WHERE StatusId='1' AND Degree_code=2 ";
$result2 = $dbObj->execQuery($sql);
$rs2 = $dbObj->fetchArray($result2);
$dbObj->freeresult($result2);
echo $rs2['num2'];
?></td>
<td height="20" align="center"><?php
$per2 = ( $rs2['num2'] * 100 ) / $total;
echo number_format($per2,2,'.','.');
?></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td height="20"><a href="PersonalData1.php?Degree_code=3">ปริญญาเอก</a></td>
<td height="20" align="center"><?php
$sql = " SELECT COUNT(Degree_code) AS num3 FROM personal_tb WHERE StatusId='1' AND Degree_code=3 ";
$result3 = $dbObj->execQuery($sql);
$rs3 = $dbObj->fetchArray($result3);
$dbObj->freeresult($result3);
echo $rs3['num3'];
?></td>
<td height="20" align="center"><?php
$per3 = ( $rs3['num3'] * 100 ) / $total;
echo number_format($per3,2,'.','.');
?></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10"></td>
<td height="10"></td>
<td height="10"></td>
<td height="10" align="center"><input type="button" name="button" id="button" value="แผนภูมิ" onclick="location.href='<?=$_Config_live_site;?>/GrapFacult.php'" /></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/icon-people-24.gif" width="24" height="24" border="0" align="absmiddle" /></td>
<td class="TEXT-DARK-BLUE10"><strong>จำนวนบุคลากรตามประเภทสายงาน</strong> </td>
<td align="center" class="TEXT-DARK-BLUE10">จำนวน</td>
<td align="center" class="TEXT-DARK-BLUE10">ร้อยละ</td>
</tr>
<tr>
<td height="20" align="center"> </td>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3%" height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td width="72%" height="20"><a href="PersonalData4.php?Teacher_type=1">ทันตแพทย์</a></td>
<td width="13%" align="center"><?php
$sql = " SELECT COUNT(Teacher_type) AS num4 FROM personal_tb WHERE StatusId='1' AND Teacher_type=1 ";
$result4 = $dbObj->execQuery($sql);
$rs4 = $dbObj->fetchArray($result4);
$dbObj->freeresult($result4);
echo $rs4['num4'];
?></td>
<td width="12%" align="center"><?php
$per4 = ( $rs4['num4'] * 100 ) / $total;
echo number_format($per4,2,'.','.');
?></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td height="20"><a href="PersonalData4.php?Teacher_type=4">เภสัชกร</a></td>
<td height="20" align="center"><?php
$sql = " SELECT COUNT(Teacher_type) AS num5 FROM personal_tb WHERE StatusId='1' AND Teacher_type=4 ";
$result5 = $dbObj->execQuery($sql);
$rs5 = $dbObj->fetchArray($result5);
$dbObj->freeresult($result5);
echo $rs5['num5'];
?></td>
<td height="20" align="center"><?php
$per5 = ( $rs5['num5'] * 100 ) / $total;
echo number_format($per5,2,'.','.');
?></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td height="20"><a href="PersonalData4.php?Teacher_type=2">วิทยาจารย์</a></td>
<td height="20" align="center"><?php
$sql = " SELECT COUNT(Teacher_type) AS num6 FROM personal_tb WHERE StatusId='1' AND Teacher_type=2 ";
$result6 = $dbObj->execQuery($sql);
$rs6 = $dbObj->fetchArray($result6);
$dbObj->freeresult($result6);
echo $rs6['num6'];
?></td>
<td height="20" align="center"><?php
$per6 = ( $rs6['num6'] * 100 ) / $total;
echo number_format($per6,2,'.','.');
?></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td height="20"><a href="PersonalData4.php?Teacher_type=5">พยาบาลวิชาชีพ</a></td>
<td height="20" align="center"><?php
$sql = " SELECT COUNT(Teacher_type) AS num7 FROM personal_tb WHERE StatusId='1' AND Teacher_type=5 ";
$result7 = $dbObj->execQuery($sql);
$rs7 = $dbObj->fetchArray($result7);
$dbObj->freeresult($result7);
echo $rs7['num7'];
?></td>
<td height="20" align="center"><?php
$per7 = ( $rs7['num7'] * 100 ) / $total;
echo number_format($per7,2,'.','.');
?></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td height="20"><a href="PersonalData4.php?Teacher_type=6">สายสนับสนุน</a></td>
<td height="20" align="center"><?php
$sql = " SELECT COUNT(Teacher_type) AS num8 FROM personal_tb WHERE StatusId='1' AND Teacher_type=6 ";
$result8 = $dbObj->execQuery($sql);
$rs8 = $dbObj->fetchArray($result8);
$dbObj->freeresult($result8);
echo $rs8['num8'];
?></td>
<td height="20" align="center"><?php
$per8 = ( $rs8['num8'] * 100 ) / $total;
echo number_format($per8,2,'.','.');
?></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10"></td>
<td height="10"></td>
<td height="10"></td>
<td height="10" align="center"><input type="button" name="button" id="button" value="แผนภูมิ" onclick="location.href='<?=$_Config_live_site;?>/GrapStatus.php'" /></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/icon-people-24.gif" width="24" height="24" border="0" align="absmiddle" /></td>
<td width="72%" class="TEXT-DARK-BLUE10"><strong>จำนวนบุคลากรตามสถานะ</strong></td>
<td width="12%" align="center" class="TEXT-DARK-BLUE10">จำนวน</td>
<td width="12%" align="center" class="TEXT-DARK-BLUE10">ร้อยละ</td>
</tr>
<tr>
<td height="20" align="center"> </td>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3%" height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td width="72%" height="20"><a href="PersonalDataType.php?Person_type=1">ข้าราชการ</a></td>
<td width="13%" align="center"><?php
$sql = " SELECT COUNT(Person_type) AS num9 FROM personal_tb WHERE StatusId='1' AND Person_type=1 ";
$result9 = $dbObj->execQuery($sql);
$rs9 = $dbObj->fetchArray($result9);
$dbObj->freeresult($result9);
echo $rs9['num9'];
?></td>
<td width="12%" align="center"><?php
$per9 = ( $rs9['num9'] * 100 ) / $total;
echo number_format($per9,2,'.','.');
?></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td height="20"><a href="PersonalDataType.php?Person_type=3">ลูกจ้างประจำ</a></td>
<td height="20" align="center"><?php
$sql = " SELECT COUNT(Person_type) AS num10 FROM personal_tb WHERE StatusId='1' AND Person_type=3 ";
$result10 = $dbObj->execQuery($sql);
$rs10 = $dbObj->fetchArray($result10);
$dbObj->freeresult($result10);
echo $rs10['num10'];
?></td>
<td height="20" align="center"><?php
$per10 = ( $rs10['num10'] * 100 ) / $total;
echo number_format($per10,2,'.','.');
?></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td height="20"><a href="PersonalDataType.php?Person_type=4">ลูกจ้างชั่วคราว</a></td>
<td height="20" align="center"><?php
$sql = " SELECT COUNT(Person_type) AS num11 FROM personal_tb WHERE StatusId='1' AND Person_type=4 ";
$result11 = $dbObj->execQuery($sql);
$rs11 = $dbObj->fetchArray($result11);
$dbObj->freeresult($result11);
echo $rs11['num11'];
?></td>
<td height="20" align="center"><?php
$per11 = ( $rs11['num11'] * 100 ) / $total;
echo number_format($per11,2,'.','.');
?></td>
</tr>
<tr>
<td height="20" align="center"><img src="../images/icons/arrow2.gif" width="12" height="12" /></td>
<td height="20"><a href="PersonalDataType.php?Person_type=5">ลูกจ้างชั่วคราว ( หมาจ่าย)</a></td>
<td height="20" align="center"><?php
$sql = " SELECT COUNT(Person_type) AS num12 FROM personal_tb WHERE StatusId='1' AND Person_type=5 ";
$result12 = $dbObj->execQuery($sql);
$rs12 = $dbObj->fetchArray($result12);
$dbObj->freeresult($result12);
echo $rs12['num12'];
?></td>
<td height="20" align="center"><?php
$per12 = ( $rs12['num12'] * 100 ) / $total;
echo number_format($per12,2,'.','.');
?></td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" align="center"> </td>
<td colspan="3" class="TEXT-DARK-BLUE10"> </td>
</tr>
<tr>
<td height="20" align="center"> </td>
<td align="right" class="TEXT-DARK-BLUE10"><strong>รวมจำนวนบุคลากรทั้งหมด</strong></td>
<td colspan="2" align="left" class="TEXT-DARK-BLUE10 PADDING-LEFT-30"><strong>
<span class="TEXT-RED10"><?php
$sql = " SELECT * FROM personal_tb WHERE StatusId='1' ";
$result99 = $dbObj->execQuery($sql);
$num99 = $dbObj->_numrows;
$dbObj->freeresult($result99);
echo $num99;
?></span> คน</strong></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"> </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);
?>
|