| [ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of class 4 // 5 // Created on: <25-Nov-2002 15:40:10 wy> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 include_once ( "kernel/common/template.php" ); 30 include_once ( "kernel/classes/ezdiscountrule.php" ); 31 include_once ( "lib/ezutils/classes/ezhttppersistence.php" ); 32 33 $module =& $Params["Module"]; 34 $discountGroupID = null; 35 if ( isset( $Params["DiscountGroupID"] ) ) 36 $discountGroupID = $Params["DiscountGroupID"]; 37 38 if ( is_numeric( $discountGroupID ) ) 39 { 40 $discountGroup = eZDiscountRule::fetch( $discountGroupID ); 41 } 42 else 43 { 44 $discountGroup = eZDiscountRule::create(); 45 $discountGroupID = $discountGroup->attribute( "id" ); 46 } 47 48 $http =& eZHttpTool::instance(); 49 if ( $http->hasPostVariable( "DiscardButton" ) ) 50 { 51 $module->redirectTo( $module->functionURI( "discountgroup" ) . "/" ); 52 return; 53 } 54 if ( $http->hasPostVariable( "ApplyButton" ) ) 55 { 56 if ( $http->hasPostVariable( "discount_group_name" ) ) 57 { 58 $name = $http->postVariable( "discount_group_name" ); 59 } 60 $discountGroup->setAttribute( "name", $name ); 61 $discountGroup->store(); 62 $module->redirectTo( $module->functionURI( "discountgroup" ) . "/" ); 63 return; 64 } 65 66 $module->setTitle( "Editing discount group" ); 67 $tpl =& templateInit(); 68 $tpl->setVariable( "module", $module ); 69 $tpl->setVariable( "discount_group", $discountGroup ); 70 71 $Result = array(); 72 $Result['content'] =& $tpl->fetch( "design:shop/discountgroupedit.tpl" ); 73 74 ?>
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 |