39 lines
1.4 KiB
PHP
39 lines
1.4 KiB
PHP
<?php
|
|
include("inc/FusionCharts.php");
|
|
include("config.php");
|
|
?>
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>Immibition</TITLE>
|
|
<link rel="shortcut icon" href="http://lasuca.com/images/favicon.ico" />
|
|
<SCRIPT LANGUAGE="Javascript" SRC="js/FusionCharts.js"></SCRIPT>
|
|
</HEAD>
|
|
<BODY>
|
|
<CENTER>
|
|
<?php
|
|
$link = connectToDB();
|
|
$strXML = "<chart legendPostion='' theme='fint' caption='Imibition Flow' subCaption='Values Are Every 5 Minutes Over 4 Hours' updateInterval='30' refreshInterval='5' YAxisMaxValue='1000' numberSuffix='gph' showValues='0' formatNumberScale='0'>";
|
|
$strXML .="<categories>";
|
|
$strQuery = "select * FROM trending where trending.id mod 5 = 0 GROUP BY DATE DESC LIMIT 100";
|
|
$result = mysql_query($strQuery) or die(mysql_error());
|
|
if ($result) {
|
|
while($ors = mysql_fetch_array($result)) {
|
|
$strXML .= "<category label='" . $ors['DATE'] . "' />";
|
|
}
|
|
}
|
|
$result2 = mysql_query($strQuery) or die(mysql_error());
|
|
$strXML .="</categories><dataset seriesName='Imibition Flow'>";
|
|
if ($result2) {
|
|
while($ors1 = mysql_fetch_array($result2)) {
|
|
$strXML .= "<set value='".$ors1['IMBFLOW']."' />";
|
|
}
|
|
}
|
|
|
|
|
|
mysql_close($link);
|
|
$strXML .= "</dataset></chart>";
|
|
|
|
echo renderChart("../../FusionCharts/MSLine.swf", "imbflow", $strXML, "", '100%', 500, false, true);
|
|
?>
|
|
</BODY>
|
|
</HTML>
|