Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

sectionlist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: sectionlist.php 6229 2001-07-20 11:26:45Z jakobn $
5 //
6 // Created on: <10-May-2001 15:33:23 ce>
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/ezlist.php" );
30
31 $ini =& eZINI::instance( 'site.ini' );
32 $Language = $ini->variable( "eZSiteManagerMain", "Language" );
33 $Limit = $ini->variable( "eZSiteManagerMain", "AdminListLimit" );
34
35 // include_once( "ezsitemanager/classes/ezsection.php" );
36
37 $t = new eZTemplate( "kernel/ezsitemanager/admin/" . $ini->variable( "eZSiteManagerMain", "AdminTemplateDir" ),
38 "kernel/ezsitemanager/admin/" . "/intl", $Language, "sectionlist.php" );
39 $t->setAllStrings();
40
41 $t->set_file( array(
42 "section_page" => "sectionlist.tpl"
43 ) );
44
45 $t->set_block( "section_page", "section_list_tpl", "section_list" );
46 $t->set_block( "section_list_tpl", "section_item_tpl", "section_item" );
47
48 if ( !isset( $Offset ) )
49 $Offset = 0;
50
51 $t->set_var( "site_style", $SiteDesign );
52 $sectionList =& eZSection::getAll( $Offset, $Limit );
53 $totalCount =& eZSection::count();
54
55
56 if ( count ( $sectionList ) > 0 )
57 {
58 $i=0;
59 foreach( $sectionList as $section )
60 {
61 if ( ( $i %2 ) == 0 )
62 $t->set_var( "td_class", "bglight" );
63 else
64 $t->set_var( "td_class", "bgdark" );
65
66 $t->set_var( "section_id", $section->id() );
67 $t->set_var( "section_name", $section->name() );
68 $t->set_var( "section_description", $section->description() );
69
70 $t->parse( "section_item", "section_item_tpl", true );
71 $i++;
72 }
73 $t->parse( "section_list", "section_list_tpl" );
74 }
75 eZList::drawNavigator( $t, $totalCount, $Limit, $Offset, "section_page" );
76
77 $t->set_var( "section_start", $Offset + 1 );
78 $t->set_var( "section_end", min( $Offset + $Limit, $totalCount ) );
79 $t->set_var( "section_total", $totalCount );
80
81 $t->pparse( "output", "section_page" );
82
83 ?>
$i
$i
Definition: admin/adlist.php:91
eZList\drawNavigator
static drawNavigator(&$t, $total_types, $max_types, $index, $parent=false, $variables=false)
Definition: ezlist.php:401
eZSection\getAll
static getAll( $offset=0, $limit=40)
Definition: ezsection.php:177
eZSection\count
static count()
Definition: ezsection.php:200
eZTemplate
Definition: eztemplate.php:107
$Offset
$Offset
Definition: ezarticle/user/search.php:110
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$section
$section
Definition: ezimagecatalogue/user/categoryedit.php:393
$Limit
$Limit
Definition: sectionlist.php:33
$t
$t
Definition: sectionlist.php:37
$Language
$Language
Definition: sectionlist.php:32
$ini
$ini
Definition: sectionlist.php:31
$totalCount
$totalCount
Definition: sectionlist.php:53
$sectionList
$sectionList
Definition: sectionlist.php:52
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.