From 866658cded5b92ddb2681dead1ebaf111d712fcc Mon Sep 17 00:00:00 2001 From: cassiopc Date: Mon, 6 Aug 2012 11:09:10 +0200 Subject: init --- boca-1.5.0/src/admin/report/piechart.php | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 boca-1.5.0/src/admin/report/piechart.php (limited to 'boca-1.5.0/src/admin/report/piechart.php') diff --git a/boca-1.5.0/src/admin/report/piechart.php b/boca-1.5.0/src/admin/report/piechart.php new file mode 100644 index 0000000..18d8d04 --- /dev/null +++ b/boca-1.5.0/src/admin/report/piechart.php @@ -0,0 +1,60 @@ +. +//////////////////////////////////////////////////////////////////////////////// +// Last modified 05/aug/2012 by cassio@ime.usp.br + +ob_start(); +header ("Expires: " . gmdate("D, d M Y H:i:s") . " GMT"); +header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); +header ("Cache-Control: no-cache, must-revalidate"); +header ("Pragma: no-cache"); +session_start(); +$locr = $_SESSION['locr']; +$loc = $_SESSION['loc']; + +require_once($locr . "/libchart/libchart.php"); +header("Content-type: image/png"); +ob_end_flush(); + +$v = explode(chr(1),rawurldecode($_GET['dados']),100); +$cor = null; +if(isset($_GET['color'])) + $cor = explode("-",rawurldecode($_GET['color']),100); + +if(count($v)/2 > 8) + $chart = new PieChart(450, 300); +else + $chart = new PieChart(400, 250); + +if(isset($_GET['order'])) $chart->order=true; + +for($i=1;$iaddPoint(new Point($v[$i], $v[$i+1], $color)); +} + +$chart->setTitle($v[0]); +$chart->setLogo($locr. "/images/poweredbyboca.png"); +$chart->render(); + +?> -- cgit v1.2.3