Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

activate.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: activate.php 6223 2001-07-20 11:20:31Z jakobn $
5 //
6 // Created on: <11-Apr-2001 15:07:58 amos>
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( "ezsession/classes/ezpreferences.php" );
29 // include_once( "ezmodule/classes/ezmodulehandler.php" );
30
31 $ini =& eZINI::instance( 'site.ini' );
32 $preferences = new eZPreferences();
33 $single_module = eZModuleHandler::useSingleModule();
34
35 if ( $single_module )
36 {
37 $modules = array( $ModuleName );
38 eZModuleHandler::setOpen( $ModuleName );
39 }
40 else
41 {
42 switch( $ModuleName )
43 {
44 case "all":
45 {
46 $modules =& eZModuleHandler::all();
47 break;
48 }
49 case "none":
50 {
51 $modules = array();
52 break;
53 }
54 default:
55 {
56 $modules =& eZModuleHandler::active();
57 if ( $Activate )
58 {
59 $modules =& eZModuleHandler::append( $modules, $ModuleName );
60 }
61 else
62 {
63 $modules =& eZModuleHandler::remove( $modules, $ModuleName );
64 }
65 }
66 }
67 }
68
69 eZModuleHandler::setActive( $modules );
70
71 $uri =& $_REQUEST["RefURL"];
72
73 if( strtolower( $ModuleName ) != 'all' && strtolower( $ModuleName ) != 'none' )
74 {
75 // set the first menu item active
76 unset( $menuItems );
77 include( "kernel/" . strtolower($ModuleName) ."/admin/menubox.php" );
78 $uri = $menuItems[0][0];
79 unset( $menuItems );
80 }
81
82 eZHTTPTool::header( "Location: $uri" );
83 exit();
84
85 ?>
$single_module
$single_module
Definition: activate.php:33
$uri
$uri
Definition: activate.php:71
$preferences
$preferences
Definition: activate.php:32
$ini
$ini
Definition: activate.php:31
$modules
foreach( $categories as $category) $modules
Definition: bugedit.php:496
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZModuleHandler\remove
static remove( $modules, $module)
Definition: ezmodulehandler.php:224
eZModuleHandler\append
static append( $modules, $module)
Definition: ezmodulehandler.php:214
eZModuleHandler\useSingleModule
static useSingleModule()
Definition: ezmodulehandler.php:102
eZModuleHandler\active
static active()
Definition: ezmodulehandler.php:139
eZModuleHandler\all
static all()
Definition: ezmodulehandler.php:121
eZModuleHandler\setActive
static setActive( $modules)
Definition: ezmodulehandler.php:203
eZModuleHandler\setOpen
static setOpen( $module, $open=true)
Definition: ezmodulehandler.php:181
eZPreferences
Definition: ezpreferences.php:62
$menuItems
$menuItems
Definition: ezabout/admin/menubox.php:31
$ModuleName
$ModuleName
Definition: ezarticle/user/searchsupplier.php:30
exit
exit
Definition: folder.php:81
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.