[ Index ] |
|
Code source de osCommerce 2.2ms2-060817 |
1 <?php 2 /* 3 $Id: banner_infobox.php,v 1.3 2003/07/11 18:15:42 project3000 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(); 16 $banner_stats_query = tep_db_query("select dayofmonth(banners_history_date) as name, banners_shown as value, banners_clicked as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and to_days(now()) - to_days(banners_history_date) < " . $days . " order by banners_history_date"); 17 while ($banner_stats = tep_db_fetch_array($banner_stats_query)) { 18 $stats[] = array($banner_stats['name'], $banner_stats['value'], $banner_stats['dvalue']); 19 } 20 21 if (sizeof($stats) < 1) $stats = array(array(date('j'), 0, 0)); 22 23 $graph = new PHPlot(200, 220, 'images/graphs/banner_infobox-' . $banner_id . '.' . $banner_extension); 24 25 $graph->SetFileFormat($banner_extension); 26 $graph->SetIsInline(1); 27 $graph->SetPrintImage(0); 28 29 $graph->draw_vert_ticks = 0; 30 $graph->SetSkipBottomTick(1); 31 $graph->SetDrawXDataLabels(0); 32 $graph->SetDrawYGrid(0); 33 $graph->SetPlotType('bars'); 34 $graph->SetDrawDataLabels(1); 35 $graph->SetLabelScalePosition(1); 36 $graph->SetMarginsPixels(15,15,15,30); 37 38 $graph->SetTitleFontSize('4'); 39 $graph->SetTitle('TEXT_BANNERS_LAST_3_DAYS'); 40 41 $graph->SetDataValues($stats); 42 $graph->SetDataColors(array('blue','red'),array('blue', 'red')); 43 44 $graph->DrawGraph(); 45 46 $graph->PrintImage(); 47 ?>
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 |
![]() |