[ Index ] |
|
Code source de osCommerce 2.2ms2-060817 |
1 <?php 2 /* 3 $Id: banner_yearly.php,v 1.3 2002/05/09 18:28:46 dgw_ Exp $ 4 5 osCommerce, Open Source E-Commerce Solutions 6 http://www.oscommerce.com 7 8 Copyright (c) 2002 osCommerce 9 10 Released under the GNU General Public License 11 */ 12 13 include(DIR_WS_CLASSES . 'phplot.php'); 14 15 $stats = array(array('0', '0', '0')); 16 $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"); 17 while ($banner_stats = tep_db_fetch_array($banner_stats_query)) { 18 $stats[] = array($banner_stats['year'], (($banner_stats['value']) ? $banner_stats['value'] : '0'), (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0')); 19 } 20 21 $graph = new PHPlot(600, 350, 'images/graphs/banner_yearly-' . $banner_id . '.' . $banner_extension); 22 23 $graph->SetFileFormat($banner_extension); 24 $graph->SetIsInline(1); 25 $graph->SetPrintImage(0); 26 27 $graph->SetSkipBottomTick(1); 28 $graph->SetDrawYGrid(1); 29 $graph->SetPrecisionY(0); 30 $graph->SetPlotType('lines'); 31 32 $graph->SetPlotBorderType('left'); 33 $graph->SetTitleFontSize('4'); 34 $graph->SetTitle(sprintf(TEXT_BANNERS_YEARLY_STATISTICS, $banner['banners_title'])); 35 36 $graph->SetBackgroundColor('white'); 37 38 $graph->SetVertTickPosition('plotleft'); 39 $graph->SetDataValues($stats); 40 $graph->SetDataColors(array('blue','red'),array('blue', 'red')); 41 42 $graph->DrawGraph(); 43 44 $graph->PrintImage(); 45 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 19:48:25 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |