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