[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of List class 4 // 5 // Created on: <29-ïËÔ-2002 16:14:57 sp> 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 /*! \file list.php 30 */ 31 include_once ( 'kernel/common/template.php' ); 32 include_once ( 'kernel/classes/ezcontentobjectversion.php' ); 33 include_once ( "lib/ezdb/classes/ezdb.php" ); 34 35 $Module =& $Params['Module']; 36 $http =& eZHTTPTool::instance(); 37 38 $Offset = $Params['Offset']; 39 $viewParameters = array( 'offset' => $Offset ); 40 41 $user =& eZUser::currentUser(); 42 if ( !$user->isLoggedIn() ) 43 return $Module->handleError( EZ_ERROR_KERNEL_ACCESS_DENIED, 'kernel' ); 44 45 $userID = $user->id(); 46 47 if ( $http->hasPostVariable( 'RemoveButton' ) ) 48 { 49 if ( $http->hasPostVariable( 'DeleteIDArray' ) ) 50 { 51 $deleteIDArray = $http->postVariable( 'DeleteIDArray' ); 52 $db =& eZDB::instance(); 53 $db->begin(); 54 foreach ( $deleteIDArray as $deleteID ) 55 { 56 eZDebug::writeNotice( $deleteID, "deleteID" ); 57 $version = eZContentObjectVersion::fetch( $deleteID ); 58 $version->remove(); 59 } 60 $db->commit(); 61 } 62 } 63 64 if ( $http->hasPostVariable( 'EmptyButton' ) ) 65 { 66 $versions = eZContentObjectVersion::fetchForUser( $userID ); 67 $db =& eZDB::instance(); 68 $db->begin(); 69 foreach ( array_keys( $versions ) as $key ) 70 { 71 $version =& $versions[$key]; 72 $version->remove(); 73 } 74 $db->commit(); 75 } 76 77 $tpl =& templateInit(); 78 79 $tpl->setVariable('view_parameters', $viewParameters ); 80 81 $Result = array(); 82 $Result['content'] =& $tpl->fetch( 'design:content/draft.tpl' ); 83 $Result['path'] = array( array( 'text' => ezi18n( 'kernel/content', 'My drafts' ), 84 'url' => false ) ); 85 86 ?>
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 |