[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Created on: <01-Aug-2002 09:58:09 bf> 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/classes/datatypes/ezuser/ezuser.php" ); 28 include_once ( "lib/ezutils/classes/ezhttptool.php" ); 29 include_once ( "kernel/classes/ezcontentclass.php" ); 30 include_once ( "kernel/classes/ezcontentclassattribute.php" ); 31 include_once ( "kernel/classes/ezcontentobject.php" ); 32 include_once ( "kernel/classes/ezcontentobjectattribute.php" ); 33 34 35 $currentUser =& eZUser::currentUser(); 36 $currentUserID = $currentUser->attribute( "contentobject_id" ); 37 $http =& eZHTTPTool::instance(); 38 $Module =& $Params["Module"]; 39 40 if ( isset( $Params["UserID"] ) ) 41 $UserID = $Params["UserID"]; 42 43 if ( $Module->isCurrentAction( "ChangePassword" ) ) 44 { 45 $Module->redirectTo( $Module->functionURI( "password" ) . "/" . $UserID ); 46 return; 47 } 48 49 if ( $Module->isCurrentAction( "ChangeSetting" ) ) 50 { 51 $Module->redirectTo( $Module->functionURI( "setting" ) . "/" . $UserID ); 52 return; 53 } 54 55 if ( $Module->isCurrentAction( "Cancel" ) ) 56 { 57 $Module->redirectTo( '/content/view/sitemap/5/' ); 58 return; 59 } 60 61 if ( $Module->isCurrentAction( "Edit" ) ) 62 { 63 $selectedVersion = $http->hasPostVariable( 'SelectedVersion' ) ? $http->postVariable( 'SelectedVersion' ) : 'f'; 64 $editLanguage = $http->hasPostVariable( 'ContentObjectLanguageCode' ) ? $http->postVariable( 'ContentObjectLanguageCode' ) : ''; 65 $Module->redirectTo( '/content/edit/' . $UserID . '/' . $selectedVersion . '/' . $editLanguage ); 66 return; 67 } 68 69 $userAccount = eZUser::fetch( $UserID ); 70 if ( !$userAccount ) 71 return $Module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' ); 72 $userObject =& $userAccount->attribute( 'contentobject' ); 73 if ( !$userObject ) 74 return $Module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' ); 75 if ( !$userObject->canEdit( ) ) 76 return $Module->handleError( EZ_ERROR_KERNEL_ACCESS_DENIED, 'kernel' ); 77 78 include_once ( "kernel/common/template.php" ); 79 $tpl =& templateInit(); 80 $tpl->setVariable( "module", $Module ); 81 $tpl->setVariable( "http", $http ); 82 $tpl->setVariable( "userID", $UserID ); 83 $tpl->setVariable( "userAccount", $userAccount ); 84 85 $Result = array(); 86 $Result['content'] =& $tpl->fetch( "design:user/edit.tpl" ); 87 $Result['path'] = array( array( 'text' => ezi18n( 'kernel/user', 'User profile' ), 88 'url' => false ) ); 89 90 91 ?>
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 |