[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Created on: <08-Mar-2005 18:16:54 jhe> 4 // 5 // SOFTWARE NAME: eZ publish 6 // SOFTWARE RELEASE: 3.9.0 7 // BUILD VERSION: 17785 8 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 9 // SOFTWARE LICENSE: GNU General Public License v2.0 10 // NOTICE: > 11 // This program is free software; you can redistribute it and/or 12 // modify it under the terms of version 2.0 of the GNU General 13 // Public License as published by the Free Software Foundation. 14 // 15 // This program is distributed in the hope that it will be useful, 16 // but WITHOUT ANY WARRANTY; without even the implied warranty of 17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 // GNU General Public License for more details. 19 // 20 // You should have received a copy of version 2.0 of the GNU General 21 // Public License along with this program; if not, write to the Free 22 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 23 // MA 02110-1301, USA. 24 // 25 // 26 27 include_once ( "kernel/common/template.php" ); 28 include_once ( "kernel/classes/ezorder.php" ); 29 include_once ( "kernel/classes/ezorderstatus.php" ); 30 include_once ( "lib/ezutils/classes/ezhttppersistence.php" ); 31 32 $module =& $Params["Module"]; 33 $http =& eZHttpTool::instance(); 34 $user =& eZUser::currentUser(); 35 36 $order = eZOrder::fetch( $OrderID ); 37 if ( !$order ) 38 { 39 return $module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' ); 40 } 41 42 if ( $http->hasPostVariable( "OrderID" ) && $http->hasPostVariable( "StatusID" ) && $http->hasPostVariable( "SetOrderStatusButton" ) ) 43 { 44 $access = $order->canModifyStatus( $StatusID ); 45 46 if ( $access ) 47 { 48 if ( $order->attribute( 'status_id' ) != $StatusID ) 49 { 50 $order->modifyStatus( $StatusID ); 51 } 52 53 if ( $http->hasPostVariable( 'RedirectURI' ) ) 54 { 55 $uri = $http->postVariable( 'RedirectURI' ); 56 $module->redirectTo( $uri ); 57 return; 58 } 59 else 60 { 61 $module->redirectTo( '/shop/orderview/' . $orderID ); 62 return; 63 } 64 } 65 else 66 { 67 return $module->handleError( EZ_ERROR_KERNEL_ACCESS_DENIED, 'kernel' ); 68 } 69 } 70 71 return $module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' ); 72 73 ?>
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 |