0
+ − 1
<?php
519
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 2
/**!info**
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 3
{
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 4
"Plugin Name" : "plugin_specialadmin_title",
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 5
"Plugin URI" : "http://enanocms.org/",
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 6
"Description" : "plugin_specialadmin_desc",
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 7
"Author" : "Dan Fuhry",
685
17ebe24cdf85
Rebranded as 1.1.5 (Caoineag alpha 5) and fixed a couple bugs related to CDN support in template_nodb and installerUI. Updated readme.
Dan
diff
changeset
+ − 8
"Version" : "1.1.5",
519
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 9
"Author URI" : "http://enanocms.org/"
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 10
}
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 11
**!*/
0
+ − 12
+ − 13
/*
+ − 14
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
801
eb8b23f11744
Two big commits in one day I know, but redid password storage to use HMAC-SHA1. Consolidated much AES processing to three core methods in session that should handle everything automagically. Installation works; upgrades should. Rebranded as 1.1.6.
Dan
diff
changeset
+ − 15
* Version 1.1.6 (Caoineag beta 1)
536
+ − 16
* Copyright (C) 2006-2008 Dan Fuhry
0
+ − 17
*
+ − 18
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ − 19
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ − 20
*
+ − 21
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ − 22
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ − 23
*/
+ − 24
+ − 25
global $db, $session, $paths, $template, $plugins; // Common objects
+ − 26
593
4f9bec0d65c1
More optimization work. Moved special page init functions to common instead of common_post hook. Allowed paths to cache page metadata on filesystem. Phased out the redundancy in $paths->pages that paired a number with every urlname as foreach loops are allowed now (and have been for some time). Fixed missing includes for several functions. Rewrote str_replace_once to be a lot more efficient.
Dan
diff
changeset
+ − 27
// $plugins->attachHook('session_started', 'SpecialAdmin_paths_init();');
590
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 28
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 29
function SpecialAdmin_paths_init()
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 30
{
0
+ − 31
global $paths;
590
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 32
$paths->add_page(Array(
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 33
'name'=>'specialpage_administration',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 34
'urlname'=>'Administration',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 35
'namespace'=>'Special',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 36
'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 37
));
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 38
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 39
$paths->add_page(Array(
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 40
'name'=>'specialpage_manage_sidebar',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 41
'urlname'=>'EditSidebar',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 42
'namespace'=>'Special',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 43
'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 44
));
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 45
}
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 46
716
+ − 47
$plugins->attachHook('session_started', 'SpecialAdmin_theme_init();');
590
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 48
$plugins->attachHook('common_post', 'SpecialAdmin_include();');
0
+ − 49
716
+ − 50
function SpecialAdmin_theme_init()
+ − 51
{
+ − 52
global $db, $session, $paths, $template, $plugins; // Common objects
+ − 53
+ − 54
// Admin pages that were too enormous to be in this file were split off into the plugins/admin/ directory in 1.0.1.
+ − 55
// Only load these files if we're looking to load the admin panel
+ − 56
list($pid, $ns) = RenderMan::strToPageID($paths->get_pageid_from_url());
+ − 57
if ( $ns == 'Admin' || ( $pid == 'Administration' && $ns == 'Special' ) )
+ − 58
{
+ − 59
// Set the theme
+ − 60
$session->theme = 'admin';
+ − 61
$session->style = 'default';
+ − 62
+ − 63
$template->add_header('<script type="text/javascript" src="' . cdnPath . '/includes/clientside/static/admin-menu.js"></script>');
+ − 64
}
+ − 65
}
+ − 66
590
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 67
function SpecialAdmin_include()
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 68
{
597
c4ae0d8e260f
Added ability to hide or show sidebar blocks based on a {restrict} or {hideif} conditional in the sidebar script
Dan
diff
changeset
+ − 69
global $db, $session, $paths, $template, $plugins; // Common objects
590
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 70
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 71
// Admin pages that were too enormous to be in this file were split off into the plugins/admin/ directory in 1.0.1.
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 72
// Only load these files if we're looking to load the admin panel
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 73
list($pid, $ns) = RenderMan::strToPageID($paths->get_pageid_from_url());
597
c4ae0d8e260f
Added ability to hide or show sidebar blocks based on a {restrict} or {hideif} conditional in the sidebar script
Dan
diff
changeset
+ − 74
if ( $ns == 'Admin' || ( $pid == 'Administration' && $ns == 'Special' ) )
590
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 75
{
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 76
require(ENANO_ROOT . '/plugins/admin/PageManager.php');
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 77
require(ENANO_ROOT . '/plugins/admin/PageEditor.php');
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 78
require(ENANO_ROOT . '/plugins/admin/PageGroups.php');
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 79
require(ENANO_ROOT . '/plugins/admin/GroupManager.php');
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 80
require(ENANO_ROOT . '/plugins/admin/SecurityLog.php');
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 81
require(ENANO_ROOT . '/plugins/admin/UserManager.php');
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 82
require(ENANO_ROOT . '/plugins/admin/UserRanks.php');
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 83
require(ENANO_ROOT . '/plugins/admin/LangManager.php');
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 84
require(ENANO_ROOT . '/plugins/admin/ThemeManager.php');
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 85
require(ENANO_ROOT . '/plugins/admin/PluginManager.php');
605
+ − 86
require(ENANO_ROOT . '/plugins/admin/CacheManager.php');
590
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 87
}
03a60844c7c5
Several optimization changes including getting rid of a few eval()s. Added placeholder functions for the theme manager, which should be working now
Dan
diff
changeset
+ − 88
}
74
68469a95658d
Various bugfixes and cleanups, too much to remember... see the diffs for what got changed :-)
Dan
diff
changeset
+ − 89
376
+ − 90
// For convenience and nothing more.
+ − 91
function acp_start_form()
+ − 92
{
+ − 93
global $db, $session, $paths, $template, $plugins; // Common objects
+ − 94
echo '<form action="'.makeUrl($paths->nslist['Special'].'Administration', ( isset($_GET['sqldbg']) ? 'sqldbg&' : '' ) . ( isset($_GET['nocompress']) ? 'nocompress&' : '' ) . 'module='.$paths->cpage['module']).'" method="post" enctype="multipart/form-data">';
+ − 95
}
74
68469a95658d
Various bugfixes and cleanups, too much to remember... see the diffs for what got changed :-)
Dan
diff
changeset
+ − 96
0
+ − 97
// function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
+ − 98
+ − 99
function page_Admin_Home() {
+ − 100
global $db, $session, $paths, $template, $plugins; // Common objects
216
+ − 101
global $lang;
0
+ − 102
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 103
{
216
+ − 104
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
217
+ − 105
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
+ − 106
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
0
+ − 107
return;
+ − 108
}
+ − 109
329
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 110
if ( $paths->getParam(0) == 'updates.xml' )
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 111
{
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 112
require_once(ENANO_ROOT . '/includes/http.php');
792
+ − 113
$req = new Request_HTTP('ktulu.enanocms.org', '/meta/updates.xml');
329
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 114
$response = $req->get_response_body();
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 115
header('Content-type: application/xml');
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 116
if ( $req->response_code != HTTP_OK )
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 117
{
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 118
// Error in response
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 119
echo '<enano><latest><error><![CDATA[
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 120
Did not properly receive response from server. Response code: ' . $req->response_code . ' ' . $req->response_string . '
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 121
]]></error></latest></enano>';
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 122
}
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 123
else
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 124
{
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 125
// Retrieve first update
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 126
$first_update = preg_match('/<release tag="([^"]+)" version="([^"]+)" (codename="([^"]+)" )?relnotes="([^"]+)" ?\/>/', $response, $match);
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 127
if ( !$first_update )
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 128
{
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 129
echo '<enano><latest><error><![CDATA[
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 130
Received invalid XML response.
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 131
]]></error></latest></enano>';
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 132
}
683
+ − 133
else
329
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 134
{
683
+ − 135
if ( version_compare(enano_version(true), $match[2], '<') )
+ − 136
{
+ − 137
$response = str_replace_once('</latest>', " <haveupdates />\n </latest>", $response);
+ − 138
}
+ − 139
echo $response;
329
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 140
}
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 141
}
0
+ − 142
return;
+ − 143
}
+ − 144
+ − 145
// Basic information
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 146
echo '<h2>' . $lang->get('acphome_heading_main') . '</h2>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 147
echo '<p>' . $lang->get('acphome_welcome_line1') . '</p>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 148
echo '<p>' . $lang->get('acphome_welcome_line2') . '</p>';
0
+ − 149
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 150
// Demo mode
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 151
if ( defined('ENANO_DEMO_MODE') )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 152
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 153
echo '<h3>' . $lang->get('acphome_msg_demo_title') . '</h3>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 154
<p>' . $lang->get('acphome_msg_demo_body', array('reset_url' => makeUrlNS('Special', 'DemoReset', false, true))) . '</p>';
443
+ − 155
}
+ − 156
0
+ − 157
// Check for the installer scripts
653
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 158
if( file_exists(ENANO_ROOT.'/install/install.php') && !defined('ENANO_DEMO_MODE') )
0
+ − 159
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 160
echo '<div class="error-box">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 161
' . $lang->get('acphome_msg_install_files') . '
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 162
</div>';
0
+ − 163
}
+ − 164
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 165
echo '<h3>' . $lang->get('acphome_heading_updates') . '</h3>';
797
+ − 166
echo '<p>' . $lang->get('acphome_msg_updates_info', array('updates_url' => 'http://ktulu.enanocms.org/meta/updates.xml')) . '</p>';
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 167
echo '<div id="update_check_container"><input type="button" onclick="ajaxUpdateCheck(this.parentNode.id);" value="' . $lang->get('acphome_btn_check_updates') . '" /></div>';
329
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
diff
changeset
+ − 168
0
+ − 169
// Inactive users
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 170
$q = $db->sql_query('SELECT time_id FROM '.table_prefix.'logs WHERE log_type=\'admin\' AND action=\'activ_req\';');
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 171
if ( $q )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 172
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 173
if ( $db->numrows() > 0 )
0
+ − 174
{
+ − 175
$n = $db->numrows();
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 176
$um_flags = 'href="#" onclick="ajaxPage(\''.$paths->nslist['Admin'].'UserManager\'); return false;"';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 177
if ( $n == 1 )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 178
$s = $lang->get('acphome_msg_inactive_users_one', array('um_flags' => $um_flags));
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 179
else
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 180
$s = $lang->get('acphome_msg_inactive_users_plural', array('um_flags' => $um_flags));
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 181
echo '<div class="warning-box">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 182
' . $s . '
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 183
</div>';
0
+ − 184
}
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 185
}
0
+ − 186
$db->free_result();
+ − 187
// Stats
+ − 188
if(getConfig('log_hits') == '1')
+ − 189
{
593
4f9bec0d65c1
More optimization work. Moved special page init functions to common instead of common_post hook. Allowed paths to cache page metadata on filesystem. Phased out the redundancy in $paths->pages that paired a number with every urlname as foreach loops are allowed now (and have been for some time). Fixed missing includes for several functions. Rewrote str_replace_once to be a lot more efficient.
Dan
diff
changeset
+ − 190
require_once(ENANO_ROOT . '/includes/stats.php');
0
+ − 191
$stats = stats_top_pages(10);
61
+ − 192
//die('<pre>'.print_r($stats,true).'</pre>');
0
+ − 193
$c = 0;
+ − 194
$cls = 'row2';
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 195
echo '<h3>' . $lang->get('acphome_heading_top_pages') . '</h3>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 196
<div class="tblholder">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 197
<table style="width: 100%;" border="0" cellspacing="1" cellpadding="4">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 198
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 199
<th>' . $lang->get('acphome_th_toppages_page') . '</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 200
<th>' . $lang->get('acphome_th_toppages_hits') . '</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 201
</tr>';
61
+ − 202
foreach($stats as $data)
0
+ − 203
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 204
echo '<tr>';
61
+ − 205
$cls = ( $cls == 'row1' ) ? 'row2' : 'row1';
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 206
echo '<td class="'.$cls.'">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 207
<a href="'.makeUrl($data['page_urlname']).'">'.$data['page_title'].'</a></td><td style="text-align: center;" class="'.$cls.'">'.$data['num_hits']
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 208
. '</td>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 209
echo '</tr>';
0
+ − 210
}
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 211
echo ' </table>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 212
</div>';
0
+ − 213
}
+ − 214
582
+ − 215
// Any hooks?
+ − 216
$code = $plugins->setHook('acp_home');
+ − 217
foreach ( $code as $cmd )
+ − 218
{
+ − 219
eval($cmd);
+ − 220
}
+ − 221
0
+ − 222
// Security log
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 223
echo '<h3>' . $lang->get('acphome_heading_seclog') . '</h3>';
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 224
echo '<p>' . $lang->get('acphome_msg_seclog_info') . '</p>';
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 225
$seclog = get_security_log(5);
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 226
echo $seclog;
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 227
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 228
echo '<p><a href="#" onclick="ajaxPage(\''.$paths->nslist['Admin'].'SecurityLog\'); return false;">' . $lang->get('acphome_btn_seclog_full') . '</a></p>';
0
+ − 229
+ − 230
}
+ − 231
+ − 232
function page_Admin_GeneralConfig() {
+ − 233
global $db, $session, $paths, $template, $plugins; // Common objects
216
+ − 234
global $lang;
0
+ − 235
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 236
{
216
+ − 237
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
217
+ − 238
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
+ − 239
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
0
+ − 240
return;
+ − 241
}
+ − 242
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 243
if(isset($_POST['submit']) && !defined('ENANO_DEMO_MODE') )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 244
{
0
+ − 245
+ − 246
// Global site options
+ − 247
setConfig('site_name', $_POST['site_name']);
+ − 248
setConfig('site_desc', $_POST['site_desc']);
741
+ − 249
setConfig('main_page', sanitize_page_id($_POST['main_page']));
0
+ − 250
setConfig('copyright_notice', $_POST['copyright']);
+ − 251
setConfig('contact_email', $_POST['contact_email']);
+ − 252
741
+ − 253
setConfig('main_page_alt_enable', ( isset($_POST['main_page_alt_enable']) && $_POST['main_page_alt_enable'] === '1' ? '1' : '0' ));
+ − 254
if ( !empty($_POST['main_page_alt']) )
+ − 255
{
+ − 256
setConfig('main_page_alt', sanitize_page_id($_POST['main_page_alt']));
+ − 257
}
+ − 258
0
+ − 259
// Wiki mode
+ − 260
if(isset($_POST['wikimode'])) setConfig('wiki_mode', '1');
+ − 261
else setConfig('wiki_mode', '0');
+ − 262
if(isset($_POST['wiki_mode_require_login'])) setConfig('wiki_mode_require_login', '1');
+ − 263
else setConfig('wiki_mode_require_login', '0');
+ − 264
if(isset($_POST['editmsg'])) setConfig('wiki_edit_notice', '1');
+ − 265
else setConfig('wiki_edit_notice', '0');
+ − 266
setConfig('wiki_edit_notice_text', $_POST['editmsg_text']);
336
+ − 267
if(isset($_POST['guest_edit_require_captcha'])) setConfig('guest_edit_require_captcha', '1');
+ − 268
else setConfig('guest_edit_require_captcha', '0');
0
+ − 269
+ − 270
// Stats
+ − 271
if(isset($_POST['log_hits'])) setConfig('log_hits', '1');
+ − 272
else setConfig('log_hits', '0');
+ − 273
+ − 274
// Disablement
+ − 275
if(isset($_POST['site_disabled'])) { setConfig('site_disabled', '1'); setConfig('site_disabled_notice', $_POST['site_disabled_notice']); }
+ − 276
else setConfig('site_disabled', '0');
+ − 277
+ − 278
// Account activation
+ − 279
setConfig('account_activation', $_POST['account_activation']);
+ − 280
+ − 281
// W3C compliance buttons
+ − 282
if(isset($_POST['w3c-vh32'])) setConfig("w3c_vh32", "1");
+ − 283
else setConfig("w3c_vh32", "0");
+ − 284
if(isset($_POST['w3c-vh40'])) setConfig("w3c_vh40", "1");
+ − 285
else setConfig("w3c_vh40", "0");
+ − 286
if(isset($_POST['w3c-vh401'])) setConfig("w3c_vh401", "1");
+ − 287
else setConfig("w3c_vh401", "0");
+ − 288
if(isset($_POST['w3c-vxhtml10'])) setConfig("w3c_vxhtml10", "1");
+ − 289
else setConfig("w3c_vxhtml10", "0");
+ − 290
if(isset($_POST['w3c-vxhtml11'])) setConfig("w3c_vxhtml11", "1");
+ − 291
else setConfig("w3c_vxhtml11", "0");
+ − 292
if(isset($_POST['w3c-vcss'])) setConfig("w3c_vcss", "1");
+ − 293
else setConfig("w3c_vcss", "0");
+ − 294
+ − 295
// SourceForge.net logo
+ − 296
if(isset($_POST['showsf'])) setConfig('sflogo_enabled', '1');
+ − 297
else setConfig('sflogo_enabled', '0');
+ − 298
setConfig('sflogo_groupid', $_POST['sfgroup']);
+ − 299
setConfig('sflogo_type', $_POST['sflogo']);
+ − 300
+ − 301
// Comment options
+ − 302
if(isset($_POST['comment-approval'])) setConfig('approve_comments', '1');
+ − 303
else setConfig('approve_comments', '0');
+ − 304
if(isset($_POST['enable-comments'])) setConfig('enable_comments', '1');
+ − 305
else setConfig('enable_comments', '0');
+ − 306
setConfig('comments_need_login', $_POST['comments_need_login']);
825
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 307
if ( in_array($_POST['comment_spam_policy'], array('moderate', 'reject', 'accept')) )
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 308
{
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 309
setConfig('comment_spam_policy', $_POST['comment_spam_policy']);
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 310
}
0
+ − 311
+ − 312
// Powered by link
+ − 313
if ( isset($_POST['enano_powered_link']) ) setConfig('powered_btn', '1');
+ − 314
else setConfig('powered_btn', '0');
+ − 315
+ − 316
if(isset($_POST['dbdbutton'])) setConfig('dbd_button', '1');
+ − 317
else setConfig('dbd_button', '0');
+ − 318
+ − 319
if($_POST['emailmethod'] == 'phpmail') setConfig('smtp_enabled', '0');
+ − 320
else setConfig('smtp_enabled', '1');
+ − 321
+ − 322
setConfig('smtp_server', $_POST['smtp_host']);
+ − 323
setConfig('smtp_user', $_POST['smtp_user']);
+ − 324
if($_POST['smtp_pass'] != 'XXXXXXXXXXXX') setConfig('smtp_password', $_POST['smtp_pass']);
+ − 325
133
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 326
// Password strength
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 327
if ( isset($_POST['pw_strength_enable']) ) setConfig('pw_strength_enable', '1');
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 328
else setConfig('pw_strength_enable', '0');
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 329
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 330
$strength = intval($_POST['pw_strength_minimum']);
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 331
if ( $strength >= -10 && $strength <= 30 )
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 332
{
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 333
$strength = strval($strength);
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 334
setConfig('pw_strength_minimum', $strength);
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 335
}
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 336
465
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 337
// Default theme
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 338
$default_theme = ( isset($template->named_theme_list[@$_POST['default_theme']]) ) ? $_POST['default_theme'] : $template->theme_list[0]['theme_id'];
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 339
setConfig('theme_default', $default_theme);
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 340
473
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 341
// Breadcrumb mode
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 342
if ( in_array($_POST['breadcrumb_mode'], array('subpages', 'always', 'never')) )
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 343
{
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 344
setConfig('breadcrumb_mode', $_POST['breadcrumb_mode']);
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 345
}
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 346
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 347
// CDN path
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 348
if ( preg_match('/^http:\/\//', $_POST['cdn_path']) || $_POST['cdn_path'] === '' )
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 349
{
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 350
// trim off a trailing slash
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 351
setConfig('cdn_path', preg_replace('#/$#', '', $_POST['cdn_path']));
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 352
}
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 353
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 354
setConfig('register_tou', RenderMan::preprocess_text($_POST['register_tou'], true, false));
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 355
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 356
// Account lockout policy
826
+ − 357
if ( ctype_digit($_POST['lockout_threshold']) )
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 358
setConfig('lockout_threshold', $_POST['lockout_threshold']);
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 359
826
+ − 360
if ( ctype_digit($_POST['lockout_duration']) )
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 361
setConfig('lockout_duration', $_POST['lockout_duration']);
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 362
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 363
if ( in_array($_POST['lockout_policy'], array('disable', 'captcha', 'lockout')) )
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 364
setConfig('lockout_policy', $_POST['lockout_policy']);
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 365
688
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 366
// Session time
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 367
foreach ( array('session_short_time', 'session_remember_time') as $k )
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 368
{
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 369
if ( strval(intval($_POST[$k])) === $_POST[$k] && intval($_POST[$k]) >= 0 )
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 370
{
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 371
setConfig($k, $_POST[$k]);
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 372
}
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 373
}
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 374
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 375
// Avatar settings
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 376
setConfig('avatar_enable', ( isset($_POST['avatar_enable']) ? '1' : '0' ));
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 377
// for these next three values, set the config value if it's a valid integer; this is
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 378
// done by using strval(intval($foo)) === $foo, which flattens $foo to an integer and
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 379
// then converts it back to a string. This effectively verifies that var $foo is both
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 380
// set and that it's a valid string representing an integer.
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 381
setConfig('avatar_max_size', ( strval(intval($_POST['avatar_max_size'])) === $_POST['avatar_max_size'] ? $_POST['avatar_max_size'] : '10240' ));
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 382
setConfig('avatar_max_width', ( strval(intval($_POST['avatar_max_width'])) === $_POST['avatar_max_width'] ? $_POST['avatar_max_width'] : '96' ));
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 383
setConfig('avatar_max_height', ( strval(intval($_POST['avatar_max_height'])) === $_POST['avatar_max_height'] ? $_POST['avatar_max_height'] : '96' ));
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 384
setConfig('avatar_enable_anim', ( isset($_POST['avatar_enable_anim']) ? '1' : '0' ));
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 385
setConfig('avatar_upload_file', ( isset($_POST['avatar_upload_file']) ? '1' : '0' ));
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 386
setConfig('avatar_upload_http', ( isset($_POST['avatar_upload_http']) ? '1' : '0' ));
621
+ − 387
setConfig('avatar_upload_gravatar', ( isset($_POST['avatar_upload_gravatar']) ? '1' : '0' ));
+ − 388
if ( in_array($_POST['gravatar_rating'], array('g', 'pg', 'r', 'x')) )
+ − 389
{
+ − 390
setConfig('gravatar_rating', $_POST['gravatar_rating']);
+ − 391
}
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 392
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 393
if ( is_dir(ENANO_ROOT . '/' . $_POST['avatar_directory']) )
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 394
{
582
+ − 395
if ( preg_match('/^[A-z0-9_-]+(?:\/(?:[A-z0-9_-]+))*\/?$/', $_POST['avatar_directory']) )
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 396
{
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 397
setConfig('avatar_directory', $_POST['avatar_directory']);
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 398
}
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 399
else
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 400
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 401
echo '<div class="error-box">' . $lang->get('acpgc_err_avatar_dir_invalid') . '</div>';
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 402
}
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 403
}
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 404
else
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 405
{
731
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 406
echo '<div class="error-box">' . $lang->get('acpgc_err_avatar_dir_not_exist') . '</div>';
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 407
}
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 408
731
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 409
setConfig('userpage_grant_acl', ( isset($_POST['userpage_grant_acl']) ? '1' : '0' ));
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 410
828
+ − 411
// Allow plugins to save their changes
+ − 412
$code = $plugins->setHook('acp_general_save');
+ − 413
foreach ( $code as $cmd )
+ − 414
{
+ − 415
eval($cmd);
+ − 416
}
+ − 417
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 418
echo '<div class="info-box">' . $lang->get('acpgc_msg_save_success') . '</div><br />';
0
+ − 419
+ − 420
}
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 421
else if ( isset($_POST['submit']) && defined('ENANO_DEMO_MODE') )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 422
{
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 423
echo '<div class="error-box">Saving the general site configuration is blocked in the administration demo.</div>';
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 424
}
0
+ − 425
echo('<form name="main" action="'.htmlspecialchars(makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module'])).'" method="post" onsubmit="if(!submitAuthorized) return false;">');
+ − 426
?>
+ − 427
<div class="tblholder">
+ − 428
<table border="0" width="100%" cellspacing="1" cellpadding="4">
+ − 429
+ − 430
<!-- Global options -->
+ − 431
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 432
<tr><th colspan="2"><?php echo $lang->get('acpgc_heading_main'); ?></th></tr>
741
+ − 433
+ − 434
<tr>
+ − 435
<th colspan="2" class="subhead"><?php echo $lang->get('acpgc_heading_submain'); ?></th>
+ − 436
</tr>
+ − 437
+ − 438
<!-- site name -->
+ − 439
+ − 440
<tr>
+ − 441
<td class="row1" style="width: 50%;">
+ − 442
<?php echo $lang->get('acpgc_field_site_name'); ?>
+ − 443
</td>
+ − 444
<td class="row1" style="width: 50%;">
+ − 445
<input type="text" name="site_name" size="30" value="<?php echo htmlspecialchars(getConfig('site_name')); ?>" />
+ − 446
</td>
+ − 447
</tr>
+ − 448
+ − 449
<!-- site tagline -->
+ − 450
<tr>
+ − 451
<td class="row2">
+ − 452
<?php echo $lang->get('acpgc_field_site_desc'); ?>
+ − 453
</td>
+ − 454
<td class="row2">
+ − 455
<input type="text" name="site_desc" size="30" value="<?php echo htmlspecialchars(getConfig('site_desc')); ?>" />
+ − 456
</td>
+ − 457
</tr>
0
+ − 458
741
+ − 459
<!-- main page -->
+ − 460
<tr>
+ − 461
<td class="row1">
+ − 462
<?php echo $lang->get('acpgc_field_main_page'); ?></td>
+ − 463
<td class="row1">
+ − 464
<?php echo $template->pagename_field('main_page', sanitize_page_id(getConfig('main_page'))); ?><br />
+ − 465
<label><input type="radio" name="main_page_alt_enable" value="0" onclick="$('#main_page_alt_tr').hide();" <?php if ( getConfig('main_page_alt_enable', '0') == '0' ) echo 'checked="checked" '; ?>/> <?php echo $lang->get('acpgc_field_main_page_option_same'); ?></label><br />
+ − 466
<label><input type="radio" name="main_page_alt_enable" value="1" onclick="$('#main_page_alt_tr').show();" <?php if ( getConfig('main_page_alt_enable', '0') == '1' ) echo 'checked="checked" '; ?>/> <?php echo $lang->get('acpgc_field_main_page_option_members'); ?></label>
+ − 467
</td>
+ − 468
</tr>
+ − 469
<tr id="main_page_alt_tr"<?php if ( getConfig('main_page_alt_enable', '0') == '0' ) echo ' style="display: none;"'; ?>>
+ − 470
<td class="row3">
+ − 471
<?php echo $lang->get('acpgc_field_main_page_members'); ?>
+ − 472
</td>
+ − 473
<td class="row3">
+ − 474
<?php echo $template->pagename_field('main_page_alt', sanitize_page_id(getConfig('main_page_alt', /* default alt to current main page */ getConfig('main_page', 'Main_Page')))); ?>
+ − 475
</td>
+ − 476
</tr>
+ − 477
+ − 478
<!-- copyright notice -->
+ − 479
<tr>
+ − 480
<td class="row2">
+ − 481
<?php echo $lang->get('acpgc_field_copyright'); ?>
+ − 482
</td>
+ − 483
<td class="row2">
+ − 484
<input type="text" name="copyright" size="30" value="<?php echo htmlspecialchars(getConfig('copyright_notice')); ?>" />
+ − 485
</td>
+ − 486
</tr>
+ − 487
<tr>
+ − 488
<td class="row1" colspan="2">
+ − 489
<?php echo $lang->get('acpgc_field_copyright_hint'); ?>
+ − 490
</td>
+ − 491
</tr>
+ − 492
+ − 493
<!-- contact e-mail -->
+ − 494
<tr>
+ − 495
<td class="row2">
+ − 496
<?php echo $lang->get('acpgc_field_contactemail'); ?><br />
+ − 497
<small><?php echo $lang->get('acpgc_field_contactemail_hint'); ?></small>
+ − 498
</td>
+ − 499
<td class="row2">
+ − 500
<input name="contact_email" type="text" size="40" value="<?php echo htmlspecialchars(getConfig('contact_email')); ?>" />
+ − 501
</td>
+ − 502
</tr>
0
+ − 503
+ − 504
<!-- Wiki mode -->
+ − 505
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 506
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_wikimode'); ?></th></tr>
0
+ − 507
+ − 508
<tr>
+ − 509
<td class="row3" rowspan="2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 510
<?php echo $lang->get('acpgc_field_wikimode_intro'); ?><br /><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 511
<?php echo $lang->get('acpgc_field_wikimode_info_sanitize'); ?><br /><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 512
<?php echo $lang->get('acpgc_field_wikimode_info_history'); ?>
0
+ − 513
</td>
+ − 514
<td class="row1">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 515
<input type="checkbox" name="wikimode" id="wikimode" <?php if(getConfig('wiki_mode')=='1') echo('CHECKED '); ?> /><label for="wikimode"><?php echo $lang->get('acpgc_field_wikimode'); ?></label>
0
+ − 516
</td>
+ − 517
</tr>
+ − 518
+ − 519
<tr><td class="row2"><label><input type="checkbox" name="wiki_mode_require_login"<?php if(getConfig('wiki_mode_require_login')=='1') echo('CHECKED '); ?>/> Only for logged in users</label></td></tr>
+ − 520
+ − 521
<tr>
+ − 522
<td class="row3" rowspan="2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 523
<b><?php echo $lang->get('acpgc_field_editnotice_title'); ?></b><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 524
<?php echo $lang->get('acpgc_field_editnotice_info'); ?>
0
+ − 525
</td>
+ − 526
<td class="row1">
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 527
<input onclick="if(this.checked) document.getElementById('editmsg_text').style.display='block'; else document.getElementById('editmsg_text').style.display='none';" type="checkbox" name="editmsg" id="editmsg" <?php if(getConfig('wiki_edit_notice', '0')=='1') echo('CHECKED '); ?>/>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 528
<label for="editmsg"><?php echo $lang->get('acpgc_field_editnotice'); ?></label>
0
+ − 529
</td>
+ − 530
</tr>
+ − 531
+ − 532
<tr>
+ − 533
<td class="row2">
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 534
<textarea <?php if(getConfig('wiki_edit_notice', '0')!='1') echo('style="display:none" '); ?>rows="5" cols="30" name="editmsg_text" id="editmsg_text"><?php echo getConfig('wiki_edit_notice_text'); ?></textarea>
0
+ − 535
</td>
+ − 536
</tr>
+ − 537
336
+ − 538
<tr>
+ − 539
<td class="row1">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 540
<b><?php echo $lang->get('acpgc_field_edit_require_captcha_title'); ?></b><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 541
<?php echo $lang->get('acpgc_field_edit_require_captcha_hint'); ?>
336
+ − 542
</td>
+ − 543
<td class="row1">
+ − 544
<label>
+ − 545
<input type="checkbox" name="guest_edit_require_captcha" <?php if ( getConfig('guest_edit_require_captcha') == '1' ) echo 'checked="checked" '; ?>/>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 546
<?php echo $lang->get('acpgc_field_edit_require_captcha'); ?>
336
+ − 547
</label>
+ − 548
</td>
+ − 549
</tr>
+ − 550
0
+ − 551
<!-- Site statistics -->
+ − 552
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 553
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_stats'); ?></th></tr>
0
+ − 554
+ − 555
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 556
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 557
<?php echo $lang->get('acpgc_stats_intro'); ?><br /><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 558
<?php echo $lang->get('acpgc_stats_hint_privacy'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 559
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 560
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 561
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 562
<input type="checkbox" name="log_hits" <?php if(getConfig('log_hits') == '1') echo 'checked="checked" '; ?>/>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 563
<?php echo $lang->get('acpgc_field_stats_enable'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 564
</label><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 565
<small><?php echo $lang->get('acpgc_field_stats_hint'); ?></small>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 566
</td>
0
+ − 567
</tr>
+ − 568
+ − 569
<!-- Comment options -->
+ − 570
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 571
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 572
<th class="subhead" colspan="2">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 573
<?php echo $lang->get('acpgc_heading_comments'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 574
</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 575
</tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 576
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 577
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 578
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 579
<label for="enable-comments">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 580
<b><?php echo $lang->get('acpgc_field_enable_comments'); ?></b>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 581
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 582
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 583
<td class="row1">
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 584
<input name="enable-comments" id="enable-comments" type="checkbox" <?php if(getConfig('enable_comments', '1')=='1') echo('CHECKED '); ?>/>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 585
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 586
</tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 587
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 588
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 589
<td class="row2">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 590
<label for="comment-approval">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 591
<?php echo $lang->get('acpgc_field_approve_comments'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 592
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 593
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 594
<td class="row2">
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 595
<input name="comment-approval" id="comment-approval" type="checkbox" <?php if(getConfig('approve_comments', '0')=='1') echo('CHECKED '); ?>/>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 596
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 597
</tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 598
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 599
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 600
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 601
<?php echo $lang->get('acpgc_field_comment_allow_guests'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 602
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 603
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 604
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 605
<input name="comments_need_login" type="radio" value="0" <?php if(getConfig('comments_need_login')=='0') echo 'checked="checked" '; ?>/>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 606
<?php echo $lang->get('acpgc_field_comment_allow_guests_yes'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 607
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 608
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 609
<input name="comments_need_login" type="radio" value="1" <?php if(getConfig('comments_need_login')=='1') echo 'checked="checked" '; ?>/>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 610
<?php echo $lang->get('acpgc_field_comment_allow_guests_captcha'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 611
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 612
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 613
<input name="comments_need_login" type="radio" value="2" <?php if(getConfig('comments_need_login')=='2') echo 'checked="checked" '; ?>/>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 614
<?php echo $lang->get('acpgc_field_comment_allow_guests_no'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 615
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 616
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 617
</tr>
825
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 618
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 619
<tr>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 620
<td class="row2">
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 621
<?php echo $lang->get('acpgc_field_comment_spam_policy'); ?><br />
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 622
<small><?php echo $lang->get('acpgc_field_comment_spam_policy_hint'); ?></small>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 623
</td>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 624
<td class="row2">
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 625
<label>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 626
<input name="comment_spam_policy" type="radio" value="moderate" <?php if ( getConfig('comment_spam_policy', 'moderate') == 'moderate' ) echo 'checked="checked"'; ?>/>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 627
<?php echo $lang->get('acpgc_field_comment_spam_policy_moderate'); ?>
828
+ − 628
</label><br />
825
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 629
<label>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 630
<input name="comment_spam_policy" type="radio" value="reject" <?php if ( getConfig('comment_spam_policy', 'moderate') == 'reject' ) echo 'checked="checked"'; ?>/>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 631
<?php echo $lang->get('acpgc_field_comment_spam_policy_reject'); ?>
828
+ − 632
</label><br />
825
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 633
<label>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 634
<input name="comment_spam_policy" type="radio" value="accept" <?php if ( getConfig('comment_spam_policy', 'moderate') == 'accept' ) echo 'checked="checked"'; ?>/>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 635
<?php echo $lang->get('acpgc_field_comment_spam_policy_accept'); ?>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 636
</label>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 637
</td>
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
diff
changeset
+ − 638
</tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 639
0
+ − 640
<!-- Site disablement -->
+ − 641
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 642
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_disablesite'); ?></th></tr>
0
+ − 643
+ − 644
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 645
<td class="row3" rowspan="2">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 646
<?php echo $lang->get('acpgc_field_disablesite_hint'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 647
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 648
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 649
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 650
<input onclick="if(this.checked) document.getElementById('site_disabled_notice').style.display='block'; else document.getElementById('site_disabled_notice').style.display='none';" type="checkbox" name="site_disabled" <?php if(getConfig('site_disabled') == '1') echo 'checked="checked" '; ?>/>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 651
<?php echo $lang->get('acpgc_field_disablesite'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 652
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 653
</td>
0
+ − 654
</tr>
+ − 655
<tr>
+ − 656
<td class="row2">
30
+ − 657
<div id="site_disabled_notice"<?php if(getConfig('site_disabled')!='1') echo(' style="display:none"'); ?>>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 658
<?php echo $lang->get('acpgc_field_disablesite_message'); ?><br />
0
+ − 659
<textarea name="site_disabled_notice" rows="7" cols="30"><?php echo getConfig('site_disabled_notice'); ?></textarea>
+ − 660
</div>
+ − 661
</td>
+ − 662
</tr>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 663
465
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 664
<!-- Default theme -->
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 665
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 666
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_default_theme'); ?></th></tr>
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 667
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 668
<tr>
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 669
<td class="row2">
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 670
<?php echo $lang->get('acpgc_field_defualt_theme'); ?>
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 671
</td>
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 672
<td class="row2">
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 673
<select name="default_theme">
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 674
<?php
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 675
foreach ( $template->named_theme_list as $theme_id => $theme_data )
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 676
{
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 677
$theme_name = htmlspecialchars($theme_data['theme_name']);
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 678
$selected = ( $theme_id === getConfig('theme_default') ) ? ' selected="selected"' : '';
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 679
echo " <option value=\"$theme_id\"$selected>$theme_name</option>\n ";
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 680
}
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 681
?>
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 682
</select>
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 683
</td>
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 684
</tr>
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
diff
changeset
+ − 685
473
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 686
<!-- Breadcrumbs -->
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 687
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 688
<tr>
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 689
<td class="row1">
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 690
<?php echo $lang->get('acpgc_field_breadcrumb_mode'); ?>
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 691
</td>
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 692
<td class="row1">
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 693
<select name="breadcrumb_mode">
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 694
<?php
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 695
foreach ( array('subpages', 'always', 'never') as $mode )
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 696
{
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 697
$str = $lang->get("acpgc_field_breadcrumb_mode_$mode");
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 698
$sel = ( getConfig('breadcrumb_mode') == $mode ) ? ' selected="selected"' : '';
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 699
echo " <option value=\"$mode\"$sel>$str</option>\n ";
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 700
}
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 701
?>
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 702
</select>
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 703
</td>
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 704
</tr>
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 705
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 706
<!-- CDN settings -->
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 707
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 708
<tr>
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 709
<td class="row2">
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 710
<p>
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 711
<?php echo $lang->get('acpgc_field_cdn_path'); ?><br />
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 712
<small><?php echo $lang->get('acpgc_field_cdn_path_hint'); ?></small>
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 713
</p>
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 714
<p>
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 715
<small><?php echo $lang->get('acpgc_field_cdn_path_example'); ?></small>
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 716
</p>
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 717
</td>
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 718
<td class="row2">
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 719
<input type="text" name="cdn_path" value="<?php echo htmlspecialchars(getConfig('cdn_path', '')); ?>" style="width: 98%;" />
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 720
</td>
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 721
</tr>
473
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
diff
changeset
+ − 722
828
+ − 723
<!-- Allow plugins to add code -->
+ − 724
<?php
+ − 725
$code = $plugins->setHook('acp_general_basic');
+ − 726
foreach ( $code as $cmd )
+ − 727
{
+ − 728
eval($cmd);
+ − 729
}
+ − 730
?>
+ − 731
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 732
</table>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 733
</div>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 734
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 735
<div class="tblholder">
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 736
<table border="0" width="100%" cellspacing="1" cellpadding="4">
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 737
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 738
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 739
<th colspan="2"><?php echo $lang->get('acpgc_heading_users'); ?></th>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 740
</tr>
0
+ − 741
+ − 742
<!-- Account activation -->
+ − 743
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 744
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_activate'); ?></th></tr>
0
+ − 745
+ − 746
<tr>
+ − 747
<td class="row3" colspan="2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 748
<?php echo $lang->get('acpgc_activate_intro_line1'); ?><br /><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 749
<?php echo $lang->get('acpgc_activate_intro_line2'); ?><br /><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 750
<b><?php echo $lang->get('acpgc_activate_intro_sfnet_warning'); ?></b>
0
+ − 751
</td>
+ − 752
</tr>
+ − 753
+ − 754
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 755
<td class="row1" style="width: 50%;"><?php echo $lang->get('acpgc_field_activate'); ?></td><td class="row1">
0
+ − 756
<?php
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 757
echo '<label><input'; if(getConfig('account_activation') == 'disable') echo ' checked="checked"'; echo ' type="radio" name="account_activation" value="disable" /> ' . $lang->get('acpgc_field_activate_disable') . '</label><br />';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 758
echo '<label><input'; if(getConfig('account_activation') != 'user' && getConfig('account_activation') != 'admin' && getConfig('account_activation') != 'disable') echo ' checked="checked"'; echo ' type="radio" name="account_activation" value="none" /> ' . $lang->get('acpgc_field_activate_none') . '</label>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 759
echo '<label><input'; if(getConfig('account_activation') == 'user') echo ' checked="checked"'; echo ' type="radio" name="account_activation" value="user" /> ' . $lang->get('acpgc_field_activate_user') . '</label>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 760
echo '<label><input'; if(getConfig('account_activation') == 'admin') echo ' checked="checked"'; echo ' type="radio" name="account_activation" value="admin" /> ' . $lang->get('acpgc_field_activate_admin') . '</label>';
0
+ − 761
?>
+ − 762
</td>
+ − 763
</tr>
+ − 764
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 765
<!-- Terms of Use -->
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 766
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 767
<tr>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 768
<th class="subhead" colspan="2">
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 769
<?php echo $lang->get('acpgc_heading_tou'); ?>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 770
</th>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 771
</tr>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 772
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 773
<tr>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 774
<td class="row2">
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 775
<b><?php echo $lang->get('acpgc_field_tou'); ?></b><br />
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 776
<small><?php echo $lang->get('acpgc_field_tou_hint'); ?></small>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 777
</td>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 778
<td class="row2">
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 779
<?php
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 780
$terms = getConfig('register_tou');
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 781
echo $template->tinymce_textarea('register_tou', $terms, 10, 40);
0
+ − 782
?>
+ − 783
</td>
+ − 784
</tr>
+ − 785
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 786
<!-- Account lockout -->
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 787
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 788
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_lockout'); ?></th></tr>
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 789
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 790
<tr><td class="row3" colspan="2"><?php echo $lang->get('acpgc_lockout_intro'); ?></td></tr>
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 791
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 792
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 793
<td class="row2"><?php echo $lang->get('acpgc_field_lockout_threshold'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 794
<small><?php echo $lang->get('acpgc_field_lockout_threshold_hint'); ?></small>
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 795
</td>
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 796
<td class="row2">
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 797
<input type="text" name="lockout_threshold" value="<?php echo ( $_ = getConfig('lockout_threshold') ) ? $_ : '5' ?>" />
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 798
</td>
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 799
</tr>
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 800
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 801
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 802
<td class="row1"><?php echo $lang->get('acpgc_field_lockout_duration'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 803
<small><?php echo $lang->get('acpgc_field_lockout_duration_hint'); ?></small>
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 804
</td>
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 805
<td class="row1">
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 806
<input type="text" name="lockout_duration" value="<?php echo ( $_ = getConfig('lockout_duration') ) ? $_ : '15' ?>" />
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 807
</td>
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 808
</tr>
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 809
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 810
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 811
<td class="row2"><?php echo $lang->get('acpgc_field_lockout_policy'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 812
<small><?php echo $lang->get('acpgc_field_lockout_policy_hint'); ?></small>
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 813
</td>
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 814
<td class="row2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 815
<label><input type="radio" name="lockout_policy" value="disable" <?php if ( getConfig('lockout_policy') == 'disable' ) echo 'checked="checked"'; ?> /> <?php echo $lang->get('acpgc_field_lockout_policy_nothing'); ?></label><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 816
<label><input type="radio" name="lockout_policy" value="captcha" <?php if ( getConfig('lockout_policy') == 'captcha' ) echo 'checked="checked"'; ?> /> <?php echo $lang->get('acpgc_field_lockout_policy_captcha'); ?></label><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 817
<label><input type="radio" name="lockout_policy" value="lockout" <?php if ( getConfig('lockout_policy') == 'lockout' || !getConfig('lockout_policy') ) echo 'checked="checked"'; ?> /> <?php echo $lang->get('acpgc_field_lockout_policy_lockout'); ?></label>
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 818
</td>
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 819
</tr>
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 820
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 821
<!-- Password strength -->
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 822
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 823
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_passstrength'); ?></th></tr>
133
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 824
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 825
<tr>
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 826
<td class="row2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 827
<b><?php echo $lang->get('acpgc_field_passstrength_title'); ?></b><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 828
<small><?php echo $lang->get('acpgc_field_passstrength_hint'); ?></small>
133
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 829
</td>
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 830
<td class="row2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 831
<label><input type="checkbox" name="pw_strength_enable" <?php if ( getConfig('pw_strength_enable') == '1' ) echo 'checked="checked" '; ?>/> <?php echo $lang->get('acpgc_field_passstrength'); ?></label>
133
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 832
</td>
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 833
</tr>
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 834
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 835
<tr>
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 836
<td class="row1">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 837
<b><?php echo $lang->get('acpgc_field_passminimum_title'); ?></b><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 838
<small><?php echo $lang->get('acpgc_field_passminimum_hint'); ?></small>
133
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 839
</td>
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 840
<td class="row1">
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 841
<input type="text" name="pw_strength_minimum" value="<?php echo ( $x = getConfig('pw_strength_minimum') ) ? $x : '-10'; ?>" />
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 842
</td>
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 843
</tr>
af0f6ec48de3
Fully implemented password complexity enforcement; added encryption for passwords on registration form; some baby steps taken towards supporting international usernames - this is not working very well, we might need a hackish fix; TODO: implement password strength meter into installer UI and get international usernames 100% working
Dan
diff
changeset
+ − 844
0
+ − 845
<!-- E-mail options -->
+ − 846
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 847
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 848
<th class="subhead" colspan="2">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 849
<?php echo $lang->get('acpgc_heading_email'); ?>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 850
</th>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 851
</tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 852
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 853
<tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 854
<td class="row1">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 855
<?php echo $lang->get('acpgc_field_email_method'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 856
<small><?php echo $lang->get('acpgc_field_email_method_hint'); ?></small>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 857
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 858
<td class="row1">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 859
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 860
<input <?php if(getConfig('smtp_enabled') != '1') echo 'checked="checked"'; ?> type="radio" name="emailmethod" value="phpmail" />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 861
<?php echo $lang->get('acpgc_field_email_method_builtin'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 862
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 863
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 864
<br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 865
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 866
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 867
<input <?php if(getConfig('smtp_enabled') == '1') echo 'checked="checked"'; ?> type="radio" name="emailmethod" value="smtp" />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 868
<?php echo $lang->get('acpgc_field_email_method_smtp'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 869
</label>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 870
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 871
</tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 872
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 873
<tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 874
<td class="row2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 875
<?php echo $lang->get('acpgc_field_email_smtp_hostname'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 876
<small><?php echo $lang->get('acpgc_field_email_smtp_hostname_hint'); ?></small>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 877
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 878
<td class="row2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 879
<input value="<?php echo getConfig('smtp_server'); ?>" name="smtp_host" type="text" size="30" />
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 880
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 881
</tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 882
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 883
<tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 884
<td class="row1">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 885
<?php echo $lang->get('acpgc_field_email_smtp_auth'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 886
<small><?php echo $lang->get('acpgc_field_email_smtp_hostname_hint'); ?></small>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 887
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 888
<td class="row1">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 889
<?php echo $lang->get('acpgc_field_email_smtp_username'); ?> <input value="<?php echo getConfig('smtp_user'); ?>" name="smtp_user" type="text" size="30" /><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 890
<?php echo $lang->get('acpgc_field_email_smtp_password'); ?> <input value="<?php if(getConfig('smtp_password') != false) echo 'XXXXXXXXXXXX'; ?>" name="smtp_pass" type="password" size="30" />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 891
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 892
</tr>
688
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 893
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 894
<!-- Session length -->
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 895
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 896
<tr>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 897
<th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_sessions'); ?></th>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 898
</tr>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 899
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 900
<tr>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 901
<td class="row3" colspan="2"><?php echo $lang->get('acpgc_hint_sessions_noelev'); ?></td>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 902
</tr>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 903
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 904
<tr>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 905
<td class="row1">
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 906
<?php echo $lang->get('acpgc_field_short_time'); ?><br />
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 907
<small><?php echo $lang->get('acpgc_field_short_time_hint'); ?></small>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 908
</td>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 909
<td class="row1">
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 910
<input type="text" name="session_short_time" value="<?php echo getConfig('session_short_time', '720'); ?>" size="4" />
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 911
</td>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 912
</tr>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 913
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 914
<tr>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 915
<td class="row2">
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 916
<?php echo $lang->get('acpgc_field_long_time'); ?><br />
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 917
<small><?php echo $lang->get('acpgc_field_long_time_hint'); ?></small>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 918
</td>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 919
<td class="row2">
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 920
<input type="text" name="session_remember_time" value="<?php echo getConfig('session_remember_time', '30'); ?>" size="4" />
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 921
</td>
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 922
</tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 923
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 924
<!-- Avatar support -->
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 925
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 926
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 927
<th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_avatars'); ?></th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 928
</tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 929
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 930
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 931
<td class="row3" colspan="2">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 932
<?php echo $lang->get('acpgc_avatars_intro'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 933
</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 934
</tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 935
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 936
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 937
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 938
<?php echo $lang->get('acpgc_field_avatar_enable'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 939
<small><?php echo $lang->get('acpgc_field_avatar_enable_hint'); ?></small>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 940
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 941
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 942
<label><input type="checkbox" name="avatar_enable" <?php if ( getConfig('avatar_enable') == '1' ) echo 'checked="checked" '; ?>/> <?php echo $lang->get('acpgc_field_avatar_enable_label'); ?></label>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 943
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 944
</tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 945
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 946
<tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 947
<td class="row2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 948
<?php echo $lang->get('acpgc_field_avatar_max_filesize'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 949
<small><?php echo $lang->get('acpgc_field_avatar_max_filesize_hint'); ?></small>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 950
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 951
<td class="row2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 952
<input type="text" name="avatar_max_size" size="7" <?php if ( ($x = getConfig('avatar_max_size')) !== false ) echo "value=\"$x\" "; else echo "value=\"10240\" "; ?>/> <?php echo $lang->get('etc_unit_bytes'); ?>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 953
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 954
</tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 955
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 956
<tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 957
<td class="row1">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 958
<?php echo $lang->get('acpgc_field_avatar_max_dimensions'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 959
<small><?php echo $lang->get('acpgc_field_avatar_max_dimensions_hint'); ?></small>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 960
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 961
<td class="row1">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 962
<input type="text" name="avatar_max_width" size="7" <?php if ( $x = getConfig('avatar_max_width') ) echo "value=\"$x\" "; else echo "value=\"150\" "; ?>/> ×
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 963
<input type="text" name="avatar_max_height" size="7" <?php if ( $x = getConfig('avatar_max_height') ) echo "value=\"$x\" "; else echo "value=\"150\" "; ?>/> <?php echo $lang->get('etc_unit_pixels'); ?>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 964
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 965
</tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 966
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 967
<tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 968
<td class="row2">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 969
<?php echo $lang->get('acpgc_field_avatar_allow_anim_title'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 970
<small><?php echo $lang->get('acpgc_field_avatar_allow_anim_hint'); ?></small>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 971
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 972
<td class="row2">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 973
<label><input type="checkbox" name="avatar_enable_anim" <?php if ( getConfig('avatar_enable_anim') == '1' ) echo 'checked="checked" '; ?>/> <?php echo $lang->get('acpgc_field_avatar_allow_anim'); ?></label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 974
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 975
</tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 976
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 977
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 978
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 979
<?php echo $lang->get('acpgc_field_avatar_upload_methods'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 980
<small></small>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 981
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 982
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 983
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 984
<input type="checkbox" name="avatar_upload_file" <?php if ( getConfig('avatar_upload_file') == '1' || getConfig('avatar_upload_file') === false ) echo 'checked="checked" '; ?>/>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 985
<?php echo $lang->get('acpgc_field_avatar_upload_file'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 986
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 987
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 988
<br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 989
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 990
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 991
<input type="checkbox" name="avatar_upload_http" <?php if ( getConfig('avatar_upload_http') == '1' || getConfig('avatar_upload_http') === false ) echo 'checked="checked" '; ?>/>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 992
<?php echo $lang->get('acpgc_field_avatar_upload_http'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 993
</label>
621
+ − 994
+ − 995
<br />
+ − 996
+ − 997
<label>
+ − 998
<input type="checkbox" name="avatar_upload_gravatar" <?php if ( getConfig('avatar_upload_gravatar') == '1' || getConfig('avatar_upload_gravatar') === false ) echo 'checked="checked" '; ?>onclick="document.getElementById('acp_gravatar_rating').style.display = ( this.checked ) ? 'block' : 'none';" />
+ − 999
<?php echo $lang->get('acpgc_field_avatar_upload_gravatar'); ?>
+ − 1000
</label>
+ − 1001
+ − 1002
<br />
+ − 1003
+ − 1004
<fieldset id="acp_gravatar_rating" style="margin-top: 10px; <?php if ( getConfig('avatar_upload_gravatar') === '0' ) echo ' display: none;'; ?>">
+ − 1005
+ − 1006
<?php /* The four ratings are g, pg, r, and x - loop through each and output a localized string and a radiobutton */ ?>
+ − 1007
<legend><?php echo $lang->get('acpgc_field_avatar_gravatar_rating'); ?></legend>
+ − 1008
+ − 1009
<?php foreach ( array('g', 'pg', 'r', 'x') as $rating ): ?>
+ − 1010
+ − 1011
<label>
+ − 1012
+ − 1013
<input type="radio" name="gravatar_rating" value="<?php echo $rating; ?>"<?php
+ − 1014
// Check the button if this is the current selection *or* if we're on "G" and the current configuration value is unset
+ − 1015
if ( getConfig('gravatar_rating', 'g') == $rating )
+ − 1016
echo ' checked="checked"';
+ − 1017
?> />
+ − 1018
+ − 1019
<?php /* The localized string */ ?>
+ − 1020
<?php echo $lang->get("acpgc_field_avatar_gravatar_rating_$rating"); ?>
+ − 1021
+ − 1022
</label>
+ − 1023
+ − 1024
<br />
+ − 1025
+ − 1026
<?php endforeach; ?>
+ − 1027
</fieldset>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1028
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1029
</tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1030
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1031
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1032
<td class="row2">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1033
<?php echo $lang->get('acpgc_field_avatar_directory'); ?><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1034
<small><?php echo $lang->get('acpgc_field_avatar_directory_hint'); ?></small>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1035
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1036
<td class="row2">
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1037
<input type="text" name="avatar_directory" size="30" <?php if ( $x = getConfig('avatar_directory') ) echo "value=\"$x\" "; else echo "value=\"files/avatars\" "; ?>/>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1038
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1039
</tr>
731
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1040
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1041
<!-- Misc. options -->
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1042
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1043
<tr>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1044
<th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_usermisc'); ?></th>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1045
</tr>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1046
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1047
<tr>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1048
<td class="row1">
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1049
<b><?php echo $lang->get('acpgc_field_userpage_acl_title'); ?></b><br />
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1050
<small>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1051
<?php echo $lang->get('acpgc_field_userpage_acl_hint'); ?>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1052
</small>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1053
</td>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1054
<td class="row1">
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1055
<label>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1056
<input type="checkbox" name="userpage_grant_acl" <?php if ( getConfig('userpage_grant_acl', '1') == '1' ) echo 'checked="checked" '; ?>/>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1057
<?php echo $lang->get('acpgc_field_userpage_acl'); ?>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1058
</label>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1059
</td>
8e6dbf6882c2
Added config option to grant userpage rights to new users (defaults to on, as it was hardcoded on before)
Dan
diff
changeset
+ − 1060
</tr>
828
+ − 1061
+ − 1062
<!-- Allow plugins to add code -->
+ − 1063
<?php
+ − 1064
$code = $plugins->setHook('acp_general_users');
+ − 1065
foreach ( $code as $cmd )
+ − 1066
{
+ − 1067
eval($cmd);
+ − 1068
}
+ − 1069
?>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1070
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1071
</table>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1072
</div>
828
+ − 1073
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1074
<div class="tblholder">
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1075
<table border="0" width="100%" cellspacing="1" cellpadding="4">
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1076
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1077
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1078
<th colspan="2"><?php echo $lang->get('acpgc_heading_sidebar'); ?></th>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1079
</tr>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1080
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1081
<!-- enanocms.org link -->
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1082
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1083
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1084
<th colspan="2" class="subhead"><?php echo $lang->get('acpgc_heading_promoteenano'); ?></th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1085
</tr>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1086
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1087
<td class="row3" style="width: 50%;">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1088
<?php echo $lang->get('acpgc_field_enano_link_title'); ?>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1089
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1090
<td class="row1">
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1091
<label>
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 1092
<input name="enano_powered_link" type="checkbox" <?php if(getConfig('powered_btn', '1') == '1') echo 'checked="checked"'; ?> /> <?php echo $lang->get('acpgc_field_enano_link'); ?>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1093
</label>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1094
</td>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1095
</tr>
0
+ − 1096
+ − 1097
<!-- SourceForge.net logo -->
+ − 1098
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1099
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_sfnet_logo'); ?></th></tr>
0
+ − 1100
+ − 1101
<tr>
+ − 1102
<td colspan="2" class="row3">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1103
<?php echo $lang->get('acpgc_sfnet_intro'); ?>
0
+ − 1104
</td>
+ − 1105
</tr>
+ − 1106
+ − 1107
<?php
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1108
if ( getConfig("sflogo_enabled") == '1' )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1109
$c='checked="checked" ';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1110
else
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1111
$c='';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1112
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1113
if ( getConfig("sflogo_groupid") )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1114
$g = getConfig("sflogo_groupid");
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1115
else
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1116
$g = '';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1117
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1118
if ( getConfig("sflogo_type") )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1119
$t = getConfig("sflogo_type");
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1120
else
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1121
$t = '1';
0
+ − 1122
?>
+ − 1123
+ − 1124
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1125
<td class="row1"><?php echo $lang->get('acpgc_field_sfnet_display'); ?></td>
0
+ − 1126
<td class="row1"><input type=checkbox name="showsf" id="showsf" <?php echo $c; ?> /></td>
+ − 1127
</tr>
+ − 1128
+ − 1129
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1130
<td class="row2"><?php echo $lang->get('acpgc_field_sfnet_group_id'); ?></td>
0
+ − 1131
<td class="row2"><input value="<?php echo $g; ?>" type=text size=15 name=sfgroup /></td>
+ − 1132
</tr>
+ − 1133
+ − 1134
<tr>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1135
<td class="row1"><?php echo $lang->get('acpgc_field_sfnet_logo_style'); ?></td>
0
+ − 1136
<td class="row1">
+ − 1137
<select name="sflogo">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1138
<option <?php if($t=='1') echo('selected="selected" '); ?>value=1><?php echo $lang->get('acpgc_field_sfnet_logo_style_1'); ?></option>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1139
<option <?php if($t=='2') echo('selected="selected" '); ?>value=2><?php echo $lang->get('acpgc_field_sfnet_logo_style_2'); ?></option>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1140
<option <?php if($t=='3') echo('selected="selected" '); ?>value=3><?php echo $lang->get('acpgc_field_sfnet_logo_style_3'); ?></option>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1141
<option <?php if($t=='4') echo('selected="selected" '); ?>value=4><?php echo $lang->get('acpgc_field_sfnet_logo_style_4'); ?></option>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1142
<option <?php if($t=='5') echo('selected="selected" '); ?>value=5><?php echo $lang->get('acpgc_field_sfnet_logo_style_5'); ?></option>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1143
<option <?php if($t=='6') echo('selected="selected" '); ?>value=6><?php echo $lang->get('acpgc_field_sfnet_logo_style_6'); ?></option>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1144
<option <?php if($t=='7') echo('selected="selected" '); ?>value=7><?php echo $lang->get('acpgc_field_sfnet_logo_style_7'); ?></option>
0
+ − 1145
</select>
+ − 1146
</td>
+ − 1147
</tr>
+ − 1148
+ − 1149
<!-- W3C validator buttons -->
+ − 1150
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1151
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_w3clogos'); ?></th></tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1152
<tr><td colspan="2" class="row3"><?php echo $lang->get('acpgc_w3clogos_intro'); ?></th></tr>
0
+ − 1153
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1154
<tr><td class="row1"><label for="w3c-vh32"><?php echo $lang->get('acpgc_w3clogos_btn_html32'); ?></label></td><td class="row1"><input type="checkbox" <?php if(getConfig('w3c_vh32')=='1') echo('checked="checked" '); ?> id="w3c-vh32" name="w3c-vh32" /></td></tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1155
<tr><td class="row2"><label for="w3c-vh40"><?php echo $lang->get('acpgc_w3clogos_btn_html40'); ?></label></td><td class="row2"><input type="checkbox" <?php if(getConfig('w3c_vh40')=='1') echo('checked="checked" '); ?> id="w3c-vh40" name="w3c-vh40" /></td></tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1156
<tr><td class="row1"><label for="w3c-vh401"><?php echo $lang->get('acpgc_w3clogos_btn_html401'); ?></label></td><td class="row1"><input type="checkbox" <?php if(getConfig('w3c_vh401')=='1') echo('checked="checked" '); ?> id="w3c-vh401" name="w3c-vh401" /></td></tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1157
<tr><td class="row2"><label for="w3c-vxhtml10"><?php echo $lang->get('acpgc_w3clogos_btn_xhtml10'); ?></label></td><td class="row2"><input type="checkbox" <?php if(getConfig('w3c_vxhtml10')=='1') echo('checked="checked" '); ?> id="w3c-vxhtml10" name="w3c-vxhtml10" /></td></tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1158
<tr><td class="row1"><label for="w3c-vxhtml11"><?php echo $lang->get('acpgc_w3clogos_btn_xhtml11'); ?></label></td><td class="row1"><input type="checkbox" <?php if(getConfig('w3c_vxhtml11')=='1') echo('checked="checked" '); ?> id="w3c-vxhtml11" name="w3c-vxhtml11" /></td></tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1159
<tr><td class="row2"><label for="w3c-vcss"><?php echo $lang->get('acpgc_w3clogos_btn_css'); ?></label></td><td class="row2"><input type="checkbox" <?php if(getConfig('w3c_vcss')=='1') echo('checked="checked" '); ?> id="w3c-vcss" name="w3c-vcss" /></td></tr>
0
+ − 1160
+ − 1161
<!-- DefectiveByDesign.org ad -->
+ − 1162
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1163
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1164
<th class="subhead" colspan="2">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1165
<?php echo $lang->get('acpgc_heading_dbd'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1166
</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1167
</tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1168
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1169
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1170
<td colspan="2" class="row3">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1171
<b><?php echo $lang->get('acpgc_dbd_intro'); ?></b>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1172
<?php echo $lang->get('acpgc_dbd_explain'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1173
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1174
</tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1175
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1176
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1177
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1178
<label for="dbdbutton">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1179
<?php echo $lang->get('acpgc_field_stopdrm'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1180
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1181
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1182
<td class="row1">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1183
<input type="checkbox" name="dbdbutton" id="dbdbutton" <?php if(getConfig('dbd_button')=='1') echo('checked="checked" '); ?>/>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1184
</td>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1185
</tr>
0
+ − 1186
828
+ − 1187
<!-- Allow plugins to add code -->
+ − 1188
<?php
+ − 1189
$code = $plugins->setHook('acp_general_sidebar');
+ − 1190
foreach ( $code as $cmd )
+ − 1191
{
+ − 1192
eval($cmd);
+ − 1193
}
+ − 1194
?>
+ − 1195
0
+ − 1196
<!-- Save button -->
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1197
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1198
</table>
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1199
</div>
828
+ − 1200
+ − 1201
<!-- Allow plugins to add code -->
+ − 1202
<?php
+ − 1203
$code = $plugins->setHook('acp_general_tail');
+ − 1204
foreach ( $code as $cmd )
+ − 1205
{
+ − 1206
eval($cmd);
+ − 1207
}
+ − 1208
?>
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1209
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1210
<div class="tblholder">
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 1211
<table border="0" width="100%" cellspacing="1" cellpadding="4">
0
+ − 1212
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1213
<tr><th colspan="2"><input type="submit" name="submit" value="<?php echo $lang->get('acpgc_btn_save_changes'); ?>" /></th></tr>
0
+ − 1214
+ − 1215
</table>
+ − 1216
</div>
+ − 1217
</form>
+ − 1218
<?php
+ − 1219
}
+ − 1220
+ − 1221
function page_Admin_UploadConfig()
+ − 1222
{
+ − 1223
global $db, $session, $paths, $template, $plugins; // Common objects
216
+ − 1224
global $lang;
0
+ − 1225
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 1226
{
216
+ − 1227
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
217
+ − 1228
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
+ − 1229
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
0
+ − 1230
return;
+ − 1231
}
+ − 1232
+ − 1233
if(isset($_POST['save']))
+ − 1234
{
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1235
if(isset($_POST['enable_uploads']) && getConfig('enable_uploads') != '1')
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1236
{
320
112debff64bd
SURPRISE! Preliminary PostgreSQL support added. The required schema file is not present in this commit and will be included at a later date. No installer support is implemented. Also in this commit: several fixes including <!-- SYSMSG ... --> was broken in template compiler; set fixed width on included images to prevent the thumbnail box from getting huge; added a much more friendly interface to AJAX responses that are invalid JSON
Dan
diff
changeset
+ − 1237
$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author) VALUES(\'security\',\'upload_enable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\');');
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1238
if ( !$q )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1239
$db->_die();
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1240
setConfig('enable_uploads', '1');
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1241
}
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1242
else if ( !isset($_POST['enable_uploads']) && getConfig('enable_uploads') == '1' )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1243
{
320
112debff64bd
SURPRISE! Preliminary PostgreSQL support added. The required schema file is not present in this commit and will be included at a later date. No installer support is implemented. Also in this commit: several fixes including <!-- SYSMSG ... --> was broken in template compiler; set fixed width on included images to prevent the thumbnail box from getting huge; added a much more friendly interface to AJAX responses that are invalid JSON
Dan
diff
changeset
+ − 1244
$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author) VALUES(\'security\',\'upload_disable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\');');
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1245
if ( !$q )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1246
$db->_die();
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1247
setConfig('enable_uploads', '0');
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1248
}
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1249
if(isset($_POST['enable_imagemagick']) && getConfig('enable_imagemagick') != '1')
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1250
{
320
112debff64bd
SURPRISE! Preliminary PostgreSQL support added. The required schema file is not present in this commit and will be included at a later date. No installer support is implemented. Also in this commit: several fixes including <!-- SYSMSG ... --> was broken in template compiler; set fixed width on included images to prevent the thumbnail box from getting huge; added a much more friendly interface to AJAX responses that are invalid JSON
Dan
diff
changeset
+ − 1251
$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author) VALUES(\'security\',\'magick_enable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\');');
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1252
if ( !$q )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1253
$db->_die();
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1254
setConfig('enable_imagemagick', '1');
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1255
}
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1256
else if ( !isset($_POST['enable_imagemagick']) && getConfig('enable_imagemagick') == '1' )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1257
{
320
112debff64bd
SURPRISE! Preliminary PostgreSQL support added. The required schema file is not present in this commit and will be included at a later date. No installer support is implemented. Also in this commit: several fixes including <!-- SYSMSG ... --> was broken in template compiler; set fixed width on included images to prevent the thumbnail box from getting huge; added a much more friendly interface to AJAX responses that are invalid JSON
Dan
diff
changeset
+ − 1258
$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author) VALUES(\'security\',\'magick_disable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\');');
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1259
if ( !$q )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1260
$db->_die();
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1261
setConfig('enable_imagemagick', '0');
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1262
}
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1263
if(isset($_POST['cache_thumbs']))
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1264
{
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1265
setConfig('cache_thumbs', '1');
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1266
}
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1267
else
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1268
{
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1269
setConfig('cache_thumbs', '0');
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1270
}
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1271
if(isset($_POST['file_history']) && getConfig('file_history') != '1' )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1272
{
320
112debff64bd
SURPRISE! Preliminary PostgreSQL support added. The required schema file is not present in this commit and will be included at a later date. No installer support is implemented. Also in this commit: several fixes including <!-- SYSMSG ... --> was broken in template compiler; set fixed width on included images to prevent the thumbnail box from getting huge; added a much more friendly interface to AJAX responses that are invalid JSON
Dan
diff
changeset
+ − 1273
$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author) VALUES(\'security\',\'filehist_enable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\');');
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1274
if ( !$q )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1275
$db->_die();
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1276
setConfig('file_history', '1');
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1277
}
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1278
else if ( !isset($_POST['file_history']) && getConfig('file_history') == '1' )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1279
{
320
112debff64bd
SURPRISE! Preliminary PostgreSQL support added. The required schema file is not present in this commit and will be included at a later date. No installer support is implemented. Also in this commit: several fixes including <!-- SYSMSG ... --> was broken in template compiler; set fixed width on included images to prevent the thumbnail box from getting huge; added a much more friendly interface to AJAX responses that are invalid JSON
Dan
diff
changeset
+ − 1280
$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author) VALUES(\'security\',\'filehist_disable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\');');
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1281
if ( !$q )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1282
$db->_die();
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1283
setConfig('file_history', '0');
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1284
}
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1285
if(file_exists($_POST['imagemagick_path']) && $_POST['imagemagick_path'] != getConfig('imagemagick_path'))
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1286
{
430
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
diff
changeset
+ − 1287
if ( defined('ENANO_DEMO_MODE') )
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
diff
changeset
+ − 1288
// Hackish but safe.
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
diff
changeset
+ − 1289
$_POST['imagemagick_path'] = '/usr/bin/convert';
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1290
$old = getConfig('imagemagick_path');
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1291
$oldnew = "{$old}||{$_POST['imagemagick_path']}";
320
112debff64bd
SURPRISE! Preliminary PostgreSQL support added. The required schema file is not present in this commit and will be included at a later date. No installer support is implemented. Also in this commit: several fixes including <!-- SYSMSG ... --> was broken in template compiler; set fixed width on included images to prevent the thumbnail box from getting huge; added a much more friendly interface to AJAX responses that are invalid JSON
Dan
diff
changeset
+ − 1292
$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author,page_text) VALUES(\'security\',\'magick_path\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\',\'' . $db->escape($oldnew) . '\');');
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1293
if ( !$q )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1294
$db->_die();
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1295
setConfig('imagemagick_path', $_POST['imagemagick_path']);
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1296
}
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1297
else if ( $_POST['imagemagick_path'] != getConfig('imagemagick_path') )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1298
{
391
85f91037cd4f
Localization is FINISHED, DAMN IT HELLAH YEAH! OVER WITH! Man, it feels to get that off my chest. Release is in under 48 hours, folks. And we're ready for it.
Dan
diff
changeset
+ − 1299
echo '<span style="color: red">' . $lang->get('acpup_err_magick_not_found', array('magick_path' => htmlspecialchars($_POST['imagemagick_path']))) . '</span>';
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1300
}
0
+ − 1301
$max_upload = floor((float)$_POST['max_file_size'] * (int)$_POST['fs_units']);
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1302
if ( $max_upload > 1048576 && defined('ENANO_DEMO_MODE') )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1303
{
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1304
echo '<div class="error-box">Wouldn\'t want the server DoS\'ed now. Stick to under a megabyte for the demo, please.</div>';
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1305
}
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1306
else
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1307
{
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1308
setConfig('max_file_size', $max_upload.'');
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1309
}
0
+ − 1310
}
376
+ − 1311
acp_start_form();
0
+ − 1312
?>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1313
<h3><?php echo $lang->get('acpup_heading_main'); ?></h3>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1314
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1315
<p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1316
<?php echo $lang->get('acpup_intro'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1317
</p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1318
<p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1319
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1320
<input type="checkbox" name="enable_uploads" <?php if(getConfig('enable_uploads')=='1') echo 'checked="checked"'; ?> />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1321
<b><?php echo $lang->get('acpup_field_enable'); ?></b>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1322
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1323
</p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1324
<p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1325
<?php echo $lang->get('acpup_field_max_size'); ?>
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
diff
changeset
+ − 1326
<input name="max_file_size" onkeyup="if(!this.value.match(/^([0-9\.]+)$/ig)) this.value = this.value.substr(0,this.value.length-1);" value="<?php echo getConfig('max_file_size', '256000'); ?>" />
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1327
<select name="fs_units">
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1328
<option value="1" selected="selected"><?php echo $lang->get('etc_unit_bytes'); ?></option>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1329
<option value="1024"><?php echo $lang->get('etc_unit_kilobytes_short'); ?></option>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1330
<option value="1048576"><?php echo $lang->get('etc_unit_megabytes_short'); ?></option>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1331
</select>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1332
</p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1333
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1334
<p><?php echo $lang->get('acpup_info_magick'); ?></p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1335
<p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1336
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1337
<input type="checkbox" name="enable_imagemagick" <?php if(getConfig('enable_imagemagick')=='1') echo 'checked="checked"'; ?> />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1338
<?php echo $lang->get('acpup_field_magick_enable'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1339
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1340
<br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1341
<?php echo $lang->get('acpup_field_magick_path'); ?> <input type="text" name="imagemagick_path" value="<?php if(getConfig('imagemagick_path')) echo getConfig('imagemagick_path'); else echo '/usr/bin/convert'; ?>" /><br />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1342
<?php echo $lang->get('acpup_field_magick_path_hint'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1343
</p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1344
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1345
<p><?php echo $lang->get('acpup_info_cache'); ?></p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1346
<p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1347
<?php echo $lang->get('acpup_info_cache_chmod'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1348
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1349
<?php
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1350
if(!is_writable(ENANO_ROOT.'/cache/'))
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1351
echo $lang->get('acpup_msg_cache_not_writable');
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1352
?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1353
</p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1354
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1355
<p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1356
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1357
<input type="checkbox" name="cache_thumbs" <?php if(getConfig('cache_thumbs')=='1' && is_writable(ENANO_ROOT.'/cache/')) echo 'checked="checked"'; else if ( ! is_writable(ENANO_ROOT . '/cache/') ) echo 'readonly="readonly"'; ?> />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1358
<?php echo $lang->get('acpup_field_cache'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1359
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1360
</p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1361
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1362
<p><?php echo $lang->get('acpup_info_history'); ?></p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1363
<p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1364
<label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1365
<input type="checkbox" name="file_history" <?php if(getConfig('file_history')=='1') echo 'checked="checked"'; ?> />
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1366
<?php echo $lang->get('acpup_field_history'); ?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1367
</label>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1368
</p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1369
0
+ − 1370
<hr style="margin-left: 1em;" />
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1371
<p><input type="submit" name="save" value="<?php echo $lang->get('acpup_btn_save'); ?>" style="font-weight: bold;" /></p>
0
+ − 1372
<?php
+ − 1373
echo '</form>';
+ − 1374
}
+ − 1375
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1376
function page_Admin_UploadAllowedMimeTypes()
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1377
{
0
+ − 1378
global $db, $session, $paths, $template, $plugins; // Common objects
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1379
global $lang;
0
+ − 1380
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 1381
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1382
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1383
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1384
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1385
return;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1386
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1387
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1388
global $mime_types, $mimetype_exps, $mimetype_extlist;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1389
if(isset($_POST['save']) && !defined('ENANO_DEMO_MODE'))
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1390
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1391
$bits = '';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1392
$keys = array_keys($mime_types);
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1393
foreach($keys as $i => $k)
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1394
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1395
if(isset($_POST['ext_'.$k])) $bits .= '1';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1396
else $bits .= '0';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1397
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1398
$bits = compress_bitfield($bits);
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1399
setConfig('allowed_mime_types', $bits);
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1400
echo '<div class="info-box">' . $lang->get('acpft_msg_saved') . '</div>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1401
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1402
else if ( isset($_POST['save']) && defined('ENANO_DEMO_MODE') )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1403
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1404
echo '<div class="error-box">' . $lang->get('acpft_msg_demo_mode') . '</div>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1405
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1406
$allowed = fetch_allowed_extensions();
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1407
?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1408
<h3><?php echo $lang->get('acpft_heading_main'); ?></h3>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1409
<p><?php echo $lang->get('acpft_hint'); ?></p>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1410
<?php
376
+ − 1411
acp_start_form();
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1412
$c = -1;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1413
$t = -1;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1414
$cl = 'row1';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1415
echo "\n".' <div class="tblholder">'."\n".' <table cellspacing="1" cellpadding="2" style="margin: 0; padding: 0;" border="0">'."\n".' <tr>'."\n ";
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1416
ksort($mime_types);
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1417
foreach($mime_types as $e => $m)
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1418
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1419
$c++;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1420
$t++;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1421
if($c == 3)
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1422
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1423
$c = 0;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1424
$cl = ( $cl == 'row1' ) ? 'row2' : 'row1';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1425
echo '</tr>'."\n".' <tr>'."\n ";
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1426
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1427
$seed = "extchkbx_{$e}_".md5(microtime() . mt_rand());
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1428
$chk = (!empty($allowed[$e])) ? ' checked="checked"' : '';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1429
echo " <td class='$cl'>\n <label><input id='{$seed}' type='checkbox' name='ext_{$e}'{$chk} />.{$e}\n ({$m})</label>\n </td>\n ";
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1430
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1431
while($c < 2)
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1432
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1433
$c++;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1434
echo " <td class='{$cl}'></td>\n ";
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1435
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1436
echo '<tr><th class="subhead" colspan="3"><input type="submit" name="save" value="' . $lang->get('etc_save_changes') . '" /></th></tr>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1437
echo '</tr>'."\n".' </table>'."\n".' </div>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1438
echo '</form>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1439
?>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1440
<?php
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1441
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1442
519
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 1443
/*
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1444
function page_Admin_PluginManager()
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1445
{
0
+ − 1446
global $db, $session, $paths, $template, $plugins; // Common objects
216
+ − 1447
global $lang;
0
+ − 1448
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 1449
{
216
+ − 1450
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
217
+ − 1451
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
+ − 1452
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
0
+ − 1453
return;
+ − 1454
}
+ − 1455
9
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1456
if(isset($_GET['action']))
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1457
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1458
if ( !isset($_GET['plugin']) )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1459
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1460
echo '<div class="error-box">No plugin specified.</div>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1461
}
387
92664d2efab8
Rebranded source code as 1.1.1; added TinyMCE ACL rule as per Vadi's request: http://forum.enanocms.org/viewtopic.php?f=7&t=54
Dan
diff
changeset
+ − 1462
else if ( !preg_match('/^[A-z0-9_\.-]+\.php$/', $_GET['plugin']) )
9
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1463
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1464
echo '<div class="error-box">Hacking attempt</div>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1465
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1466
else
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1467
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1468
$plugin =& $_GET['plugin'];
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1469
switch($_GET['action'])
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1470
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1471
case "enable":
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1472
$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author,page_text) VALUES(\'security\',\'plugin_enable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',"' . $db->escape($session->username) . '","' . $db->escape($_GET['plugin']) . '");');
109
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1473
if ( !$q )
93ef7df77847
Added a ton of new log points for administrator actions; restructured security log view and enabled pagination for security logs; string change in ajax.php for RDNS operation failure
Dan
diff
changeset
+ − 1474
$db->_die();
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1475
setConfig("plugin_$plugin", '1');
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1476
break;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1477
case "disable":
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1478
if ( defined('ENANO_DEMO_MODE') && strstr($_GET['plugin'], 'Demo') )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1479
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1480
echo('<h3>' . $lang->get('acppl_err_heading') . '</h3>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1481
<p>' . $lang->get('acppl_err_demo_plugin') . '</p>');
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1482
break;
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1483
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1484
if ( !in_array($plugin, $plugins->system_plugins) )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1485
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1486
$q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author,page_text) VALUES(\'security\',\'plugin_disable\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',"' . $db->escape($session->username) . '","' . $db->escape($_GET['plugin']) . '");');
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1487
if ( !$q )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1488
$db->_die();
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1489
setConfig("plugin_$plugin", '0');
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1490
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1491
else
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1492
{
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1493
echo '<h3>' . $lang->get('acppl_err_heading') . '</h3>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1494
<p>' . $lang->get('acppl_err_system_plugin') . '</p>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1495
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1496
break;
504
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1497
case "reimport":
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1498
$plugin_id = substr($plugin, 0, -4);
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1499
if ( isset($plugins->loaded_plugins[$plugin_id]) )
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1500
{
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1501
// plugin file is safe, call import
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1502
$lang->import_plugin( ENANO_ROOT . "/plugins/$plugin" );
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1503
echo '<div class="info-box">' . $lang->get('acppl_msg_reimport_success') . '</div>';
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1504
}
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1505
break;
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1506
}
0
+ − 1507
}
+ − 1508
}
+ − 1509
$dir = './plugins/';
+ − 1510
$plugin_list = Array();
+ − 1511
$system = Array();
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1512
$show_system = ( isset($_GET['show_system']) && $_GET['show_system'] == 'yes' );
9
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1513
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1514
if (is_dir($dir))
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1515
{
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1516
if ($dh = opendir($dir))
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1517
{
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1518
while (($file = readdir($dh)) !== false)
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1519
{
0
+ − 1520
if(preg_match('#^(.*?)\.php$#is', $file) && $file != 'index.php')
+ − 1521
{
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1522
unset($thelist);
0
+ − 1523
if ( in_array($file, $plugins->system_plugins) )
+ − 1524
{
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1525
if ( !$show_system )
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1526
continue;
0
+ − 1527
$thelist =& $system;
+ − 1528
}
+ − 1529
else
+ − 1530
{
+ − 1531
$thelist =& $plugin_list;
+ − 1532
}
+ − 1533
$f = file_get_contents($dir . $file);
+ − 1534
$f = explode("\n", $f);
+ − 1535
$f = array_slice($f, 2, 7);
+ − 1536
$f[0] = substr($f[0], 13, strlen($f[0]));
+ − 1537
$f[1] = substr($f[1], 12, strlen($f[1]));
+ − 1538
$f[2] = substr($f[2], 13, strlen($f[2]));
+ − 1539
$f[3] = substr($f[3], 8, strlen($f[3]));
+ − 1540
$f[4] = substr($f[4], 9, strlen($f[4]));
+ − 1541
$f[5] = substr($f[5], 12, strlen($f[5]));
+ − 1542
$thelist[$file] = Array();
+ − 1543
$thelist[$file]['name'] = $f[0];
+ − 1544
$thelist[$file]['uri'] = $f[1];
+ − 1545
$thelist[$file]['desc'] = $f[2];
+ − 1546
$thelist[$file]['auth'] = $f[3];
+ − 1547
$thelist[$file]['vers'] = $f[4];
+ − 1548
$thelist[$file]['aweb'] = $f[5];
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1549
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1550
if ( preg_match('/^[a-z0-9]+_[a-z0-9_]+$/', $thelist[$file]['name']) )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1551
$thelist[$file]['name'] = $lang->get($thelist[$file]['name']);
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1552
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1553
if ( preg_match('/^[a-z0-9]+_[a-z0-9_]+$/', $thelist[$file]['desc']) )
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1554
$thelist[$file]['desc'] = $lang->get($thelist[$file]['desc']);
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1555
0
+ − 1556
}
+ − 1557
}
+ − 1558
closedir($dh);
+ − 1559
}
9
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1560
else
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1561
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1562
echo '<div class="error-box">' . $lang->get('acppl_err_open_dir') . '</div>';
9
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1563
return;
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1564
}
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1565
}
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1566
else
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1567
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1568
echo '<div class="error-box">' . $lang->get('acppl_err_missing_dir') . '</div>';
9
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
diff
changeset
+ − 1569
return;
0
+ − 1570
}
+ − 1571
echo('<div class="tblholder"><table border="0" width="100%" cellspacing="1" cellpadding="4">
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1572
<tr>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1573
<th>' . $lang->get('acppl_col_filename') . '</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1574
<th>' . $lang->get('acppl_col_name') . '</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1575
<th>' . $lang->get('acppl_col_description') . '</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1576
<th>' . $lang->get('acppl_col_author') . '</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1577
<th>' . $lang->get('acppl_col_version') . '</th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1578
<th></th>
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1579
</tr>');
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1580
$plugin_files_1 = array_keys($plugin_list);
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1581
$plugin_files_2 = array_keys($system);
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1582
$plugin_files = array_values(array_merge($plugin_files_1, $plugin_files_2));
0
+ − 1583
$cls = 'row2';
+ − 1584
for ( $i = 0; $i < sizeof($plugin_files); $i++ )
+ − 1585
{
+ − 1586
$cls = ( $cls == 'row2' ) ? 'row3' : 'row2';
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1587
$this_plugin = ( isset($system[$plugin_files[$i]]) ) ? $system[$plugin_files[$i]] : $plugin_list[$plugin_files[$i]];
380
73444271fd1c
Updated acledit and comment templates on themes, as they weren't in sync with Oxygen; fixed some undefined index errors in SpecialAdmin and paths
Dan
diff
changeset
+ − 1588
$is_system = ( @$system[$plugin_files[$i]] );
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1589
$bgcolor = '';
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1590
if ( $is_system && $cls == 'row2' )
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1591
$bgcolor = ' style="background-color: #FFD8D8;"';
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1592
else if ( $is_system && $cls == 'row3' )
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1593
$bgcolor = ' style="background-color: #FFD0D0;"';
0
+ − 1594
echo '<tr>
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1595
<td class="'.$cls.'"'.$bgcolor.'>'.$plugin_files[$i].'</td>
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1596
<td class="'.$cls.'"'.$bgcolor.'><a href="'.$this_plugin['uri'].'">'.$this_plugin['name'].'</a></td>
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1597
<td class="'.$cls.'"'.$bgcolor.'>'.$this_plugin['desc'].'</td>
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1598
<td class="'.$cls.'"'.$bgcolor.'><a href="'.$this_plugin['aweb'].'">'.$this_plugin['auth'].'</a></td>
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1599
<td class="'.$cls.'"'.$bgcolor.'>'.$this_plugin['vers'].'</td>
504
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1600
<td class="'.$cls.'"'.( $bgcolor != '' ? str_replace_once(';', '; text-align: center;', $bgcolor) : ' style="text-align: center;"' ).' nowrap="nowrap">';
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1601
if ( !in_array($plugin_files[$i], $plugins->system_plugins) )
0
+ − 1602
{
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1603
if ( getConfig('plugin_'.$plugin_files[$i]) == '1' )
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1604
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1605
echo '<a href="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'&show_system=' . ( $show_system ? 'yes' : 'no' ) . '&action=disable&plugin='.$plugin_files[$i].'">' . $lang->get('acppl_btn_disable') . '</a>';
504
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1606
echo ' | ';
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
diff
changeset
+ − 1607
echo '<a title="' . $lang->get('acppl_btn_reimport_tip') . '" href="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'&show_system=' . ( $show_system ? 'yes' : 'no' ) . '&action=reimport&plugin='.$plugin_files[$i].'">' . $lang->get('acppl_btn_reimport') . '</a>';
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1608
}
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1609
else
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1610
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1611
echo '<a href="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'&show_system=' . ( $show_system ? 'yes' : 'no' ) . '&action=enable&plugin='.$plugin_files[$i].'">' . $lang->get('acppl_btn_enable') . '</a>';
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1612
}
0
+ − 1613
}
+ − 1614
else
+ − 1615
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1616
echo $lang->get('acppl_lbl_system_plugin');
0
+ − 1617
}
+ − 1618
echo '</td></tr>';
+ − 1619
}
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1620
$showhide_link = ( $show_system ) ?
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1621
'<a style="color: white;" href="' . makeUrlNS('Special', 'Administration', 'module=' . $paths->cpage['module'] . '&show_system=no', true) . '">' . $lang->get('acppl_btn_hide_system') . '</a>' :
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1622
'<a style="color: white;" href="' . makeUrlNS('Special', 'Administration', 'module=' . $paths->cpage['module'] . '&show_system=yes', true) . '">' . $lang->get('acppl_btn_show_system') . '</a>' ;
85
7c68a18a27be
AJAX comments are now paginated; plugin manager can now show system plugins; typo in installer corrected; links in oxygen/stpatty/admin footers changed to "About Enano" page; 1.0.1 release candidate
Dan
diff
changeset
+ − 1623
echo '<tr><th colspan="6" class="subhead">'.$showhide_link.'</th></tr>';
0
+ − 1624
echo '</table></div>';
+ − 1625
}
519
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
diff
changeset
+ − 1626
*/
0
+ − 1627
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1628
function page_Admin_DBBackup()
0
+ − 1629
{
+ − 1630
global $db, $session, $paths, $template, $plugins; // Common objects
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1631
global $lang;
0
+ − 1632
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 1633
{
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1634
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1635
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1636
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
0
+ − 1637
return;
+ − 1638
}
+ − 1639
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1640
if ( ENANO_DBLAYER != 'MYSQL' )
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1641
die('<h3>' . $lang->get('acpdb_err_not_supported_title') . '</h3>
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1642
<p>' . $lang->get('acpdb_err_not_supported_desc') . '</p>');
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1643
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1644
if(isset($_GET['submitting']) && $_GET['submitting'] == 'yes' && defined('ENANO_DEMO_MODE') )
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1645
{
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1646
redirect(makeUrlComplete('Special', 'Administration'), $lang->get('acpdb_err_demo_mode_title'), $lang->get('acpdb_err_demo_mode_desc'), 5);
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1647
}
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1648
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1649
global $system_table_list;
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1650
if(isset($_GET['submitting']) && $_GET['submitting'] == 'yes')
0
+ − 1651
{
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1652
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1653
if(defined('SQL_BACKUP_CRYPT'))
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1654
// Try to increase our time limit
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1655
@set_time_limit(0);
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1656
// Do the actual export
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1657
$aesext = ( defined('SQL_BACKUP_CRYPT') ) ? '.tea' : '';
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1658
$filename = 'enano_backup_' . enano_date('ymd') . '.sql' . $aesext;
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1659
ob_start();
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1660
// Spew some headers
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1661
$headdate = enano_date('F d, Y \a\t h:i a');
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1662
echo <<<HEADER
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1663
-- Enano CMS SQL backup
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1664
-- Generated on {$headdate} by {$session->username}
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1665
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1666
HEADER;
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1667
// build the table list
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1668
$base = ( isset($_POST['do_system_tables']) ) ? $system_table_list : Array();
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1669
$add = ( isset($_POST['additional_tables'])) ? $_POST['additional_tables'] : Array();
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1670
$tables = array_merge($base, $add);
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1671
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1672
// Log it!
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1673
$e = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,edit_summary,page_text) VALUES(\'security\', \'db_backup\', '.time().', \''.enano_date('d M Y h:i a').'\', \''.$db->escape($session->username).'\', \''.$db->escape($_SERVER['REMOTE_ADDR']).'\', \'' . $db->escape(implode(', ', $tables)) . '\')');
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1674
if ( !$e )
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1675
$db->_die();
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1676
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1677
foreach($tables as $i => $t)
0
+ − 1678
{
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1679
if(!preg_match('#^([a-z0-9_]+)$#i', $t))
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1680
die('Hacking attempt');
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1681
// if($t == table_prefix.'files' && isset($_POST['do_data']))
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1682
// unset($tables[$i]);
0
+ − 1683
}
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1684
foreach($tables as $t)
0
+ − 1685
{
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1686
// THE FOLLOWING COMMENT DOES NOT APPLY AS OF 1.0.
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1687
// Sorry folks - this script CAN'T backup enano_files and enano_search_index due to the sheer size of the tables.
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1688
// If encryption is enabled the log data will be excluded too.
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1689
$result = export_table(
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1690
$t,
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1691
isset($_POST['do_struct']),
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1692
( isset($_POST['do_data']) ),
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1693
false
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1694
) . "\n";
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1695
if ( !$result )
0
+ − 1696
{
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1697
$db->_die();
0
+ − 1698
}
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1699
echo $result;
0
+ − 1700
}
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1701
$data = ob_get_contents();
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1702
ob_end_clean();
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1703
if(defined('SQL_BACKUP_CRYPT'))
0
+ − 1704
{
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1705
// Free some memory, we don't need this stuff any more
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1706
$db->close();
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1707
unset($paths, $db, $template, $plugins);
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1708
$tea = new TEACrypt();
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1709
$data = $tea->encrypt($data, $session->private_key);
0
+ − 1710
}
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1711
header('Content-disposition: attachment; filename='.$filename.'');
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1712
header('Content-type: application/octet-stream');
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1713
header('Content-length: '.strlen($data));
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1714
echo $data;
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1715
exit;
0
+ − 1716
}
+ − 1717
else
+ − 1718
{
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1719
// Show the UI
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1720
echo '<form action="'.makeUrlNS('Admin', 'DBBackup', 'submitting=yes', true).'" method="post" enctype="multipart/form-data">';
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1721
?>
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1722
<p><?php echo $lang->get('acpdb_intro'); ?></p>
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1723
<p><label><input type="checkbox" name="do_system_tables" checked="checked" /> <?php echo $lang->get('acpdb_lbl_system_tables'); ?></label><p>
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1724
<p><?php echo $lang->get('acpdb_lbl_additional_tables'); ?></p>
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1725
<p><select name="additional_tables[]" multiple="multiple">
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1726
<?php
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1727
if ( ENANO_DBLAYER == 'MYSQL' )
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1728
{
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1729
$q = $db->sql_query('SHOW TABLES;') or $db->_die('Somehow we were denied the request to get the list of tables.');
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1730
}
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1731
else if ( ENANO_DBLAYER == 'PGSQL' )
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1732
{
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1733
$q = $db->sql_query('SELECT relname FROM pg_stat_user_tables ORDER BY relname;') or $db->_die('Somehow we were denied the request to get the list of tables.');
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1734
}
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1735
while($row = $db->fetchrow_num())
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1736
{
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1737
if(!in_array($row[0], $system_table_list)) echo '<option value="'.$row[0].'">'.$row[0].'</option>';
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1738
}
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1739
?>
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1740
</select>
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1741
</p>
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1742
<p><label><input type="checkbox" name="do_struct" checked="checked" /> <?php echo $lang->get('acpdb_lbl_include_structure'); ?></label><br />
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1743
<label><input type="checkbox" name="do_data" checked="checked" /> <?php echo $lang->get('acpdb_lbl_include_data'); ?></label>
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1744
</p>
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1745
<p><input type="submit" value="<?php echo $lang->get('acpdb_btn_create_backup'); ?>" /></p>
343
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1746
<?php
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
diff
changeset
+ − 1747
echo '</form>';
0
+ − 1748
}
+ − 1749
}
+ − 1750
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1751
/*
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1752
* Admin:PageManager sources are in /plugins/admin/PageManager.php.
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1753
*/
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1754
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1755
/*
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1756
* Admin:PageEditor sources are in /plugins/admin/PageEditor.php.
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1757
*/
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
diff
changeset
+ − 1758
430
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
diff
changeset
+ − 1759
/*
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
diff
changeset
+ − 1760
* Admin:ThemeManager sources are in /plugins/admin/ThemeManager.php.
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
diff
changeset
+ − 1761
*/
0
+ − 1762
347
+ − 1763
/*
+ − 1764
* Admin:GroupManager sources are in /plugins/admin/GroupManager.php.
+ − 1765
*/
0
+ − 1766
30
+ − 1767
function page_Admin_COPPA()
+ − 1768
{
+ − 1769
global $db, $session, $paths, $template, $plugins; // Common objects
216
+ − 1770
global $lang;
30
+ − 1771
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 1772
{
216
+ − 1773
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
217
+ − 1774
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
+ − 1775
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
30
+ − 1776
return;
+ − 1777
}
+ − 1778
356
+ − 1779
echo '<h2>' . $lang->get('acpcp_heading_main') . '</h2>';
30
+ − 1780
echo '<p>
356
+ − 1781
' . $lang->get('acpcp_intro') . '
30
+ − 1782
</p>';
+ − 1783
+ − 1784
// Start form
+ − 1785
+ − 1786
if ( isset($_POST['coppa_address']) )
+ − 1787
{
+ − 1788
// Saving changes
+ − 1789
$enable_coppa = ( isset($_POST['enable_coppa']) ) ? '1' : '0';
+ − 1790
setConfig('enable_coppa', $enable_coppa);
+ − 1791
+ − 1792
$address = $_POST['coppa_address']; // RenderMan::preprocess_text($_POST['coppa_address'], true, false);
+ − 1793
setConfig('coppa_address', $address);
+ − 1794
356
+ − 1795
echo '<div class="info-box">' . $lang->get('acpcp_msg_save_success') . '</div>';
30
+ − 1796
}
+ − 1797
376
+ − 1798
acp_start_form();
30
+ − 1799
+ − 1800
echo '<div class="tblholder">';
+ − 1801
echo '<table border="0" cellspacing="1" cellpadding="4">';
+ − 1802
echo '<tr>
+ − 1803
<th colspan="2">
356
+ − 1804
' . $lang->get('acpcp_th_form') . '
30
+ − 1805
</th>
+ − 1806
</tr>';
+ − 1807
+ − 1808
echo '<tr>
+ − 1809
<td class="row1">
356
+ − 1810
' . $lang->get('acpcp_field_enable_title') . '
30
+ − 1811
</td>
+ − 1812
<td class="row2">
356
+ − 1813
<label><input type="checkbox" name="enable_coppa" ' . ( ( getConfig('enable_coppa') == '1' ) ? 'checked="checked"' : '' ) . ' /> ' . $lang->get('acpcp_field_enable') . '</label><br />
+ − 1814
<small>' . $lang->get('acpcp_field_enable_hint') . '</small>
30
+ − 1815
</td>
+ − 1816
</tr>';
+ − 1817
+ − 1818
echo '<tr>
+ − 1819
<td class="row1">
356
+ − 1820
' . $lang->get('acpcp_field_address') . '<br />
+ − 1821
<small>' . $lang->get('acpcp_field_address_hint') . '</small>
30
+ − 1822
</td>
+ − 1823
<td class="row2">
+ − 1824
<textarea name="coppa_address" rows="7" cols="40">' . getConfig('coppa_address') . '</textarea>
+ − 1825
</td>
+ − 1826
</tr>';
+ − 1827
+ − 1828
echo '<tr>
+ − 1829
<th colspan="2" class="subhead">
356
+ − 1830
<input type="submit" value="' . $lang->get('etc_save_changes') . '" />
30
+ − 1831
</th>
+ − 1832
</tr>';
+ − 1833
+ − 1834
echo '</table>';
+ − 1835
+ − 1836
echo '</form>';
+ − 1837
+ − 1838
}
+ − 1839
0
+ − 1840
function page_Admin_MassEmail()
+ − 1841
{
+ − 1842
global $db, $session, $paths, $template, $plugins; // Common objects
357
+ − 1843
global $lang;
0
+ − 1844
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 1845
{
357
+ − 1846
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
+ − 1847
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
+ − 1848
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
0
+ − 1849
return;
+ − 1850
}
+ − 1851
+ − 1852
global $enano_config;
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1853
if ( isset($_POST['do_send']) && !defined('ENANO_DEMO_MODE') )
0
+ − 1854
{
+ − 1855
$use_smtp = getConfig('smtp_enabled') == '1';
+ − 1856
+ − 1857
//
+ − 1858
// Let's do some checking to make sure that mass mail functions
+ − 1859
// are working in win32 versions of php. (copied from phpBB)
+ − 1860
//
+ − 1861
if ( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$use_smtp)
+ − 1862
{
+ − 1863
$ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
+ − 1864
+ − 1865
// We are running on windows, force delivery to use our smtp functions
+ − 1866
// since php's are broken by default
+ − 1867
$use_smtp = true;
+ − 1868
$enano_config['smtp_server'] = @$ini_val('SMTP');
+ − 1869
}
+ − 1870
+ − 1871
$mail = new emailer( !empty($use_smtp) );
+ − 1872
+ − 1873
// Validate subject/message body
+ − 1874
$subject = stripslashes(trim($_POST['subject']));
+ − 1875
$message = stripslashes(trim($_POST['message']));
+ − 1876
+ − 1877
if ( empty($subject) )
357
+ − 1878
$errors[] = $lang->get('acpmm_err_need_subject');
0
+ − 1879
if ( empty($message) )
357
+ − 1880
$errors[] = $lang->get('acpmm_err_need_message');
0
+ − 1881
+ − 1882
// Get list of members
+ − 1883
if ( !empty($_POST['userlist']) )
+ − 1884
{
+ − 1885
$userlist = str_replace(', ', ',', $_POST['userlist']);
+ − 1886
$userlist = explode(',', $userlist);
+ − 1887
foreach ( $userlist as $k => $u )
+ − 1888
{
+ − 1889
if ( $u == $session->username )
+ − 1890
{
+ − 1891
// Message is automatically sent to the sender
+ − 1892
unset($userlist[$k]);
+ − 1893
}
+ − 1894
else
+ − 1895
{
+ − 1896
$userlist[$k] = $db->escape($u);
+ − 1897
}
+ − 1898
}
+ − 1899
$userlist = 'WHERE username=\'' . implode('\' OR username=\'', $userlist) . '\'';
+ − 1900
+ − 1901
$q = $db->sql_query('SELECT email FROM '.table_prefix.'users ' . $userlist . ';');
+ − 1902
if ( !$q )
+ − 1903
$db->_die();
+ − 1904
+ − 1905
if ( $row = $db->fetchrow() )
+ − 1906
{
+ − 1907
do {
+ − 1908
$mail->cc($row['email']);
+ − 1909
} while ( $row = $db->fetchrow() );
+ − 1910
}
+ − 1911
+ − 1912
$db->free_result();
+ − 1913
+ − 1914
}
+ − 1915
else
+ − 1916
{
+ − 1917
// Sending to a usergroup
+ − 1918
+ − 1919
$group_id = intval($_POST['group_id']);
+ − 1920
if ( $group_id < 1 )
+ − 1921
{
+ − 1922
$errors[] = 'Invalid group ID';
+ − 1923
}
+ − 1924
else
+ − 1925
{
+ − 1926
$q = $db->sql_query('SELECT u.email FROM '.table_prefix.'group_members AS g
+ − 1927
LEFT JOIN '.table_prefix.'users AS u
+ − 1928
ON (u.user_id=g.user_id)
+ − 1929
WHERE g.group_id=' . $group_id . ';');
+ − 1930
if ( !$q )
+ − 1931
$db->_die();
+ − 1932
+ − 1933
if ( $row = $db->fetchrow() )
+ − 1934
{
+ − 1935
do {
+ − 1936
$mail->cc($row['email']);
+ − 1937
} while ( $row = $db->fetchrow() );
+ − 1938
}
+ − 1939
+ − 1940
$db->free_result();
+ − 1941
}
+ − 1942
}
+ − 1943
+ − 1944
if ( sizeof($errors) < 1 )
+ − 1945
{
+ − 1946
+ − 1947
$mail->from(getConfig('contact_email'));
+ − 1948
$mail->replyto(getConfig('contact_email'));
+ − 1949
$mail->set_subject($subject);
+ − 1950
$mail->email_address(getConfig('contact_email'));
+ − 1951
+ − 1952
// Copied/modified from phpBB
+ − 1953
$email_headers = 'X-AntiAbuse: Website server name - ' . $_SERVER['SERVER_NAME'] . "\n";
+ − 1954
$email_headers .= 'X-AntiAbuse: User_id - ' . $session->user_id . "\n";
+ − 1955
$email_headers .= 'X-AntiAbuse: Username - ' . $session->username . "\n";
+ − 1956
$email_headers .= 'X-AntiAbuse: User IP - ' . $_SERVER['REMOTE_ADDR'] . "\n";
+ − 1957
+ − 1958
$mail->extra_headers($email_headers);
+ − 1959
357
+ − 1960
// FIXME: how to handle l10n with this?
0
+ − 1961
$tpl = 'The following message was mass-mailed by {SENDER}, one of the administrators from {SITE_NAME}. If this message contains spam or any comments which you find abusive or offensive, please contact the administration team at:
+ − 1962
+ − 1963
{CONTACT_EMAIL}
+ − 1964
+ − 1965
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ − 1966
{MESSAGE}
+ − 1967
';
+ − 1968
+ − 1969
$mail->use_template($tpl);
+ − 1970
+ − 1971
$mail->assign_vars(array(
+ − 1972
'SENDER' => $session->username,
+ − 1973
'SITE_NAME' => getConfig('site_name'),
+ − 1974
'CONTACT_EMAIL' => getConfig('contact_email'),
+ − 1975
'MESSAGE' => $message
+ − 1976
));
+ − 1977
+ − 1978
//echo '<pre>'.print_r($mail,true).'</pre>';
+ − 1979
+ − 1980
// All done
+ − 1981
$mail->send();
+ − 1982
$mail->reset();
+ − 1983
357
+ − 1984
echo '<div class="info-box">' . $lang->get('acpmm_msg_send_success') . '</div>';
0
+ − 1985
+ − 1986
}
+ − 1987
else
+ − 1988
{
357
+ − 1989
echo '<div class="warning-box">' . $lang->get('acpmm_err_send_fail') . '<ul><li>' . implode('</li><li>', $errors) . '</li></ul></div>';
0
+ − 1990
}
+ − 1991
+ − 1992
}
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1993
else if ( isset($_POST['do_send']) && defined('ENANO_DEMO_MODE') )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1994
{
357
+ − 1995
echo '<div class="error-box">' . $lang->get('acpmm_err_demo') . '</div>';
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 1996
}
376
+ − 1997
acp_start_form();
0
+ − 1998
?>
+ − 1999
<div class="tblholder">
+ − 2000
<table border="0" cellspacing="1" cellpadding="4">
+ − 2001
<tr>
357
+ − 2002
<th colspan="2"><?php echo $lang->get('acpmm_heading_main'); ?></th>
0
+ − 2003
</tr>
+ − 2004
<tr>
+ − 2005
<td class="row2" rowspan="2" style="width: 30%; min-width: 200px;">
357
+ − 2006
<?php echo $lang->get('acpmm_field_group_to'); ?><br />
0
+ − 2007
<small>
357
+ − 2008
<?php echo $lang->get('acpmm_field_group_to_hint'); ?>
0
+ − 2009
</small>
+ − 2010
</td>
+ − 2011
<td class="row1">
+ − 2012
<select name="group_id">
+ − 2013
<?php
+ − 2014
$q = $db->sql_query('SELECT group_name,group_id FROM '.table_prefix.'groups ORDER BY group_name ASC;');
+ − 2015
if ( !$q )
+ − 2016
$db->_die();
+ − 2017
while ( $row = $db->fetchrow() )
+ − 2018
{
357
+ − 2019
list($g_name) = array_values($row);
+ − 2020
$g_name_langstr = 'groupcp_grp_' . strtolower($g_name);
+ − 2021
if ( ($g_langstr = $lang->get($g_name_langstr)) != $g_name_langstr )
+ − 2022
{
+ − 2023
$g_name = $g_langstr;
+ − 2024
}
+ − 2025
echo '<option value="' . $row['group_id'] . '">' . htmlspecialchars($g_name) . '</option>';
0
+ − 2026
}
+ − 2027
?>
+ − 2028
</select>
+ − 2029
</td>
+ − 2030
</tr>
+ − 2031
<tr>
+ − 2032
<td class="row1">
357
+ − 2033
<?php echo $lang->get('acpmm_field_username'); ?> <input type="text" name="userlist" size="50" />
0
+ − 2034
</td>
+ − 2035
</tr>
+ − 2036
<tr>
+ − 2037
<td class="row2" style="width: 30%; min-width: 200px;">
357
+ − 2038
<?php echo $lang->get('acpmm_field_subject'); ?>
0
+ − 2039
</td>
+ − 2040
<td class="row1">
+ − 2041
<input name="subject" type="text" size="50" />
+ − 2042
</td>
+ − 2043
</tr>
+ − 2044
<tr>
+ − 2045
<td class="row2" style="width: 30%; min-width: 200px;">
357
+ − 2046
<?php echo $lang->get('acpmm_field_message'); ?>
0
+ − 2047
</td>
+ − 2048
<td class="row1">
+ − 2049
<textarea name="message" rows="30" cols="60" style="width: 100%;"></textarea>
+ − 2050
</td>
+ − 2051
</tr>
+ − 2052
<tr>
+ − 2053
<th class="subhead" colspan="2" style="text-align: left;" valign="middle">
357
+ − 2054
<div style="float: right;"><input type="submit" name="do_send" value="<?php echo $lang->get('acpmm_btn_send'); ?>" /></div>
+ − 2055
<small style="font-weight: normal;"><?php echo $lang->get('acpmm_msg_send_takeawhile'); ?></small>
0
+ − 2056
</th>
+ − 2057
</tr>
+ − 2058
+ − 2059
</table>
+ − 2060
</div>
+ − 2061
<?php
+ − 2062
echo '</form>';
+ − 2063
}
+ − 2064
+ − 2065
function page_Admin_BanControl()
+ − 2066
{
+ − 2067
global $db, $session, $paths, $template, $plugins; // Common objects
216
+ − 2068
global $lang;
0
+ − 2069
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 2070
{
216
+ − 2071
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
217
+ − 2072
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
+ − 2073
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
0
+ − 2074
return;
+ − 2075
}
+ − 2076
+ − 2077
if(isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['id']) && $_GET['id'] != '')
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2078
{
208
+ − 2079
$e = $db->sql_query('DELETE FROM '.table_prefix.'banlist WHERE ban_id=' . intval($_GET['id']) . '');
358
+ − 2080
if ( !$e )
+ − 2081
$db->_die('The ban list entry was not deleted.');
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2082
}
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2083
if(isset($_POST['create']) && !defined('ENANO_DEMO_MODE'))
0
+ − 2084
{
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2085
$type = intval($_POST['type']);
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2086
$value = trim($_POST['value']);
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2087
if ( !in_array($type, array(BAN_IP, BAN_USER, BAN_EMAIL)) )
0
+ − 2088
{
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2089
echo '<div class="error-box">Hacking attempt.</div>';
0
+ − 2090
}
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2091
else if ( empty($value) )
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2092
{
358
+ − 2093
echo '<div class="error-box">' . $lang->get('acpbc_err_empty') . '</div>';
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2094
}
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2095
else
0
+ − 2096
{
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2097
$entries = array();
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2098
$input = explode(',', $_POST['value']);
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2099
$error = false;
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2100
foreach ( $input as $entry )
322
+ − 2101
{
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2102
$entry = trim($entry);
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2103
if ( empty($entry) )
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2104
{
358
+ − 2105
echo '<div class="error-box">' . $lang->get('acpbc_err_invalid_ip_range') . '</div>';
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2106
$error = true;
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2107
break;
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2108
}
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2109
if ( $type == BAN_IP )
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2110
{
270
5bcdee999015
Major fixes to the ban system - large IP match lists don't slow down the server miserably anymore.
Dan
diff
changeset
+ − 2111
if ( !isset($_POST['regex']) )
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2112
{
270
5bcdee999015
Major fixes to the ban system - large IP match lists don't slow down the server miserably anymore.
Dan
diff
changeset
+ − 2113
// as of 1.0.2 parsing is done at runtime
5bcdee999015
Major fixes to the ban system - large IP match lists don't slow down the server miserably anymore.
Dan
diff
changeset
+ − 2114
$entries[] = $entry;
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2115
}
270
5bcdee999015
Major fixes to the ban system - large IP match lists don't slow down the server miserably anymore.
Dan
diff
changeset
+ − 2116
else
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2117
{
270
5bcdee999015
Major fixes to the ban system - large IP match lists don't slow down the server miserably anymore.
Dan
diff
changeset
+ − 2118
$entries[] = $entry;
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2119
}
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2120
}
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2121
else
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2122
{
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2123
$entries[] = $entry;
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2124
}
322
+ − 2125
}
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2126
if ( !$error )
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2127
{
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2128
$regex = ( isset($_POST['regex']) ) ? '1' : '0';
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2129
$to_insert = array();
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2130
$reason = $db->escape($_POST['reason']);
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2131
foreach ( $entries as $entry )
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2132
{
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2133
$entry = $db->escape($entry);
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2134
$to_insert[] = "($type, '$entry', '$reason', $regex)";
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2135
}
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2136
$q = 'INSERT INTO '.table_prefix."banlist(ban_type, ban_value, reason, is_regex)\n VALUES" . implode(",\n ", $to_insert) . ';';
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2137
@set_time_limit(0);
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2138
$e = $db->sql_query($q);
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2139
if(!$e) $db->_die('The banlist could not be updated.');
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2140
}
0
+ − 2141
}
+ − 2142
}
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2143
else if ( isset($_POST['create']) && defined('ENANO_DEMO_MODE') )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2144
{
358
+ − 2145
echo '<div class="error-box">' . $lang->get('acpbc_err_demo', array('ban_target' => htmlspecialchars($_POST['value']))) . '</div>';
0
+ − 2146
}
+ − 2147
$q = $db->sql_query('SELECT ban_id,ban_type,ban_value,is_regex FROM '.table_prefix.'banlist ORDER BY ban_type;');
358
+ − 2148
if ( !$q )
+ − 2149
$db->_die('The banlist data could not be selected.');
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2150
echo '<div class="tblholder" style="max-height: 800px; clip: rect(0px,auto,auto,0px); overflow: auto;">
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2151
<table border="0" cellspacing="1" cellpadding="4">';
358
+ − 2152
echo '<tr>
+ − 2153
<th>' . $lang->get('acpbc_col_type') . '</th>
+ − 2154
<th>' . $lang->get('acpbc_col_value') . '</th>
+ − 2155
<th>' . $lang->get('acpbc_col_regex') . '</th>
+ − 2156
<th></th>
+ − 2157
</tr>';
+ − 2158
if ( $db->numrows() < 1 )
+ − 2159
{
+ − 2160
echo '<td class="row1" colspan="4">' . $lang->get('acpbc_msg_no_rules') . '</td>';
+ − 2161
}
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2162
$cls = 'row2';
358
+ − 2163
while ( $r = $db->fetchrow() )
0
+ − 2164
{
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2165
$cls = ( $cls == 'row1' ) ? 'row2' : 'row1';
358
+ − 2166
if ( $r['ban_type'] == BAN_IP )
+ − 2167
$t = $lang->get('acpbc_ban_type_ip');
+ − 2168
else if ( $r['ban_type'] == BAN_USER )
+ − 2169
$t = $lang->get('acpbc_ban_type_username');
+ − 2170
else if ( $r['ban_type'] == BAN_EMAIL )
+ − 2171
$t = $lang->get('acpbc_ban_type_email');
+ − 2172
$g = ( $r['is_regex'] ) ? '<b>' . $lang->get('acpbc_ban_regex_yes') . '</b>' : $lang->get('acpbc_ban_regex_no');
+ − 2173
echo '<tr>
+ − 2174
<td class="'.$cls.'">'.$t.'</td>
+ − 2175
<td class="'.$cls.'">'.htmlspecialchars($r['ban_value']).'</td>
+ − 2176
<td class="'.$cls.'">'.$g.'</td>
+ − 2177
<td class="'.$cls.'"><a href="'.makeUrlNS('Special', 'Administration', 'module='.$paths->nslist['Admin'].'BanControl&action=delete&id='.$r['ban_id']).'">' . $lang->get('acpbc_btn_delete') . '</a></td>
+ − 2178
</tr>';
0
+ − 2179
}
+ − 2180
$db->free_result();
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
diff
changeset
+ − 2181
echo '</table></div>';
358
+ − 2182
echo '<h3>' . $lang->get('acpbc_heading_create_new') . '</h3>';
376
+ − 2183
acp_start_form();
0
+ − 2184
?>
358
+ − 2185
+ − 2186
<?php echo $lang->get('acpbc_field_type'); ?>
+ − 2187
<select name="type">
+ − 2188
<option value="<?php echo BAN_IP; ?>"><?php echo $lang->get('acpbc_ban_type_ip'); ?></option>
+ − 2189
<option value="<?php echo BAN_USER; ?>"><?php echo $lang->get('acpbc_ban_type_username'); ?></option>
+ − 2190
<option value="<?php echo BAN_EMAIL; ?>"><?php echo $lang->get('acpbc_ban_type_email'); ?></option>
+ − 2191
</select>
+ − 2192
<br />
+ − 2193
+ − 2194
<?php echo $lang->get('acpbc_field_rule'); ?>
+ − 2195
<input type="text" name="value" size="30" /><br />
+ − 2196
<small><?php echo $lang->get('acpbc_field_rule_hint'); ?></small><br />
+ − 2197
+ − 2198
<?php echo $lang->get('acpbc_field_reason'); ?>
+ − 2199
<textarea name="reason" rows="7" cols="40"></textarea><br />
+ − 2200
+ − 2201
<label><input type="checkbox" name="regex" id="regex" /> <?php echo $lang->get('acpbc_field_regex'); ?></label>
+ − 2202
<?php echo $lang->get('acpbc_field_regex_hint'); ?><br />
+ − 2203
+ − 2204
<input type="submit" style="font-weight: bold;" name="create" value="<?php echo $lang->get('acpbc_btn_create'); ?>" />
0
+ − 2205
<?php
+ − 2206
echo '</form>';
+ − 2207
}
+ − 2208
+ − 2209
function page_Admin_AdminLogout()
+ − 2210
{
+ − 2211
global $db, $session, $paths, $template, $plugins; // Common objects
216
+ − 2212
global $lang;
0
+ − 2213
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
+ − 2214
{
216
+ − 2215
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
217
+ − 2216
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
+ − 2217
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
0
+ − 2218
return;
+ − 2219
}
+ − 2220
+ − 2221
$session->logout(USER_LEVEL_ADMIN);
358
+ − 2222
echo '<h3>' . $lang->get('acplo_heading_main') . '</h3>
741
+ − 2223
<p>' . $lang->get('acplo_msg_logout_complete', array('mainpage_link' => makeUrl(get_main_page()))) . '</p>';
0
+ − 2224
}
+ − 2225
+ − 2226
function page_Special_Administration()
+ − 2227
{
+ − 2228
global $db, $session, $paths, $template, $plugins; // Common objects
216
+ − 2229
global $lang;
0
+ − 2230
+ − 2231
if($session->auth_level < USER_LEVEL_ADMIN) {
+ − 2232
redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), 'Not authorized', 'You need an authorization level of '.USER_LEVEL_ADMIN.' to use this page, your auth level is: ' . $session->auth_level, 0);
+ − 2233
exit;
+ − 2234
}
+ − 2235
else
+ − 2236
{
+ − 2237
if( !isset( $_GET['noheaders'] ) )
+ − 2238
{
+ − 2239
$template->header();
+ − 2240
}
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 2241
echo $lang->get('adm_page_tagline');
0
+ − 2242
?>
+ − 2243
<script type="text/javascript">
+ − 2244
function ajaxPage(t)
+ − 2245
{
57
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2246
if ( KILL_SWITCH )
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2247
{
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2248
document.getElementById('ajaxPageContainer').innerHTML = '<div class="error-box">Because of the lack of AJAX support, support for Internet Explorer versions less than 6.0 has been disabled in Runt. You can download and use Mozilla Firefox (or Seamonkey under Windows 95); both have an up-to-date standards-compliant rendering engine that has been tested thoroughly with Enano.</div>';
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2249
return false;
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2250
}
0
+ − 2251
if ( t == namespace_list.Admin + 'AdminLogout' )
+ − 2252
{
582
+ − 2253
load_component('messagebox');
564
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2254
miniPromptMessage({
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2255
title: $lang.get('user_logout_confirm_title_elev'),
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2256
message: $lang.get('user_logout_confirm_body_elev'),
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2257
buttons: [
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2258
{
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2259
text: $lang.get('user_logout_confirm_btn_logout'),
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2260
color: 'red',
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2261
style: {
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2262
fontWeight: 'bold'
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2263
},
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2264
onclick: function()
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2265
{
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2266
var tigraentry = document.getElementById('i_div0_0').parentNode;
706
+ − 2267
var tigraobj = $dynano(tigraentry);
564
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2268
var div = document.createElement('div');
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2269
div.style.backgroundColor = '#FFFFFF';
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2270
domObjChangeOpac(70, div);
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2271
div.style.position = 'absolute';
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2272
var top = tigraobj.Top();
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2273
var left = tigraobj.Left();
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2274
var width = tigraobj.Width();
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2275
var height = tigraobj.Height();
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2276
div.style.top = top + 'px';
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2277
div.style.left = left + 'px';
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2278
div.style.width = width + 'px';
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2279
div.style.height = height + 'px';
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2280
var body = document.getElementsByTagName('body')[0];
573
43e7254afdb4
Renamed some functions (that were new in this release anyway) due to compatibility broken with PunBB bridge
Dan
diff
changeset
+ − 2281
miniPromptDestroy(this);
564
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2282
body.appendChild(div);
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2283
ajaxPageBin(namespace_list.Admin + 'AdminLogout');
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2284
}
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2285
},
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2286
{
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2287
text: $lang.get('etc_cancel'),
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2288
onclick: function()
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2289
{
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2290
miniPromptDestroy(this);
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2291
}
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2292
}
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2293
]
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
diff
changeset
+ − 2294
});
0
+ − 2295
return;
+ − 2296
}
+ − 2297
ajaxPageBin(t);
+ − 2298
}
+ − 2299
function ajaxPageBin(t)
+ − 2300
{
57
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2301
if ( KILL_SWITCH )
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2302
{
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2303
document.getElementById('ajaxPageContainer').innerHTML = '<div class="error-box">Because of the lack of AJAX support, support for Internet Explorer versions less than 6.0 has been disabled in Runt. You can download and use Mozilla Firefox (or Seamonkey under Windows 95); both have an up-to-date standards-compliant rendering engine that has been tested thoroughly with Enano.</div>';
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2304
return false;
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2305
}
0
+ − 2306
document.getElementById('ajaxPageContainer').innerHTML = '<div class="wait-box">Loading page...</div>';
792
+ − 2307
ajaxGet('<?php echo scriptPath; ?>/ajax.php?title='+t+'&_mode=getpage&noheaders&auth=' + ENANO_SID, function() {
407
+ − 2308
if ( ajax.readyState == 4 && ajax.status == 200 ) {
792
+ − 2309
var response = String(ajax.responseText + '');
+ − 2310
if ( check_json_response(response) )
+ − 2311
{
+ − 2312
response = parseJSON(response);
+ − 2313
if ( response.mode == 'error' )
+ − 2314
{
+ − 2315
if ( response.error == 'need_auth_to_admin' )
+ − 2316
{
+ − 2317
load_component('login');
+ − 2318
ajaxDynamicReauth(t);
+ − 2319
}
+ − 2320
else
+ − 2321
{
+ − 2322
alert(response.error);
+ − 2323
}
+ − 2324
}
+ − 2325
}
+ − 2326
else
+ − 2327
{
+ − 2328
document.getElementById('ajaxPageContainer').innerHTML = ajax.responseText;
+ − 2329
fadeInfoBoxes();
+ − 2330
autofill_onload();
+ − 2331
}
0
+ − 2332
}
+ − 2333
});
+ − 2334
}
582
+ − 2335
<?php
+ − 2336
if ( !isset($_GET['module']) )
+ − 2337
{
+ − 2338
echo <<<EOF
+ − 2339
var _enanoAdminOnload = function() { ajaxPage('{$paths->nslist['Admin']}Home'); };
+ − 2340
addOnloadHook(_enanoAdminOnload);
+ − 2341
+ − 2342
EOF;
+ − 2343
}
+ − 2344
?>
0
+ − 2345
var TREE_TPL = {
+ − 2346
'target' : '_self', // name of the frame links will be opened in
+ − 2347
// other possible values are: _blank, _parent, _search, _self and _top
+ − 2348
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2349
'icon_e' : '<?php echo cdnPath; ?>/images/icons/empty.gif', // empty image
807
+ − 2350
'icon_l' : '<?php echo cdnPath; ?>/images/spacer.gif', // vertical line
+ − 2351
'icon_32' : '<?php echo cdnPath; ?>/images/spacer.gif', // root leaf icon normal
+ − 2352
'icon_36' : '<?php echo cdnPath; ?>/images/spacer.gif', // root leaf icon selected
+ − 2353
'icon_48' : '<?php echo cdnPath; ?>/images/spacer.gif', // root icon normal
+ − 2354
'icon_52' : '<?php echo cdnPath; ?>/images/spacer.gif', // root icon selected
+ − 2355
'icon_56' : '<?php echo cdnPath; ?>/images/spacer.gif', // root icon opened
+ − 2356
'icon_60' : '<?php echo cdnPath; ?>/images/spacer.gif', // root icon selected
+ − 2357
'icon_16' : '<?php echo cdnPath; ?>/images/spacer.gif', // node icon normal
+ − 2358
'icon_20' : '<?php echo cdnPath; ?>/images/spacer.gif', // node icon selected
+ − 2359
'icon_24' : '<?php echo cdnPath; ?>/images/spacer.gif', // node icon opened
+ − 2360
'icon_28' : '<?php echo cdnPath; ?>/images/spacer.gif', // node icon selected opened
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2361
'icon_0' : '<?php echo cdnPath; ?>/images/icons/page.gif', // leaf icon normal
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2362
'icon_4' : '<?php echo cdnPath; ?>/images/icons/page.gif', // leaf icon selected
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2363
'icon_8' : '<?php echo cdnPath; ?>/images/icons/page.gif', // leaf icon opened
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2364
'icon_12' : '<?php echo cdnPath; ?>/images/icons/page.gif', // leaf icon selected
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2365
'icon_2' : '<?php echo cdnPath; ?>/images/icons/joinbottom.gif', // junction for leaf
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2366
'icon_3' : '<?php echo cdnPath; ?>/images/icons/join.gif', // junction for last leaf
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2367
'icon_18' : '<?php echo cdnPath; ?>/images/icons/plusbottom.gif', // junction for closed node
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2368
'icon_19' : '<?php echo cdnPath; ?>/images/icons/plus.gif', // junction for last closed node
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2369
'icon_26' : '<?php echo cdnPath; ?>/images/icons/minusbottom.gif',// junction for opened node
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2370
'icon_27' : '<?php echo cdnPath; ?>/images/icons/minus.gif' // junction for last opended node
0
+ − 2371
};
582
+ − 2372
+ − 2373
addOnloadHook(function()
+ − 2374
{
797
+ − 2375
load_component(['fat', 'ajax', 'l10n', 'autofill', 'jquery', 'jquery-ui']);
582
+ − 2376
keepalive_onload();
+ − 2377
});
+ − 2378
0
+ − 2379
<?php
+ − 2380
echo $paths->parseAdminTree(); // Make a Javascript array that defines the tree
582
+ − 2381
?>
0
+ − 2382
</script>
+ − 2383
<table border="0" width="100%">
+ − 2384
<tr>
+ − 2385
<td class="holder" valign="top">
+ − 2386
<div class="pad" style="padding-right: 20px;">
+ − 2387
<script type="text/javascript">
653
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2388
if ( !KILL_SWITCH )
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2389
{
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2390
new tree(TREE_ITEMS, TREE_TPL);
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2391
}
0
+ − 2392
</script>
+ − 2393
</div>
+ − 2394
</td>
+ − 2395
<td width="100%" valign="top">
+ − 2396
<div class="pad" id="ajaxPageContainer">
+ − 2397
<?php
+ − 2398
if(isset($_GET['module']))
+ − 2399
{
+ − 2400
// Look for a namespace prefix in the urlname, and assign a different namespace, if necessary
+ − 2401
$k = array_keys($paths->nslist);
+ − 2402
for ( $i = 0; $i < sizeof($paths->nslist); $i++ )
+ − 2403
{
+ − 2404
$ln = strlen( $paths->nslist[ $k[ $i ] ] );
+ − 2405
if ( substr($_GET['module'], 0, $ln) == $paths->nslist[$k[$i]] )
+ − 2406
{
+ − 2407
$ns = $k[$i];
+ − 2408
$nm = substr($_GET['module'], $ln, strlen($_GET['module']));
+ − 2409
}
+ − 2410
}
+ − 2411
$fname = 'page_'.$ns.'_'.$nm;
+ − 2412
$s = strpos($fname, '?noheaders');
+ − 2413
if($s) $fname = substr($fname, 0, $s);
+ − 2414
$paths->cpage['module'] = $_GET['module'];
+ − 2415
if ( function_exists($fname) && $_GET['module'] != $paths->nslist['Special'] . 'Administration' )
+ − 2416
{
653
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2417
call_user_func($fname);
0
+ − 2418
}
+ − 2419
}
+ − 2420
else
+ − 2421
{
179
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
diff
changeset
+ − 2422
echo '<script type="text/javascript">document.write(\'<div class="wait-box">Please wait while the administration panel loads. You need to be using a recent browser with AJAX support in order to use Runt.</div>\');</script><noscript><div class="error-box">It looks like Javascript isn\'t enabled in your browser. Please enable Javascript or use a different browser to continue.</div></noscript>';
0
+ − 2423
}
+ − 2424
?>
+ − 2425
</div>
57
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2426
<script type="text/javascript">
653
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2427
addOnloadHook(function()
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2428
{
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2429
if ( KILL_SWITCH )
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2430
{
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2431
document.getElementById('ajaxPageContainer').innerHTML = '<div class="error-box">Because of the lack of AJAX support, support for Internet Explorer versions less than 6.0 has been disabled in Runt. You can download and use Mozilla Firefox (or Seamonkey under Windows 95); both have an up-to-date standards-compliant rendering engine that has been tested thoroughly with Enano.</div>';
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2432
}
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2433
}
3ea1c552e734
Fixed installer path check in Admin:Home; made admin-menu more compatible with componentized JS
Dan
diff
changeset
+ − 2434
);
57
b354deeaa4c4
Vastly improved compatibility with older versions of IE, particularly 5.0, through the use of a kill switch that turns off all AJAX functions
Dan
diff
changeset
+ − 2435
</script>
0
+ − 2436
</td>
+ − 2437
</tr>
+ − 2438
</table>
+ − 2439
+ − 2440
<?php
+ − 2441
}
+ − 2442
if(!isset($_GET['noheaders']))
+ − 2443
{
+ − 2444
$template->footer();
+ − 2445
}
+ − 2446
}
+ − 2447
+ − 2448
function page_Special_EditSidebar()
+ − 2449
{
+ − 2450
global $db, $session, $paths, $template, $plugins; // Common objects
216
+ − 2451
global $lang;
607
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2452
global $cache;
0
+ − 2453
+ − 2454
if($session->auth_level < USER_LEVEL_ADMIN)
+ − 2455
{
+ − 2456
redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), '', '', false);
+ − 2457
exit;
+ − 2458
}
+ − 2459
else
+ − 2460
{
+ − 2461
650
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2462
$template->add_header('<script type="text/javascript" src="'.cdnPath.'/includes/clientside/dbx.js"></script>');
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2463
$template->add_header('<script type="text/javascript" src="'.cdnPath.'/includes/clientside/dbx-key.js"></script>');
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2464
$template->add_header('<script type="text/javascript" src="'.cdnPath.'/includes/clientside/sbedit.js"></script>');
e45183014778
Added CDN support: a URL to a CDN can now be specified and Enano will load all images, CSS, and javascript (except TinyMCE) from that server
Dan
diff
changeset
+ − 2465
$template->add_header('<link rel="stylesheet" type="text/css" href="'.cdnPath.'/includes/clientside/dbx.css" />');
0
+ − 2466
+ − 2467
$template->load_theme('oxygen', 'bleu');
+ − 2468
$template->init_vars();
+ − 2469
+ − 2470
$template->header();
+ − 2471
+ − 2472
if(isset($_POST['save']))
+ − 2473
{
+ − 2474
// Write the new block order to the database
+ − 2475
// The only way to do this is with tons of queries (one per block + one select query at the start to count everything) but afaik its safe...
+ − 2476
// Anyone know a better way to do this?
+ − 2477
$q = $db->sql_query('SELECT item_order,item_id,sidebar_id FROM '.table_prefix.'sidebar ORDER BY sidebar_id ASC, item_order ASC;');
+ − 2478
if ( !$q )
+ − 2479
{
+ − 2480
$db->_die('The sidebar order data could not be selected.');
+ − 2481
}
+ − 2482
$orders = Array();
+ − 2483
while($row = $db->fetchrow())
+ − 2484
{
+ − 2485
$orders[] = Array(
+ − 2486
count($orders),
+ − 2487
$row['item_id'],
+ − 2488
$row['sidebar_id'],
+ − 2489
);
+ − 2490
}
+ − 2491
$db->free_result();
+ − 2492
+ − 2493
// We now have an array with each sidebar ID in its respective order. Explode the order string in $_POST['order_(left|right)'] and use it to build a set of queries.
+ − 2494
$ol = explode(',', $_POST['order_left']);
+ − 2495
$odr = explode(',', $_POST['order_right']);
+ − 2496
$om = array_merge($ol, $odr);
+ − 2497
unset($ol, $odr);
+ − 2498
$queries = Array();
+ − 2499
foreach($orders as $k => $v)
+ − 2500
{
365
+ − 2501
$queries[] = 'UPDATE '.table_prefix.'sidebar SET item_order='.intval($om[$k]).' WHERE item_id='.intval($v[1]).';';
0
+ − 2502
}
+ − 2503
foreach($queries as $sql)
+ − 2504
{
+ − 2505
$q = $db->sql_query($sql);
+ − 2506
if(!$q)
+ − 2507
{
+ − 2508
$t = $db->get_error();
+ − 2509
echo $t;
+ − 2510
$template->footer();
+ − 2511
exit;
+ − 2512
}
+ − 2513
}
607
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2514
$cache->purge('anon_sidebar');
365
+ − 2515
echo '<div class="info-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_order_update_success') . '</div>';
0
+ − 2516
}
+ − 2517
elseif(isset($_POST['create']))
+ − 2518
{
+ − 2519
switch((int)$_POST['type'])
+ − 2520
{
+ − 2521
case BLOCK_WIKIFORMAT:
+ − 2522
$content = $_POST['wikiformat_content'];
+ − 2523
break;
+ − 2524
case BLOCK_TEMPLATEFORMAT:
+ − 2525
$content = $_POST['templateformat_content'];
+ − 2526
break;
+ − 2527
case BLOCK_HTML:
+ − 2528
$content = $_POST['html_content'];
+ − 2529
break;
+ − 2530
case BLOCK_PHP:
+ − 2531
$content = $_POST['php_content'];
+ − 2532
break;
+ − 2533
case BLOCK_PLUGIN:
+ − 2534
$content = $_POST['plugin_id'];
+ − 2535
break;
+ − 2536
}
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2537
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2538
if ( defined('ENANO_DEMO_MODE') )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2539
{
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2540
// Sanitize the HTML
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2541
$content = sanitize_html($content, true);
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2542
}
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2543
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2544
if ( defined('ENANO_DEMO_MODE') && intval($_POST['type']) == BLOCK_PHP )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2545
{
365
+ − 2546
echo '<div class="error-box" style="margin: 10px 0 10px 0;">' . $lang->get('sbedit_err_demo_php_disable') . '</div>';
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2547
$_POST['php_content'] = '?><Nulled>';
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2548
$content = $_POST['php_content'];
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2549
}
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2550
0
+ − 2551
// Get the value of item_order
+ − 2552
365
+ − 2553
$q = $db->sql_query('SELECT * FROM '.table_prefix.'sidebar WHERE sidebar_id='.intval($_POST['sidebar_id']).';');
0
+ − 2554
if(!$q) $db->_die('The order number could not be selected');
+ − 2555
$io = $db->numrows();
+ − 2556
+ − 2557
$db->free_result();
+ − 2558
+ − 2559
$q = 'INSERT INTO '.table_prefix.'sidebar(block_name, block_type, sidebar_id, block_content, item_order) VALUES ( \''.$db->escape($_POST['title']).'\', \''.$db->escape($_POST['type']).'\', \''.$db->escape($_POST['sidebar_id']).'\', \''.$db->escape($content).'\', '.$io.' );';
+ − 2560
$result = $db->sql_query($q);
+ − 2561
if(!$result)
+ − 2562
{
+ − 2563
echo $db->get_error();
+ − 2564
$template->footer();
+ − 2565
exit;
+ − 2566
}
607
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2567
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2568
$cache->purge('anon_sidebar');
365
+ − 2569
echo '<div class="info-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_item_added') . '</div>';
0
+ − 2570
+ − 2571
}
+ − 2572
+ − 2573
if(isset($_GET['action']) && isset($_GET['id']))
+ − 2574
{
162
e1a22031b5bd
Major revamps to the template parser. Fixed a few security holes that could allow PHP to be injected in untimely places in TPL code. Improved Ux for XSS attempt in tplWikiFormat. Documented many functions. Backported much cleaner parser from 2.0 branch. Beautified a lot of code in the depths of the template class. Pretty much a small-scale Extreme Makeover.
Dan
diff
changeset
+ − 2575
if(!preg_match('#^([0-9]*)$#', $_GET['id']))
0
+ − 2576
{
+ − 2577
echo '<div class="warning-box">Error with action: $_GET["id"] was not an integer, aborting to prevent SQL injection</div>';
+ − 2578
}
+ − 2579
switch($_GET['action'])
+ − 2580
{
+ − 2581
case 'new':
+ − 2582
?>
+ − 2583
<script type="text/javascript">
+ − 2584
function setType(input)
+ − 2585
{
+ − 2586
val = input.value;
+ − 2587
if(!val)
+ − 2588
{
+ − 2589
return false;
+ − 2590
}
+ − 2591
var divs = getElementsByClassName(document, 'div', 'sbadd_block');
+ − 2592
for(var i in divs)
+ − 2593
{
+ − 2594
if(divs[i].id == 'blocktype_'+val) divs[i].style.display = 'block';
+ − 2595
else divs[i].style.display = 'none';
+ − 2596
}
+ − 2597
}
+ − 2598
</script>
+ − 2599
+ − 2600
<form action="<?php echo makeUrl($paths->page); ?>" method="post">
+ − 2601
+ − 2602
<p>
365
+ − 2603
<?php echo $lang->get('sbedit_create_intro'); ?>
0
+ − 2604
</p>
+ − 2605
<p>
+ − 2606
<select name="type" onchange="setType(this)"> <?php /* (NOT WORKING, at least in firefox 2) onload="var thingy = this; setTimeout('setType(thingy)', 500);" */ ?>
365
+ − 2607
<option value="<?php echo BLOCK_WIKIFORMAT; ?>"><?php echo $lang->get('sbedit_block_type_wiki'); ?></option>
+ − 2608
<option value="<?php echo BLOCK_TEMPLATEFORMAT; ?>"><?php echo $lang->get('sbedit_block_type_tpl'); ?></option>
+ − 2609
<option value="<?php echo BLOCK_HTML; ?>"><?php echo $lang->get('sbedit_block_type_html'); ?></option>
+ − 2610
<option value="<?php echo BLOCK_PHP; ?>"><?php echo $lang->get('sbedit_block_type_php'); ?></option>
+ − 2611
<option value="<?php echo BLOCK_PLUGIN; ?>"><?php echo $lang->get('sbedit_block_type_plugin'); ?></option>
0
+ − 2612
</select>
+ − 2613
</p>
+ − 2614
+ − 2615
<p>
+ − 2616
365
+ − 2617
<?php echo $lang->get('sbedit_field_block_title'); ?> <input name="title" type="text" size="40" /><br />
+ − 2618
<?php echo $lang->get('sbedit_field_block_sidebar'); ?>
+ − 2619
<select name="sidebar_id">
+ − 2620
<option value="<?php echo SIDEBAR_LEFT; ?>"><?php echo $lang->get('sbedit_field_block_sidebar_left'); ?></option>
+ − 2621
<option value="<?php echo SIDEBAR_RIGHT; ?>"><?php echo $lang->get('sbedit_field_block_sidebar_right'); ?></option>
+ − 2622
</select>
0
+ − 2623
+ − 2624
</p>
+ − 2625
+ − 2626
<div class="sbadd_block" id="blocktype_<?php echo BLOCK_WIKIFORMAT; ?>">
+ − 2627
<p>
365
+ − 2628
<?php echo $lang->get('sbedit_field_wikitext'); ?>
0
+ − 2629
</p>
+ − 2630
<p>
+ − 2631
<textarea style="width: 98%;" name="wikiformat_content" rows="15" cols="50"></textarea>
+ − 2632
</p>
+ − 2633
</div>
+ − 2634
+ − 2635
<div class="sbadd_block" id="blocktype_<?php echo BLOCK_TEMPLATEFORMAT; ?>">
+ − 2636
<p>
365
+ − 2637
<?php echo $lang->get('sbedit_field_tplcode'); ?>
0
+ − 2638
</p>
+ − 2639
<p>
+ − 2640
<textarea style="width: 98%;" name="templateformat_content" rows="15" cols="50"></textarea>
+ − 2641
</p>
+ − 2642
</div>
+ − 2643
+ − 2644
<div class="sbadd_block" id="blocktype_<?php echo BLOCK_HTML; ?>">
+ − 2645
<p>
365
+ − 2646
<?php echo $lang->get('sbedit_field_html'); ?>
0
+ − 2647
</p>
+ − 2648
<p>
+ − 2649
<textarea style="width: 98%;" name="html_content" rows="15" cols="50"></textarea>
+ − 2650
</p>
+ − 2651
</div>
+ − 2652
+ − 2653
<div class="sbadd_block" id="blocktype_<?php echo BLOCK_PHP; ?>">
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2654
<?php if ( defined('ENANO_DEMO_MODE') ) { ?>
365
+ − 2655
<p><?php echo $lang->get('sbedit_field_php_disabled'); ?></p>
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2656
<?php } else { ?>
365
+ − 2657
<?php echo $lang->get('sbedit_field_php'); ?>
+ − 2658
0
+ − 2659
<p>
+ − 2660
<textarea style="width: 98%;" name="php_content" rows="15" cols="50"></textarea>
+ − 2661
</p>
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2662
<?php } ?>
0
+ − 2663
</div>
+ − 2664
+ − 2665
<div class="sbadd_block" id="blocktype_<?php echo BLOCK_PLUGIN; ?>">
+ − 2666
<p>
365
+ − 2667
<?php echo $lang->get('sbedit_field_plugin'); ?>
0
+ − 2668
</p>
+ − 2669
<p>
+ − 2670
<select name="plugin_id">
+ − 2671
<?php
+ − 2672
foreach($template->plugin_blocks as $k => $c)
+ − 2673
{
607
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2674
echo '<option value="'.$k.'">'.$lang->get($k).'</option>';
0
+ − 2675
}
+ − 2676
?>
+ − 2677
</select>
+ − 2678
</p>
+ − 2679
</div>
+ − 2680
+ − 2681
<p>
+ − 2682
365
+ − 2683
<input type="submit" name="create" value="<?php echo $lang->get('sbedit_btn_create_block'); ?>" style="font-weight: bold;" />
+ − 2684
<input type="submit" name="cancel" value="<?php echo $lang->get('etc_cancel'); ?>" />
0
+ − 2685
+ − 2686
</p>
+ − 2687
+ − 2688
</form>
+ − 2689
+ − 2690
<script type="text/javascript">
741
+ − 2691
addOnloadHook(function()
+ − 2692
{
+ − 2693
var divs = getElementsByClassName(document, 'div', 'sbadd_block');
+ − 2694
for(var i in divs)
+ − 2695
{
+ − 2696
if(divs[i].id != 'blocktype_<?php echo BLOCK_WIKIFORMAT; ?>') setTimeout("document.getElementById('"+divs[i].id+"').style.display = 'none';", 500);
+ − 2697
}
+ − 2698
});
0
+ − 2699
</script>
+ − 2700
+ − 2701
<?php
+ − 2702
$template->footer();
+ − 2703
return;
+ − 2704
break;
+ − 2705
case 'move':
607
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2706
$cache->purge('anon_sidebar');
0
+ − 2707
if( !isset($_GET['side']) || ( isset($_GET['side']) && !preg_match('#^([0-9]+)$#', $_GET['side']) ) )
+ − 2708
{
+ − 2709
echo '<div class="warning-box" style="margin: 10px 0;">$_GET[\'side\'] contained an SQL injection attempt</div>';
+ − 2710
break;
+ − 2711
}
190
+ − 2712
$query = $db->sql_query('UPDATE '.table_prefix.'sidebar SET sidebar_id=' . $db->escape($_GET['side']) . ' WHERE item_id=' . intval($_GET['id']) . ';');
0
+ − 2713
if(!$query)
+ − 2714
{
+ − 2715
echo $db->get_error();
+ − 2716
$template->footer();
+ − 2717
exit;
+ − 2718
}
365
+ − 2719
echo '<div class="info-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_block_moved') . '</div>';
0
+ − 2720
break;
+ − 2721
case 'delete':
190
+ − 2722
$query = $db->sql_query('DELETE FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';'); // Already checked for injection attempts ;-)
0
+ − 2723
if(!$query)
+ − 2724
{
+ − 2725
echo $db->get_error();
+ − 2726
$template->footer();
+ − 2727
exit;
+ − 2728
}
607
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2729
$cache->purge('anon_sidebar');
0
+ − 2730
if(isset($_GET['ajax']))
+ − 2731
{
+ − 2732
ob_end_clean();
+ − 2733
die('GOOD');
+ − 2734
}
365
+ − 2735
echo '<div class="error-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_block_deleted') . '</div>';
0
+ − 2736
break;
+ − 2737
case 'disenable';
190
+ − 2738
$q = $db->sql_query('SELECT item_enabled FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';');
0
+ − 2739
if(!$q)
+ − 2740
{
+ − 2741
echo $db->get_error();
+ − 2742
$template->footer();
+ − 2743
exit;
+ − 2744
}
+ − 2745
$r = $db->fetchrow();
+ − 2746
$db->free_result();
+ − 2747
$e = ( $r['item_enabled'] == 1 ) ? '0' : '1';
190
+ − 2748
$q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET item_enabled='.$e.' WHERE item_id=' . intval($_GET['id']) . ';');
+ − 2749
if(!$q)
+ − 2750
{
+ − 2751
echo $db->get_error();
+ − 2752
$template->footer();
+ − 2753
exit;
+ − 2754
}
+ − 2755
if(isset($_GET['ajax']))
+ − 2756
{
+ − 2757
ob_end_clean();
+ − 2758
die('GOOD');
+ − 2759
}
+ − 2760
break;
+ − 2761
case 'rename';
+ − 2762
$newname = $db->escape($_POST['newname']);
+ − 2763
$q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET block_name=\''.$newname.'\' WHERE item_id=' . intval($_GET['id']) . ';');
0
+ − 2764
if(!$q)
+ − 2765
{
+ − 2766
echo $db->get_error();
+ − 2767
$template->footer();
+ − 2768
exit;
+ − 2769
}
+ − 2770
if(isset($_GET['ajax']))
+ − 2771
{
+ − 2772
ob_end_clean();
+ − 2773
die('GOOD');
+ − 2774
}
+ − 2775
break;
+ − 2776
case 'getsource':
190
+ − 2777
$q = $db->sql_query('SELECT block_content,block_type FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';');
0
+ − 2778
if(!$q)
+ − 2779
{
+ − 2780
echo $db->get_error();
+ − 2781
$template->footer();
+ − 2782
exit;
+ − 2783
}
+ − 2784
ob_end_clean();
+ − 2785
$r = $db->fetchrow();
+ − 2786
$db->free_result();
607
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2787
$cache->purge('anon_sidebar');
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2788
0
+ − 2789
if($r['block_type'] == BLOCK_PLUGIN) die('HOUSTON_WE_HAVE_A_PLUGIN');
+ − 2790
die($r['block_content']);
+ − 2791
break;
+ − 2792
case 'save':
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2793
if ( defined('ENANO_DEMO_MODE') )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2794
{
190
+ − 2795
$q = $db->sql_query('SELECT block_type FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';');
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2796
if(!$q)
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2797
{
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2798
echo 'var status=unescape(\''.hexencode($db->get_error()).'\');';
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2799
exit;
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2800
}
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2801
$row = $db->fetchrow();
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2802
if ( $row['block_type'] == BLOCK_PHP )
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2803
{
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2804
$_POST['content'] = '?><Nulled>';
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2805
}
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2806
else
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2807
{
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2808
$_POST['content'] = sanitize_html($_POST['content'], true);
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2809
}
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
diff
changeset
+ − 2810
}
190
+ − 2811
$q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET block_content=\''.$db->escape(rawurldecode($_POST['content'])).'\' WHERE item_id=' . intval($_GET['id']) . ';');
0
+ − 2812
if(!$q)
+ − 2813
{
+ − 2814
echo 'var status=unescape(\''.hexencode($db->get_error()).'\');';
+ − 2815
exit;
+ − 2816
}
190
+ − 2817
$q = $db->sql_query('SELECT block_type,block_content FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';');
0
+ − 2818
if(!$q)
+ − 2819
{
+ − 2820
echo 'var status=unescape(\''.hexencode($db->get_error()).'\');';
+ − 2821
exit;
+ − 2822
}
+ − 2823
$row = $db->fetchrow();
+ − 2824
$db->free_result();
+ − 2825
switch($row['block_type'])
+ − 2826
{
+ − 2827
case BLOCK_WIKIFORMAT:
+ − 2828
default:
+ − 2829
$c = RenderMan::render($row['block_content']);
+ − 2830
break;
+ − 2831
case BLOCK_TEMPLATEFORMAT:
+ − 2832
$c = $template->tplWikiFormat($row['block_content'], false, 'sidebar-editor.tpl');
+ − 2833
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c);
+ − 2834
break;
+ − 2835
case BLOCK_HTML:
+ − 2836
$c = $row['block_content'];
+ − 2837
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c);
+ − 2838
break;
+ − 2839
case BLOCK_PHP:
+ − 2840
ob_start();
+ − 2841
eval($row['block_content']);
+ − 2842
$c = ob_get_contents();
+ − 2843
ob_end_clean();
+ − 2844
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c);
+ − 2845
break;
+ − 2846
case BLOCK_PLUGIN:
365
+ − 2847
$c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : $lang->get('sbedit_msg_plugin_not_loaded');
0
+ − 2848
break;
+ − 2849
}
597
c4ae0d8e260f
Added ability to hide or show sidebar blocks based on a {restrict} or {hideif} conditional in the sidebar script
Dan
diff
changeset
+ − 2850
$c = preg_replace('/\{(restrict|hideif) ([a-z0-9_\(\)\|&! ]+)\}/', '', $c);
607
935f3799b654
First stab at cache management backend. Everything seems to have been tested and working so far, but a number of things require a more specialized cache and can't go through the framework (e.g. user ranks which use references to map usernames to user IDs)
Dan
diff
changeset
+ − 2851
$cache->purge('anon_sidebar');
0
+ − 2852
die('var status = \'GOOD\'; var content = unescape(\''.hexencode($c).'\');');
+ − 2853
break;
+ − 2854
}
+ − 2855
}
+ − 2856
+ − 2857
$q = $db->sql_query('SELECT item_id,sidebar_id,item_enabled,block_name,block_type,block_content FROM '.table_prefix.'sidebar ORDER BY sidebar_id ASC, item_order ASC;');
+ − 2858
if(!$q) $db->_die('The sidebar text data could not be selected.');
+ − 2859
+ − 2860
$vars = $template->extract_vars('sidebar-editor.tpl');
+ − 2861
+ − 2862
$parser = $template->makeParserText($vars['sidebar_button']);
+ − 2863
$parser->assign_vars(Array(
+ − 2864
'HREF'=>'#',
+ − 2865
'FLAGS'=>'onclick="return false;"',
365
+ − 2866
'TEXT' => $lang->get('sidebar_btn_changestyle')
0
+ − 2867
));
+ − 2868
$template->tpl_strings['THEME_LINK'] = $parser->run();
+ − 2869
$parser->assign_vars(Array(
365
+ − 2870
'TEXT' => $lang->get('sidebar_btn_logout'),
0
+ − 2871
));
+ − 2872
$template->tpl_strings['LOGOUT_LINK'] = $parser->run();
+ − 2873
+ − 2874
$n1 = Array();
+ − 2875
$n2 = Array();
+ − 2876
$n =& $n1;
+ − 2877
+ − 2878
echo '<table border="0"><tr><td valign="top"><div class="dbx-group" id="sbedit_left">';
+ − 2879
//if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_top']);
+ − 2880
+ − 2881
// Time for the loop
+ − 2882
// what this loop does is fetch the row data, then send it out to the appropriate parser for formatting,
+ − 2883
// then puts the result into $c, which is then sent to the template compiler for insertion into the TPL code.
+ − 2884
while($row = $db->fetchrow())
+ − 2885
{
+ − 2886
if(isset($current_side))
+ − 2887
{
+ − 2888
if($current_side != $row['sidebar_id'])
+ − 2889
{
+ − 2890
// Time to switch!
+ − 2891
//if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_bottom']);
+ − 2892
echo '</div></td><td valign="top"><div class="dbx-group" id="sbedit_right">';
+ − 2893
//echo '</td><td valign="top">';
+ − 2894
//if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_top']);
+ − 2895
$n =& $n2;
+ − 2896
}
+ − 2897
}
+ − 2898
$n[] = count($n);
+ − 2899
$current_side = $row['sidebar_id'];
+ − 2900
switch($row['block_type'])
+ − 2901
{
+ − 2902
case BLOCK_WIKIFORMAT:
+ − 2903
default:
+ − 2904
$parser = $template->makeParserText($vars['sidebar_section']);
+ − 2905
$c = RenderMan::render($row['block_content']);
+ − 2906
break;
+ − 2907
case BLOCK_TEMPLATEFORMAT:
+ − 2908
$parser = $template->makeParserText($vars['sidebar_section']);
+ − 2909
$c = $template->tplWikiFormat($row['block_content'], false, 'sidebar-editor.tpl');
+ − 2910
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c);
183
91127e62f38f
Fixed some regular expressions in HTML optimization algorithm; regex page groups can be edited now (oops)
Dan
diff
changeset
+ − 2911
// fix for the "Administration" link that somehow didn't get rendered properly
91127e62f38f
Fixed some regular expressions in HTML optimization algorithm; regex page groups can be edited now (oops)
Dan
diff
changeset
+ − 2912
$c = preg_replace("/(^|\n)([ ]*)<a([ ]+.*)?>(.+)<\/a>(<br(.*)\/>)([\r\n]+|$)/isU", '\\1\\2<li><a\\3>\\4</a></li>\\7', $c);
0
+ − 2913
break;
+ − 2914
case BLOCK_HTML:
+ − 2915
$parser = $template->makeParserText($vars['sidebar_section_raw']);
+ − 2916
$c = $row['block_content'];
+ − 2917
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c);
+ − 2918
break;
+ − 2919
case BLOCK_PHP:
+ − 2920
$parser = $template->makeParserText($vars['sidebar_section_raw']);
+ − 2921
ob_start();
+ − 2922
eval($row['block_content']);
+ − 2923
$c = ob_get_contents();
+ − 2924
ob_end_clean();
+ − 2925
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c);
+ − 2926
break;
+ − 2927
case BLOCK_PLUGIN:
+ − 2928
$parser = $template->makeParserText($vars['sidebar_section_raw']);
741
+ − 2929
$c = ($template->fetch_block($row['block_content'], true)) ? $template->fetch_block($row['block_content'], true) : $lang->get('sbedit_msg_plugin_not_loaded');
+ − 2930
0
+ − 2931
break;
+ − 2932
}
597
c4ae0d8e260f
Added ability to hide or show sidebar blocks based on a {restrict} or {hideif} conditional in the sidebar script
Dan
diff
changeset
+ − 2933
$c = preg_replace('/\{(restrict|hideif) ([a-z0-9_\(\)\|&! ]+)\}/', '', $c);
215
+ − 2934
$block_name = $row['block_name']; // $template->tplWikiFormat($row['block_name']);
202
88d7a7c2743c
Nothing special at all. Unnamed sidebar blocks will show the text <Unnamed> instead of just showing nothing, thus making them renamable
Dan
diff
changeset
+ − 2935
if ( empty($block_name) )
365
+ − 2936
$block_name = '<' . $lang->get('sbedit_note_block_unnamed') . '>';
+ − 2937
$t = '<span title="' . $lang->get('sbedit_hint_rename') . '" id="sbrename_' . $row['item_id'] . '" ondblclick="ajaxRenameSidebarStage1(this, \''.$row['item_id'].'\'); return false;">' . $block_name . '</span>';
+ − 2938
if($row['item_enabled'] == 0) $t .= ' <span id="disabled_'.$row['item_id'].'" style="color: red;">' . $lang->get('sbedit_note_block_disabled') . '</span>';
+ − 2939
else $t .= ' <span id="disabled_'.$row['item_id'].'" style="color: red; display: none;">' . $lang->get('sbedit_note_block_disabled') . '</span>';
0
+ − 2940
$side = ( $row['sidebar_id'] == SIDEBAR_LEFT ) ? SIDEBAR_RIGHT : SIDEBAR_LEFT;
365
+ − 2941
$tb = '<a title="' . $lang->get('sbedit_tip_disenable') . '" href="'.makeUrl($paths->page, 'action=disenable&id='.$row['item_id'].'' , true).'" onclick="ajaxDisenableBlock(\''.$row['item_id'].'\'); return false;" ><img alt="' . $lang->get('sbedit_tip_disenable') . '" style="border-width: 0;" src="'.scriptPath.'/images/disenable.png" /></a>
+ − 2942
<a title="' . $lang->get('sbedit_tip_edit') . '" href="'.makeUrl($paths->page, 'action=edit&id='.$row['item_id'].'' , true).'" onclick="ajaxEditBlock(\''.$row['item_id'].'\', this); return false;"><img alt="' . $lang->get('sbedit_tip_edit') . '" style="border-width: 0;" src="'.scriptPath.'/images/edit.png" /></a>
+ − 2943
<a title="' . $lang->get('sbedit_tip_delete') . '" href="'.makeUrl($paths->page, 'action=delete&id='.$row['item_id'].'' , true).'" onclick="if(confirm(\'' . $lang->get('sbedit_msg_delete_confirm') . '\')) { ajaxDeleteBlock(\''.$row['item_id'].'\', this); } return false;"><img alt="' . $lang->get('sbedit_tip_delete') . '" style="border-width: 0;" src="'.scriptPath.'/images/delete.png" /></a>
+ − 2944
<a title="' . $lang->get('sbedit_tip_move') . '" href="'.makeUrl($paths->page, 'action=move&id='.$row['item_id'].'&side='.$side, true).'"><img alt="' . $lang->get('sbedit_tip_move') . '" style="border-width: 0;" src="'.scriptPath.'/images/move.png" /></a>';
0
+ − 2945
$as = '';
+ − 2946
$ae = ' '.$tb;
+ − 2947
$parser->assign_vars(Array('CONTENT'=>$c,'TITLE'=>$t,'ADMIN_START'=>$as,'ADMIN_END'=>$ae));
+ − 2948
echo $parser->run();
+ − 2949
unset($parser);
+ − 2950
+ − 2951
}
+ − 2952
$db->free_result();
+ − 2953
//if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_bottom']);
+ − 2954
echo '</div></td></tr></table>';
+ − 2955
echo '<form action="'.makeUrl($paths->page).'" method="post">';
+ − 2956
$order = implode(',', $n1);
+ − 2957
echo "<input type='hidden' id='divOrder_Left' name='order_left' value='{$order}' />";
+ − 2958
$order = implode(',', $n2);
+ − 2959
echo "<input type='hidden' id='divOrder_Right' name='order_right' value='{$order}' />";
+ − 2960
echo '
+ − 2961
<div style="margin: 0 auto 0 auto; text-align: center;">
365
+ − 2962
<input type="submit" name="save" style="font-weight: bold;" value="' . $lang->get('etc_save_changes') . '" />
+ − 2963
<input type="submit" name="revert" style="font-weight: normal;" value="' . $lang->get('sbedit_btn_revert') . '" onclick="return confirm($lang.get(\'sbedit_msg_discard_order_confirm\'))" />
0
+ − 2964
<br />
741
+ − 2965
<a href="'.makeUrl($paths->page, 'action=new&id=0', true).'">' . $lang->get('sbedit_btn_create_new_stage1') . '</a> | <a href="'.makeUrl(get_main_page(), false, true).'">' . $lang->get('sbedit_btn_main_page') . '</a>
0
+ − 2966
</div>
+ − 2967
</form>
+ − 2968
';
+ − 2969
}
+ − 2970
+ − 2971
$template->footer();
+ − 2972
}
+ − 2973
+ − 2974
?>