-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.php
64 lines (51 loc) · 2.91 KB
/
settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/*
* Copyright 2003 - 2005 Mark O'Sullivan
* This file is part of Vanilla.
* Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
* Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* The latest source code for Vanilla is available at www.lussumo.com
* Contact Mark O'Sullivan at mark [at] lussumo [dot] com
*
* Description: Web forms that handle manipulating user & application settings
*/
include("appg/settings.php");
include(sgLIBRARY."Input.Select.class.php");
include(sgLIBRARY."Input.Radio.class.php");
include(sgLIBRARY."Input.Checkbox.class.php");
include(sgLIBRARY."Input.Validator.class.php");
include(sgLIBRARY."Utility.Constant.class.php");
include(sgLIBRARY."Vanilla.Role.class.php");
include(sgLIBRARY."Vanilla.Category.class.php");
include(sgLIBRARY."Utility.Email.class.php");
include("appg/init_internal.php");
// Ensure the user is allowed to view this page
if (!$Context->Session->User->AdminCategories
&& !$Context->Session->User->AdminUsers
&& !$Context->Session->User->MasterAdmin) header("location: account.php");
// 1. DEFINE VARIABLES AND PROPERTIES SPECIFIC TO THIS PAGE
$Menu->CurrentTab = "settings";
$Panel->CssClass = "SettingsPanel";
$Body->CssClass = "SettingsPageBody";
$Context->PageTitle = $Context->GetDefinition("AdministrativeSettings");
// 2. BUILD PAGE CONTROLS
// Build the control panel
AddSettingOptionsToPanel($Context, $Panel);
// Create the default view
$Body->AddControl($Context->ObjectFactory->NewContextObject($Context, "SettingsHelp"));
// Forms
$Body->AddControl($Context->ObjectFactory->NewContextObject($Context, "CategoryForm"));
$Body->AddControl($Context->ObjectFactory->NewContextObject($Context, "RoleForm"));
$Body->AddControl($Context->ObjectFactory->NewContextObject($Context, "GlobalsForm"));
$Body->AddControl($Context->ObjectFactory->NewContextObject($Context, "ExtensionForm"));
$Body->AddControl($Context->ObjectFactory->NewContextObject($Context, "RegistrationForm"));
$Body->AddControl($Context->ObjectFactory->NewContextObject($Context, "LanguageForm"));
// 3. ADD CONTROLS TO THE PAGE
$Page->AddControl("Head_Render", $Head);
$Page->AddControl("Menu_Render", $Menu);
$Page->AddControl("Panel_Render", $Panel);
$Page->AddControl("Body_Render", $Body);
// 4. FIRE PAGE EVENTS
$Page->FireEvents();
?>