Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

modulelist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: modulelist.php 8504 2001-11-19 09:46:46Z jhe $
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 /*
28 Viser liste over prioriteringer
29 */
30 // include_once( "classes/INIFile.php" );
31 $ini = eZINI::instance( 'site.ini' );
32 $Language = $ini->variable( "eZBugMain", "Language" );
33
34 // include_once( "classes/eztemplate.php" );
35
36 // include_once( "ezbug/classes/ezbugmodule.php" );
37
38 $t = new eZTemplate( "kernel/ezbug/admin/" . $ini->variable( "eZBugMain", "AdminTemplateDir" ),
39 "kernel/ezbug/admin/intl", $Language, "modulelist.php" );
40 $t->setAllStrings();
41
42 $t->set_file( array(
43 "module_page" => "modulelist.tpl"
44 ) );
45
46 $t->set_block( "module_page", "module_item_tpl", "module_item" );
47 $t->set_block( "module_page", "path_item_tpl", "path_item" );
48
49 $t->set_var( "site_style", $SiteDesign );
50
51 $module = new eZBugModule( $ParentID );
52 $t->set_var( "this_id", $ParentID );
53
54
55 if( isset( $DeleteModules ) ) // delete selected modules
56 {
57 if( count( $ModuleArrayID ) > 0 )
58 {
59 foreach( $ModuleArrayID as $itemID )
60 {
61 $delModule = new eZBugModule( $itemID );
62 $delModule->delete();
63 }
64 }
65 }
66
67 // path
68 $pathArray = $module->path();
69
70 // print( count( $pathArray ) );
71 $t->set_var( "path_item", "" );
72 foreach ( $pathArray as $path )
73 {
74 $t->set_var( "module_id", $path[0] );
75
76 $t->set_var( "module_name", $path[1] );
77
78 $t->parse( "path_item", "path_item_tpl", true );
79 }
80
81 $moduleList = $module->getByParent( $module );
82
83 if ( count( $moduleList ) == 0 )
84 {
85 $t->set_var( "module_item", "ingen moduler funnet" );
86 }
87 else
88 {
89 $i=0;
90 foreach( $moduleList as $moduleItem )
91 {
92 if ( ( $i %2 ) == 0 )
93 {
94 $t->set_var( "td_class", "bglight" );
95 }
96 else
97 {
98 $t->set_var( "td_class", "bgdark" );
99 }
100
101 $t->set_var( "module_id", $moduleItem->id() );
102 $t->set_var( "module_name", $moduleItem->name() );
103
104 $i++;
105 $t->parse( "module_item", "module_item_tpl", true );
106 }
107 }
108
109 $t->pparse( "output", "module_page" );
110
111 ?>
$i
$i
Definition: admin/adlist.php:91
eZBugModule
Definition: ezbugmodule.php:56
eZTemplate
Definition: eztemplate.php:107
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$ParentID
$ParentID
Definition: eztrade/admin/categorylist.php:171
$pathArray
if(isset( $DeleteModules)) $pathArray
Definition: modulelist.php:68
$t
$t
Definition: modulelist.php:38
$Language
$Language
Definition: modulelist.php:32
$ini
$ini
Definition: modulelist.php:31
$module
$module
Definition: modulelist.php:51
$moduleList
foreach( $pathArray as $path) $moduleList
Definition: modulelist.php:81
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.