[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Created on: <16-Apr-2002 11:00:12 amos> 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 28 include_once ( "kernel/classes/ezcontentclass.php" ); 29 include_once ( "lib/ezutils/classes/ezhttppersistence.php" ); 30 include_once ( "kernel/classes/ezcontentclassclassgroup.php" ); 31 32 $Module =& $Params["Module"]; 33 $ClassID = null; 34 if ( isset( $Params["ClassID"] ) ) 35 $ClassID =& $Params["ClassID"]; 36 37 $GroupID = null; 38 if ( isset( $Params["GroupID"] ) ) 39 $GroupID =& $Params["GroupID"]; 40 41 $class = eZContentClass::fetch( $ClassID ); 42 $ClassName = $class->attribute( 'name' ); 43 $classObjects =& eZContentObject::fetchSameClassList( $ClassID ); 44 $ClassObjectsCount = count( $classObjects ); 45 if ( $ClassObjectsCount == 0 ) 46 $ClassObjectsCount .= " object"; 47 else 48 $ClassObjectsCount .= " objects"; 49 $http =& eZHTTPTool::instance(); 50 if ( $http->hasPostVariable( "ConfirmButton" ) ) 51 { 52 $class->remove( true ); 53 eZContentClassClassGroup::removeClassMembers( $ClassID, 0 ); 54 $Module->redirectTo( '/class/classlist/' . $GroupID ); 55 } 56 if ( $http->hasPostVariable( "CancelButton" ) ) 57 { 58 $Module->redirectTo( '/class/classlist/' . $GroupID ); 59 } 60 $Module->setTitle( "Deletion of class " .$ClassID ); 61 include_once ( "kernel/common/template.php" ); 62 $tpl =& templateInit(); 63 64 65 $tpl->setVariable( "module", $Module ); 66 $tpl->setVariable( "GroupID", $GroupID ); 67 $tpl->setVariable( "ClassID", $ClassID ); 68 $tpl->setVariable( "ClassName", $ClassName ); 69 $tpl->setVariable( "ClassObjectsCount", $ClassObjectsCount ); 70 $Result = array(); 71 $Result['content'] =& $tpl->fetch( "design:class/delete.tpl" ); 72 $Result['path'] = array( array( 'url' => '/class/delete/', 73 'text' => ezi18n( 'kernel/class', 'Remove class' ) ) ); 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 |