"; echo "


กรุณาทำการ Login ก่อน

"; echo ""; exit(); } else { /** Configuration */ require_once( "../configuration.php" ); require_once( $_Config_absolute_path . "/includes/framework.php" ); require_once( "../includes/Function.php" ); /** Chart */ include ("../includes/charts.php"); /** Create Database Object */ $dbObj = new DBConn; $myTable0 = "personal_tb"; //=== salary_repot_tb $query0 = " SELECT * FROM $myTable0 ORDER BY Teacher_name ASC "; $result0 = $dbObj->execQuery($query0); //$rs = $dbObj->fetchArray($result); $total = $dbObj->_numrows; /** Config Table for This Page */ $myTable = "projectstdplan_tb"; $myTablePK = "Budget_Year"; $myTable2 = "project_type_tb"; $myTable2PK = "ProjectId"; /* $queryUsr = " SELECT * FROM user_tb WHERE Username='$Username' "; $resultUsr = $dbObj->execQuery($queryUsr); $rss = $dbObj->fetchArray($resultUsr); */ //=== $query = " SELECT * FROM $myTable GROUP BY $myTablePK "; $result = $dbObj->execQuery($query); $num = $dbObj->_numrows; //$total = $dbObj->_numrows; } #else ?> จำนวนบุคลากรตามประเภทสายงาน
หน้าหลัก » จำนวนบุคลากรตามประเภทสายงาน

"; $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); $per4 = ( $rs4['num4'] * 100 ) / $total; $p4 = number_format($per4,2,'.','.'); $strXML .= ""; $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); $per5 = ( $rs5['num5'] * 100 ) / $total; $p5 = number_format($per5,2,'.','.'); $strXML .= ""; $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); $per6 = ( $rs6['num6'] * 100 ) / $total; $p6 = number_format($per6,2,'.','.'); $strXML .= ""; $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); $per7 = ( $rs7['num7'] * 100 ) / $total; $p7 = number_format($per7,2,'.','.'); $strXML .= ""; $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); $per8 = ( $rs8['num8'] * 100 ) / $total; $p8 = number_format($per8,2,'.','.'); $strXML .= ""; //Finally, close element $strXML .= ""; //Create the chart - Pie 3D Chart with data from strXML echo renderChart("../charts/Pie3D.swf", "", $strXML, "",600, 375, false, false); ?>

 
freeresult($result); /** Close the Database */ $dbObj->disconn(); /** Unset Class */ unset($dbObj); ?>