KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /home/queenjbs/www/FusionChart/Code/PHP/DB_JS_dataURL/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/queenjbs/www/FusionChart/Code/PHP/DB_JS_dataURL/FactoryData.php
<?php
  //We've included ../Includes/FusionCharts.php, which contains functions
  //to help us easily embed the charts.
  include("../Includes/FusionCharts.php");
  include("../Includes/DBConn.php");
?>
<?php

  //This page is invoked from Default.php. When the user clicks on a pie
  //slice in Default.php, the factory Id is passed to this page. We need
  //to get that factory id, get information from database and then write XML.
  
  //Request the factory Id from Querystring
  $FactoryId = @$_GET['factoryId'] ? @$_GET['factoryId'] : 1;
  
  //$strXML will be used to store the entire XML document generated
  //Generate the chart element string
  $strXML = "<chart palette='2' caption='Factory " . $FactoryId . " Output ' subcaption='(In Units)' xAxisName='Date' showValues='1' >";
  
  //Connect to the DB
  $link = connectToDB();
  
  //Now, we get the data for that factory
  $strQuery = "select * from Factory_Output where FactoryID=" . $FactoryId;
  $result = mysql_query($strQuery) or die(mysql_error());
  
  //Iterate through each factory
  if ($result) {
    while($ors = mysql_fetch_array($result)) {
      //Here, we convert date into a more readable form for set label.
      $strXML .= "<set label='" . datePart("d",$ors['DatePro']) . "/" . datePart("m",$ors['DatePro']) . "' value='" . $ors['Quantity'] . "'/>";
    }
  }
  
  mysql_close($link);
  
  //Close <chart> element
  $strXML .= "</chart>";
  
  //Just write out the XML data
  //NOTE THAT THIS PAGE DOESN'T CONTAIN ANY HTML TAG, WHATSOEVER
  echo $strXML; 
?>

Anon7 - 2021