author | Dan |
Tue, 10 Jun 2008 10:51:44 -0400 | |
changeset 569 | 6ba792bc9071 |
parent 564 | a1c450a911a6 |
child 573 | 43e7254afdb4 |
permissions | -rw-r--r-- |
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
parents:
511
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
parents:
511
diff
changeset
|
3 |
{ |
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
parents:
511
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
parents:
511
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
parents:
511
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
parents:
511
diff
changeset
|
7 |
"Author" : "Dan Fuhry", |
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
parents:
555
diff
changeset
|
8 |
"Version" : "1.1.4", |
519
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
parents:
511
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
parents:
511
diff
changeset
|
10 |
} |
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
parents:
511
diff
changeset
|
11 |
**!*/ |
0 | 12 |
|
13 |
/* |
|
14 |
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
|
536 | 15 |
* Version 1.1.4 (Caoineag alpha 4) |
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 |
||
334
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
329
diff
changeset
|
27 |
$plugins->attachHook('session_started', ' |
0 | 28 |
global $paths; |
29 |
$paths->add_page(Array( |
|
334
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
329
diff
changeset
|
30 |
\'name\'=>\'specialpage_administration\', |
0 | 31 |
\'urlname\'=>\'Administration\', |
32 |
\'namespace\'=>\'Special\', |
|
116
77c75179bb95
Made most special pages "visible"; fixup for non-existent special page redirect in paths.php; rewrote Special:AllPages to have pagination (WiP, Special:SpecialPages is possibly next, depending on whether paginate_array works or not)
Dan
parents:
110
diff
changeset
|
33 |
\'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', |
0 | 34 |
)); |
35 |
||
36 |
$paths->add_page(Array( |
|
334
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
329
diff
changeset
|
37 |
\'name\'=>\'specialpage_manage_sidebar\', |
0 | 38 |
\'urlname\'=>\'EditSidebar\', |
39 |
\'namespace\'=>\'Special\', |
|
116
77c75179bb95
Made most special pages "visible"; fixup for non-existent special page redirect in paths.php; rewrote Special:AllPages to have pagination (WiP, Special:SpecialPages is possibly next, depending on whether paginate_array works or not)
Dan
parents:
110
diff
changeset
|
40 |
\'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', |
0 | 41 |
)); |
42 |
'); |
|
43 |
||
74
68469a95658d
Various bugfixes and cleanups, too much to remember... see the diffs for what got changed :-)
Dan
parents:
73
diff
changeset
|
44 |
// Admin pages that were too enormous to be in this file were split off into the plugins/admin/ directory in 1.0.1 |
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
parents:
336
diff
changeset
|
45 |
require(ENANO_ROOT . '/plugins/admin/PageManager.php'); |
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
parents:
343
diff
changeset
|
46 |
require(ENANO_ROOT . '/plugins/admin/PageEditor.php'); |
74
68469a95658d
Various bugfixes and cleanups, too much to remember... see the diffs for what got changed :-)
Dan
parents:
73
diff
changeset
|
47 |
require(ENANO_ROOT . '/plugins/admin/PageGroups.php'); |
347 | 48 |
require(ENANO_ROOT . '/plugins/admin/GroupManager.php'); |
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
parents:
103
diff
changeset
|
49 |
require(ENANO_ROOT . '/plugins/admin/SecurityLog.php'); |
140
40f7fa5fd061
Revamped the administrator's user CP, big time. The admin module now uses a smart form and enables all profile fields, including users_extra, to be changed. Passwords are encrypted when sent. The whole CP has been split off into a different file to accomodate the large amount of code.
Dan
parents:
133
diff
changeset
|
50 |
require(ENANO_ROOT . '/plugins/admin/UserManager.php'); |
555
ac4c6a7f01d8
Added user preference for disabling visual effects in Javascript applets; added re-import button to installed plugins
Dan
parents:
536
diff
changeset
|
51 |
require(ENANO_ROOT . '/plugins/admin/UserRanks.php'); |
372
5bd429428101
A number of scattered changes. Profiler added and only enabled in debug mode (currently on), but awfully useful for fixing performance in the future. Started work on Admin:LangManager
Dan
parents:
365
diff
changeset
|
52 |
require(ENANO_ROOT . '/plugins/admin/LangManager.php'); |
430
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
parents:
407
diff
changeset
|
53 |
require(ENANO_ROOT . '/plugins/admin/ThemeManager.php'); |
519
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
parents:
511
diff
changeset
|
54 |
require(ENANO_ROOT . '/plugins/admin/PluginManager.php'); |
74
68469a95658d
Various bugfixes and cleanups, too much to remember... see the diffs for what got changed :-)
Dan
parents:
73
diff
changeset
|
55 |
|
376 | 56 |
// For convenience and nothing more. |
57 |
function acp_start_form() |
|
58 |
{ |
|
59 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
60 |
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">'; |
|
61 |
} |
|
74
68469a95658d
Various bugfixes and cleanups, too much to remember... see the diffs for what got changed :-)
Dan
parents:
73
diff
changeset
|
62 |
|
0 | 63 |
// function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace> |
64 |
||
65 |
function page_Admin_Home() { |
|
66 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
67 |
global $lang; |
0 | 68 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
69 |
{ |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
70 |
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
217
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
71 |
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
72 |
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
0 | 73 |
return; |
74 |
} |
|
75 |
||
329
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
76 |
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
parents:
328
diff
changeset
|
77 |
{ |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
78 |
require_once(ENANO_ROOT . '/includes/http.php'); |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
79 |
$req = new Request_HTTP('germantown.enanocms.org', '/meta/updates.xml'); |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
80 |
$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
parents:
328
diff
changeset
|
81 |
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
parents:
328
diff
changeset
|
82 |
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
parents:
328
diff
changeset
|
83 |
{ |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
84 |
// 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
parents:
328
diff
changeset
|
85 |
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
parents:
328
diff
changeset
|
86 |
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
parents:
328
diff
changeset
|
87 |
]]></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
parents:
328
diff
changeset
|
88 |
} |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
89 |
else |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
90 |
{ |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
91 |
// 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
parents:
328
diff
changeset
|
92 |
$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
parents:
328
diff
changeset
|
93 |
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
parents:
328
diff
changeset
|
94 |
{ |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
95 |
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
parents:
328
diff
changeset
|
96 |
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
parents:
328
diff
changeset
|
97 |
]]></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
parents:
328
diff
changeset
|
98 |
} |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
99 |
if ( version_compare(enano_version(true), $match[2], '<') ) |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
100 |
{ |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
101 |
$response = str_replace_once('</latest>', " <haveupdates />\n </latest>", $response); |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
102 |
} |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
103 |
echo $response; |
0437a7cf1acc
Added update-checking function (still a little rough around the edges); added support into admin user CP for changing avatars
Dan
parents:
328
diff
changeset
|
104 |
} |
0 | 105 |
return; |
106 |
} |
|
107 |
||
108 |
// 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
parents:
336
diff
changeset
|
109 |
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
parents:
336
diff
changeset
|
110 |
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
parents:
336
diff
changeset
|
111 |
echo '<p>' . $lang->get('acphome_welcome_line2') . '</p>'; |
0 | 112 |
|
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
113 |
// Demo mode |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
114 |
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
parents:
15
diff
changeset
|
115 |
{ |
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
parents:
336
diff
changeset
|
116 |
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
parents:
336
diff
changeset
|
117 |
<p>' . $lang->get('acphome_msg_demo_body', array('reset_url' => makeUrlNS('Special', 'DemoReset', false, true))) . '</p>'; |
443
a48b72312f6d
Fix undefined E_STRICT under PHP 4; add PHP 4 deprecation notice in admin panel
Dan
parents:
322
diff
changeset
|
118 |
} |
a48b72312f6d
Fix undefined E_STRICT under PHP 4; add PHP 4 deprecation notice in admin panel
Dan
parents:
322
diff
changeset
|
119 |
|
0 | 120 |
// Check for the installer scripts |
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
121 |
if( ( file_exists(ENANO_ROOT.'/install.php') || file_exists(ENANO_ROOT.'/schema.sql') ) && !defined('ENANO_DEMO_MODE') ) |
0 | 122 |
{ |
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
parents:
336
diff
changeset
|
123 |
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
parents:
336
diff
changeset
|
124 |
' . $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
parents:
336
diff
changeset
|
125 |
</div>'; |
0 | 126 |
} |
127 |
||
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
parents:
336
diff
changeset
|
128 |
echo '<h3>' . $lang->get('acphome_heading_updates') . '</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
parents:
336
diff
changeset
|
129 |
echo '<p>' . $lang->get('acphome_msg_updates_info', array('updates_url' => 'http://germantown.enanocms.org/meta/updates.xml')) . '</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
parents:
336
diff
changeset
|
130 |
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
parents:
328
diff
changeset
|
131 |
|
0 | 132 |
// 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
parents:
336
diff
changeset
|
133 |
$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
parents:
336
diff
changeset
|
134 |
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
parents:
336
diff
changeset
|
135 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
136 |
if ( $db->numrows() > 0 ) |
0 | 137 |
{ |
138 |
$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
parents:
336
diff
changeset
|
139 |
$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
parents:
336
diff
changeset
|
140 |
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
parents:
336
diff
changeset
|
141 |
$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
parents:
336
diff
changeset
|
142 |
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
parents:
336
diff
changeset
|
143 |
$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
parents:
336
diff
changeset
|
144 |
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
parents:
336
diff
changeset
|
145 |
' . $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
parents:
336
diff
changeset
|
146 |
</div>'; |
0 | 147 |
} |
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
parents:
336
diff
changeset
|
148 |
} |
0 | 149 |
$db->free_result(); |
150 |
// Stats |
|
151 |
if(getConfig('log_hits') == '1') |
|
152 |
{ |
|
153 |
$stats = stats_top_pages(10); |
|
61 | 154 |
//die('<pre>'.print_r($stats,true).'</pre>'); |
0 | 155 |
$c = 0; |
156 |
$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
parents:
336
diff
changeset
|
157 |
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
parents:
336
diff
changeset
|
158 |
<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
parents:
336
diff
changeset
|
159 |
<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
parents:
336
diff
changeset
|
160 |
<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
parents:
336
diff
changeset
|
161 |
<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
parents:
336
diff
changeset
|
162 |
<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
parents:
336
diff
changeset
|
163 |
</tr>'; |
61 | 164 |
foreach($stats as $data) |
0 | 165 |
{ |
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
parents:
336
diff
changeset
|
166 |
echo '<tr>'; |
61 | 167 |
$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
parents:
336
diff
changeset
|
168 |
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
parents:
336
diff
changeset
|
169 |
<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
parents:
336
diff
changeset
|
170 |
. '</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
parents:
336
diff
changeset
|
171 |
echo '</tr>'; |
0 | 172 |
} |
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
parents:
336
diff
changeset
|
173 |
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
parents:
336
diff
changeset
|
174 |
</div>'; |
0 | 175 |
} |
176 |
||
177 |
// 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
parents:
336
diff
changeset
|
178 |
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
parents:
343
diff
changeset
|
179 |
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
parents:
103
diff
changeset
|
180 |
$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
parents:
103
diff
changeset
|
181 |
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
parents:
103
diff
changeset
|
182 |
|
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
parents:
336
diff
changeset
|
183 |
echo '<p><a href="#" onclick="ajaxPage(\''.$paths->nslist['Admin'].'SecurityLog\'); return false;">' . $lang->get('acphome_btn_seclog_full') . '</a></p>'; |
0 | 184 |
|
185 |
} |
|
186 |
||
187 |
function page_Admin_GeneralConfig() { |
|
188 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
189 |
global $lang; |
0 | 190 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
191 |
{ |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
192 |
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
217
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
193 |
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
194 |
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
0 | 195 |
return; |
196 |
} |
|
197 |
||
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
198 |
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
parents:
15
diff
changeset
|
199 |
{ |
0 | 200 |
|
201 |
// Global site options |
|
202 |
setConfig('site_name', $_POST['site_name']); |
|
203 |
setConfig('site_desc', $_POST['site_desc']); |
|
204 |
setConfig('main_page', str_replace(' ', '_', $_POST['main_page'])); |
|
205 |
setConfig('copyright_notice', $_POST['copyright']); |
|
206 |
setConfig('contact_email', $_POST['contact_email']); |
|
207 |
||
208 |
// Wiki mode |
|
209 |
if(isset($_POST['wikimode'])) setConfig('wiki_mode', '1'); |
|
210 |
else setConfig('wiki_mode', '0'); |
|
211 |
if(isset($_POST['wiki_mode_require_login'])) setConfig('wiki_mode_require_login', '1'); |
|
212 |
else setConfig('wiki_mode_require_login', '0'); |
|
213 |
if(isset($_POST['editmsg'])) setConfig('wiki_edit_notice', '1'); |
|
214 |
else setConfig('wiki_edit_notice', '0'); |
|
215 |
setConfig('wiki_edit_notice_text', $_POST['editmsg_text']); |
|
336
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
216 |
if(isset($_POST['guest_edit_require_captcha'])) setConfig('guest_edit_require_captcha', '1'); |
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
217 |
else setConfig('guest_edit_require_captcha', '0'); |
0 | 218 |
|
219 |
// Stats |
|
220 |
if(isset($_POST['log_hits'])) setConfig('log_hits', '1'); |
|
221 |
else setConfig('log_hits', '0'); |
|
222 |
||
223 |
// Disablement |
|
224 |
if(isset($_POST['site_disabled'])) { setConfig('site_disabled', '1'); setConfig('site_disabled_notice', $_POST['site_disabled_notice']); } |
|
225 |
else setConfig('site_disabled', '0'); |
|
226 |
||
227 |
// Account activation |
|
228 |
setConfig('account_activation', $_POST['account_activation']); |
|
229 |
||
230 |
// W3C compliance buttons |
|
231 |
if(isset($_POST['w3c-vh32'])) setConfig("w3c_vh32", "1"); |
|
232 |
else setConfig("w3c_vh32", "0"); |
|
233 |
if(isset($_POST['w3c-vh40'])) setConfig("w3c_vh40", "1"); |
|
234 |
else setConfig("w3c_vh40", "0"); |
|
235 |
if(isset($_POST['w3c-vh401'])) setConfig("w3c_vh401", "1"); |
|
236 |
else setConfig("w3c_vh401", "0"); |
|
237 |
if(isset($_POST['w3c-vxhtml10'])) setConfig("w3c_vxhtml10", "1"); |
|
238 |
else setConfig("w3c_vxhtml10", "0"); |
|
239 |
if(isset($_POST['w3c-vxhtml11'])) setConfig("w3c_vxhtml11", "1"); |
|
240 |
else setConfig("w3c_vxhtml11", "0"); |
|
241 |
if(isset($_POST['w3c-vcss'])) setConfig("w3c_vcss", "1"); |
|
242 |
else setConfig("w3c_vcss", "0"); |
|
243 |
||
244 |
// SourceForge.net logo |
|
245 |
if(isset($_POST['showsf'])) setConfig('sflogo_enabled', '1'); |
|
246 |
else setConfig('sflogo_enabled', '0'); |
|
247 |
setConfig('sflogo_groupid', $_POST['sfgroup']); |
|
248 |
setConfig('sflogo_type', $_POST['sflogo']); |
|
249 |
||
250 |
// Comment options |
|
251 |
if(isset($_POST['comment-approval'])) setConfig('approve_comments', '1'); |
|
252 |
else setConfig('approve_comments', '0'); |
|
253 |
if(isset($_POST['enable-comments'])) setConfig('enable_comments', '1'); |
|
254 |
else setConfig('enable_comments', '0'); |
|
255 |
setConfig('comments_need_login', $_POST['comments_need_login']); |
|
256 |
||
257 |
// Powered by link |
|
258 |
if ( isset($_POST['enano_powered_link']) ) setConfig('powered_btn', '1'); |
|
259 |
else setConfig('powered_btn', '0'); |
|
260 |
||
261 |
if(isset($_POST['dbdbutton'])) setConfig('dbd_button', '1'); |
|
262 |
else setConfig('dbd_button', '0'); |
|
263 |
||
264 |
if($_POST['emailmethod'] == 'phpmail') setConfig('smtp_enabled', '0'); |
|
265 |
else setConfig('smtp_enabled', '1'); |
|
266 |
||
267 |
setConfig('smtp_server', $_POST['smtp_host']); |
|
268 |
setConfig('smtp_user', $_POST['smtp_user']); |
|
269 |
if($_POST['smtp_pass'] != 'XXXXXXXXXXXX') setConfig('smtp_password', $_POST['smtp_pass']); |
|
270 |
||
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
parents:
130
diff
changeset
|
271 |
// 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
parents:
130
diff
changeset
|
272 |
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
parents:
130
diff
changeset
|
273 |
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
parents:
130
diff
changeset
|
274 |
|
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
parents:
130
diff
changeset
|
275 |
$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
parents:
130
diff
changeset
|
276 |
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
parents:
130
diff
changeset
|
277 |
{ |
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
parents:
130
diff
changeset
|
278 |
$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
parents:
130
diff
changeset
|
279 |
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
parents:
130
diff
changeset
|
280 |
} |
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
parents:
130
diff
changeset
|
281 |
|
465
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
282 |
// Default theme |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
283 |
$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
parents:
458
diff
changeset
|
284 |
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
parents:
458
diff
changeset
|
285 |
|
473
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
286 |
// Breadcrumb mode |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
287 |
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
parents:
465
diff
changeset
|
288 |
{ |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
289 |
setConfig('breadcrumb_mode', $_POST['breadcrumb_mode']); |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
290 |
} |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
291 |
|
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
292 |
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
parents:
347
diff
changeset
|
293 |
|
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
parents:
166
diff
changeset
|
294 |
// Account 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
parents:
166
diff
changeset
|
295 |
if ( preg_match('/^[0-9]+$/', $_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
parents:
166
diff
changeset
|
296 |
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
parents:
166
diff
changeset
|
297 |
|
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
parents:
166
diff
changeset
|
298 |
if ( preg_match('/^[0-9]+$/', $_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
parents:
166
diff
changeset
|
299 |
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
parents:
166
diff
changeset
|
300 |
|
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
parents:
166
diff
changeset
|
301 |
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
parents:
166
diff
changeset
|
302 |
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
parents:
166
diff
changeset
|
303 |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
304 |
// Avatar settings |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
305 |
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
parents:
326
diff
changeset
|
306 |
// 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
parents:
326
diff
changeset
|
307 |
// 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
parents:
326
diff
changeset
|
308 |
// 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
parents:
326
diff
changeset
|
309 |
// 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
parents:
326
diff
changeset
|
310 |
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
parents:
326
diff
changeset
|
311 |
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
parents:
326
diff
changeset
|
312 |
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
parents:
326
diff
changeset
|
313 |
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
parents:
326
diff
changeset
|
314 |
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
parents:
326
diff
changeset
|
315 |
setConfig('avatar_upload_http', ( isset($_POST['avatar_upload_http']) ? '1' : '0' )); |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
316 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
317 |
if ( is_dir(ENANO_ROOT . '/' . $_POST['avatar_directory']) ) |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
318 |
{ |
511
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
504
diff
changeset
|
319 |
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
parents:
326
diff
changeset
|
320 |
{ |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
321 |
setConfig('avatar_directory', $_POST['avatar_directory']); |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
322 |
} |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
323 |
else |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
324 |
{ |
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
parents:
336
diff
changeset
|
325 |
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
parents:
326
diff
changeset
|
326 |
} |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
327 |
} |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
328 |
else |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
329 |
{ |
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
parents:
336
diff
changeset
|
330 |
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
parents:
326
diff
changeset
|
331 |
} |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
332 |
|
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
parents:
336
diff
changeset
|
333 |
echo '<div class="info-box">' . $lang->get('acpgc_msg_save_success') . '</div><br />'; |
0 | 334 |
|
335 |
} |
|
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
336 |
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
parents:
15
diff
changeset
|
337 |
{ |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
338 |
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
parents:
15
diff
changeset
|
339 |
} |
0 | 340 |
echo('<form name="main" action="'.htmlspecialchars(makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module'])).'" method="post" onsubmit="if(!submitAuthorized) return false;">'); |
341 |
?> |
|
342 |
<div class="tblholder"> |
|
343 |
<table border="0" width="100%" cellspacing="1" cellpadding="4"> |
|
344 |
||
345 |
<!-- Global options --> |
|
346 |
||
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
parents:
336
diff
changeset
|
347 |
<tr><th colspan="2"><?php echo $lang->get('acpgc_heading_main'); ?></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
parents:
336
diff
changeset
|
348 |
<tr><th colspan="2" class="subhead"><?php echo $lang->get('acpgc_heading_submain'); ?></th></tr> |
0 | 349 |
|
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
parents:
336
diff
changeset
|
350 |
<tr><td class="row1" style="width: 50%;"><?php echo $lang->get('acpgc_field_site_name'); ?></td> <td class="row1" style="width: 50%;"><input type="text" name="site_name" size="30" value="<?php echo htmlspecialchars(getConfig('site_name')); ?>" /></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
parents:
336
diff
changeset
|
351 |
<tr><td class="row2"><?php echo $lang->get('acpgc_field_site_desc'); ?></td> <td class="row2"><input type="text" name="site_desc" size="30" value="<?php echo htmlspecialchars(getConfig('site_desc')); ?>" /></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
parents:
336
diff
changeset
|
352 |
<tr><td class="row1"><?php echo $lang->get('acpgc_field_main_page'); ?></td> <td class="row1"><?php echo $template->pagename_field('main_page', htmlspecialchars(str_replace('_', ' ', getConfig('main_page')))); ?></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
parents:
336
diff
changeset
|
353 |
<tr><td class="row2"><?php echo $lang->get('acpgc_field_copyright'); ?></td><td class="row2"><input type="text" name="copyright" size="30" value="<?php echo htmlspecialchars(getConfig('copyright_notice')); ?>" /></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
parents:
336
diff
changeset
|
354 |
<tr><td class="row1" colspan="2"><?php echo $lang->get('acpgc_field_copyright_hint'); ?></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
parents:
336
diff
changeset
|
355 |
<tr><td class="row2"><?php echo $lang->get('acpgc_field_contactemail'); ?><br /><small><?php echo $lang->get('acpgc_field_contactemail_hint'); ?></small></td><td class="row2"><input name="contact_email" type="text" size="40" value="<?php echo htmlspecialchars(getConfig('contact_email')); ?>" /></td></tr> |
0 | 356 |
|
357 |
<!-- Wiki mode --> |
|
358 |
||
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
parents:
336
diff
changeset
|
359 |
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_wikimode'); ?></th></tr> |
0 | 360 |
|
361 |
<tr> |
|
362 |
<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
parents:
336
diff
changeset
|
363 |
<?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
parents:
336
diff
changeset
|
364 |
<?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
parents:
336
diff
changeset
|
365 |
<?php echo $lang->get('acpgc_field_wikimode_info_history'); ?> |
0 | 366 |
</td> |
367 |
<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
parents:
336
diff
changeset
|
368 |
<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 | 369 |
</td> |
370 |
</tr> |
|
371 |
||
372 |
<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> |
|
373 |
||
374 |
<tr> |
|
375 |
<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
parents:
336
diff
changeset
|
376 |
<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
parents:
336
diff
changeset
|
377 |
<?php echo $lang->get('acpgc_field_editnotice_info'); ?> |
0 | 378 |
</td> |
379 |
<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
parents:
336
diff
changeset
|
380 |
<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')=='1') echo('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
parents:
336
diff
changeset
|
381 |
<label for="editmsg"><?php echo $lang->get('acpgc_field_editnotice'); ?></label> |
0 | 382 |
</td> |
383 |
</tr> |
|
384 |
||
385 |
<tr> |
|
386 |
<td class="row2"> |
|
387 |
<textarea <?php if(getConfig('wiki_edit_notice')!='1') echo('style="display:none" '); ?>rows="5" cols="30" name="editmsg_text" id="editmsg_text"><?php echo getConfig('wiki_edit_notice_text'); ?></textarea> |
|
388 |
</td> |
|
389 |
</tr> |
|
390 |
||
336
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
391 |
<tr> |
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
392 |
<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
parents:
336
diff
changeset
|
393 |
<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
parents:
336
diff
changeset
|
394 |
<?php echo $lang->get('acpgc_field_edit_require_captcha_hint'); ?> |
336
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
395 |
</td> |
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
396 |
<td class="row1"> |
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
397 |
<label> |
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
398 |
<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
parents:
336
diff
changeset
|
399 |
<?php echo $lang->get('acpgc_field_edit_require_captcha'); ?> |
336
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
400 |
</label> |
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
401 |
</td> |
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
402 |
</tr> |
bfa2e9c23f03
Added ability to require CAPTCHA for guests when editing pages (AJAX INTERFACE ONLY)
Dan
parents:
335
diff
changeset
|
403 |
|
0 | 404 |
<!-- Site statistics --> |
405 |
||
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
parents:
336
diff
changeset
|
406 |
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_stats'); ?></th></tr> |
0 | 407 |
|
408 |
<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
parents:
336
diff
changeset
|
409 |
<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
parents:
336
diff
changeset
|
410 |
<?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
parents:
336
diff
changeset
|
411 |
<?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
parents:
336
diff
changeset
|
412 |
</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
parents:
336
diff
changeset
|
413 |
<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
parents:
336
diff
changeset
|
414 |
<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
parents:
336
diff
changeset
|
415 |
<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
parents:
336
diff
changeset
|
416 |
<?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
parents:
336
diff
changeset
|
417 |
</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
parents:
336
diff
changeset
|
418 |
<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
parents:
336
diff
changeset
|
419 |
</td> |
0 | 420 |
</tr> |
421 |
||
422 |
<!-- Comment options --> |
|
423 |
||
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
parents:
336
diff
changeset
|
424 |
<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
parents:
336
diff
changeset
|
425 |
<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
parents:
336
diff
changeset
|
426 |
<?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
parents:
336
diff
changeset
|
427 |
</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
parents:
336
diff
changeset
|
428 |
</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
parents:
336
diff
changeset
|
429 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
430 |
<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
parents:
336
diff
changeset
|
431 |
<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
parents:
336
diff
changeset
|
432 |
<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
parents:
336
diff
changeset
|
433 |
<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
parents:
336
diff
changeset
|
434 |
</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
parents:
336
diff
changeset
|
435 |
</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
parents:
336
diff
changeset
|
436 |
<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
parents:
336
diff
changeset
|
437 |
<input name="enable-comments" id="enable-comments" type="checkbox" <?php if(getConfig('enable_comments')=='1') echo('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
parents:
336
diff
changeset
|
438 |
</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
parents:
336
diff
changeset
|
439 |
</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
parents:
336
diff
changeset
|
440 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
441 |
<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
parents:
336
diff
changeset
|
442 |
<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
parents:
336
diff
changeset
|
443 |
<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
parents:
336
diff
changeset
|
444 |
<?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
parents:
336
diff
changeset
|
445 |
</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
parents:
336
diff
changeset
|
446 |
</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
parents:
336
diff
changeset
|
447 |
<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
parents:
336
diff
changeset
|
448 |
<input name="comment-approval" id="comment-approval" type="checkbox" <?php if(getConfig('approve_comments')=='1') echo('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
parents:
336
diff
changeset
|
449 |
</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
parents:
336
diff
changeset
|
450 |
</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
parents:
336
diff
changeset
|
451 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
452 |
<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
parents:
336
diff
changeset
|
453 |
<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
parents:
336
diff
changeset
|
454 |
<?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
parents:
336
diff
changeset
|
455 |
</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
parents:
336
diff
changeset
|
456 |
<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
parents:
336
diff
changeset
|
457 |
<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
parents:
336
diff
changeset
|
458 |
<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
parents:
336
diff
changeset
|
459 |
<?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
parents:
336
diff
changeset
|
460 |
</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
parents:
336
diff
changeset
|
461 |
<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
parents:
336
diff
changeset
|
462 |
<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
parents:
336
diff
changeset
|
463 |
<?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
parents:
336
diff
changeset
|
464 |
</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
parents:
336
diff
changeset
|
465 |
<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
parents:
336
diff
changeset
|
466 |
<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
parents:
336
diff
changeset
|
467 |
<?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
parents:
336
diff
changeset
|
468 |
</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
parents:
336
diff
changeset
|
469 |
</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
parents:
336
diff
changeset
|
470 |
</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
parents:
336
diff
changeset
|
471 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
472 |
<!-- Default permissions --> |
0 | 473 |
|
474 |
<!-- |
|
475 |
||
476 |
READ: Do not try to enable this, backend support for it has been disabled. To edit default |
|
477 |
permissions, select The Entire Website in any permissions editor window. |
|
478 |
||
479 |
<tr><th colspan="2">Default permissions for pages</th></tr> |
|
480 |
||
481 |
<tr> |
|
482 |
<td class="row1">You can edit the default set of permissions used when no other permissions are available. Permissions set here are used when no other permissions are available. As with other ACL rules, you can assign these defaults to every user or one specific user or group.</td> |
|
483 |
<td class="row1"><a href="#" onclick="ajaxOpenACLManager('__DefaultPermissions', 'Special'); return false;">Manage default permissions</a></td> |
|
484 |
</tr> |
|
485 |
||
486 |
--> |
|
487 |
||
488 |
<!-- Site disablement --> |
|
489 |
||
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
parents:
336
diff
changeset
|
490 |
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_disablesite'); ?></th></tr> |
0 | 491 |
|
492 |
<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
parents:
336
diff
changeset
|
493 |
<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
parents:
336
diff
changeset
|
494 |
<?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
parents:
336
diff
changeset
|
495 |
</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
parents:
336
diff
changeset
|
496 |
<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
parents:
336
diff
changeset
|
497 |
<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
parents:
336
diff
changeset
|
498 |
<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
parents:
336
diff
changeset
|
499 |
<?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
parents:
336
diff
changeset
|
500 |
</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
parents:
336
diff
changeset
|
501 |
</td> |
0 | 502 |
</tr> |
503 |
<tr> |
|
504 |
<td class="row2"> |
|
30 | 505 |
<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
parents:
336
diff
changeset
|
506 |
<?php echo $lang->get('acpgc_field_disablesite_message'); ?><br /> |
0 | 507 |
<textarea name="site_disabled_notice" rows="7" cols="30"><?php echo getConfig('site_disabled_notice'); ?></textarea> |
508 |
</div> |
|
509 |
</td> |
|
510 |
</tr> |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
511 |
|
465
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
512 |
<!-- Default theme --> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
513 |
|
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
514 |
<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
parents:
458
diff
changeset
|
515 |
|
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
516 |
<tr> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
517 |
<td class="row2"> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
518 |
<?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
parents:
458
diff
changeset
|
519 |
</td> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
520 |
<td class="row2"> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
521 |
<select name="default_theme"> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
522 |
<?php |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
523 |
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
parents:
458
diff
changeset
|
524 |
{ |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
525 |
$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
parents:
458
diff
changeset
|
526 |
$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
parents:
458
diff
changeset
|
527 |
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
parents:
458
diff
changeset
|
528 |
} |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
529 |
?> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
530 |
</select> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
531 |
</td> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
532 |
</tr> |
fe8b8c9b54e8
Finished theme manager to the point where it's in a working state in Firefox and hopefully IE.
Dan
parents:
458
diff
changeset
|
533 |
|
473
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
534 |
<!-- Breadcrumbs --> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
535 |
|
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
536 |
<tr> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
537 |
<td class="row1"> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
538 |
<?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
parents:
465
diff
changeset
|
539 |
</td> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
540 |
<td class="row1"> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
541 |
<select name="breadcrumb_mode"> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
542 |
<?php |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
543 |
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
parents:
465
diff
changeset
|
544 |
{ |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
545 |
$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
parents:
465
diff
changeset
|
546 |
$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
parents:
465
diff
changeset
|
547 |
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
parents:
465
diff
changeset
|
548 |
} |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
549 |
?> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
550 |
</select> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
551 |
</td> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
552 |
</tr> |
518bc2b214f1
Added modal dialog support for page editor; added customizability for breadcrumbs (thanks to Manoj for idea)
Dan
parents:
465
diff
changeset
|
553 |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
554 |
</table> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
555 |
</div> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
556 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
557 |
<div class="tblholder"> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
558 |
<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
parents:
326
diff
changeset
|
559 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
560 |
<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
parents:
336
diff
changeset
|
561 |
<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
parents:
326
diff
changeset
|
562 |
</tr> |
0 | 563 |
|
564 |
<!-- Account activation --> |
|
565 |
||
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
parents:
336
diff
changeset
|
566 |
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_activate'); ?></th></tr> |
0 | 567 |
|
568 |
<tr> |
|
569 |
<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
parents:
336
diff
changeset
|
570 |
<?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
parents:
336
diff
changeset
|
571 |
<?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
parents:
336
diff
changeset
|
572 |
<b><?php echo $lang->get('acpgc_activate_intro_sfnet_warning'); ?></b> |
0 | 573 |
</td> |
574 |
</tr> |
|
575 |
||
576 |
<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
parents:
336
diff
changeset
|
577 |
<td class="row1" style="width: 50%;"><?php echo $lang->get('acpgc_field_activate'); ?></td><td class="row1"> |
0 | 578 |
<?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
parents:
336
diff
changeset
|
579 |
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
parents:
336
diff
changeset
|
580 |
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
parents:
336
diff
changeset
|
581 |
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
parents:
336
diff
changeset
|
582 |
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 | 583 |
?> |
584 |
</td> |
|
585 |
</tr> |
|
586 |
||
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
587 |
<!-- Terms of Use --> |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
588 |
|
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
589 |
<tr> |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
590 |
<th class="subhead" colspan="2"> |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
591 |
<?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
parents:
347
diff
changeset
|
592 |
</th> |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
593 |
</tr> |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
594 |
|
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
595 |
<tr> |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
596 |
<td class="row2"> |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
597 |
<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
parents:
347
diff
changeset
|
598 |
<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
parents:
347
diff
changeset
|
599 |
</td> |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
600 |
<td class="row2"> |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
601 |
<?php |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
602 |
$terms = getConfig('register_tou'); |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
347
diff
changeset
|
603 |
echo $template->tinymce_textarea('register_tou', $terms, 10, 40); |
0 | 604 |
?> |
605 |
</td> |
|
606 |
</tr> |
|
607 |
||
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
parents:
166
diff
changeset
|
608 |
<!-- 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
parents:
166
diff
changeset
|
609 |
|
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
parents:
336
diff
changeset
|
610 |
<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
parents:
166
diff
changeset
|
611 |
|
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
parents:
336
diff
changeset
|
612 |
<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
parents:
166
diff
changeset
|
613 |
|
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
parents:
166
diff
changeset
|
614 |
<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
parents:
336
diff
changeset
|
615 |
<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
parents:
336
diff
changeset
|
616 |
<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
parents:
166
diff
changeset
|
617 |
</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
parents:
166
diff
changeset
|
618 |
<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
parents:
166
diff
changeset
|
619 |
<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
parents:
166
diff
changeset
|
620 |
</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
parents:
166
diff
changeset
|
621 |
</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
parents:
166
diff
changeset
|
622 |
|
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
parents:
166
diff
changeset
|
623 |
<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
parents:
336
diff
changeset
|
624 |
<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
parents:
336
diff
changeset
|
625 |
<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
parents:
166
diff
changeset
|
626 |
</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
parents:
166
diff
changeset
|
627 |
<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
parents:
166
diff
changeset
|
628 |
<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
parents:
166
diff
changeset
|
629 |
</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
parents:
166
diff
changeset
|
630 |
</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
parents:
166
diff
changeset
|
631 |
|
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
parents:
166
diff
changeset
|
632 |
<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
parents:
336
diff
changeset
|
633 |
<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
parents:
336
diff
changeset
|
634 |
<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
parents:
166
diff
changeset
|
635 |
</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
parents:
166
diff
changeset
|
636 |
<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
parents:
336
diff
changeset
|
637 |
<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
parents:
336
diff
changeset
|
638 |
<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
parents:
336
diff
changeset
|
639 |
<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
parents:
166
diff
changeset
|
640 |
</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
parents:
166
diff
changeset
|
641 |
</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
parents:
166
diff
changeset
|
642 |
|
36b287f1d85c
[F] Added support for account lockouts. User is locked out or required to complete a CAPTCHA after specified threshold for specified period.
Dan
parents:
166
diff
changeset
|
643 |
<!-- 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
parents:
166
diff
changeset
|
644 |
|
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
parents:
336
diff
changeset
|
645 |
<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
parents:
130
diff
changeset
|
646 |
|
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
parents:
130
diff
changeset
|
647 |
<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
parents:
130
diff
changeset
|
648 |
<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
parents:
336
diff
changeset
|
649 |
<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
parents:
336
diff
changeset
|
650 |
<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
parents:
130
diff
changeset
|
651 |
</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
parents:
130
diff
changeset
|
652 |
<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
parents:
336
diff
changeset
|
653 |
<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
parents:
130
diff
changeset
|
654 |
</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
parents:
130
diff
changeset
|
655 |
</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
parents:
130
diff
changeset
|
656 |
|
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
parents:
130
diff
changeset
|
657 |
<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
parents:
130
diff
changeset
|
658 |
<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
parents:
336
diff
changeset
|
659 |
<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
parents:
336
diff
changeset
|
660 |
<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
parents:
130
diff
changeset
|
661 |
</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
parents:
130
diff
changeset
|
662 |
<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
parents:
130
diff
changeset
|
663 |
<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
parents:
130
diff
changeset
|
664 |
</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
parents:
130
diff
changeset
|
665 |
</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
parents:
130
diff
changeset
|
666 |
|
0 | 667 |
<!-- E-mail options --> |
668 |
||
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
669 |
<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
parents:
336
diff
changeset
|
670 |
<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
parents:
336
diff
changeset
|
671 |
<?php echo $lang->get('acpgc_heading_email'); ?> |
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
672 |
</th> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
673 |
</tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
674 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
675 |
<tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
676 |
<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
parents:
336
diff
changeset
|
677 |
<?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
parents:
336
diff
changeset
|
678 |
<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
parents:
326
diff
changeset
|
679 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
680 |
<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
parents:
336
diff
changeset
|
681 |
<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
parents:
336
diff
changeset
|
682 |
<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
parents:
336
diff
changeset
|
683 |
<?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
parents:
336
diff
changeset
|
684 |
</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
parents:
336
diff
changeset
|
685 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
686 |
<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
parents:
336
diff
changeset
|
687 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
688 |
<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
parents:
336
diff
changeset
|
689 |
<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
parents:
336
diff
changeset
|
690 |
<?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
parents:
336
diff
changeset
|
691 |
</label> |
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
692 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
693 |
</tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
694 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
695 |
<tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
696 |
<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
parents:
336
diff
changeset
|
697 |
<?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
parents:
336
diff
changeset
|
698 |
<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
parents:
326
diff
changeset
|
699 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
700 |
<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
parents:
336
diff
changeset
|
701 |
<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
parents:
326
diff
changeset
|
702 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
703 |
</tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
704 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
705 |
<tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
706 |
<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
parents:
336
diff
changeset
|
707 |
<?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
parents:
336
diff
changeset
|
708 |
<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
parents:
326
diff
changeset
|
709 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
710 |
<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
parents:
336
diff
changeset
|
711 |
<?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
parents:
336
diff
changeset
|
712 |
<?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
parents:
336
diff
changeset
|
713 |
</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
parents:
336
diff
changeset
|
714 |
</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
parents:
336
diff
changeset
|
715 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
716 |
<!-- 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
parents:
336
diff
changeset
|
717 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
718 |
<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
parents:
336
diff
changeset
|
719 |
<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
parents:
336
diff
changeset
|
720 |
</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
parents:
336
diff
changeset
|
721 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
722 |
<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
parents:
336
diff
changeset
|
723 |
<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
parents:
336
diff
changeset
|
724 |
<?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
parents:
336
diff
changeset
|
725 |
</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
parents:
336
diff
changeset
|
726 |
</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
parents:
336
diff
changeset
|
727 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
728 |
<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
parents:
336
diff
changeset
|
729 |
<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
parents:
336
diff
changeset
|
730 |
<?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
parents:
336
diff
changeset
|
731 |
<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
parents:
336
diff
changeset
|
732 |
</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
parents:
336
diff
changeset
|
733 |
<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
parents:
336
diff
changeset
|
734 |
<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
parents:
326
diff
changeset
|
735 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
736 |
</tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
737 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
738 |
<tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
739 |
<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
parents:
336
diff
changeset
|
740 |
<?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
parents:
336
diff
changeset
|
741 |
<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
parents:
326
diff
changeset
|
742 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
743 |
<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
parents:
336
diff
changeset
|
744 |
<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
parents:
326
diff
changeset
|
745 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
746 |
</tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
747 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
748 |
<tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
749 |
<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
parents:
336
diff
changeset
|
750 |
<?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
parents:
336
diff
changeset
|
751 |
<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
parents:
326
diff
changeset
|
752 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
753 |
<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
parents:
336
diff
changeset
|
754 |
<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
parents:
336
diff
changeset
|
755 |
<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
parents:
326
diff
changeset
|
756 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
757 |
</tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
758 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
759 |
<tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
760 |
<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
parents:
336
diff
changeset
|
761 |
<?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
parents:
336
diff
changeset
|
762 |
<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
parents:
336
diff
changeset
|
763 |
</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
parents:
336
diff
changeset
|
764 |
<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
parents:
336
diff
changeset
|
765 |
<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
parents:
336
diff
changeset
|
766 |
</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
parents:
336
diff
changeset
|
767 |
</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
parents:
336
diff
changeset
|
768 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
769 |
<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
parents:
336
diff
changeset
|
770 |
<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
parents:
336
diff
changeset
|
771 |
<?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
parents:
336
diff
changeset
|
772 |
<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
parents:
336
diff
changeset
|
773 |
</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
parents:
336
diff
changeset
|
774 |
<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
parents:
336
diff
changeset
|
775 |
<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
parents:
336
diff
changeset
|
776 |
<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
parents:
336
diff
changeset
|
777 |
<?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
parents:
336
diff
changeset
|
778 |
</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
parents:
336
diff
changeset
|
779 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
780 |
<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
parents:
336
diff
changeset
|
781 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
782 |
<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
parents:
336
diff
changeset
|
783 |
<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
parents:
336
diff
changeset
|
784 |
<?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
parents:
336
diff
changeset
|
785 |
</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
parents:
336
diff
changeset
|
786 |
</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
parents:
336
diff
changeset
|
787 |
</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
parents:
336
diff
changeset
|
788 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
789 |
<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
parents:
336
diff
changeset
|
790 |
<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
parents:
336
diff
changeset
|
791 |
<?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
parents:
336
diff
changeset
|
792 |
<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
parents:
326
diff
changeset
|
793 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
794 |
<td class="row2"> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
795 |
<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
parents:
326
diff
changeset
|
796 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
797 |
</tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
798 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
799 |
</table> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
800 |
</div> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
801 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
802 |
<div class="tblholder"> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
803 |
<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
parents:
326
diff
changeset
|
804 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
805 |
<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
parents:
336
diff
changeset
|
806 |
<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
parents:
326
diff
changeset
|
807 |
</tr> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
808 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
809 |
<!-- enanocms.org link --> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
810 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
811 |
<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
parents:
336
diff
changeset
|
812 |
<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
parents:
336
diff
changeset
|
813 |
</tr> |
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
814 |
<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
parents:
336
diff
changeset
|
815 |
<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
parents:
336
diff
changeset
|
816 |
<?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
parents:
326
diff
changeset
|
817 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
818 |
<td class="row1"> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
819 |
<label> |
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
parents:
336
diff
changeset
|
820 |
<input name="enano_powered_link" type="checkbox" <?php if(getConfig('powered_btn') == '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
parents:
326
diff
changeset
|
821 |
</label> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
822 |
</td> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
823 |
</tr> |
0 | 824 |
|
825 |
<!-- SourceForge.net logo --> |
|
826 |
||
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
parents:
336
diff
changeset
|
827 |
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_sfnet_logo'); ?></th></tr> |
0 | 828 |
|
829 |
<tr> |
|
830 |
<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
parents:
336
diff
changeset
|
831 |
<?php echo $lang->get('acpgc_sfnet_intro'); ?> |
0 | 832 |
</td> |
833 |
</tr> |
|
834 |
||
835 |
<?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
parents:
336
diff
changeset
|
836 |
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
parents:
336
diff
changeset
|
837 |
$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
parents:
336
diff
changeset
|
838 |
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
parents:
336
diff
changeset
|
839 |
$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
parents:
336
diff
changeset
|
840 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
841 |
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
parents:
336
diff
changeset
|
842 |
$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
parents:
336
diff
changeset
|
843 |
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
parents:
336
diff
changeset
|
844 |
$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
parents:
336
diff
changeset
|
845 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
846 |
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
parents:
336
diff
changeset
|
847 |
$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
parents:
336
diff
changeset
|
848 |
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
parents:
336
diff
changeset
|
849 |
$t = '1'; |
0 | 850 |
?> |
851 |
||
852 |
<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
parents:
336
diff
changeset
|
853 |
<td class="row1"><?php echo $lang->get('acpgc_field_sfnet_display'); ?></td> |
0 | 854 |
<td class="row1"><input type=checkbox name="showsf" id="showsf" <?php echo $c; ?> /></td> |
855 |
</tr> |
|
856 |
||
857 |
<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
parents:
336
diff
changeset
|
858 |
<td class="row2"><?php echo $lang->get('acpgc_field_sfnet_group_id'); ?></td> |
0 | 859 |
<td class="row2"><input value="<?php echo $g; ?>" type=text size=15 name=sfgroup /></td> |
860 |
</tr> |
|
861 |
||
862 |
<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
parents:
336
diff
changeset
|
863 |
<td class="row1"><?php echo $lang->get('acpgc_field_sfnet_logo_style'); ?></td> |
0 | 864 |
<td class="row1"> |
865 |
<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
parents:
336
diff
changeset
|
866 |
<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
parents:
336
diff
changeset
|
867 |
<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
parents:
336
diff
changeset
|
868 |
<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
parents:
336
diff
changeset
|
869 |
<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
parents:
336
diff
changeset
|
870 |
<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
parents:
336
diff
changeset
|
871 |
<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
parents:
336
diff
changeset
|
872 |
<option <?php if($t=='7') echo('selected="selected" '); ?>value=7><?php echo $lang->get('acpgc_field_sfnet_logo_style_7'); ?></option> |
0 | 873 |
</select> |
874 |
</td> |
|
875 |
</tr> |
|
876 |
||
877 |
<!-- W3C validator buttons --> |
|
878 |
||
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
parents:
336
diff
changeset
|
879 |
<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
parents:
336
diff
changeset
|
880 |
<tr><td colspan="2" class="row3"><?php echo $lang->get('acpgc_w3clogos_intro'); ?></th></tr> |
0 | 881 |
|
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
parents:
336
diff
changeset
|
882 |
<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
parents:
336
diff
changeset
|
883 |
<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
parents:
336
diff
changeset
|
884 |
<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
parents:
336
diff
changeset
|
885 |
<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
parents:
336
diff
changeset
|
886 |
<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
parents:
336
diff
changeset
|
887 |
<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 | 888 |
|
889 |
<!-- DefectiveByDesign.org ad --> |
|
890 |
||
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
parents:
336
diff
changeset
|
891 |
<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
parents:
336
diff
changeset
|
892 |
<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
parents:
336
diff
changeset
|
893 |
<?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
parents:
336
diff
changeset
|
894 |
</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
parents:
336
diff
changeset
|
895 |
</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
parents:
336
diff
changeset
|
896 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
897 |
<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
parents:
336
diff
changeset
|
898 |
<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
parents:
336
diff
changeset
|
899 |
<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
parents:
336
diff
changeset
|
900 |
<?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
parents:
336
diff
changeset
|
901 |
</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
parents:
336
diff
changeset
|
902 |
</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
parents:
336
diff
changeset
|
903 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
904 |
<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
parents:
336
diff
changeset
|
905 |
<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
parents:
336
diff
changeset
|
906 |
<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
parents:
336
diff
changeset
|
907 |
<?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
parents:
336
diff
changeset
|
908 |
</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
parents:
336
diff
changeset
|
909 |
</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
parents:
336
diff
changeset
|
910 |
<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
parents:
336
diff
changeset
|
911 |
<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
parents:
336
diff
changeset
|
912 |
</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
parents:
336
diff
changeset
|
913 |
</tr> |
0 | 914 |
|
915 |
<!-- Save button --> |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
916 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
917 |
</table> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
918 |
</div> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
919 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
920 |
<div class="tblholder"> |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
921 |
<table border="0" width="100%" cellspacing="1" cellpadding="4"> |
0 | 922 |
|
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
parents:
336
diff
changeset
|
923 |
<tr><th colspan="2"><input type="submit" name="submit" value="<?php echo $lang->get('acpgc_btn_save_changes'); ?>" /></th></tr> |
0 | 924 |
|
925 |
</table> |
|
926 |
</div> |
|
927 |
</form> |
|
928 |
<?php |
|
929 |
} |
|
930 |
||
931 |
function page_Admin_UploadConfig() |
|
932 |
{ |
|
933 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
934 |
global $lang; |
0 | 935 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
936 |
{ |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
937 |
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
217
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
938 |
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
939 |
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
0 | 940 |
return; |
941 |
} |
|
942 |
||
943 |
if(isset($_POST['save'])) |
|
944 |
{ |
|
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
parents:
103
diff
changeset
|
945 |
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
parents:
103
diff
changeset
|
946 |
{ |
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
parents:
317
diff
changeset
|
947 |
$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
parents:
103
diff
changeset
|
948 |
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
parents:
103
diff
changeset
|
949 |
$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
parents:
103
diff
changeset
|
950 |
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
parents:
103
diff
changeset
|
951 |
} |
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
parents:
103
diff
changeset
|
952 |
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
parents:
103
diff
changeset
|
953 |
{ |
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
parents:
317
diff
changeset
|
954 |
$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
parents:
103
diff
changeset
|
955 |
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
parents:
103
diff
changeset
|
956 |
$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
parents:
103
diff
changeset
|
957 |
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
parents:
103
diff
changeset
|
958 |
} |
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
parents:
103
diff
changeset
|
959 |
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
parents:
103
diff
changeset
|
960 |
{ |
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
parents:
317
diff
changeset
|
961 |
$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
parents:
103
diff
changeset
|
962 |
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
parents:
103
diff
changeset
|
963 |
$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
parents:
103
diff
changeset
|
964 |
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
parents:
103
diff
changeset
|
965 |
} |
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
parents:
103
diff
changeset
|
966 |
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
parents:
103
diff
changeset
|
967 |
{ |
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
parents:
317
diff
changeset
|
968 |
$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
parents:
103
diff
changeset
|
969 |
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
parents:
103
diff
changeset
|
970 |
$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
parents:
103
diff
changeset
|
971 |
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
parents:
103
diff
changeset
|
972 |
} |
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
parents:
103
diff
changeset
|
973 |
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
parents:
103
diff
changeset
|
974 |
{ |
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
parents:
103
diff
changeset
|
975 |
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
parents:
103
diff
changeset
|
976 |
} |
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
parents:
103
diff
changeset
|
977 |
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
parents:
103
diff
changeset
|
978 |
{ |
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
parents:
103
diff
changeset
|
979 |
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
parents:
103
diff
changeset
|
980 |
} |
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
parents:
103
diff
changeset
|
981 |
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
parents:
103
diff
changeset
|
982 |
{ |
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
parents:
317
diff
changeset
|
983 |
$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
parents:
103
diff
changeset
|
984 |
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
parents:
103
diff
changeset
|
985 |
$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
parents:
103
diff
changeset
|
986 |
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
parents:
103
diff
changeset
|
987 |
} |
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
parents:
103
diff
changeset
|
988 |
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
parents:
103
diff
changeset
|
989 |
{ |
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
parents:
317
diff
changeset
|
990 |
$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
parents:
103
diff
changeset
|
991 |
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
parents:
103
diff
changeset
|
992 |
$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
parents:
103
diff
changeset
|
993 |
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
parents:
103
diff
changeset
|
994 |
} |
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
parents:
103
diff
changeset
|
995 |
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
parents:
103
diff
changeset
|
996 |
{ |
430
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
parents:
407
diff
changeset
|
997 |
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
parents:
407
diff
changeset
|
998 |
// 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
parents:
407
diff
changeset
|
999 |
$_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
parents:
103
diff
changeset
|
1000 |
$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
parents:
103
diff
changeset
|
1001 |
$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
parents:
317
diff
changeset
|
1002 |
$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
parents:
103
diff
changeset
|
1003 |
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
parents:
103
diff
changeset
|
1004 |
$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
parents:
103
diff
changeset
|
1005 |
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
parents:
103
diff
changeset
|
1006 |
} |
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
parents:
103
diff
changeset
|
1007 |
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
parents:
103
diff
changeset
|
1008 |
{ |
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
parents:
387
diff
changeset
|
1009 |
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
parents:
103
diff
changeset
|
1010 |
} |
0 | 1011 |
$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
parents:
15
diff
changeset
|
1012 |
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
parents:
15
diff
changeset
|
1013 |
{ |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
1014 |
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
parents:
15
diff
changeset
|
1015 |
} |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
1016 |
else |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
1017 |
{ |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
1018 |
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
parents:
15
diff
changeset
|
1019 |
} |
0 | 1020 |
} |
376 | 1021 |
acp_start_form(); |
0 | 1022 |
?> |
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
parents:
336
diff
changeset
|
1023 |
<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
parents:
336
diff
changeset
|
1024 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1025 |
<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
parents:
336
diff
changeset
|
1026 |
<?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
parents:
336
diff
changeset
|
1027 |
</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
parents:
336
diff
changeset
|
1028 |
<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
parents:
336
diff
changeset
|
1029 |
<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
parents:
336
diff
changeset
|
1030 |
<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
parents:
336
diff
changeset
|
1031 |
<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
parents:
336
diff
changeset
|
1032 |
</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
parents:
336
diff
changeset
|
1033 |
</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
parents:
336
diff
changeset
|
1034 |
<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
parents:
336
diff
changeset
|
1035 |
<?php echo $lang->get('acpup_field_max_size'); ?> |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1036 |
<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'); ?>" /> |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1037 |
<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
parents:
336
diff
changeset
|
1038 |
<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
parents:
336
diff
changeset
|
1039 |
<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
parents:
336
diff
changeset
|
1040 |
<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
parents:
336
diff
changeset
|
1041 |
</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
parents:
336
diff
changeset
|
1042 |
</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
parents:
336
diff
changeset
|
1043 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1044 |
<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
parents:
336
diff
changeset
|
1045 |
<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
parents:
336
diff
changeset
|
1046 |
<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
parents:
336
diff
changeset
|
1047 |
<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
parents:
336
diff
changeset
|
1048 |
<?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
parents:
336
diff
changeset
|
1049 |
</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
parents:
336
diff
changeset
|
1050 |
<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
parents:
336
diff
changeset
|
1051 |
<?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
parents:
336
diff
changeset
|
1052 |
<?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
parents:
336
diff
changeset
|
1053 |
</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
parents:
336
diff
changeset
|
1054 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1055 |
<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
parents:
336
diff
changeset
|
1056 |
<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
parents:
336
diff
changeset
|
1057 |
<?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
parents:
336
diff
changeset
|
1058 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1059 |
<?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
parents:
336
diff
changeset
|
1060 |
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
parents:
336
diff
changeset
|
1061 |
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
parents:
336
diff
changeset
|
1062 |
?> |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1063 |
</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
parents:
336
diff
changeset
|
1064 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1065 |
<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
parents:
336
diff
changeset
|
1066 |
<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
parents:
336
diff
changeset
|
1067 |
<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
parents:
336
diff
changeset
|
1068 |
<?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
parents:
336
diff
changeset
|
1069 |
</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
parents:
336
diff
changeset
|
1070 |
</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
parents:
336
diff
changeset
|
1071 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1072 |
<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
parents:
336
diff
changeset
|
1073 |
<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
parents:
336
diff
changeset
|
1074 |
<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
parents:
336
diff
changeset
|
1075 |
<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
parents:
336
diff
changeset
|
1076 |
<?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
parents:
336
diff
changeset
|
1077 |
</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
parents:
336
diff
changeset
|
1078 |
</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
parents:
336
diff
changeset
|
1079 |
|
0 | 1080 |
<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
parents:
336
diff
changeset
|
1081 |
<p><input type="submit" name="save" value="<?php echo $lang->get('acpup_btn_save'); ?>" style="font-weight: bold;" /></p> |
0 | 1082 |
<?php |
1083 |
echo '</form>'; |
|
1084 |
} |
|
1085 |
||
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
parents:
336
diff
changeset
|
1086 |
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
parents:
336
diff
changeset
|
1087 |
{ |
0 | 1088 |
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
parents:
336
diff
changeset
|
1089 |
global $lang; |
0 | 1090 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
1091 |
{ |
|
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
parents:
336
diff
changeset
|
1092 |
$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
parents:
336
diff
changeset
|
1093 |
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
parents:
336
diff
changeset
|
1094 |
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
parents:
336
diff
changeset
|
1095 |
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
parents:
336
diff
changeset
|
1096 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1097 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1098 |
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
parents:
336
diff
changeset
|
1099 |
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
parents:
336
diff
changeset
|
1100 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1101 |
$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
parents:
336
diff
changeset
|
1102 |
$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
parents:
336
diff
changeset
|
1103 |
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
parents:
336
diff
changeset
|
1104 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1105 |
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
parents:
336
diff
changeset
|
1106 |
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
parents:
336
diff
changeset
|
1107 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1108 |
$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
parents:
336
diff
changeset
|
1109 |
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
parents:
336
diff
changeset
|
1110 |
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
parents:
336
diff
changeset
|
1111 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1112 |
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
parents:
336
diff
changeset
|
1113 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1114 |
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
parents:
336
diff
changeset
|
1115 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1116 |
$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
parents:
336
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
parents:
336
diff
changeset
|
1118 |
<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
parents:
336
diff
changeset
|
1119 |
<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
parents:
336
diff
changeset
|
1120 |
<?php |
376 | 1121 |
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
parents:
336
diff
changeset
|
1122 |
$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
parents:
336
diff
changeset
|
1123 |
$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
parents:
336
diff
changeset
|
1124 |
$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
parents:
336
diff
changeset
|
1125 |
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
parents:
336
diff
changeset
|
1126 |
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
parents:
336
diff
changeset
|
1127 |
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
parents:
336
diff
changeset
|
1128 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1129 |
$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
parents:
336
diff
changeset
|
1130 |
$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
parents:
336
diff
changeset
|
1131 |
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
parents:
336
diff
changeset
|
1132 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1133 |
$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
parents:
336
diff
changeset
|
1134 |
$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
parents:
336
diff
changeset
|
1135 |
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
parents:
336
diff
changeset
|
1136 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1137 |
$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
parents:
336
diff
changeset
|
1138 |
$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
parents:
336
diff
changeset
|
1139 |
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
parents:
336
diff
changeset
|
1140 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1141 |
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
parents:
336
diff
changeset
|
1142 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1143 |
$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
parents:
336
diff
changeset
|
1144 |
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
parents:
336
diff
changeset
|
1145 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1146 |
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
parents:
336
diff
changeset
|
1147 |
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
parents:
336
diff
changeset
|
1148 |
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
parents:
336
diff
changeset
|
1149 |
?> |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1150 |
<?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
parents:
336
diff
changeset
|
1151 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1152 |
|
519
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
parents:
511
diff
changeset
|
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
parents:
336
diff
changeset
|
1154 |
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
parents:
336
diff
changeset
|
1155 |
{ |
0 | 1156 |
global $db, $session, $paths, $template, $plugins; // Common objects |
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
1157 |
global $lang; |
0 | 1158 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
1159 |
{ |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
1160 |
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
217
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
1161 |
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
1162 |
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
0 | 1163 |
return; |
1164 |
} |
|
1165 |
||
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
parents:
0
diff
changeset
|
1166 |
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
parents:
0
diff
changeset
|
1167 |
{ |
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
parents:
336
diff
changeset
|
1168 |
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
parents:
336
diff
changeset
|
1169 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1170 |
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
parents:
336
diff
changeset
|
1171 |
} |
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
parents:
380
diff
changeset
|
1172 |
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
parents:
0
diff
changeset
|
1173 |
{ |
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
parents:
336
diff
changeset
|
1174 |
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
parents:
336
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
parents:
336
diff
changeset
|
1176 |
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
parents:
336
diff
changeset
|
1177 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1178 |
$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
parents:
336
diff
changeset
|
1179 |
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
parents:
336
diff
changeset
|
1180 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1181 |
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
parents:
336
diff
changeset
|
1182 |
$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
parents:
103
diff
changeset
|
1183 |
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
parents:
103
diff
changeset
|
1184 |
$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
parents:
336
diff
changeset
|
1185 |
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
parents:
336
diff
changeset
|
1186 |
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
parents:
336
diff
changeset
|
1187 |
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
parents:
336
diff
changeset
|
1188 |
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
parents:
336
diff
changeset
|
1189 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1190 |
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
parents:
336
diff
changeset
|
1191 |
<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
parents:
336
diff
changeset
|
1192 |
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
parents:
336
diff
changeset
|
1193 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1194 |
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
parents:
336
diff
changeset
|
1195 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1196 |
$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
parents:
336
diff
changeset
|
1197 |
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
parents:
336
diff
changeset
|
1198 |
$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
parents:
336
diff
changeset
|
1199 |
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
parents:
336
diff
changeset
|
1200 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1201 |
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
parents:
336
diff
changeset
|
1202 |
{ |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1203 |
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
parents:
336
diff
changeset
|
1204 |
<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
parents:
336
diff
changeset
|
1205 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1206 |
break; |
504
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
parents:
473
diff
changeset
|
1207 |
case "reimport": |
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
parents:
473
diff
changeset
|
1208 |
$plugin_id = substr($plugin, 0, -4); |
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
parents:
473
diff
changeset
|
1209 |
if ( isset($plugins->loaded_plugins[$plugin_id]) ) |
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
parents:
473
diff
changeset
|
1210 |
{ |
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
parents:
473
diff
changeset
|
1211 |
// plugin file is safe, call import |
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
parents:
473
diff
changeset
|
1212 |
$lang->import_plugin( ENANO_ROOT . "/plugins/$plugin" ); |
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
parents:
473
diff
changeset
|
1213 |
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
parents:
473
diff
changeset
|
1214 |
} |
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
parents:
473
diff
changeset
|
1215 |
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
parents:
336
diff
changeset
|
1216 |
} |
0 | 1217 |
} |
1218 |
} |
|
1219 |
$dir = './plugins/'; |
|
1220 |
$plugin_list = Array(); |
|
1221 |
$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
parents:
80
diff
changeset
|
1222 |
$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
parents:
0
diff
changeset
|
1223 |
|
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
parents:
0
diff
changeset
|
1224 |
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
parents:
0
diff
changeset
|
1225 |
{ |
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
parents:
0
diff
changeset
|
1226 |
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
parents:
0
diff
changeset
|
1227 |
{ |
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
parents:
0
diff
changeset
|
1228 |
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
parents:
0
diff
changeset
|
1229 |
{ |
0 | 1230 |
if(preg_match('#^(.*?)\.php$#is', $file) && $file != 'index.php') |
1231 |
{ |
|
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
parents:
80
diff
changeset
|
1232 |
unset($thelist); |
0 | 1233 |
if ( in_array($file, $plugins->system_plugins) ) |
1234 |
{ |
|
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
parents:
80
diff
changeset
|
1235 |
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
parents:
80
diff
changeset
|
1236 |
continue; |
0 | 1237 |
$thelist =& $system; |
1238 |
} |
|
1239 |
else |
|
1240 |
{ |
|
1241 |
$thelist =& $plugin_list; |
|
1242 |
} |
|
1243 |
$f = file_get_contents($dir . $file); |
|
1244 |
$f = explode("\n", $f); |
|
1245 |
$f = array_slice($f, 2, 7); |
|
1246 |
$f[0] = substr($f[0], 13, strlen($f[0])); |
|
1247 |
$f[1] = substr($f[1], 12, strlen($f[1])); |
|
1248 |
$f[2] = substr($f[2], 13, strlen($f[2])); |
|
1249 |
$f[3] = substr($f[3], 8, strlen($f[3])); |
|
1250 |
$f[4] = substr($f[4], 9, strlen($f[4])); |
|
1251 |
$f[5] = substr($f[5], 12, strlen($f[5])); |
|
1252 |
$thelist[$file] = Array(); |
|
1253 |
$thelist[$file]['name'] = $f[0]; |
|
1254 |
$thelist[$file]['uri'] = $f[1]; |
|
1255 |
$thelist[$file]['desc'] = $f[2]; |
|
1256 |
$thelist[$file]['auth'] = $f[3]; |
|
1257 |
$thelist[$file]['vers'] = $f[4]; |
|
1258 |
$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
parents:
336
diff
changeset
|
1259 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1260 |
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
parents:
336
diff
changeset
|
1261 |
$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
parents:
336
diff
changeset
|
1262 |
|
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1263 |
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
parents:
336
diff
changeset
|
1264 |
$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
parents:
336
diff
changeset
|
1265 |
|
0 | 1266 |
} |
1267 |
} |
|
1268 |
closedir($dh); |
|
1269 |
} |
|
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
parents:
0
diff
changeset
|
1270 |
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
parents:
0
diff
changeset
|
1271 |
{ |
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
parents:
336
diff
changeset
|
1272 |
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
parents:
0
diff
changeset
|
1273 |
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
parents:
0
diff
changeset
|
1274 |
} |
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
parents:
0
diff
changeset
|
1275 |
} |
1e61232606d6
Following fixes: admin theme supports <button> tag now, PageProcessor can eval now, and SpecialAdmin.php plugin can no longer be disabled
dan@fuhry
parents:
0
diff
changeset
|
1276 |
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
parents:
0
diff
changeset
|
1277 |
{ |
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
parents:
336
diff
changeset
|
1278 |
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
parents:
0
diff
changeset
|
1279 |
return; |
0 | 1280 |
} |
1281 |
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
parents:
336
diff
changeset
|
1282 |
<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
parents:
336
diff
changeset
|
1283 |
<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
parents:
336
diff
changeset
|
1284 |
<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
parents:
336
diff
changeset
|
1285 |
<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
parents:
336
diff
changeset
|
1286 |
<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
parents:
336
diff
changeset
|
1287 |
<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
parents:
336
diff
changeset
|
1288 |
<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
parents:
336
diff
changeset
|
1289 |
</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
parents:
80
diff
changeset
|
1290 |
$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
parents:
80
diff
changeset
|
1291 |
$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
parents:
80
diff
changeset
|
1292 |
$plugin_files = array_values(array_merge($plugin_files_1, $plugin_files_2)); |
0 | 1293 |
$cls = 'row2'; |
1294 |
for ( $i = 0; $i < sizeof($plugin_files); $i++ ) |
|
1295 |
{ |
|
1296 |
$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
parents:
80
diff
changeset
|
1297 |
$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
parents:
377
diff
changeset
|
1298 |
$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
parents:
80
diff
changeset
|
1299 |
$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
parents:
80
diff
changeset
|
1300 |
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
parents:
80
diff
changeset
|
1301 |
$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
parents:
80
diff
changeset
|
1302 |
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
parents:
80
diff
changeset
|
1303 |
$bgcolor = ' style="background-color: #FFD0D0;"'; |
0 | 1304 |
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
parents:
80
diff
changeset
|
1305 |
<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
parents:
80
diff
changeset
|
1306 |
<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
parents:
80
diff
changeset
|
1307 |
<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
parents:
80
diff
changeset
|
1308 |
<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
parents:
80
diff
changeset
|
1309 |
<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
parents:
473
diff
changeset
|
1310 |
<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
parents:
80
diff
changeset
|
1311 |
if ( !in_array($plugin_files[$i], $plugins->system_plugins) ) |
0 | 1312 |
{ |
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
parents:
80
diff
changeset
|
1313 |
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
parents:
80
diff
changeset
|
1314 |
{ |
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
parents:
336
diff
changeset
|
1315 |
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
parents:
473
diff
changeset
|
1316 |
echo ' | '; |
bc8e0e9ee01d
Added support for embedding language data into plugins; updated all version numbers on plugin files
Dan
parents:
473
diff
changeset
|
1317 |
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
parents:
80
diff
changeset
|
1318 |
} |
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
parents:
80
diff
changeset
|
1319 |
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
parents:
80
diff
changeset
|
1320 |
{ |
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
parents:
336
diff
changeset
|
1321 |
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
parents:
80
diff
changeset
|
1322 |
} |
0 | 1323 |
} |
1324 |
else |
|
1325 |
{ |
|
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
parents:
336
diff
changeset
|
1326 |
echo $lang->get('acppl_lbl_system_plugin'); |
0 | 1327 |
} |
1328 |
echo '</td></tr>'; |
|
1329 |
} |
|
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
parents:
80
diff
changeset
|
1330 |
$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
parents:
336
diff
changeset
|
1331 |
'<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
parents:
336
diff
changeset
|
1332 |
'<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
parents:
80
diff
changeset
|
1333 |
echo '<tr><th colspan="6" class="subhead">'.$showhide_link.'</th></tr>'; |
0 | 1334 |
echo '</table></div>'; |
1335 |
} |
|
519
94214ec0871c
Started work on the new plugin manager and associated management code. Very incomplete at this point and not usable.
Dan
parents:
511
diff
changeset
|
1336 |
*/ |
0 | 1337 |
|
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
parents:
343
diff
changeset
|
1338 |
function page_Admin_DBBackup() |
0 | 1339 |
{ |
1340 |
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
parents:
336
diff
changeset
|
1341 |
global $lang; |
0 | 1342 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
1343 |
{ |
|
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
parents:
336
diff
changeset
|
1344 |
$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
parents:
336
diff
changeset
|
1345 |
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
parents:
336
diff
changeset
|
1346 |
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
0 | 1347 |
return; |
1348 |
} |
|
1349 |
||
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
parents:
343
diff
changeset
|
1350 |
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
parents:
343
diff
changeset
|
1351 |
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
parents:
343
diff
changeset
|
1352 |
<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
parents:
336
diff
changeset
|
1353 |
|
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
parents:
343
diff
changeset
|
1354 |
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
parents:
336
diff
changeset
|
1355 |
{ |
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
parents:
343
diff
changeset
|
1356 |
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
parents:
336
diff
changeset
|
1357 |
} |
eefe9ab7fe7c
Localized the first parts of the admin panel. As a consequence, also wrote a brand new Admin:PageManager that doesn't suck like the old one did.
Dan
parents:
336
diff
changeset
|
1358 |
|
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
parents:
343
diff
changeset
|
1359 |
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
parents:
343
diff
changeset
|
1360 |
if(isset($_GET['submitting']) && $_GET['submitting'] == 'yes') |
0 | 1361 |
{ |
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
parents:
343
diff
changeset
|
1362 |
|
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
parents:
343
diff
changeset
|
1363 |
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
parents:
343
diff
changeset
|
1364 |
// 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
parents:
343
diff
changeset
|
1365 |
@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
parents:
343
diff
changeset
|
1366 |
// 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
parents:
343
diff
changeset
|
1367 |
$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
parents:
343
diff
changeset
|
1368 |
$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
parents:
343
diff
changeset
|
1369 |
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
parents:
343
diff
changeset
|
1370 |
// 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
parents:
343
diff
changeset
|
1371 |
$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
parents:
343
diff
changeset
|
1372 |
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
parents:
343
diff
changeset
|
1373 |
-- 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
parents:
343
diff
changeset
|
1374 |
-- 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
parents:
343
diff
changeset
|
1375 |
|
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
parents:
343
diff
changeset
|
1376 |
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
parents:
343
diff
changeset
|
1377 |
// 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
parents:
343
diff
changeset
|
1378 |
$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
parents:
343
diff
changeset
|
1379 |
$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
parents:
343
diff
changeset
|
1380 |
$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
parents:
343
diff
changeset
|
1381 |
|
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
parents:
343
diff
changeset
|
1382 |
// 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
parents:
343
diff
changeset
|
1383 |
$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
parents:
343
diff
changeset
|
1384 |
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
parents:
343
diff
changeset
|
1385 |
$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
parents:
343
diff
changeset
|
1386 |
|
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
parents:
343
diff
changeset
|
1387 |
foreach($tables as $i => $t) |
0 | 1388 |
{ |
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
parents:
343
diff
changeset
|
1389 |
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
parents:
343
diff
changeset
|
1390 |
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
parents:
343
diff
changeset
|
1391 |
// 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
parents:
343
diff
changeset
|
1392 |
// unset($tables[$i]); |
0 | 1393 |
} |
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
parents:
343
diff
changeset
|
1394 |
foreach($tables as $t) |
0 | 1395 |
{ |
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
parents:
343
diff
changeset
|
1396 |
// 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
parents:
343
diff
changeset
|
1397 |
// 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
parents:
343
diff
changeset
|
1398 |
// 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
parents:
343
diff
changeset
|
1399 |
$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
parents:
343
diff
changeset
|
1400 |
$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
parents:
343
diff
changeset
|
1401 |
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
parents:
343
diff
changeset
|
1402 |
( 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
parents:
343
diff
changeset
|
1403 |
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
parents:
343
diff
changeset
|
1404 |
) . "\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
parents:
343
diff
changeset
|
1405 |
if ( !$result ) |
0 | 1406 |
{ |
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
parents:
343
diff
changeset
|
1407 |
$db->_die(); |
0 | 1408 |
} |
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
parents:
343
diff
changeset
|
1409 |
echo $result; |
0 | 1410 |
} |
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
parents:
343
diff
changeset
|
1411 |
$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
parents:
343
diff
changeset
|
1412 |
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
parents:
343
diff
changeset
|
1413 |
if(defined('SQL_BACKUP_CRYPT')) |
0 | 1414 |
{ |
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
parents:
343
diff
changeset
|
1415 |
// 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
parents:
343
diff
changeset
|
1416 |
$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
parents:
343
diff
changeset
|
1417 |
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
parents:
343
diff
changeset
|
1418 |
$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
parents:
343
diff
changeset
|
1419 |
$data = $tea->encrypt($data, $session->private_key); |
0 | 1420 |
} |
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
parents:
343
diff
changeset
|
1421 |
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
parents:
343
diff
changeset
|
1422 |
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
parents:
343
diff
changeset
|
1423 |
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
parents:
343
diff
changeset
|
1424 |
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
parents:
343
diff
changeset
|
1425 |
exit; |
0 | 1426 |
} |
1427 |
else |
|
1428 |
{ |
|
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
parents:
343
diff
changeset
|
1429 |
// 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
parents:
343
diff
changeset
|
1430 |
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
parents:
336
diff
changeset
|
1431 |
?> |
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
parents:
343
diff
changeset
|
1432 |
<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
parents:
343
diff
changeset
|
1433 |
<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
parents:
343
diff
changeset
|
1434 |
<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
parents:
343
diff
changeset
|
1435 |
<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
parents:
343
diff
changeset
|
1436 |
<?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
parents:
343
diff
changeset
|
1437 |
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
parents:
343
diff
changeset
|
1438 |
{ |
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
parents:
343
diff
changeset
|
1439 |
$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
parents:
343
diff
changeset
|
1440 |
} |
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
parents:
343
diff
changeset
|
1441 |
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
parents:
343
diff
changeset
|
1442 |
{ |
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
parents:
343
diff
changeset
|
1443 |
$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
parents:
343
diff
changeset
|
1444 |
} |
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
parents:
343
diff
changeset
|
1445 |
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
parents:
343
diff
changeset
|
1446 |
{ |
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
parents:
343
diff
changeset
|
1447 |
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
parents:
343
diff
changeset
|
1448 |
} |
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
parents:
343
diff
changeset
|
1449 |
?> |
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
parents:
343
diff
changeset
|
1450 |
</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
parents:
343
diff
changeset
|
1451 |
</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
parents:
343
diff
changeset
|
1452 |
<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
parents:
343
diff
changeset
|
1453 |
<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
parents:
343
diff
changeset
|
1454 |
</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
parents:
343
diff
changeset
|
1455 |
<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
parents:
336
diff
changeset
|
1456 |
<?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
parents:
336
diff
changeset
|
1457 |
echo '</form>'; |
0 | 1458 |
} |
1459 |
} |
|
1460 |
||
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
parents:
343
diff
changeset
|
1461 |
/* |
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
parents:
343
diff
changeset
|
1462 |
* 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
parents:
343
diff
changeset
|
1463 |
*/ |
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
parents:
343
diff
changeset
|
1464 |
|
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
parents:
343
diff
changeset
|
1465 |
/* |
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
parents:
343
diff
changeset
|
1466 |
* 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
parents:
343
diff
changeset
|
1467 |
*/ |
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
parents:
343
diff
changeset
|
1468 |
|
430
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
parents:
407
diff
changeset
|
1469 |
/* |
ec90736b9cb9
Started (but disabled) work on the new theme manager, 1.1.2 is being released with this thing halfway done.
Dan
parents:
407
diff
changeset
|
1470 |
* 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
parents:
407
diff
changeset
|
1471 |
*/ |
0 | 1472 |
|
347 | 1473 |
/* |
1474 |
* Admin:GroupManager sources are in /plugins/admin/GroupManager.php. |
|
1475 |
*/ |
|
0 | 1476 |
|
30 | 1477 |
function page_Admin_COPPA() |
1478 |
{ |
|
1479 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
1480 |
global $lang; |
30 | 1481 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
1482 |
{ |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
1483 |
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
217
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
1484 |
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
1485 |
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
30 | 1486 |
return; |
1487 |
} |
|
1488 |
||
356 | 1489 |
echo '<h2>' . $lang->get('acpcp_heading_main') . '</h2>'; |
30 | 1490 |
echo '<p> |
356 | 1491 |
' . $lang->get('acpcp_intro') . ' |
30 | 1492 |
</p>'; |
1493 |
||
1494 |
// Start form |
|
1495 |
||
1496 |
if ( isset($_POST['coppa_address']) ) |
|
1497 |
{ |
|
1498 |
// Saving changes |
|
1499 |
$enable_coppa = ( isset($_POST['enable_coppa']) ) ? '1' : '0'; |
|
1500 |
setConfig('enable_coppa', $enable_coppa); |
|
1501 |
||
1502 |
$address = $_POST['coppa_address']; // RenderMan::preprocess_text($_POST['coppa_address'], true, false); |
|
1503 |
setConfig('coppa_address', $address); |
|
1504 |
||
356 | 1505 |
echo '<div class="info-box">' . $lang->get('acpcp_msg_save_success') . '</div>'; |
30 | 1506 |
} |
1507 |
||
376 | 1508 |
acp_start_form(); |
30 | 1509 |
|
1510 |
echo '<div class="tblholder">'; |
|
1511 |
echo '<table border="0" cellspacing="1" cellpadding="4">'; |
|
1512 |
echo '<tr> |
|
1513 |
<th colspan="2"> |
|
356 | 1514 |
' . $lang->get('acpcp_th_form') . ' |
30 | 1515 |
</th> |
1516 |
</tr>'; |
|
1517 |
||
1518 |
echo '<tr> |
|
1519 |
<td class="row1"> |
|
356 | 1520 |
' . $lang->get('acpcp_field_enable_title') . ' |
30 | 1521 |
</td> |
1522 |
<td class="row2"> |
|
356 | 1523 |
<label><input type="checkbox" name="enable_coppa" ' . ( ( getConfig('enable_coppa') == '1' ) ? 'checked="checked"' : '' ) . ' /> ' . $lang->get('acpcp_field_enable') . '</label><br /> |
1524 |
<small>' . $lang->get('acpcp_field_enable_hint') . '</small> |
|
30 | 1525 |
</td> |
1526 |
</tr>'; |
|
1527 |
||
1528 |
echo '<tr> |
|
1529 |
<td class="row1"> |
|
356 | 1530 |
' . $lang->get('acpcp_field_address') . '<br /> |
1531 |
<small>' . $lang->get('acpcp_field_address_hint') . '</small> |
|
30 | 1532 |
</td> |
1533 |
<td class="row2"> |
|
1534 |
<textarea name="coppa_address" rows="7" cols="40">' . getConfig('coppa_address') . '</textarea> |
|
1535 |
</td> |
|
1536 |
</tr>'; |
|
1537 |
||
1538 |
echo '<tr> |
|
1539 |
<th colspan="2" class="subhead"> |
|
356 | 1540 |
<input type="submit" value="' . $lang->get('etc_save_changes') . '" /> |
30 | 1541 |
</th> |
1542 |
</tr>'; |
|
1543 |
||
1544 |
echo '</table>'; |
|
1545 |
||
1546 |
echo '</form>'; |
|
1547 |
||
1548 |
} |
|
1549 |
||
0 | 1550 |
function page_Admin_MassEmail() |
1551 |
{ |
|
1552 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
357 | 1553 |
global $lang; |
0 | 1554 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
1555 |
{ |
|
357 | 1556 |
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
1557 |
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
|
1558 |
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
|
0 | 1559 |
return; |
1560 |
} |
|
1561 |
||
1562 |
global $enano_config; |
|
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
1563 |
if ( isset($_POST['do_send']) && !defined('ENANO_DEMO_MODE') ) |
0 | 1564 |
{ |
1565 |
$use_smtp = getConfig('smtp_enabled') == '1'; |
|
1566 |
||
1567 |
// |
|
1568 |
// Let's do some checking to make sure that mass mail functions |
|
1569 |
// are working in win32 versions of php. (copied from phpBB) |
|
1570 |
// |
|
1571 |
if ( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$use_smtp) |
|
1572 |
{ |
|
1573 |
$ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var'; |
|
1574 |
||
1575 |
// We are running on windows, force delivery to use our smtp functions |
|
1576 |
// since php's are broken by default |
|
1577 |
$use_smtp = true; |
|
1578 |
$enano_config['smtp_server'] = @$ini_val('SMTP'); |
|
1579 |
} |
|
1580 |
||
1581 |
$mail = new emailer( !empty($use_smtp) ); |
|
1582 |
||
1583 |
// Validate subject/message body |
|
1584 |
$subject = stripslashes(trim($_POST['subject'])); |
|
1585 |
$message = stripslashes(trim($_POST['message'])); |
|
1586 |
||
1587 |
if ( empty($subject) ) |
|
357 | 1588 |
$errors[] = $lang->get('acpmm_err_need_subject'); |
0 | 1589 |
if ( empty($message) ) |
357 | 1590 |
$errors[] = $lang->get('acpmm_err_need_message'); |
0 | 1591 |
|
1592 |
// Get list of members |
|
1593 |
if ( !empty($_POST['userlist']) ) |
|
1594 |
{ |
|
1595 |
$userlist = str_replace(', ', ',', $_POST['userlist']); |
|
1596 |
$userlist = explode(',', $userlist); |
|
1597 |
foreach ( $userlist as $k => $u ) |
|
1598 |
{ |
|
1599 |
if ( $u == $session->username ) |
|
1600 |
{ |
|
1601 |
// Message is automatically sent to the sender |
|
1602 |
unset($userlist[$k]); |
|
1603 |
} |
|
1604 |
else |
|
1605 |
{ |
|
1606 |
$userlist[$k] = $db->escape($u); |
|
1607 |
} |
|
1608 |
} |
|
1609 |
$userlist = 'WHERE username=\'' . implode('\' OR username=\'', $userlist) . '\''; |
|
1610 |
||
1611 |
$q = $db->sql_query('SELECT email FROM '.table_prefix.'users ' . $userlist . ';'); |
|
1612 |
if ( !$q ) |
|
1613 |
$db->_die(); |
|
1614 |
||
1615 |
if ( $row = $db->fetchrow() ) |
|
1616 |
{ |
|
1617 |
do { |
|
1618 |
$mail->cc($row['email']); |
|
1619 |
} while ( $row = $db->fetchrow() ); |
|
1620 |
} |
|
1621 |
||
1622 |
$db->free_result(); |
|
1623 |
||
1624 |
} |
|
1625 |
else |
|
1626 |
{ |
|
1627 |
// Sending to a usergroup |
|
1628 |
||
1629 |
$group_id = intval($_POST['group_id']); |
|
1630 |
if ( $group_id < 1 ) |
|
1631 |
{ |
|
1632 |
$errors[] = 'Invalid group ID'; |
|
1633 |
} |
|
1634 |
else |
|
1635 |
{ |
|
1636 |
$q = $db->sql_query('SELECT u.email FROM '.table_prefix.'group_members AS g |
|
1637 |
LEFT JOIN '.table_prefix.'users AS u |
|
1638 |
ON (u.user_id=g.user_id) |
|
1639 |
WHERE g.group_id=' . $group_id . ';'); |
|
1640 |
if ( !$q ) |
|
1641 |
$db->_die(); |
|
1642 |
||
1643 |
if ( $row = $db->fetchrow() ) |
|
1644 |
{ |
|
1645 |
do { |
|
1646 |
$mail->cc($row['email']); |
|
1647 |
} while ( $row = $db->fetchrow() ); |
|
1648 |
} |
|
1649 |
||
1650 |
$db->free_result(); |
|
1651 |
} |
|
1652 |
} |
|
1653 |
||
1654 |
if ( sizeof($errors) < 1 ) |
|
1655 |
{ |
|
1656 |
||
1657 |
$mail->from(getConfig('contact_email')); |
|
1658 |
$mail->replyto(getConfig('contact_email')); |
|
1659 |
$mail->set_subject($subject); |
|
1660 |
$mail->email_address(getConfig('contact_email')); |
|
1661 |
||
1662 |
// Copied/modified from phpBB |
|
1663 |
$email_headers = 'X-AntiAbuse: Website server name - ' . $_SERVER['SERVER_NAME'] . "\n"; |
|
1664 |
$email_headers .= 'X-AntiAbuse: User_id - ' . $session->user_id . "\n"; |
|
1665 |
$email_headers .= 'X-AntiAbuse: Username - ' . $session->username . "\n"; |
|
1666 |
$email_headers .= 'X-AntiAbuse: User IP - ' . $_SERVER['REMOTE_ADDR'] . "\n"; |
|
1667 |
||
1668 |
$mail->extra_headers($email_headers); |
|
1669 |
||
357 | 1670 |
// FIXME: how to handle l10n with this? |
0 | 1671 |
$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: |
1672 |
||
1673 |
{CONTACT_EMAIL} |
|
1674 |
||
1675 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
1676 |
{MESSAGE} |
|
1677 |
'; |
|
1678 |
||
1679 |
$mail->use_template($tpl); |
|
1680 |
||
1681 |
$mail->assign_vars(array( |
|
1682 |
'SENDER' => $session->username, |
|
1683 |
'SITE_NAME' => getConfig('site_name'), |
|
1684 |
'CONTACT_EMAIL' => getConfig('contact_email'), |
|
1685 |
'MESSAGE' => $message |
|
1686 |
)); |
|
1687 |
||
1688 |
//echo '<pre>'.print_r($mail,true).'</pre>'; |
|
1689 |
||
1690 |
// All done |
|
1691 |
$mail->send(); |
|
1692 |
$mail->reset(); |
|
1693 |
||
357 | 1694 |
echo '<div class="info-box">' . $lang->get('acpmm_msg_send_success') . '</div>'; |
0 | 1695 |
|
1696 |
} |
|
1697 |
else |
|
1698 |
{ |
|
357 | 1699 |
echo '<div class="warning-box">' . $lang->get('acpmm_err_send_fail') . '<ul><li>' . implode('</li><li>', $errors) . '</li></ul></div>'; |
0 | 1700 |
} |
1701 |
||
1702 |
} |
|
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
1703 |
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
parents:
15
diff
changeset
|
1704 |
{ |
357 | 1705 |
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
parents:
15
diff
changeset
|
1706 |
} |
376 | 1707 |
acp_start_form(); |
0 | 1708 |
?> |
1709 |
<div class="tblholder"> |
|
1710 |
<table border="0" cellspacing="1" cellpadding="4"> |
|
1711 |
<tr> |
|
357 | 1712 |
<th colspan="2"><?php echo $lang->get('acpmm_heading_main'); ?></th> |
0 | 1713 |
</tr> |
1714 |
<tr> |
|
1715 |
<td class="row2" rowspan="2" style="width: 30%; min-width: 200px;"> |
|
357 | 1716 |
<?php echo $lang->get('acpmm_field_group_to'); ?><br /> |
0 | 1717 |
<small> |
357 | 1718 |
<?php echo $lang->get('acpmm_field_group_to_hint'); ?> |
0 | 1719 |
</small> |
1720 |
</td> |
|
1721 |
<td class="row1"> |
|
1722 |
<select name="group_id"> |
|
1723 |
<?php |
|
1724 |
$q = $db->sql_query('SELECT group_name,group_id FROM '.table_prefix.'groups ORDER BY group_name ASC;'); |
|
1725 |
if ( !$q ) |
|
1726 |
$db->_die(); |
|
1727 |
while ( $row = $db->fetchrow() ) |
|
1728 |
{ |
|
357 | 1729 |
list($g_name) = array_values($row); |
1730 |
$g_name_langstr = 'groupcp_grp_' . strtolower($g_name); |
|
1731 |
if ( ($g_langstr = $lang->get($g_name_langstr)) != $g_name_langstr ) |
|
1732 |
{ |
|
1733 |
$g_name = $g_langstr; |
|
1734 |
} |
|
1735 |
echo '<option value="' . $row['group_id'] . '">' . htmlspecialchars($g_name) . '</option>'; |
|
0 | 1736 |
} |
1737 |
?> |
|
1738 |
</select> |
|
1739 |
</td> |
|
1740 |
</tr> |
|
1741 |
<tr> |
|
1742 |
<td class="row1"> |
|
357 | 1743 |
<?php echo $lang->get('acpmm_field_username'); ?> <input type="text" name="userlist" size="50" /> |
0 | 1744 |
</td> |
1745 |
</tr> |
|
1746 |
<tr> |
|
1747 |
<td class="row2" style="width: 30%; min-width: 200px;"> |
|
357 | 1748 |
<?php echo $lang->get('acpmm_field_subject'); ?> |
0 | 1749 |
</td> |
1750 |
<td class="row1"> |
|
1751 |
<input name="subject" type="text" size="50" /> |
|
1752 |
</td> |
|
1753 |
</tr> |
|
1754 |
<tr> |
|
1755 |
<td class="row2" style="width: 30%; min-width: 200px;"> |
|
357 | 1756 |
<?php echo $lang->get('acpmm_field_message'); ?> |
0 | 1757 |
</td> |
1758 |
<td class="row1"> |
|
1759 |
<textarea name="message" rows="30" cols="60" style="width: 100%;"></textarea> |
|
1760 |
</td> |
|
1761 |
</tr> |
|
1762 |
<tr> |
|
1763 |
<th class="subhead" colspan="2" style="text-align: left;" valign="middle"> |
|
357 | 1764 |
<div style="float: right;"><input type="submit" name="do_send" value="<?php echo $lang->get('acpmm_btn_send'); ?>" /></div> |
1765 |
<small style="font-weight: normal;"><?php echo $lang->get('acpmm_msg_send_takeawhile'); ?></small> |
|
0 | 1766 |
</th> |
1767 |
</tr> |
|
1768 |
||
1769 |
</table> |
|
1770 |
</div> |
|
1771 |
<?php |
|
1772 |
echo '</form>'; |
|
1773 |
} |
|
1774 |
||
1775 |
function page_Admin_BanControl() |
|
1776 |
{ |
|
1777 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
1778 |
global $lang; |
0 | 1779 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
1780 |
{ |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
1781 |
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
217
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
1782 |
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
1783 |
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
0 | 1784 |
return; |
1785 |
} |
|
1786 |
||
1787 |
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
parents:
15
diff
changeset
|
1788 |
{ |
208 | 1789 |
$e = $db->sql_query('DELETE FROM '.table_prefix.'banlist WHERE ban_id=' . intval($_GET['id']) . ''); |
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1790 |
if ( !$e ) |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1791 |
$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
parents:
15
diff
changeset
|
1792 |
} |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
1793 |
if(isset($_POST['create']) && !defined('ENANO_DEMO_MODE')) |
0 | 1794 |
{ |
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1795 |
$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
parents:
118
diff
changeset
|
1796 |
$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
parents:
118
diff
changeset
|
1797 |
if ( !in_array($type, array(BAN_IP, BAN_USER, BAN_EMAIL)) ) |
0 | 1798 |
{ |
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1799 |
echo '<div class="error-box">Hacking attempt.</div>'; |
0 | 1800 |
} |
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1801 |
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
parents:
118
diff
changeset
|
1802 |
{ |
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1803 |
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
parents:
118
diff
changeset
|
1804 |
} |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1805 |
else |
0 | 1806 |
{ |
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1807 |
$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
parents:
118
diff
changeset
|
1808 |
$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
parents:
118
diff
changeset
|
1809 |
$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
parents:
118
diff
changeset
|
1810 |
foreach ( $input as $entry ) |
322
5f1cd51bf1be
Many changes. Installer with PostgreSQL is broken badly and will be for some time.
Dan
parents:
320
diff
changeset
|
1811 |
{ |
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1812 |
$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
parents:
118
diff
changeset
|
1813 |
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
parents:
118
diff
changeset
|
1814 |
{ |
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1815 |
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
parents:
118
diff
changeset
|
1816 |
$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
parents:
118
diff
changeset
|
1817 |
break; |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1818 |
} |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1819 |
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
parents:
118
diff
changeset
|
1820 |
{ |
270
5bcdee999015
Major fixes to the ban system - large IP match lists don't slow down the server miserably anymore.
Dan
parents:
256
diff
changeset
|
1821 |
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
parents:
118
diff
changeset
|
1822 |
{ |
270
5bcdee999015
Major fixes to the ban system - large IP match lists don't slow down the server miserably anymore.
Dan
parents:
256
diff
changeset
|
1823 |
// 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
parents:
256
diff
changeset
|
1824 |
$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
parents:
118
diff
changeset
|
1825 |
} |
270
5bcdee999015
Major fixes to the ban system - large IP match lists don't slow down the server miserably anymore.
Dan
parents:
256
diff
changeset
|
1826 |
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
parents:
118
diff
changeset
|
1827 |
{ |
270
5bcdee999015
Major fixes to the ban system - large IP match lists don't slow down the server miserably anymore.
Dan
parents:
256
diff
changeset
|
1828 |
$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
parents:
118
diff
changeset
|
1829 |
} |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1830 |
} |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1831 |
else |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1832 |
{ |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1833 |
$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
parents:
118
diff
changeset
|
1834 |
} |
322
5f1cd51bf1be
Many changes. Installer with PostgreSQL is broken badly and will be for some time.
Dan
parents:
320
diff
changeset
|
1835 |
} |
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1836 |
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
parents:
118
diff
changeset
|
1837 |
{ |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1838 |
$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
parents:
118
diff
changeset
|
1839 |
$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
parents:
118
diff
changeset
|
1840 |
$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
parents:
118
diff
changeset
|
1841 |
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
parents:
118
diff
changeset
|
1842 |
{ |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1843 |
$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
parents:
118
diff
changeset
|
1844 |
$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
parents:
118
diff
changeset
|
1845 |
} |
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1846 |
$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
parents:
118
diff
changeset
|
1847 |
@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
parents:
118
diff
changeset
|
1848 |
$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
parents:
118
diff
changeset
|
1849 |
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
parents:
118
diff
changeset
|
1850 |
} |
0 | 1851 |
} |
1852 |
} |
|
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
1853 |
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
parents:
15
diff
changeset
|
1854 |
{ |
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1855 |
echo '<div class="error-box">' . $lang->get('acpbc_err_demo', array('ban_target' => htmlspecialchars($_POST['value']))) . '</div>'; |
0 | 1856 |
} |
1857 |
$q = $db->sql_query('SELECT ban_id,ban_type,ban_value,is_regex FROM '.table_prefix.'banlist ORDER BY ban_type;'); |
|
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1858 |
if ( !$q ) |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1859 |
$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
parents:
118
diff
changeset
|
1860 |
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
parents:
118
diff
changeset
|
1861 |
<table border="0" cellspacing="1" cellpadding="4">'; |
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1862 |
echo '<tr> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1863 |
<th>' . $lang->get('acpbc_col_type') . '</th> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1864 |
<th>' . $lang->get('acpbc_col_value') . '</th> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1865 |
<th>' . $lang->get('acpbc_col_regex') . '</th> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1866 |
<th></th> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1867 |
</tr>'; |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1868 |
if ( $db->numrows() < 1 ) |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1869 |
{ |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1870 |
echo '<td class="row1" colspan="4">' . $lang->get('acpbc_msg_no_rules') . '</td>'; |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1871 |
} |
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1872 |
$cls = 'row2'; |
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1873 |
while ( $r = $db->fetchrow() ) |
0 | 1874 |
{ |
128
01955bf53f96
Improved ban control page and allowed multiple entries/IP ranges; changed some parameters on jBox; user level changes are logged now
Dan
parents:
118
diff
changeset
|
1875 |
$cls = ( $cls == 'row1' ) ? 'row2' : 'row1'; |
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1876 |
if ( $r['ban_type'] == BAN_IP ) |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1877 |
$t = $lang->get('acpbc_ban_type_ip'); |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1878 |
else if ( $r['ban_type'] == BAN_USER ) |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1879 |
$t = $lang->get('acpbc_ban_type_username'); |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1880 |
else if ( $r['ban_type'] == BAN_EMAIL ) |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1881 |
$t = $lang->get('acpbc_ban_type_email'); |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1882 |
$g = ( $r['is_regex'] ) ? '<b>' . $lang->get('acpbc_ban_regex_yes') . '</b>' : $lang->get('acpbc_ban_regex_no'); |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1883 |
echo '<tr> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1884 |
<td class="'.$cls.'">'.$t.'</td> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1885 |
<td class="'.$cls.'">'.htmlspecialchars($r['ban_value']).'</td> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1886 |
<td class="'.$cls.'">'.$g.'</td> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1887 |
<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> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1888 |
</tr>'; |
0 | 1889 |
} |
1890 |
$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
parents:
118
diff
changeset
|
1891 |
echo '</table></div>'; |
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1892 |
echo '<h3>' . $lang->get('acpbc_heading_create_new') . '</h3>'; |
376 | 1893 |
acp_start_form(); |
0 | 1894 |
?> |
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1895 |
|
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1896 |
<?php echo $lang->get('acpbc_field_type'); ?> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1897 |
<select name="type"> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1898 |
<option value="<?php echo BAN_IP; ?>"><?php echo $lang->get('acpbc_ban_type_ip'); ?></option> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1899 |
<option value="<?php echo BAN_USER; ?>"><?php echo $lang->get('acpbc_ban_type_username'); ?></option> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1900 |
<option value="<?php echo BAN_EMAIL; ?>"><?php echo $lang->get('acpbc_ban_type_email'); ?></option> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1901 |
</select> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1902 |
<br /> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1903 |
|
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1904 |
<?php echo $lang->get('acpbc_field_rule'); ?> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1905 |
<input type="text" name="value" size="30" /><br /> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1906 |
<small><?php echo $lang->get('acpbc_field_rule_hint'); ?></small><br /> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1907 |
|
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1908 |
<?php echo $lang->get('acpbc_field_reason'); ?> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1909 |
<textarea name="reason" rows="7" cols="40"></textarea><br /> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1910 |
|
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1911 |
<label><input type="checkbox" name="regex" id="regex" /> <?php echo $lang->get('acpbc_field_regex'); ?></label> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1912 |
<?php echo $lang->get('acpbc_field_regex_hint'); ?><br /> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1913 |
|
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1914 |
<input type="submit" style="font-weight: bold;" name="create" value="<?php echo $lang->get('acpbc_btn_create'); ?>" /> |
0 | 1915 |
<?php |
1916 |
echo '</form>'; |
|
1917 |
} |
|
1918 |
||
1919 |
function page_Admin_AdminLogout() |
|
1920 |
{ |
|
1921 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
1922 |
global $lang; |
0 | 1923 |
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) |
1924 |
{ |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
1925 |
$login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); |
217
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
1926 |
echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
2b13497fe820
... properly this time. Nighthawk is giving me crap so I'm moving to the laptop for now.
Dan
parents:
216
diff
changeset
|
1927 |
echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
0 | 1928 |
return; |
1929 |
} |
|
1930 |
||
1931 |
$session->logout(USER_LEVEL_ADMIN); |
|
358
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1932 |
echo '<h3>' . $lang->get('acplo_heading_main') . '</h3> |
b25d34fbc7ab
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
Dan
parents:
357
diff
changeset
|
1933 |
<p>' . $lang->get('acplo_msg_logout_complete', array('mainpage_link' => makeUrl(getConfig('main_page')))) . '</p>'; |
0 | 1934 |
} |
1935 |
||
1936 |
function page_Special_Administration() |
|
1937 |
{ |
|
1938 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
1939 |
global $lang; |
0 | 1940 |
|
1941 |
if($session->auth_level < USER_LEVEL_ADMIN) { |
|
1942 |
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); |
|
1943 |
exit; |
|
1944 |
} |
|
1945 |
else |
|
1946 |
{ |
|
1947 |
$template->load_theme('admin', 'default'); |
|
1948 |
$template->init_vars(); |
|
1949 |
if( !isset( $_GET['noheaders'] ) ) |
|
1950 |
{ |
|
1951 |
$template->header(); |
|
1952 |
} |
|
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
parents:
376
diff
changeset
|
1953 |
echo $lang->get('adm_page_tagline'); |
0 | 1954 |
?> |
1955 |
<script type="text/javascript"> |
|
1956 |
function ajaxPage(t) |
|
1957 |
{ |
|
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
parents:
43
diff
changeset
|
1958 |
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
parents:
43
diff
changeset
|
1959 |
{ |
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
parents:
43
diff
changeset
|
1960 |
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
parents:
43
diff
changeset
|
1961 |
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
parents:
43
diff
changeset
|
1962 |
} |
0 | 1963 |
if ( t == namespace_list.Admin + 'AdminLogout' ) |
1964 |
{ |
|
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
parents:
555
diff
changeset
|
1965 |
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
parents:
555
diff
changeset
|
1966 |
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
parents:
555
diff
changeset
|
1967 |
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
parents:
555
diff
changeset
|
1968 |
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
parents:
555
diff
changeset
|
1969 |
{ |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1970 |
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
parents:
555
diff
changeset
|
1971 |
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
parents:
555
diff
changeset
|
1972 |
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
parents:
555
diff
changeset
|
1973 |
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
parents:
555
diff
changeset
|
1974 |
}, |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1975 |
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
parents:
555
diff
changeset
|
1976 |
{ |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1977 |
var tigraentry = document.getElementById('i_div0_0').parentNode; |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1978 |
var tigraobj = $(tigraentry); |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1979 |
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
parents:
555
diff
changeset
|
1980 |
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
parents:
555
diff
changeset
|
1981 |
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
parents:
555
diff
changeset
|
1982 |
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
parents:
555
diff
changeset
|
1983 |
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
parents:
555
diff
changeset
|
1984 |
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
parents:
555
diff
changeset
|
1985 |
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
parents:
555
diff
changeset
|
1986 |
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
parents:
555
diff
changeset
|
1987 |
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
parents:
555
diff
changeset
|
1988 |
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
parents:
555
diff
changeset
|
1989 |
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
parents:
555
diff
changeset
|
1990 |
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
parents:
555
diff
changeset
|
1991 |
var body = document.getElementsByTagName('body')[0]; |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1992 |
miniPromptDestroy(true); |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1993 |
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
parents:
555
diff
changeset
|
1994 |
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
parents:
555
diff
changeset
|
1995 |
} |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1996 |
}, |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1997 |
{ |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
1998 |
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
parents:
555
diff
changeset
|
1999 |
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
parents:
555
diff
changeset
|
2000 |
{ |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
2001 |
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
parents:
555
diff
changeset
|
2002 |
} |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
2003 |
} |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
2004 |
] |
a1c450a911a6
Updated version number metadata in system plugin files; added some comments and removed unused code from index.php and includes/graphs.php
Dan
parents:
555
diff
changeset
|
2005 |
}); |
0 | 2006 |
return; |
2007 |
} |
|
2008 |
ajaxPageBin(t); |
|
2009 |
} |
|
2010 |
function ajaxPageBin(t) |
|
2011 |
{ |
|
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
parents:
43
diff
changeset
|
2012 |
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
parents:
43
diff
changeset
|
2013 |
{ |
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
parents:
43
diff
changeset
|
2014 |
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
parents:
43
diff
changeset
|
2015 |
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
parents:
43
diff
changeset
|
2016 |
} |
0 | 2017 |
document.getElementById('ajaxPageContainer').innerHTML = '<div class="wait-box">Loading page...</div>'; |
2018 |
ajaxGet('<?php echo scriptPath; ?>/ajax.php?title='+t+'&_mode=getpage&noheaders&auth=<?php echo $session->sid_super; ?>', function() { |
|
407
35d94240a197
Mass-fixed all AJAX functions to also check the HTTP status code before parsing the response
Dan
parents:
391
diff
changeset
|
2019 |
if ( ajax.readyState == 4 && ajax.status == 200 ) { |
0 | 2020 |
document.getElementById('ajaxPageContainer').innerHTML = ajax.responseText; |
2021 |
fadeInfoBoxes(); |
|
2022 |
} |
|
2023 |
}); |
|
2024 |
} |
|
2025 |
function _enanoAdminOnload() { ajaxPage('<?php echo $paths->nslist['Admin']; ?>Home'); } |
|
2026 |
var TREE_TPL = { |
|
2027 |
'target' : '_self', // name of the frame links will be opened in |
|
2028 |
// other possible values are: _blank, _parent, _search, _self and _top |
|
2029 |
||
2030 |
'icon_e' : '<?php echo scriptPath; ?>/images/icons/empty.gif', // empty image |
|
2031 |
'icon_l' : '<?php echo scriptPath; ?>/images/icons/line.gif', // vertical line |
|
2032 |
'icon_32' : '<?php echo scriptPath; ?>/images/icons/base.gif', // root leaf icon normal |
|
2033 |
'icon_36' : '<?php echo scriptPath; ?>/images/icons/base.gif', // root leaf icon selected |
|
2034 |
'icon_48' : '<?php echo scriptPath; ?>/images/icons/base.gif', // root icon normal |
|
2035 |
'icon_52' : '<?php echo scriptPath; ?>/images/icons/base.gif', // root icon selected |
|
2036 |
'icon_56' : '<?php echo scriptPath; ?>/images/icons/base.gif', // root icon opened |
|
2037 |
'icon_60' : '<?php echo scriptPath; ?>/images/icons/base.gif', // root icon selected |
|
2038 |
'icon_16' : '<?php echo scriptPath; ?>/images/icons/folder.gif', // node icon normal |
|
2039 |
'icon_20' : '<?php echo scriptPath; ?>/images/icons/folderopen.gif', // node icon selected |
|
2040 |
'icon_24' : '<?php echo scriptPath; ?>/images/icons/folder.gif', // node icon opened |
|
2041 |
'icon_28' : '<?php echo scriptPath; ?>/images/icons/folderopen.gif', // node icon selected opened |
|
2042 |
'icon_0' : '<?php echo scriptPath; ?>/images/icons/page.gif', // leaf icon normal |
|
2043 |
'icon_4' : '<?php echo scriptPath; ?>/images/icons/page.gif', // leaf icon selected |
|
2044 |
'icon_8' : '<?php echo scriptPath; ?>/images/icons/page.gif', // leaf icon opened |
|
2045 |
'icon_12' : '<?php echo scriptPath; ?>/images/icons/page.gif', // leaf icon selected |
|
2046 |
'icon_2' : '<?php echo scriptPath; ?>/images/icons/joinbottom.gif', // junction for leaf |
|
2047 |
'icon_3' : '<?php echo scriptPath; ?>/images/icons/join.gif', // junction for last leaf |
|
2048 |
'icon_18' : '<?php echo scriptPath; ?>/images/icons/plusbottom.gif', // junction for closed node |
|
2049 |
'icon_19' : '<?php echo scriptPath; ?>/images/icons/plus.gif', // junction for last closed node |
|
2050 |
'icon_26' : '<?php echo scriptPath; ?>/images/icons/minusbottom.gif',// junction for opened node |
|
2051 |
'icon_27' : '<?php echo scriptPath; ?>/images/icons/minus.gif' // junction for last opended node |
|
2052 |
}; |
|
118
0c5efda996bf
Added keep-alive function to admin panel (had been planned for some time) and a new hook, template_var_init_end
Dan
parents:
116
diff
changeset
|
2053 |
addOnloadHook(keepalive_onload); |
0 | 2054 |
<?php |
2055 |
echo $paths->parseAdminTree(); // Make a Javascript array that defines the tree |
|
2056 |
if(!isset($_GET['module'])) { echo 'addOnloadHook(_enanoAdminOnload);'; } ?> |
|
2057 |
</script> |
|
2058 |
<table border="0" width="100%"> |
|
2059 |
<tr> |
|
2060 |
<td class="holder" valign="top"> |
|
2061 |
<div class="pad" style="padding-right: 20px;"> |
|
2062 |
<script type="text/javascript"> |
|
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
parents:
43
diff
changeset
|
2063 |
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
parents:
43
diff
changeset
|
2064 |
{ |
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
parents:
43
diff
changeset
|
2065 |
new tree(TREE_ITEMS, TREE_TPL); |
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
parents:
43
diff
changeset
|
2066 |
} |
0 | 2067 |
</script> |
2068 |
</div> |
|
2069 |
</td> |
|
2070 |
<td width="100%" valign="top"> |
|
2071 |
<div class="pad" id="ajaxPageContainer"> |
|
2072 |
<?php |
|
2073 |
if(isset($_GET['module'])) |
|
2074 |
{ |
|
2075 |
// Look for a namespace prefix in the urlname, and assign a different namespace, if necessary |
|
2076 |
$k = array_keys($paths->nslist); |
|
2077 |
for ( $i = 0; $i < sizeof($paths->nslist); $i++ ) |
|
2078 |
{ |
|
2079 |
$ln = strlen( $paths->nslist[ $k[ $i ] ] ); |
|
2080 |
if ( substr($_GET['module'], 0, $ln) == $paths->nslist[$k[$i]] ) |
|
2081 |
{ |
|
2082 |
$ns = $k[$i]; |
|
2083 |
$nm = substr($_GET['module'], $ln, strlen($_GET['module'])); |
|
2084 |
} |
|
2085 |
} |
|
2086 |
$fname = 'page_'.$ns.'_'.$nm; |
|
2087 |
$s = strpos($fname, '?noheaders'); |
|
2088 |
if($s) $fname = substr($fname, 0, $s); |
|
2089 |
$paths->cpage['module'] = $_GET['module']; |
|
2090 |
if ( function_exists($fname) && $_GET['module'] != $paths->nslist['Special'] . 'Administration' ) |
|
2091 |
{ |
|
2092 |
eval($fname.'();'); |
|
2093 |
} |
|
2094 |
} |
|
2095 |
else |
|
2096 |
{ |
|
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
parents:
166
diff
changeset
|
2097 |
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 | 2098 |
} |
2099 |
?> |
|
2100 |
</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
parents:
43
diff
changeset
|
2101 |
<script type="text/javascript"> |
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
parents:
43
diff
changeset
|
2102 |
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
parents:
43
diff
changeset
|
2103 |
{ |
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
parents:
43
diff
changeset
|
2104 |
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
parents:
43
diff
changeset
|
2105 |
} |
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
parents:
43
diff
changeset
|
2106 |
</script> |
0 | 2107 |
</td> |
2108 |
</tr> |
|
2109 |
</table> |
|
2110 |
||
2111 |
<?php |
|
2112 |
} |
|
2113 |
if(!isset($_GET['noheaders'])) |
|
2114 |
{ |
|
2115 |
$template->footer(); |
|
2116 |
} |
|
2117 |
} |
|
2118 |
||
2119 |
function page_Special_EditSidebar() |
|
2120 |
{ |
|
2121 |
global $db, $session, $paths, $template, $plugins; // Common objects |
|
216
feaffad3e07b
Localized the dreaded not-authenticated message in the admin panel
Dan
parents:
215
diff
changeset
|
2122 |
global $lang; |
0 | 2123 |
|
2124 |
if($session->auth_level < USER_LEVEL_ADMIN) |
|
2125 |
{ |
|
2126 |
redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), '', '', false); |
|
2127 |
exit; |
|
2128 |
} |
|
2129 |
else |
|
2130 |
{ |
|
2131 |
||
2132 |
$template->add_header('<script type="text/javascript" src="'.scriptPath.'/includes/clientside/dbx.js"></script>'); |
|
2133 |
$template->add_header('<script type="text/javascript" src="'.scriptPath.'/includes/clientside/dbx-key.js"></script>'); |
|
2134 |
$template->add_header('<script type="text/javascript" src="'.scriptPath.'/includes/clientside/sbedit.js"></script>'); |
|
2135 |
$template->add_header('<link rel="stylesheet" type="text/css" href="'.scriptPath.'/includes/clientside/dbx.css" />'); |
|
2136 |
||
2137 |
$template->load_theme('oxygen', 'bleu'); |
|
2138 |
$template->init_vars(); |
|
2139 |
||
2140 |
$template->header(); |
|
2141 |
||
2142 |
if(isset($_POST['save'])) |
|
2143 |
{ |
|
2144 |
// Write the new block order to the database |
|
2145 |
// 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... |
|
2146 |
// Anyone know a better way to do this? |
|
2147 |
$q = $db->sql_query('SELECT item_order,item_id,sidebar_id FROM '.table_prefix.'sidebar ORDER BY sidebar_id ASC, item_order ASC;'); |
|
2148 |
if ( !$q ) |
|
2149 |
{ |
|
2150 |
$db->_die('The sidebar order data could not be selected.'); |
|
2151 |
} |
|
2152 |
$orders = Array(); |
|
2153 |
while($row = $db->fetchrow()) |
|
2154 |
{ |
|
2155 |
$orders[] = Array( |
|
2156 |
count($orders), |
|
2157 |
$row['item_id'], |
|
2158 |
$row['sidebar_id'], |
|
2159 |
); |
|
2160 |
} |
|
2161 |
$db->free_result(); |
|
2162 |
||
2163 |
// 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. |
|
2164 |
$ol = explode(',', $_POST['order_left']); |
|
2165 |
$odr = explode(',', $_POST['order_right']); |
|
2166 |
$om = array_merge($ol, $odr); |
|
2167 |
unset($ol, $odr); |
|
2168 |
$queries = Array(); |
|
2169 |
foreach($orders as $k => $v) |
|
2170 |
{ |
|
365 | 2171 |
$queries[] = 'UPDATE '.table_prefix.'sidebar SET item_order='.intval($om[$k]).' WHERE item_id='.intval($v[1]).';'; |
0 | 2172 |
} |
2173 |
foreach($queries as $sql) |
|
2174 |
{ |
|
2175 |
$q = $db->sql_query($sql); |
|
2176 |
if(!$q) |
|
2177 |
{ |
|
2178 |
$t = $db->get_error(); |
|
2179 |
echo $t; |
|
2180 |
$template->footer(); |
|
2181 |
exit; |
|
2182 |
} |
|
2183 |
} |
|
365 | 2184 |
echo '<div class="info-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_order_update_success') . '</div>'; |
0 | 2185 |
} |
2186 |
elseif(isset($_POST['create'])) |
|
2187 |
{ |
|
2188 |
switch((int)$_POST['type']) |
|
2189 |
{ |
|
2190 |
case BLOCK_WIKIFORMAT: |
|
2191 |
$content = $_POST['wikiformat_content']; |
|
2192 |
break; |
|
2193 |
case BLOCK_TEMPLATEFORMAT: |
|
2194 |
$content = $_POST['templateformat_content']; |
|
2195 |
break; |
|
2196 |
case BLOCK_HTML: |
|
2197 |
$content = $_POST['html_content']; |
|
2198 |
break; |
|
2199 |
case BLOCK_PHP: |
|
2200 |
$content = $_POST['php_content']; |
|
2201 |
break; |
|
2202 |
case BLOCK_PLUGIN: |
|
2203 |
$content = $_POST['plugin_id']; |
|
2204 |
break; |
|
2205 |
} |
|
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2206 |
|
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2207 |
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
parents:
15
diff
changeset
|
2208 |
{ |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2209 |
// Sanitize the HTML |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2210 |
$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
parents:
15
diff
changeset
|
2211 |
} |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2212 |
|
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2213 |
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
parents:
15
diff
changeset
|
2214 |
{ |
365 | 2215 |
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
parents:
15
diff
changeset
|
2216 |
$_POST['php_content'] = '?><Nulled>'; |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2217 |
$content = $_POST['php_content']; |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2218 |
} |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2219 |
|
0 | 2220 |
// Get the value of item_order |
2221 |
||
365 | 2222 |
$q = $db->sql_query('SELECT * FROM '.table_prefix.'sidebar WHERE sidebar_id='.intval($_POST['sidebar_id']).';'); |
0 | 2223 |
if(!$q) $db->_die('The order number could not be selected'); |
2224 |
$io = $db->numrows(); |
|
2225 |
||
2226 |
$db->free_result(); |
|
2227 |
||
2228 |
$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.' );'; |
|
2229 |
$result = $db->sql_query($q); |
|
2230 |
if(!$result) |
|
2231 |
{ |
|
2232 |
echo $db->get_error(); |
|
2233 |
$template->footer(); |
|
2234 |
exit; |
|
2235 |
} |
|
2236 |
||
365 | 2237 |
echo '<div class="info-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_item_added') . '</div>'; |
0 | 2238 |
|
2239 |
} |
|
2240 |
||
2241 |
if(isset($_GET['action']) && isset($_GET['id'])) |
|
2242 |
{ |
|
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
parents:
142
diff
changeset
|
2243 |
if(!preg_match('#^([0-9]*)$#', $_GET['id'])) |
0 | 2244 |
{ |
2245 |
echo '<div class="warning-box">Error with action: $_GET["id"] was not an integer, aborting to prevent SQL injection</div>'; |
|
2246 |
} |
|
2247 |
switch($_GET['action']) |
|
2248 |
{ |
|
2249 |
case 'new': |
|
2250 |
?> |
|
2251 |
<script type="text/javascript"> |
|
2252 |
function setType(input) |
|
2253 |
{ |
|
2254 |
val = input.value; |
|
2255 |
if(!val) |
|
2256 |
{ |
|
2257 |
return false; |
|
2258 |
} |
|
2259 |
var divs = getElementsByClassName(document, 'div', 'sbadd_block'); |
|
2260 |
for(var i in divs) |
|
2261 |
{ |
|
2262 |
if(divs[i].id == 'blocktype_'+val) divs[i].style.display = 'block'; |
|
2263 |
else divs[i].style.display = 'none'; |
|
2264 |
} |
|
2265 |
} |
|
2266 |
</script> |
|
2267 |
||
2268 |
<form action="<?php echo makeUrl($paths->page); ?>" method="post"> |
|
2269 |
||
2270 |
<p> |
|
365 | 2271 |
<?php echo $lang->get('sbedit_create_intro'); ?> |
0 | 2272 |
</p> |
2273 |
<p> |
|
2274 |
<select name="type" onchange="setType(this)"> <?php /* (NOT WORKING, at least in firefox 2) onload="var thingy = this; setTimeout('setType(thingy)', 500);" */ ?> |
|
365 | 2275 |
<option value="<?php echo BLOCK_WIKIFORMAT; ?>"><?php echo $lang->get('sbedit_block_type_wiki'); ?></option> |
2276 |
<option value="<?php echo BLOCK_TEMPLATEFORMAT; ?>"><?php echo $lang->get('sbedit_block_type_tpl'); ?></option> |
|
2277 |
<option value="<?php echo BLOCK_HTML; ?>"><?php echo $lang->get('sbedit_block_type_html'); ?></option> |
|
2278 |
<option value="<?php echo BLOCK_PHP; ?>"><?php echo $lang->get('sbedit_block_type_php'); ?></option> |
|
2279 |
<option value="<?php echo BLOCK_PLUGIN; ?>"><?php echo $lang->get('sbedit_block_type_plugin'); ?></option> |
|
0 | 2280 |
</select> |
2281 |
</p> |
|
2282 |
||
2283 |
<p> |
|
2284 |
||
365 | 2285 |
<?php echo $lang->get('sbedit_field_block_title'); ?> <input name="title" type="text" size="40" /><br /> |
2286 |
<?php echo $lang->get('sbedit_field_block_sidebar'); ?> |
|
2287 |
<select name="sidebar_id"> |
|
2288 |
<option value="<?php echo SIDEBAR_LEFT; ?>"><?php echo $lang->get('sbedit_field_block_sidebar_left'); ?></option> |
|
2289 |
<option value="<?php echo SIDEBAR_RIGHT; ?>"><?php echo $lang->get('sbedit_field_block_sidebar_right'); ?></option> |
|
2290 |
</select> |
|
0 | 2291 |
|
2292 |
</p> |
|
2293 |
||
2294 |
<div class="sbadd_block" id="blocktype_<?php echo BLOCK_WIKIFORMAT; ?>"> |
|
2295 |
<p> |
|
365 | 2296 |
<?php echo $lang->get('sbedit_field_wikitext'); ?> |
0 | 2297 |
</p> |
2298 |
<p> |
|
2299 |
<textarea style="width: 98%;" name="wikiformat_content" rows="15" cols="50"></textarea> |
|
2300 |
</p> |
|
2301 |
</div> |
|
2302 |
||
2303 |
<div class="sbadd_block" id="blocktype_<?php echo BLOCK_TEMPLATEFORMAT; ?>"> |
|
2304 |
<p> |
|
365 | 2305 |
<?php echo $lang->get('sbedit_field_tplcode'); ?> |
0 | 2306 |
</p> |
2307 |
<p> |
|
2308 |
<textarea style="width: 98%;" name="templateformat_content" rows="15" cols="50"></textarea> |
|
2309 |
</p> |
|
2310 |
</div> |
|
2311 |
||
2312 |
<div class="sbadd_block" id="blocktype_<?php echo BLOCK_HTML; ?>"> |
|
2313 |
<p> |
|
365 | 2314 |
<?php echo $lang->get('sbedit_field_html'); ?> |
0 | 2315 |
</p> |
2316 |
<p> |
|
2317 |
<textarea style="width: 98%;" name="html_content" rows="15" cols="50"></textarea> |
|
2318 |
</p> |
|
2319 |
</div> |
|
2320 |
||
2321 |
<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
parents:
15
diff
changeset
|
2322 |
<?php if ( defined('ENANO_DEMO_MODE') ) { ?> |
365 | 2323 |
<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
parents:
15
diff
changeset
|
2324 |
<?php } else { ?> |
365 | 2325 |
<?php echo $lang->get('sbedit_field_php'); ?> |
2326 |
||
0 | 2327 |
<p> |
2328 |
<textarea style="width: 98%;" name="php_content" rows="15" cols="50"></textarea> |
|
2329 |
</p> |
|
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2330 |
<?php } ?> |
0 | 2331 |
</div> |
2332 |
||
2333 |
<div class="sbadd_block" id="blocktype_<?php echo BLOCK_PLUGIN; ?>"> |
|
2334 |
<p> |
|
365 | 2335 |
<?php echo $lang->get('sbedit_field_plugin'); ?> |
0 | 2336 |
</p> |
2337 |
<p> |
|
2338 |
<select name="plugin_id"> |
|
2339 |
<?php |
|
2340 |
foreach($template->plugin_blocks as $k => $c) |
|
2341 |
{ |
|
2342 |
echo '<option value="'.$k.'">'.$k.'</option>'; |
|
2343 |
} |
|
2344 |
?> |
|
2345 |
</select> |
|
2346 |
</p> |
|
2347 |
</div> |
|
2348 |
||
2349 |
<p> |
|
2350 |
||
365 | 2351 |
<input type="submit" name="create" value="<?php echo $lang->get('sbedit_btn_create_block'); ?>" style="font-weight: bold;" /> |
2352 |
<input type="submit" name="cancel" value="<?php echo $lang->get('etc_cancel'); ?>" /> |
|
0 | 2353 |
|
2354 |
</p> |
|
2355 |
||
2356 |
</form> |
|
2357 |
||
2358 |
<script type="text/javascript"> |
|
2359 |
var divs = getElementsByClassName(document, 'div', 'sbadd_block'); |
|
2360 |
for(var i in divs) |
|
2361 |
{ |
|
2362 |
if(divs[i].id != 'blocktype_<?php echo BLOCK_WIKIFORMAT; ?>') setTimeout("document.getElementById('"+divs[i].id+"').style.display = 'none';", 500); |
|
2363 |
} |
|
2364 |
</script> |
|
2365 |
||
2366 |
<?php |
|
2367 |
$template->footer(); |
|
2368 |
return; |
|
2369 |
break; |
|
2370 |
case 'move': |
|
2371 |
if( !isset($_GET['side']) || ( isset($_GET['side']) && !preg_match('#^([0-9]+)$#', $_GET['side']) ) ) |
|
2372 |
{ |
|
2373 |
echo '<div class="warning-box" style="margin: 10px 0;">$_GET[\'side\'] contained an SQL injection attempt</div>'; |
|
2374 |
break; |
|
2375 |
} |
|
190
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2376 |
$query = $db->sql_query('UPDATE '.table_prefix.'sidebar SET sidebar_id=' . $db->escape($_GET['side']) . ' WHERE item_id=' . intval($_GET['id']) . ';'); |
0 | 2377 |
if(!$query) |
2378 |
{ |
|
2379 |
echo $db->get_error(); |
|
2380 |
$template->footer(); |
|
2381 |
exit; |
|
2382 |
} |
|
365 | 2383 |
echo '<div class="info-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_block_moved') . '</div>'; |
0 | 2384 |
break; |
2385 |
case 'delete': |
|
190
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2386 |
$query = $db->sql_query('DELETE FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';'); // Already checked for injection attempts ;-) |
0 | 2387 |
if(!$query) |
2388 |
{ |
|
2389 |
echo $db->get_error(); |
|
2390 |
$template->footer(); |
|
2391 |
exit; |
|
2392 |
} |
|
2393 |
if(isset($_GET['ajax'])) |
|
2394 |
{ |
|
2395 |
ob_end_clean(); |
|
2396 |
die('GOOD'); |
|
2397 |
} |
|
365 | 2398 |
echo '<div class="error-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_block_deleted') . '</div>'; |
0 | 2399 |
break; |
2400 |
case 'disenable'; |
|
190
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2401 |
$q = $db->sql_query('SELECT item_enabled FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';'); |
0 | 2402 |
if(!$q) |
2403 |
{ |
|
2404 |
echo $db->get_error(); |
|
2405 |
$template->footer(); |
|
2406 |
exit; |
|
2407 |
} |
|
2408 |
$r = $db->fetchrow(); |
|
2409 |
$db->free_result(); |
|
2410 |
$e = ( $r['item_enabled'] == 1 ) ? '0' : '1'; |
|
190
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2411 |
$q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET item_enabled='.$e.' WHERE item_id=' . intval($_GET['id']) . ';'); |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2412 |
if(!$q) |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2413 |
{ |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2414 |
echo $db->get_error(); |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2415 |
$template->footer(); |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2416 |
exit; |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2417 |
} |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2418 |
if(isset($_GET['ajax'])) |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2419 |
{ |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2420 |
ob_end_clean(); |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2421 |
die('GOOD'); |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2422 |
} |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2423 |
break; |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2424 |
case 'rename'; |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2425 |
$newname = $db->escape($_POST['newname']); |
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2426 |
$q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET block_name=\''.$newname.'\' WHERE item_id=' . intval($_GET['id']) . ';'); |
0 | 2427 |
if(!$q) |
2428 |
{ |
|
2429 |
echo $db->get_error(); |
|
2430 |
$template->footer(); |
|
2431 |
exit; |
|
2432 |
} |
|
2433 |
if(isset($_GET['ajax'])) |
|
2434 |
{ |
|
2435 |
ob_end_clean(); |
|
2436 |
die('GOOD'); |
|
2437 |
} |
|
2438 |
break; |
|
2439 |
case 'getsource': |
|
190
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2440 |
$q = $db->sql_query('SELECT block_content,block_type FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';'); |
0 | 2441 |
if(!$q) |
2442 |
{ |
|
2443 |
echo $db->get_error(); |
|
2444 |
$template->footer(); |
|
2445 |
exit; |
|
2446 |
} |
|
2447 |
ob_end_clean(); |
|
2448 |
$r = $db->fetchrow(); |
|
2449 |
$db->free_result(); |
|
2450 |
if($r['block_type'] == BLOCK_PLUGIN) die('HOUSTON_WE_HAVE_A_PLUGIN'); |
|
2451 |
die($r['block_content']); |
|
2452 |
break; |
|
2453 |
case 'save': |
|
19
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2454 |
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
parents:
15
diff
changeset
|
2455 |
{ |
190
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2456 |
$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
parents:
15
diff
changeset
|
2457 |
if(!$q) |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2458 |
{ |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2459 |
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
parents:
15
diff
changeset
|
2460 |
exit; |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2461 |
} |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2462 |
$row = $db->fetchrow(); |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2463 |
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
parents:
15
diff
changeset
|
2464 |
{ |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2465 |
$_POST['content'] = '?><Nulled>'; |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2466 |
} |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2467 |
else |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2468 |
{ |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2469 |
$_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
parents:
15
diff
changeset
|
2470 |
} |
5d003b6c9e89
Added demo mode functionality to various parts of Enano (unlocked only with a plugin) and fixed groups table
Dan
parents:
15
diff
changeset
|
2471 |
} |
190
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2472 |
$q = $db->sql_query('UPDATE '.table_prefix.'sidebar SET block_content=\''.$db->escape(rawurldecode($_POST['content'])).'\' WHERE item_id=' . intval($_GET['id']) . ';'); |
0 | 2473 |
if(!$q) |
2474 |
{ |
|
2475 |
echo 'var status=unescape(\''.hexencode($db->get_error()).'\');'; |
|
2476 |
exit; |
|
2477 |
} |
|
190
e858bacb5cfa
Sidebar blocks can be renamed now (untested except in Fx2)
Dan
parents:
183
diff
changeset
|
2478 |
$q = $db->sql_query('SELECT block_type,block_content FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';'); |
0 | 2479 |
if(!$q) |
2480 |
{ |
|
2481 |
echo 'var status=unescape(\''.hexencode($db->get_error()).'\');'; |
|
2482 |
exit; |
|
2483 |
} |
|
2484 |
$row = $db->fetchrow(); |
|
2485 |
$db->free_result(); |
|
2486 |
switch($row['block_type']) |
|
2487 |
{ |
|
2488 |
case BLOCK_WIKIFORMAT: |
|
2489 |
default: |
|
2490 |
$c = RenderMan::render($row['block_content']); |
|
2491 |
break; |
|
2492 |
case BLOCK_TEMPLATEFORMAT: |
|
2493 |
$c = $template->tplWikiFormat($row['block_content'], false, 'sidebar-editor.tpl'); |
|
2494 |
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c); |
|
2495 |
break; |
|
2496 |
case BLOCK_HTML: |
|
2497 |
$c = $row['block_content']; |
|
2498 |
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c); |
|
2499 |
break; |
|
2500 |
case BLOCK_PHP: |
|
2501 |
ob_start(); |
|
2502 |
eval($row['block_content']); |
|
2503 |
$c = ob_get_contents(); |
|
2504 |
ob_end_clean(); |
|
2505 |
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c); |
|
2506 |
break; |
|
2507 |
case BLOCK_PLUGIN: |
|
365 | 2508 |
$c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : $lang->get('sbedit_msg_plugin_not_loaded'); |
0 | 2509 |
break; |
2510 |
} |
|
2511 |
die('var status = \'GOOD\'; var content = unescape(\''.hexencode($c).'\');'); |
|
2512 |
break; |
|
2513 |
} |
|
2514 |
} |
|
2515 |
||
2516 |
$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;'); |
|
2517 |
if(!$q) $db->_die('The sidebar text data could not be selected.'); |
|
2518 |
||
2519 |
$vars = $template->extract_vars('sidebar-editor.tpl'); |
|
2520 |
||
2521 |
$parser = $template->makeParserText($vars['sidebar_button']); |
|
2522 |
$parser->assign_vars(Array( |
|
2523 |
'HREF'=>'#', |
|
2524 |
'FLAGS'=>'onclick="return false;"', |
|
365 | 2525 |
'TEXT' => $lang->get('sidebar_btn_changestyle') |
0 | 2526 |
)); |
2527 |
$template->tpl_strings['THEME_LINK'] = $parser->run(); |
|
2528 |
$parser->assign_vars(Array( |
|
365 | 2529 |
'TEXT' => $lang->get('sidebar_btn_logout'), |
0 | 2530 |
)); |
2531 |
$template->tpl_strings['LOGOUT_LINK'] = $parser->run(); |
|
2532 |
||
2533 |
$n1 = Array(); |
|
2534 |
$n2 = Array(); |
|
2535 |
$n =& $n1; |
|
2536 |
||
2537 |
echo '<table border="0"><tr><td valign="top"><div class="dbx-group" id="sbedit_left">'; |
|
2538 |
//if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_top']); |
|
2539 |
||
2540 |
// Time for the loop |
|
2541 |
// what this loop does is fetch the row data, then send it out to the appropriate parser for formatting, |
|
2542 |
// then puts the result into $c, which is then sent to the template compiler for insertion into the TPL code. |
|
2543 |
while($row = $db->fetchrow()) |
|
2544 |
{ |
|
2545 |
if(isset($current_side)) |
|
2546 |
{ |
|
2547 |
if($current_side != $row['sidebar_id']) |
|
2548 |
{ |
|
2549 |
// Time to switch! |
|
2550 |
//if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_bottom']); |
|
2551 |
echo '</div></td><td valign="top"><div class="dbx-group" id="sbedit_right">'; |
|
2552 |
//echo '</td><td valign="top">'; |
|
2553 |
//if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_top']); |
|
2554 |
$n =& $n2; |
|
2555 |
} |
|
2556 |
} |
|
2557 |
$n[] = count($n); |
|
2558 |
$current_side = $row['sidebar_id']; |
|
2559 |
switch($row['block_type']) |
|
2560 |
{ |
|
2561 |
case BLOCK_WIKIFORMAT: |
|
2562 |
default: |
|
2563 |
$parser = $template->makeParserText($vars['sidebar_section']); |
|
2564 |
$c = RenderMan::render($row['block_content']); |
|
2565 |
break; |
|
2566 |
case BLOCK_TEMPLATEFORMAT: |
|
2567 |
$parser = $template->makeParserText($vars['sidebar_section']); |
|
2568 |
$c = $template->tplWikiFormat($row['block_content'], false, 'sidebar-editor.tpl'); |
|
2569 |
$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
parents:
162
diff
changeset
|
2570 |
// 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
parents:
162
diff
changeset
|
2571 |
$c = preg_replace("/(^|\n)([ ]*)<a([ ]+.*)?>(.+)<\/a>(<br(.*)\/>)([\r\n]+|$)/isU", '\\1\\2<li><a\\3>\\4</a></li>\\7', $c); |
0 | 2572 |
break; |
2573 |
case BLOCK_HTML: |
|
2574 |
$parser = $template->makeParserText($vars['sidebar_section_raw']); |
|
2575 |
$c = $row['block_content']; |
|
2576 |
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c); |
|
2577 |
break; |
|
2578 |
case BLOCK_PHP: |
|
2579 |
$parser = $template->makeParserText($vars['sidebar_section_raw']); |
|
2580 |
ob_start(); |
|
2581 |
eval($row['block_content']); |
|
2582 |
$c = ob_get_contents(); |
|
2583 |
ob_end_clean(); |
|
2584 |
$c = preg_replace('#<a (.*?)>(.*?)</a>#is', '<a href="#" onclick="return false;">\\2</a>', $c); |
|
2585 |
break; |
|
2586 |
case BLOCK_PLUGIN: |
|
2587 |
$parser = $template->makeParserText($vars['sidebar_section_raw']); |
|
365 | 2588 |
$c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : $lang->get('sbedit_msg_plugin_not_loaded'); |
0 | 2589 |
break; |
2590 |
} |
|
215 | 2591 |
$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
parents:
192
diff
changeset
|
2592 |
if ( empty($block_name) ) |
365 | 2593 |
$block_name = '<' . $lang->get('sbedit_note_block_unnamed') . '>'; |
2594 |
$t = '<span title="' . $lang->get('sbedit_hint_rename') . '" id="sbrename_' . $row['item_id'] . '" ondblclick="ajaxRenameSidebarStage1(this, \''.$row['item_id'].'\'); return false;">' . $block_name . '</span>'; |
|
2595 |
if($row['item_enabled'] == 0) $t .= ' <span id="disabled_'.$row['item_id'].'" style="color: red;">' . $lang->get('sbedit_note_block_disabled') . '</span>'; |
|
2596 |
else $t .= ' <span id="disabled_'.$row['item_id'].'" style="color: red; display: none;">' . $lang->get('sbedit_note_block_disabled') . '</span>'; |
|
0 | 2597 |
$side = ( $row['sidebar_id'] == SIDEBAR_LEFT ) ? SIDEBAR_RIGHT : SIDEBAR_LEFT; |
365 | 2598 |
$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> |
2599 |
<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> |
|
2600 |
<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> |
|
2601 |
<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 | 2602 |
$as = ''; |
2603 |
$ae = ' '.$tb; |
|
2604 |
$parser->assign_vars(Array('CONTENT'=>$c,'TITLE'=>$t,'ADMIN_START'=>$as,'ADMIN_END'=>$ae)); |
|
2605 |
echo $parser->run(); |
|
2606 |
unset($parser); |
|
2607 |
||
2608 |
} |
|
2609 |
$db->free_result(); |
|
2610 |
//if(isset($vars['sidebar_top'])) echo $template->parse($vars['sidebar_bottom']); |
|
2611 |
echo '</div></td></tr></table>'; |
|
2612 |
echo '<form action="'.makeUrl($paths->page).'" method="post">'; |
|
2613 |
$order = implode(',', $n1); |
|
2614 |
echo "<input type='hidden' id='divOrder_Left' name='order_left' value='{$order}' />"; |
|
2615 |
$order = implode(',', $n2); |
|
2616 |
echo "<input type='hidden' id='divOrder_Right' name='order_right' value='{$order}' />"; |
|
2617 |
echo ' |
|
2618 |
<div style="margin: 0 auto 0 auto; text-align: center;"> |
|
365 | 2619 |
<input type="submit" name="save" style="font-weight: bold;" value="' . $lang->get('etc_save_changes') . '" /> |
2620 |
<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 | 2621 |
<br /> |
365 | 2622 |
<a href="'.makeUrl($paths->page, 'action=new&id=0', true).'">' . $lang->get('sbedit_btn_create_new_stage1') . '</a> | <a href="'.makeUrl(getConfig('main_page'), false, true).'">' . $lang->get('sbedit_btn_main_page') . '</a> |
0 | 2623 |
</div> |
2624 |
</form> |
|
2625 |
'; |
|
2626 |
} |
|
2627 |
||
2628 |
$template->footer(); |
|
2629 |
} |
|
2630 |
||
2631 |
?> |