Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezarticle/admin/sitemap.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: sitemap.php 9394 2002-04-05 11:41:23Z br $
5 //
6 // Created on: <18-Oct-2000 15:04:39 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/INIFile.php" );
28 // include_once( "classes/eztemplate.php" );
29 // include_once( "classes/ezlocale.php" );
30 // include_once( "ezmail/classes/ezmail.php" );
31 // include_once( "classes/ezcachefile.php" );
32
33 // include_once( "ezuser/classes/ezuser.php" );
34 // include_once( "ezuser/classes/ezobjectpermission.php" );
35 // include_once( "classes/ezhttptool.php" );
36
37 // include_once( "ezarticle/classes/ezarticlecategory.php" );
38 // include_once( "ezarticle/classes/ezarticle.php" );
39 // include_once( "ezarticle/classes/ezarticlegenerator.php" );
40 // include_once( "ezarticle/classes/ezarticlerenderer.php" );
41
42 $t = new eZTemplate( "kernel/ezarticle/admin/" . $ini->variable( "eZArticleMain", "AdminTemplateDir" ),
43 "kernel/ezarticle/admin/intl/", $Language, "sitemap.php" );
44
45 $t->setAllStrings();
46
47 $t->set_file( "article_sitemap_page_tpl", "sitemap.tpl" );
48
49 $t->set_block( "article_sitemap_page_tpl", "category_value_tpl", "category_value" );
50 $t->set_block( "article_sitemap_page_tpl", "article_value_tpl", "article_value" );
51 $t->set_block( "article_sitemap_page_tpl", "value_tpl", "value" );
52
53 $tree = new eZArticleCategory();
54 $treeArray =& $tree->getTree();
55 $user =& eZUser::currentUser();
56
57 $t->set_var( "category_value", "" );
58 $t->set_var( "article_value", "" );
59
60 foreach ( $treeArray as $index => $catItem )
61 {
62 if ( eZObjectPermission::hasPermission( $catItem[0]->id(), "article_category", 'w', $user ) == true ||
63 eZArticleCategory::isOwner( eZUser::currentUser(), $catItem[0]->id() ) )
64 {
65 $placement = $catItem[1] - 1;
66 $option_level = str_repeat( "&nbsp;&nbsp;&nbsp;&nbsp;", $placement );
67
68 $t->set_var( "category_id", $catItem[0]->id() );
69
70 $t->set_var( "option_value", "archive/" . $catItem[0]->id() );
71 $t->set_var( "option_name", $catItem[0]->name() );
72 $t->set_var( "option_level", $option_level );
73
74 $t->parse( "value", "category_value_tpl", true );
75
76 $category = new eZArticleCategory( $catItem[0]->id() );
77
78 $articleList =& $category->articles( "time", false, true, 0, 50, $catItem[0]->id() );
79
80 foreach ( $articleList as $article )
81 {
82 $t->set_var( "article_id", $article->id() );
83 $t->set_var( "option_level", "&nbsp;&nbsp;&nbsp;&nbsp;" . $option_level );
84
85 $t->set_var( "option_value", "articlepreview/".$article->id() );
86 $t->set_var( "option_name", $article->name() );
87 $t->parse( "value", "article_value_tpl", true );
88 }
89 unset ($articleList);
90 unset ($category);
91
92 }
93 }
94
95 $t->pparse( "output", "article_sitemap_page_tpl" );
96
97 ?>
$category
if( $Action=="Edit") $category
Definition: adedit.php:378
$article
$article
Definition: articlelog.php:45
eZArticleCategory
Definition: ezarticlecategory.php:45
eZArticleCategory\isOwner
isOwner( $user, $categoryID)
Definition: ezarticlecategory.php:825
eZObjectPermission\hasPermission
static hasPermission( $objectID, $moduleTable, $permission, $user=false)
Definition: ezobjectpermission.php:76
eZTemplate
Definition: eztemplate.php:107
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
$Language
$Language
Definition: classes/admin/linklist.php:65
$ini
$ini
Definition: classes/admin/linklist.php:64
$t
$t
Definition: ezarticle/admin/sitemap.php:42
$treeArray
$treeArray
Definition: ezarticle/admin/sitemap.php:54
$user
$user
Definition: ezarticle/admin/sitemap.php:55
$tree
$tree
Definition: ezarticle/admin/sitemap.php:53
$index
$index
Definition: ezforum/user/messageedit.php:36
$articleList
$articleList
Definition: pendinglist.php:112
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.