Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

articlelog.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: articlelog.php 7882 2001-10-16 11:33:52Z ce $
5 //
6 // Created on: <05-Jun-2001 14:38:04 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( "classes/ezlocale.php" );
28 // include_once( "classes/ezhttptool.php" );
29 // include_once( "classes/eztemplate.php" );
30 // include_once( "classes/INIFile.php" );
31
32
33 $t = new eZTemplate( "kernel/ezarticle/admin/" . $ini->variable( "eZArticleMain", "AdminTemplateDir" ),
34 "kernel/ezarticle/admin/intl", $Language, "articlelog.php" );
35
36 $locale = new eZLocale( $Language );
37
38 $t->set_file( "log_page_tpl", "articlelog.tpl" );
39
40 $t->setAllStrings();
41
42 $t->set_block( "log_page_tpl", "log_list_tpl", "log_list" );
43 $t->set_block( "log_list_tpl", "log_item_tpl", "log_item" );
44
45 $article = new eZArticle( $ArticleID );
46
47 $t->set_var( "article_id", $ArticleID );
48
49 $logArray = $article->logMessages();
50
51
52 foreach ( $logArray as $message )
53 {
54 $dateTime = new eZDateTime();
55 $dateTime->timeStamp( $message["Created"] );
56 $t->set_var( "log_date", $locale->format( $dateTime ) );
57
58 $user = new eZUser( $message["UserID"] );
59 $t->set_var( "log_user", $user->firstName() . " " . $user->lastName() );
60
61 $t->set_var( "log_message", $message["Message"] );
62
63 $t->parse( "log_item", "log_item_tpl", true );
64 }
65 if ( count( $logArray ) > 0 )
66 $t->parse( "log_list", "log_list_tpl" );
67 else
68 $t->set_var( "log_list", "" );
69
70
71 $t->pparse( "output", "log_page_tpl" );
72
73 ?>
$message
$message
Definition: admin/message.php:51
$locale
$locale
Definition: articlelog.php:36
$t
$t
Definition: articlelog.php:33
$article
$article
Definition: articlelog.php:45
$logArray
$logArray
Definition: articlelog.php:49
$dateTime
$dateTime
Definition: authorview.php:77
eZArticle
Definition: ezarticle.php:82
eZDateTime
Definition: ezdatetime.php:55
eZLocale
Definition: ezlocale.php:119
eZTemplate
Definition: eztemplate.php:107
eZUser
Definition: ezuser.php:76
$Language
$Language
Definition: classes/admin/linklist.php:65
$ini
$ini
Definition: classes/admin/linklist.php:64
$ArticleID
$ArticleID
Definition: export.php:48
$user
$user
Definition: user/adlist.php:39
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.