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