Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

author.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: author.php 6552 2001-08-22 13:13:15Z jb $
5 //
6 // Created on: <23-Oct-2000 17:53:46 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
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 the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 // include_once( "ezuser/classes/ezauthor.php" );
28 // include_once( "ezxmlrpc/classes/ezxmlrpcstruct.php" );
29 // include_once( "ezxmlrpc/classes/ezxmlrpcint.php" );
30 // include_once( "ezxmlrpc/classes/ezxmlrpcstring.php" );
31 // include_once( "ezxmlrpc/classes/ezxmlrpcbool.php" );
32
33 if( $Command == "list" ) // Return a list of authors and their ID's
34 {
35 $authorList = eZAuthor::getAll();
36 $authors = array();
37 foreach( $authorList as $author )
38 {
39 $authors[] = new eZXMLRPCStruct( array( "URL" => createURLStruct( "ezuser", "author", $author->id() ),
40 "Name" => new eZXMLRPCString( $author->name( false ) )
41 )
42 );
43 }
44 $ReturnData = new eZXMLRPCStruct( array( "Catalogues" => array(),
45 "Elements" => $authors ) );
46 }
47 else if( $Command == "storedata" )
48 {
49 if ( isset( $Data["Name"] ) && isset( $Data["Email"] ) )
50 {
51 $author = new eZAuthor();
52 if ( $ID != 0 )
53 $author->get( $ID );
54 $author->setName( $Data["Name"]->value() );
55 $author->setEmail( $Data["Email"]->value() );
56 $author->store();
57
58 $ID = $author->id();
59 $ReturnData = new eZXMLRPCStruct( array( "Location" => createURLStruct( "ezuser", "author", $ID ),
60 "UpdateType" => new eZXMLRPCString( $Command )
61 ) );
62 $Command = "update";
63 }
64 else
65 $Error = createErrorMessage( EZERROR_BAD_REQUEST_DATA );
66 }
67
68 ?>
$author
$author
Definition: admin/articleedit.php:834
eZAuthor
Definition: ezauthor.php:40
eZAuthor\getAll
& getAll()
Definition: ezauthor.php:175
eZXMLRPCString
Definition: ezxmlrpcstring.php:37
eZXMLRPCStruct
Definition: ezxmlrpcstruct.php:37
$authors
$authors
Definition: ezarticle/user/authorlist.php:52
$Error
if(isset( $EditButton)) if(!empty( $CancelButton)) if(!empty( $PreviewButton)) if( $Action=="preview") switch( $Action) $Error
Definition: ezforum/user/messageedit.php:134
$ReturnData
$ReturnData
Definition: tag.php:48
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.