[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // 4 // Created on: <01-Mar-2004 15:35:18 wy> 5 // 6 // SOFTWARE NAME: eZ publish 7 // SOFTWARE RELEASE: 3.9.0 8 // BUILD VERSION: 17785 9 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 10 // SOFTWARE LICENSE: GNU General Public License v2.0 11 // NOTICE: > 12 // This program is free software; you can redistribute it and/or 13 // modify it under the terms of version 2.0 of the GNU General 14 // Public License as published by the Free Software Foundation. 15 // 16 // This program is distributed in the hope that it will be useful, 17 // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 // GNU General Public License for more details. 20 // 21 // You should have received a copy of version 2.0 of the GNU General 22 // Public License along with this program; if not, write to the Free 23 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 24 // MA 02110-1301, USA. 25 // 26 // 27 28 /*! \file orderstatistics.php 29 */ 30 31 32 include_once ( "kernel/common/template.php" ); 33 include_once ( "kernel/classes/ezorder.php" ); 34 include_once ( 'lib/ezlocale/classes/ezdate.php' ); 35 36 $module =& $Params["Module"]; 37 $year = $Params['Year']; 38 $month = $Params['Month']; 39 40 $http =& eZHttpTool::instance(); 41 if ( $http->hasPostVariable( "Year" ) ) 42 { 43 $year = $http->postVariable( "Year" ); 44 } 45 46 if ( $http->hasPostVariable( "Month" ) ) 47 { 48 $month = $http->postVariable( "Month" ); 49 } 50 51 if ( $http->hasPostVariable( "View" ) ) 52 { 53 $module->redirectTo( "/shop/statistics/" . $year . '/' . $month ); 54 } 55 56 $statisticArray =& eZOrder::orderStatistics( $year, $month ); 57 $yearList = array(); 58 $currentDate = new eZDate(); 59 $currentYear = $currentDate->attribute( 'year' ); 60 for ( $index = 0; $index < 10; $index++ ) 61 { 62 $yearList[] = $currentYear - $index; 63 } 64 65 $locale =& eZLocale::instance(); 66 $monthList = array(); 67 for ( $monthIndex = 1; $monthIndex <= 12; $monthIndex++ ) 68 { 69 $monthList[] = array( 'value' => $monthIndex, 'name' => $locale->longMonthName( $monthIndex ) ); 70 } 71 72 $tpl =& templateInit(); 73 $tpl->setVariable( "year", $year ); 74 $tpl->setVariable( "month", $month ); 75 $tpl->setVariable( "year_list", $yearList ); 76 $tpl->setVariable( "month_list", $monthList ); 77 $tpl->setVariable( "statistic_result", $statisticArray ); 78 79 $path = array(); 80 $path[] = array( 'text' => ezi18n( 'kernel/shop', 'Statistics' ), 81 'url' => false ); 82 83 $Result = array(); 84 $Result['path'] =& $path; 85 86 $Result['content'] =& $tpl->fetch( "design:shop/orderstatistics.tpl" ); 87 88 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |