Example #1
0
					
					<?php 
foreach ($charts as $title => $data) {
    ?>
					<div class="block" style="float:left;margin-right:2em;">
						<div class="hd">
							<h2><?php 
    echo $title;
    ?>
</h2>
						</div>
						<div class="bd">
							<?php 
    $gc = new googleChart(implode(',', $data), 'pie');
    $gc->setLabels(implode('|', array_keys($data)));
    $gc->draw(true);
    ?>
						</div>
					</div>
					<?php 
}
?>
              
                </div></div>
            </div>
            <div id="sidebar" class="yui-b">

            </div>
        </div>

        <div id="ft"></div>
Example #2
0
    /**
     * Show pie chart for all of the aircraft flown
     *  by a certain pilot. Outputs image, unless $ret == true,
     * 	then it returns the URL.
     */
    public static function AircraftFlownGraph($ret = false)
    {
        //Select aircraft types
        $sql = 'SELECT a.name AS aircraft, COUNT(p.aircraft) AS count
				FROM ' . TABLE_PREFIX . 'pireps p, ' . TABLE_PREFIX . 'aircraft a 
				WHERE p.aircraft = a.id
				GROUP BY a.name';
        $stats = DB::get_results($sql);
        if (!$stats) {
            return;
        }
        $data = '';
        $labels = '';
        foreach ($stats as $stat) {
            if ($stat->aircraft == '') {
                continue;
            }
            $data .= $stat->count . ',';
            $labels .= $stat->aircraft . '|';
        }
        // remove that final lone char
        $data = substr($data, 0, strlen($data) - 1);
        $labels = substr($labels, 0, strlen($labels) - 1);
        $chart = new googleChart($data, 'pie');
        $chart->dimensions = '350x200';
        $chart->setLabels($labels);
        if ($ret == true) {
            return $chart->draw(false);
        } else {
            echo '<img src="' . $chart->draw(false) . '" />';
        }
    }
Example #3
0
$opw->dimensions = '280x100';
$opw->setLabelsMinMax(4, 'left');
$opw_fb = clone $opw;
$opw_fb->dimensions = '640x400';
?>

				<div class="block">
					<div class="hd">
						<h2>Downloads 30 Days</h2>
					</div>
					<div class="bd">
						<a href="<?php 
echo $opw_fb->draw(false);
?>
" class="fb"><?php 
$opw->draw();
?>
</a>
					</div>
				</div>

<?php 
/*
				<div class="block">
					<div class="hd">
						<h2>Recent Orderes (<?PHP echo Order::totalOrders(); ?> total)</h2>
					</div>
					<div class="bd">
						<ul class="biglist">
							<?PHP foreach($orders as $o) : ?>
							<li><a href="order.php?id=<?PHP echo $o->id; ?>"><?PHP echo $o->payer_email; ?></a></li>
Example #4
0
					</div>
					<div class="bd">
						<a href="<?php 
echo $opw_fb->draw(false);
?>
" class="fb"><?php 
$opw->draw();
?>
</a>
					</div>
				</div>

				<div class="block">
					<div class="hd">
						<h2>Orders Per Month (All)</h2>
					</div>
					<div class="bd">
						<a href="<?php 
echo $opma_fb->draw(false);
?>
" class="fb"><?php 
$opma->draw();
?>
</a>
					</div>
				</div>
            </div>
        </div>

<?php 
include 'inc/footer.inc.php';
Example #5
0
$opw24->draw();
?>
</a>
					</div>
				</div>

				<div class="block">
					<div class="hd">
						<h2>Downloads 30 Days</h2>
					</div>
					<div class="bd">
						<a href="<?php 
echo $opw30_fb->draw(false);
?>
" class="fb"><?php 
$opw30->draw();
?>
</a>
					</div>
				</div>				
				
				<div class="block">
					<div class="hd">
						<h2>Create an Application</h2>
					</div>
					<div class="bd">
						<form action="index.php" method="post">
		                    <p>
								<label for="test1">Application Name</label>
		                        <input type="text" class="text" name="name" id="appname" value="">
		                    </p>
Example #6
0
function debug($x)
{
    $arr = array($x->strength, $x->dexterity, $x->resistance, $x->intelligence);
    $moo = new googleChart($arr);
    $moo->draw();
}