Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

settings.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: settings.php 6484 2001-08-17 13:36:01Z jhe $
5 //
6 // Created on: <11-Apr-2001 16:53:40 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( "classes/eztemplate.php" );
29 // include_once( "classes/ezhttptool.php" );
30
31 $ini =& eZINI::instance( 'site.ini' );
32 $Language = $ini->variable( "eZUserMain", "Language" );
33 // $DOC_ROOT = $ini->variable( "eZUserMain", "DocumentRoot" );
34
35 // include_once( "ezsession/classes/ezpreferences.php" );
36 $preferences = new eZPreferences();
37
38 // include_once( "ezmodule/classes/ezmodulehandler.php" );
39
40 $single_module = eZModuleHandler::useSingleModule();
41 $module_tab = eZModuleHandler::activeTab( true );
42
43 // include_once( "ezuser/classes/ezuser.php" );
44 // include_once( "ezuser/classes/ezusergroup.php" );
45 // include_once( "ezuser/classes/ezmodule.php" );
46 // include_once( "ezuser/classes/ezpermission.php" );
47 // include_once( "ezsession/classes/ezsession.php" );
48
49 require( "kernel/ezuser/admin/admincheck.php" );
50
51 $url = $GLOBALS["RefURL"];
52 if ( $url == "/user/settings" )
53 $url = "/";
54 if( $url == '' )
55 $url == '/';
56
57 if ( isset( $Cancel ) )
58 {
59 eZHTTPTool::header( "Location: $url" );
60 exit();
61 }
62
63 // Template
64 $t = new eZTemplate( "kernel/ezuser/admin/" . $ini->variable( "eZUserMain", "AdminTemplateDir" ),
65 "kernel/ezuser/admin/" . "/intl", $Language, "settings.php" );
66 $t->setAllStrings();
67
68 $t->set_file( "settings", "settings.tpl" );
69
70 $t->set_block( "settings", "module_tab_item_tpl", "module_tab_item" );
71
72 $t->set_var( "ref_url", $url );
73
74 $user =& eZUser::currentUser();
75 if ( !$user )
76 {
77 eZHTTPTool::header( "Location: /user/login/" );
78 exit();
79 }
80
81 if ( isset( $Action ) && $Action == "update" )
82 {
83 $preferences->setVariable( "SingleModule", $SingleModule != "" ? "enabled" : "disabled" );
84 $preferences->setVariable( "ModuleTab", $ModuleTabBar != "" ? "enabled" : "disabled" );
85
86 eZHTTPTool::header( "Location: $url" );
87 exit();
88 }
89
90 $t->set_var( "first_name", $user->firstName() );
91 $t->set_var( "last_name", $user->lastName() );
92
93 $t->set_var( "action_value", "update" );
94
95 $t->set_var( "module_tab", $module_tab ? "checked" : "" );
96 $t->set_var( "single_module", $single_module ? "checked" : "" );
97
98 $t->set_var( "module_tab_item", "" );
99 if ( eZModuleHandler::hasTab() )
100 $t->parse( "module_tab_item", "module_tab_item_tpl" );
101
102 $t->pparse( "output", "settings" );
103
104 ?>
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZModuleHandler\useSingleModule
static useSingleModule()
Definition: ezmodulehandler.php:102
eZModuleHandler\activeTab
static activeTab()
Definition: ezmodulehandler.php:65
eZModuleHandler\hasTab
static hasTab()
Definition: ezmodulehandler.php:81
eZPreferences
Definition: ezpreferences.php:62
eZTemplate
Definition: eztemplate.php:107
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
$Action
$Action
Definition: companysearch.php:80
exit
exit
Definition: folder.php:81
$single_module
$single_module
Definition: settings.php:40
$user
$user
Definition: settings.php:74
$preferences
$preferences
Definition: settings.php:36
$Language
$Language
Definition: settings.php:32
$ini
$ini
Definition: settings.php:31
$t
if(isset( $Cancel)) $t
Definition: settings.php:64
$module_tab
$module_tab
Definition: settings.php:41
$url
$url
Definition: settings.php:51
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.