Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

admin/topiclist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: topiclist.php 6206 2001-07-19 12:19:22Z jakobn $
5 //
6 // Created on: <01-Jun-2001 11:58:53 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 // include_once( "ezarticle/classes/eztopic.php" );
33
34 if ( isset( $NewTopic ) )
35 {
36 $i=0;
37 if ( count( $IDArray ) > 0 )
38 {
39 foreach ( $IDArray as $id )
40 {
41 $topic = new eZTopic( $id );
42 $topic->setDescription( $Description[$i] );
43 $topic->setName( $Name[$i] );
44 $topic->store();
45
46 $i++;
47 }
48 }
49 $topic = new eZTopic( );
50 $topic->store();
51 }
52
53 if ( isset( $DeleteTopic ) )
54 {
55 foreach ( $DeleteIDArray as $id )
56 {
57 $topic = new eZTopic( $id );
58 $topic->delete();
59 }
60 }
61
62 if ( isset( $Store ) )
63 {
64 $i=0;
65 if ( count( $IDArray ) > 0 )
66 {
67 foreach ( $IDArray as $id )
68 {
69 $topic = new eZTopic( $id );
70 $topic->setDescription( $Description[$i] );
71 $topic->setName( $Name[$i] );
72 $topic->store();
73
74 $i++;
75 }
76 }
77 }
78
79 $t = new eZTemplate( "kernel/ezarticle/admin/" . $ini->variable( "eZUserMain", "AdminTemplateDir" ),
80 "kernel/ezarticle/admin/intl", $Language, "topiclist.php" );
81
82 $locale = new eZLocale( $Language );
83
84 $t->set_file( "topic_page_tpl", "topiclist.tpl" );
85
86 $t->setAllStrings();
87
88 $t->set_block( "topic_page_tpl", "topic_list_tpl", "topic_list" );
89 $t->set_block( "topic_list_tpl", "topic_item_tpl", "topic_item" );
90
91 $topic = new eZTopic( );
92
93 $topicArray = $topic->getAll();
94
95 $t->set_var( "topic_item", "" );
96 $i=0;
97 foreach ( $topicArray as $topic )
98 {
99 $t->set_var( "id", $topic->id() );
100 $t->set_var( "topic_name", $topic->name() );
101 $t->set_var( "topic_description", $topic->description() );
102
103 if ( ( $i % 2 ) == 0 )
104 {
105 $t->set_var( "td_class", "bglight" );
106 }
107 else
108 {
109 $t->set_var( "td_class", "bgdark" );
110 }
111
112 $t->parse( "topic_item", "topic_item_tpl", true );
113 $i++;
114
115 }
116 $t->parse( "topic_list", "topic_list_tpl" );
117
118 $t->pparse( "output", "topic_page_tpl" );
119
120 ?>
$topic
$topic
Definition: admin/topiclist.php:91
$locale
$locale
Definition: admin/topiclist.php:82
$topicArray
$topicArray
Definition: admin/topiclist.php:93
$t
if(isset( $NewTopic)) if(isset( $DeleteTopic)) if(isset( $Store)) $t
Definition: admin/topiclist.php:79
$i
$i
Definition: admin/topiclist.php:96
$Description
$Description
Definition: articlelistrss.php:38
eZLocale
Definition: ezlocale.php:119
eZTemplate
Definition: eztemplate.php:107
eZTopic
Definition: eztopic.php:41
$Language
$Language
Definition: classes/admin/linklist.php:65
$ini
$ini
Definition: classes/admin/linklist.php:64
$id
$id
Definition: companytypelist.php:193
$Name
$Name
Definition: polledit.php:250
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.