[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: banner_yearly.php 3 2006-05-27 04:59:07Z user $ 4 osCMax Power E-Commerce 5 http://oscdox.com 6 Copyright 2006 osCMax2005 osCMax, 2002 osCommerce 7 Released under the GNU General Public License 8 */ 9 include(DIR_WS_CLASSES . 'phplot.php'); 10 $stats = array(array('0', '0', '0')); 11 $banner_stats_query = tep_db_query("select year(banners_history_date) as year, sum(banners_shown) as value, sum(banners_clicked) as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' group by year"); 12 while ($banner_stats = tep_db_fetch_array($banner_stats_query)) { 13 $stats[] = array($banner_stats['year'], (($banner_stats['value']) ? $banner_stats['value'] : '0'), (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0')); 14 } 15 $graph = new PHPlot(600, 350, 'images/graphs/banner_yearly-' . $banner_id . '.' . $banner_extension); 16 $graph->SetFileFormat($banner_extension); 17 $graph->SetIsInline(1); 18 $graph->SetPrintImage(0); 19 $graph->SetSkipBottomTick(1); 20 $graph->SetDrawYGrid(1); 21 $graph->SetPrecisionY(0); 22 $graph->SetPlotType('lines'); 23 $graph->SetPlotBorderType('left'); 24 $graph->SetTitleFontSize('4'); 25 $graph->SetTitle(sprintf(TEXT_BANNERS_YEARLY_STATISTICS, $banner['banners_title'])); 26 $graph->SetBackgroundColor('white'); 27 $graph->SetVertTickPosition('plotleft'); 28 $graph->SetDataValues($stats); 29 $graph->SetDataColors(array('blue','red'),array('blue', 'red')); 30 $graph->DrawGraph(); 31 $graph->PrintImage(); 32 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Jan 1 13:43:16 2010 | Cross-referenced by PHPXref 0.7 |