{assign var="title" value="show report"} {include file="header.html"} {include file="error.inc.html"} {include_php file="Includes/FusionCharts.php"}
{php} function connectToDB( $dbName="" ) { // These four parameters must be changed dependent on your MySQL settings $hostdb = 'localhost'; // MySQl host $userdb = 'root'; // MySQL username $passdb = 'root'; // MySQL password $namedb = $dbName ? $dbName : 'amember'; // MySQL database name $link = mysql_connect ($hostdb, $userdb, $passdb); if (!$link) { // we should have connected, but if any of the above parameters // are incorrect or we can't access the DB for some reason, // then we will stop execution here die('Could not connect: ' . mysql_error()); } $db_selected = mysql_select_db($namedb); if (!$db_selected) { die ('Can\'t use database : ' . mysql_error()); } return $link; } {/php}
{php} // Connect to the DB $link = connectToDB(); $strXML = ""; $do=mysql_query("select * from amember_dayservices where site_id='".$_GET['id']."'"); while($row = mysql_fetch_array($do)) { if($row['result']=='N') { $strXML .= ""; } elseif($row['result']=='Y') { $strXML .= ""; } } //Finally, close element $strXML .= ""; //Create the chart - Pie 3D Chart with data from $strXML echo renderChart("FusionCharts/Column3D.swf", "", $strXML, "Time", 600,300, false, false); {/php}
{include file="js.country_state.js"}

#_TPL_POWEREDBY||#

{include file="footer.html"}