[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * @package admin 4 * @copyright Copyright 2003-2006 Zen Cart Development Team 5 * @copyright Portions Copyright 2003 osCommerce 6 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 7 * @version $Id: banner_infobox.php 3001 2006-02-09 21:45:06Z wilt $ 8 */ 9 if (!defined('IS_ADMIN_FLAG')) { 10 die('Illegal Access'); 11 } 12 include(DIR_WS_CLASSES . 'phplot.php'); 13 14 $stats = array(); 15 $banner_stats = $db->Execute("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"); 16 while (!$banner_stats->EOF) { 17 $stats[] = array($banner_stats->fields['name'], $banner_stats->fields['value'], $banner_stats->fields['dvalue']); 18 $banner_stats->MoveNext(); 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 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |