"; 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; /** Config Table for This Page */ $myTable1 = "personal_tb"; $myTable2 = "research_tb"; $param = "&"; /** Query เพื่อหา Numrows ก่อน */ //$query = " SELECT * FROM $myTable2 GROUP BY Year_prop "; //$result = $dbObj->execQuery($query); //$numrows = $dbObj->_numrows } # else ?> <?=$_Config_sitename;?>
หน้าหลัก » ข้อมูลรายงาน » กราฟแสดงข้อมูลครุภัณฑ์  
 
‹ ย้อนกลับ
 
 
   
 
"; // Fetch all factory records $strQuery = "SELECT * FROM accessories_type_tb "; $result1 = mysql_query($strQuery); //Iterate through each factory if ($result1) { while( $rs1 = mysql_fetch_array($result1) ) { $error_id = $rs1['id']; $strQuery = " SELECT * FROM accessories_tb at, accessories_type_tb att WHERE at.Dura='Y' and at.Status='Y' and at.Acc_type_code = att.Acc_type_code and at.Acc_type_code !='0' and at.Acc_type_code='$rs1[Acc_type_code]' "; $result2 = mysql_query($strQuery); $numAmt = mysql_num_rows($result2); $strXML .= ""; } # while } # if //Finally, close element $strXML .= ""; //Create the chart - Pie 3D Chart with data from strXML echo renderChart("../charts/Pie3D.swf", "", $strXML, "", 750, 375, false, false); ?> "; // Fetch all factory records $strQuery = "SELECT * FROM durable_tb dt, accessories_type_tb att , accessories_tb at WHERE at.Dura='Y' and at.Acc_type_code = att.Acc_type_code and dt.AccId = at.AccId and at.Acc_type_code !='0' GROUP BY dt.Acc_type_code "; $result2= mysql_query($strQuery); //Iterate through each factory if ($result2) { while( $rs2 = mysql_fetch_array($result2) ) { $error_id = $rs2['id']; $strQuery = "SELECT * FROM durable_tb dt, accessories_type_tb att , accessories_tb at WHERE at.Dura='Y' and at.Acc_type_code = att.Acc_type_code and dt.AccId = at.AccId and at.Acc_type_code !='0' and at.Acc_type_code='$rs2[Acc_type_code]' "; $result3 = mysql_query($strQuery); $numAmt = mysql_num_rows($result3); $strXML .= ""; } # while } # if //Finally, close element $strXML .= ""; //Create the chart - Pie 3D Chart with data from strXML echo renderChart("../charts/Pie3D.swf", "", $strXML, "", 750, 375, false, false); ?> "; // Fetch all factory records $strQuery = " SELECT * FROM durable_type_tb "; $result1 = mysql_query($strQuery); //Iterate through each factory if ($result1) { while( $rs1 = mysql_fetch_array($result1) ) { $error_id = $rs1['id']; $strQuery = "Select * From durable_tb WHERE durableCode='$rs1[durableCode]' "; $result2 = mysql_query($strQuery); $numAmt = mysql_num_rows($result2); $strXML .= ""; } # while } # if //Finally, close element $strXML .= ""; //Create the chart - Pie 3D Chart with data from strXML echo renderChart("../charts/Pie3D.swf", "", $strXML, "", 750, 375, false, false); ?> "; // Fetch all factory records $strQuery = " SELECT * FROM accessories_type_tb "; $result1 = mysql_query($strQuery); //Iterate through each factory if ($result1) { while( $rs1 = mysql_fetch_array($result1) ) { $error_id = $rs1['id']; $strQuery = " SELECT * FROM accessories_tb at, accessories_type_tb att WHERE Fund='หมดอายุการใช้งาน' and at.Acc_type_code = att.Acc_type_code and at.Acc_type_code !='0' and at.Acc_type_code='$rs1[Acc_type_code]' "; $result2 = mysql_query($strQuery); $numAmt = mysql_num_rows($result2); $strXML .= ""; } # while } # if //Finally, close element $strXML .= ""; //Create the chart - Pie 3D Chart with data from strXML echo renderChart("../charts/Pie3D.swf", "", $strXML, "", 750, 375, false, false); ?> "; // Fetch all factory records $strQuery = " SELECT * FROM accessories_tb WHERE Year !=' ' and Dura='Y' GROUP BY Year "; $result1 = mysql_query($strQuery); //Iterate through each factory if ($result1) { while( $rs1 = mysql_fetch_array($result1) ) { $error_id = $rs1['id']; $strQuery = " SELECT SUM(Price) AS SumB1 FROM accessories_tb WHERE Year='$rs1[Year]' and Dura='Y' "; $result3 = $dbObj->execQuery($strQuery); $rs3 = $dbObj->fetchArray($result3); $strXML .= ""; } # while } # if //Finally, close element $strXML .= ""; //Create the chart - Pie 3D Chart with data from strXML echo renderChart("../charts/Column2D.swf", "", $strXML, "", 750, 375, false, false); ?> "; // Fetch all factory records $strQuery = " SELECT * FROM accessories_tb WHERE Year !=' ' and Dura='N' GROUP BY Year "; $result1 = mysql_query($strQuery); //Iterate through each factory if ($result1) { while( $rs1 = mysql_fetch_array($result1) ) { $error_id = $rs1['id']; $strQuery = " SELECT SUM(Price) AS SumB1 FROM accessories_tb WHERE Year='$rs1[Year]' and Dura='N' "; $result2 = mysql_query($strQuery); $rs2 = $dbObj->fetchArray($result2); $strXML .= ""; } # while } # if //Finally, close element $strXML .= ""; //Create the chart - Pie 3D Chart with data from strXML echo renderChart("../charts/Column2D.swf", "", $strXML, "", 750, 375, false, false); ?> "; // Fetch all factory records $strQuery = "SELECT * FROM accessories_type_tb "; $result1 = mysql_query($strQuery); //Iterate through each factory if ($result1) { while( $rs1 = mysql_fetch_array($result1) ) { $error_id = $rs1['id']; $strQuery = " SELECT * FROM accessories_tb at, accessories_type_tb att WHERE at.Dura='N' and at.Status='Y' and at.Acc_type_code = att.Acc_type_code and at.Acc_type_code !='0' and at.Acc_type_code='$rs1[Acc_type_code]' "; $result2 = mysql_query($strQuery); $numAmt = mysql_num_rows($result2); $strXML .= ""; } # while } # if //Finally, close element $strXML .= ""; //Create the chart - Pie 3D Chart with data from strXML echo renderChart("../charts/Pie3D.swf", "", $strXML, "", 750, 375, false, false); ?>
 
freeresult($result); /** Close the Database */ $dbObj->disconn(); /** Unset Class */ unset($dbObj); ?>