[ 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 $GroupID = false; 34 if ( isset( $Params["GroupID"] ) ) 35 $GroupID =& $Params["GroupID"]; 36 37 $http =& eZHTTPTool::instance(); 38 $http->setSessionVariable( 'FromGroupID', $GroupID ); 39 if ( $http->hasPostVariable( "RemoveButton" ) ) 40 { 41 if ( $http->hasPostVariable( 'DeleteIDArray' ) ) 42 { 43 $deleteIDArray = $http->postVariable( 'DeleteIDArray' ); 44 if ( $deleteIDArray !== null ) 45 { 46 $http->setSessionVariable( 'DeleteClassIDArray', $deleteIDArray ); 47 $Module->redirectTo( $Module->functionURI( 'removeclass' ) . '/' . $GroupID . '/' ); 48 } 49 } 50 } 51 52 if ( $http->hasPostVariable( "NewButton" ) ) 53 { 54 if ( $http->hasPostVariable( "CurrentGroupID" ) ) 55 $GroupID = $http->postVariable( "CurrentGroupID" ); 56 if ( $http->hasPostVariable( "CurrentGroupName" ) ) 57 $GroupName = $http->postVariable( "CurrentGroupName" ); 58 if ( $http->hasPostVariable( "ClassLanguageCode" ) ) 59 $LanguageCode = $http->postVariable( "ClassLanguageCode" ); 60 $params = array( null, $GroupID, $GroupName, $LanguageCode ); 61 $unorderedParams = array( 'Language' => $LanguageCode ); 62 $Module->run( 'edit', $params, $unorderedParams ); 63 return; 64 } 65 66 if ( !isset( $TemplateData ) or !is_array( $TemplateData ) ) 67 { 68 $TemplateData = array( array( "name" => "groupclasses", 69 "http_base" => "ContentClass", 70 "data" => array( "command" => "groupclass_list", 71 "type" => "class" ) ) ); 72 } 73 74 $Module->setTitle( ezi18n( 'kernel/class', 'Class list of group' ) . ' ' . $GroupID ); 75 include_once ( "kernel/common/template.php" ); 76 $tpl =& templateInit(); 77 78 include_once ( "kernel/classes/datatypes/ezuser/ezuser.php" ); 79 $user =& eZUser::currentUser(); 80 foreach( $TemplateData as $tpldata ) 81 { 82 $tplname = $tpldata["name"]; 83 84 $groupInfo = eZContentClassGroup::fetch( $GroupID ); 85 86 if( !$groupInfo ) 87 { 88 return $Module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' ); 89 } 90 91 $list = eZContentClassClassGroup::fetchClassList( 0, $GroupID, $asObject = true ); 92 $groupModifier =& eZContentObject::fetch( $groupInfo->attribute( 'modifier_id') ); 93 $tpl->setVariable( $tplname, $list ); 94 $tpl->setVariable( "class_count", count( $list ) ); 95 $tpl->setVariable( "GroupID", $GroupID ); 96 $tpl->setVariable( "group", $groupInfo ); 97 $tpl->setVariable( "group_modifier", $groupModifier ); 98 } 99 100 $group = eZContentClassGroup::fetch( $GroupID ); 101 $groupName = $group->attribute( 'name' ); 102 103 104 $tpl->setVariable( "module", $Module ); 105 106 $Result = array(); 107 $Result['content'] =& $tpl->fetch( "design:class/classlist.tpl" ); 108 $Result['path'] = array( array( 'url' => '/class/grouplist/', 109 'text' => ezi18n( 'kernel/class', 'Classes' ) ), 110 array( 'url' => false, 111 'text' => $groupName ) ); 112 ?>
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 |