1 |
1356
|
Luisehahne
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category admin
|
5 |
|
|
* @package settings
|
6 |
1529
|
Luisehahne
|
* @author Ryan Djurovich, WebsiteBaker Project
|
7 |
1912
|
Luisehahne
|
* @copyright 2009-2013, WebsiteBaker Org. e.V.
|
8 |
|
|
* @link http://www.websitebaker.org/
|
9 |
1356
|
Luisehahne
|
* @license http://www.gnu.org/licenses/gpl.html
|
10 |
|
|
* @platform WebsiteBaker 2.8.x
|
11 |
1374
|
Luisehahne
|
* @requirements PHP 5.2.2 and higher
|
12 |
1356
|
Luisehahne
|
* @version $Id$
|
13 |
1843
|
Luisehahne
|
* @filesource $HeadURL$
|
14 |
1356
|
Luisehahne
|
* @lastmodified $Date$
|
15 |
|
|
*
|
16 |
|
|
*/
|
17 |
|
|
|
18 |
1843
|
Luisehahne
|
// Include config file
|
19 |
|
|
if(!defined('WB_URL'))
|
20 |
|
|
{
|
21 |
|
|
$config_file = realpath('../../config.php');
|
22 |
|
|
if(file_exists($config_file) && !defined('WB_URL'))
|
23 |
|
|
{
|
24 |
|
|
require($config_file);
|
25 |
|
|
}
|
26 |
|
|
}
|
27 |
1356
|
Luisehahne
|
if(isset($_GET['advanced']) && $_GET['advanced'] == 'yes') {
|
28 |
|
|
$admin = new admin('Settings', 'settings_advanced');
|
29 |
|
|
} else {
|
30 |
|
|
$admin = new admin('Settings', 'settings_basic');
|
31 |
|
|
}
|
32 |
2098
|
darkviper
|
$oDb = WbDatabase::getInstance();
|
33 |
|
|
$oTrans = Translate::getInstance();
|
34 |
|
|
$oTrans->enableAddon('admin\\settings');
|
35 |
1356
|
Luisehahne
|
|
36 |
1716
|
Luisehahne
|
// add new values, later in upgrade-script
|
37 |
|
|
$cfg = array(
|
38 |
2098
|
darkviper
|
'wbmail_signature' => (defined('WBMAIL_SIGNATURE') ? WBMAIL_SIGNATURE : ''),
|
39 |
1716
|
Luisehahne
|
'confirmed_registration' => (defined('CONFIRMED_REGISTRATION') ? CONFIRMED_REGISTRATION : '0'),
|
40 |
2098
|
darkviper
|
'page_extendet' => (defined('PAGE_EXTENDET') ? PAGE_EXTENDET : 'true'),
|
41 |
|
|
);
|
42 |
1716
|
Luisehahne
|
db_update_key_value( 'settings', $cfg );
|
43 |
|
|
|
44 |
1356
|
Luisehahne
|
// Include the WB functions file
|
45 |
|
|
require_once(WB_PATH.'/framework/functions.php');
|
46 |
|
|
require_once(WB_PATH.'/framework/functions-utf8.php');
|
47 |
|
|
|
48 |
1529
|
Luisehahne
|
// Setup template object, parse vars to it, then parse it
|
49 |
1356
|
Luisehahne
|
// Create new template object
|
50 |
1777
|
Luisehahne
|
$oTpl = new Template(dirname($admin->correct_theme_source('settings.htt')),'comment');
|
51 |
|
|
//$oTpl->debug = true;
|
52 |
|
|
//$oTpl->filename_comments = true;
|
53 |
|
|
//$oTpl->unknown_regexp = "strict";
|
54 |
|
|
//$oTpl->halt_on_error = "report" ;
|
55 |
1356
|
Luisehahne
|
|
56 |
1777
|
Luisehahne
|
$oTpl->set_file('page', 'settings.htt');
|
57 |
|
|
$oTpl->set_block('page', 'main_block', 'main');
|
58 |
1356
|
Luisehahne
|
|
59 |
1745
|
Luisehahne
|
/*-- insert all needed vars from language files ----------------------------------------*/
|
60 |
2098
|
darkviper
|
$oTpl->set_var($oTrans->getLangArray());
|
61 |
1356
|
Luisehahne
|
|
62 |
1912
|
Luisehahne
|
$oTpl->set_var('FTAN', $admin->getFTAN());
|
63 |
|
|
|
64 |
1356
|
Luisehahne
|
// Query current settings in the db, then loop through them and print them
|
65 |
2098
|
darkviper
|
$sql = 'SELECT * FROM `'.$oDb->TablePrefix.'settings`';
|
66 |
|
|
if (($results = $oDb->doQuery($sql))) {
|
67 |
1777
|
Luisehahne
|
while($setting = $results->fetchRow(MYSQL_ASSOC)) {
|
68 |
|
|
$setting_name = $setting['name'];
|
69 |
|
|
$setting_value = ( $setting_name != 'wbmailer_smtp_password' ) ? htmlspecialchars($setting['value']) : htmlentities($setting['value'], ENT_COMPAT, 'UTF-8');
|
70 |
|
|
$oTpl->set_var(strtoupper($setting_name),($setting_value));
|
71 |
|
|
}
|
72 |
1356
|
Luisehahne
|
}
|
73 |
|
|
|
74 |
|
|
$is_advanced = (isset($_GET['advanced']) && $_GET['advanced'] == 'yes');
|
75 |
|
|
// Tell the browser whether or not to show advanced options
|
76 |
1777
|
Luisehahne
|
if($is_advanced)
|
77 |
|
|
{
|
78 |
|
|
$oTpl->set_var('DISPLAY_ADVANCED', '');
|
79 |
|
|
$oTpl->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
|
80 |
|
|
$oTpl->set_var('BASIC_FILE_PERMS_ID', 'hide');
|
81 |
|
|
$oTpl->set_var('ADVANCED', 'yes');
|
82 |
2098
|
darkviper
|
$oTpl->set_var('ADVANCED_BUTTON', '<< '.$oTrans->TEXT_HIDE_ADVANCED);
|
83 |
1777
|
Luisehahne
|
$oTpl->set_var('ADVANCED_LINK', 'index.php?advanced=no');
|
84 |
1356
|
Luisehahne
|
|
85 |
1777
|
Luisehahne
|
} else {
|
86 |
|
|
$oTpl->set_var('DISPLAY_ADVANCED', ' style="display: none;"');
|
87 |
|
|
$oTpl->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
|
88 |
|
|
$oTpl->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
|
89 |
1356
|
Luisehahne
|
|
90 |
1777
|
Luisehahne
|
$oTpl->set_var('ADVANCED', 'no');
|
91 |
2098
|
darkviper
|
$oTpl->set_var('ADVANCED_BUTTON', $oTrans->TEXT_SHOW_ADVANCED.' >>');
|
92 |
1777
|
Luisehahne
|
$oTpl->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
|
93 |
|
|
}
|
94 |
1356
|
Luisehahne
|
|
95 |
1777
|
Luisehahne
|
$sSelected = ' selected="selected"';
|
96 |
|
|
$checked = ' checked="checked"';
|
97 |
1356
|
Luisehahne
|
|
98 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
99 |
2098
|
darkviper
|
'WB_URL' => WB_URL,
|
100 |
1777
|
Luisehahne
|
'THEME_URL' => THEME_URL,
|
101 |
|
|
'ADMIN_URL' => ADMIN_URL,
|
102 |
|
|
));
|
103 |
|
|
|
104 |
|
|
// Insert permissions values
|
105 |
2098
|
darkviper
|
if ($admin->get_permission('settings_advanced') != true) {
|
106 |
1777
|
Luisehahne
|
$oTpl->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
|
107 |
|
|
}
|
108 |
|
|
|
109 |
|
|
/**
|
110 |
|
|
* <!-- BEGIN show_page_level_limit_block -->
|
111 |
|
|
* Insert page level limits
|
112 |
|
|
*/
|
113 |
|
|
$oTpl->set_block('main_block', 'show_page_level_limit_block', 'show_page_level_limit');
|
114 |
|
|
/**
|
115 |
|
|
* <!-- BEGIN page_level_limit_list_block -->
|
116 |
|
|
*/
|
117 |
|
|
$oTpl->set_block('show_page_level_limit_block', 'page_level_limit_list_block', 'page_level_limit_list');
|
118 |
|
|
for($i = 1; $i <= 10; $i++)
|
119 |
|
|
{
|
120 |
|
|
$oTpl->set_var('NUMBER', $i);
|
121 |
|
|
if(PAGE_LEVEL_LIMIT == $i)
|
122 |
|
|
{
|
123 |
|
|
$oTpl->set_var('SELECTED', $sSelected);
|
124 |
|
|
} else {
|
125 |
|
|
$oTpl->set_var('SELECTED', '');
|
126 |
1356
|
Luisehahne
|
}
|
127 |
1777
|
Luisehahne
|
$oTpl->parse('page_level_limit_list', 'page_level_limit_list_block', true);
|
128 |
1356
|
Luisehahne
|
}
|
129 |
|
|
|
130 |
1777
|
Luisehahne
|
/**
|
131 |
|
|
* <!-- END page_level_limit_list_block -->
|
132 |
|
|
* <!-- END show_page_level_limit_block -->
|
133 |
|
|
*/
|
134 |
|
|
if($is_advanced)
|
135 |
|
|
{
|
136 |
|
|
$oTpl->parse('show_page_level_limit', 'show_page_level_limit_block', false);
|
137 |
|
|
} else {
|
138 |
|
|
$oTpl->parse('show_page_level_limit', '');
|
139 |
|
|
}
|
140 |
1716
|
Luisehahne
|
|
141 |
1777
|
Luisehahne
|
/**
|
142 |
|
|
* Work-out if page trash feature is disabled, in-line, or separate
|
143 |
|
|
*/
|
144 |
|
|
if(PAGE_TRASH == 'disabled')
|
145 |
|
|
{
|
146 |
|
|
$oTpl->set_var(array(
|
147 |
2098
|
darkviper
|
'PAGE_TRASH_DISABLED' => $checked,
|
148 |
|
|
'PAGE_TRASH_INLINE' => '',
|
149 |
|
|
'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;',
|
150 |
|
|
));
|
151 |
|
|
} elseif(PAGE_TRASH == 'inline') {
|
152 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
153 |
2098
|
darkviper
|
'PAGE_TRASH_INLINE' => $checked,
|
154 |
|
|
'PAGE_TRASH_DISABLED' => '',
|
155 |
|
|
'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;',
|
156 |
|
|
));
|
157 |
|
|
} elseif(PAGE_TRASH == 'separate') {
|
158 |
1777
|
Luisehahne
|
$oTpl->set_var('PAGE_TRASH_SEPARATE', $checked);
|
159 |
|
|
$oTpl->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: inline;');
|
160 |
|
|
}
|
161 |
1356
|
Luisehahne
|
|
162 |
1777
|
Luisehahne
|
/**
|
163 |
|
|
* <!-- BEGIN show_checkbox_1_block -->
|
164 |
|
|
* advanced yes
|
165 |
|
|
*/
|
166 |
|
|
$oTpl->set_block('main_block', 'show_checkbox_1_block', 'show_checkbox_1');
|
167 |
|
|
// Work-out if page languages feature is enabled
|
168 |
2098
|
darkviper
|
if(defined('PAGE_LANGUAGES') && PAGE_LANGUAGES == true) {
|
169 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
170 |
|
|
'PAGE_LANGUAGES_ENABLED' => $checked,
|
171 |
|
|
'PAGE_LANGUAGES_DISABLED' => '',
|
172 |
|
|
));
|
173 |
|
|
} else {
|
174 |
|
|
$oTpl->set_var(array(
|
175 |
|
|
'PAGE_LANGUAGES_DISABLED' => $checked,
|
176 |
|
|
'PAGE_LANGUAGES_ENABLED' => '',
|
177 |
|
|
));
|
178 |
|
|
}
|
179 |
|
|
|
180 |
|
|
// Work-out if page extended feature is enabled
|
181 |
2098
|
darkviper
|
if(defined('PAGE_EXTENDET') && PAGE_EXTENDET == true) {
|
182 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
183 |
1849
|
Luisehahne
|
'PAGE_EXTENDET_ENABLED' => $checked,
|
184 |
|
|
'PAGE_EXTENDET_DISABLED' => '',
|
185 |
1777
|
Luisehahne
|
));
|
186 |
|
|
} else {
|
187 |
|
|
$oTpl->set_var(array(
|
188 |
1849
|
Luisehahne
|
'PAGE_EXTENDET_DISABLED' => $checked,
|
189 |
|
|
'PAGE_EXTENDET_ENABLED' => '',
|
190 |
1777
|
Luisehahne
|
));
|
191 |
|
|
}
|
192 |
|
|
|
193 |
|
|
// Work-out if multiple menus feature is enabled
|
194 |
2098
|
darkviper
|
if(defined('MULTIPLE_MENUS') && MULTIPLE_MENUS == true) {
|
195 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
196 |
|
|
'MULTIPLE_MENUS_ENABLED' => $checked,
|
197 |
|
|
'MULTIPLE_MENUS_DISABLED' => '',
|
198 |
|
|
));
|
199 |
|
|
} else {
|
200 |
|
|
$oTpl->set_var(array(
|
201 |
|
|
'MULTIPLE_MENUS_DISABLED' => $checked,
|
202 |
|
|
'MULTIPLE_MENUS_ENABLED' => '',
|
203 |
|
|
));
|
204 |
|
|
}
|
205 |
|
|
|
206 |
|
|
/**
|
207 |
|
|
* <!-- END show_checkbox_1_block -->
|
208 |
|
|
* advanced yes
|
209 |
|
|
*/
|
210 |
2098
|
darkviper
|
if($is_advanced) {
|
211 |
1777
|
Luisehahne
|
$oTpl->parse('show_checkbox_1', 'show_checkbox_1_block');
|
212 |
|
|
} else {
|
213 |
|
|
$oTpl->parse('show_checkbox_1', '');
|
214 |
|
|
}
|
215 |
|
|
|
216 |
|
|
// Work-out if media home folder feature is enabled
|
217 |
2098
|
darkviper
|
$oTpl->set_var('TEXT_HOME_FOLDERS', $oTrans->TEXT_HOME_FOLDERS);
|
218 |
1777
|
Luisehahne
|
if(HOME_FOLDERS)
|
219 |
|
|
{
|
220 |
|
|
$oTpl->set_var(array(
|
221 |
|
|
'HOME_FOLDERS_ENABLED' => $checked,
|
222 |
|
|
'HOME_FOLDERS_DISABLED' => '',
|
223 |
|
|
));
|
224 |
|
|
} else {
|
225 |
|
|
$oTpl->set_var(array(
|
226 |
|
|
'HOME_FOLDERS_DISABLED' => $checked,
|
227 |
|
|
'HOME_FOLDERS_ENABLED' => '',
|
228 |
|
|
));
|
229 |
|
|
}
|
230 |
|
|
|
231 |
|
|
$oTpl->set_block('main_block', 'show_checkbox_2_block', 'show_checkbox_2');
|
232 |
|
|
// Work-out if manage sections feature is enabled
|
233 |
|
|
if(MANAGE_SECTIONS)
|
234 |
|
|
{
|
235 |
|
|
$oTpl->set_var(array(
|
236 |
|
|
'MANAGE_SECTIONS_ENABLED' => $checked,
|
237 |
|
|
'MANAGE_SECTIONS_DISABLED' => '',
|
238 |
|
|
));
|
239 |
|
|
} else {
|
240 |
|
|
$oTpl->set_var(array(
|
241 |
|
|
'MANAGE_SECTIONS_DISABLED' => $checked,
|
242 |
|
|
'MANAGE_SECTIONS_ENABLED' => '',
|
243 |
|
|
));
|
244 |
|
|
}
|
245 |
|
|
|
246 |
|
|
// Work-out if section blocks feature is enabled
|
247 |
|
|
if(defined('SECTION_BLOCKS') && SECTION_BLOCKS == true)
|
248 |
|
|
{
|
249 |
|
|
$oTpl->set_var(array(
|
250 |
|
|
'SECTION_BLOCKS_ENABLED' => $checked,
|
251 |
|
|
'SECTION_BLOCKS_DISABLED' => '',
|
252 |
|
|
));
|
253 |
|
|
} else {
|
254 |
|
|
$oTpl->set_var(array(
|
255 |
|
|
'SECTION_BLOCKS_DISABLED' => $checked,
|
256 |
|
|
'SECTION_BLOCKS_ENABLED' => '',
|
257 |
|
|
));
|
258 |
|
|
}
|
259 |
|
|
|
260 |
|
|
/**
|
261 |
|
|
*
|
262 |
|
|
*/
|
263 |
|
|
if($is_advanced)
|
264 |
|
|
{
|
265 |
|
|
$oTpl->parse('show_checkbox_2', 'show_checkbox_2_block');
|
266 |
|
|
} else {
|
267 |
|
|
$oTpl->parse('show_checkbox_2', '');
|
268 |
|
|
}
|
269 |
|
|
|
270 |
|
|
// Work-out if intro feature is enabled
|
271 |
|
|
if(INTRO_PAGE)
|
272 |
|
|
{
|
273 |
|
|
$oTpl->set_var(array(
|
274 |
|
|
'INTRO_PAGE_ENABLED' => $checked,
|
275 |
|
|
'INTRO_PAGE_DISABLED' => '',
|
276 |
|
|
));
|
277 |
|
|
} else {
|
278 |
|
|
$oTpl->set_var(array(
|
279 |
|
|
'INTRO_PAGE_DISABLED' => $checked,
|
280 |
|
|
'INTRO_PAGE_ENABLED' => '',
|
281 |
|
|
));
|
282 |
|
|
}
|
283 |
|
|
/**
|
284 |
|
|
* <!-- BEGIN show_checkbox_3_block -->
|
285 |
|
|
*/
|
286 |
|
|
$oTpl->set_block('main_block', 'show_checkbox_3_block', 'show_checkbox_3');
|
287 |
|
|
// Work-out if homepage redirection feature is enabled
|
288 |
|
|
if(defined('HOMEPAGE_REDIRECTION') && HOMEPAGE_REDIRECTION == true)
|
289 |
|
|
{
|
290 |
|
|
$oTpl->set_var(array(
|
291 |
|
|
'HOMEPAGE_REDIRECTION_ENABLED' => $checked,
|
292 |
|
|
'HOMEPAGE_REDIRECTION_DISABLED' => '',
|
293 |
|
|
));
|
294 |
|
|
} else {
|
295 |
|
|
// $oTpl->set_var('HOMEPAGE_REDIRECTION_DISABLED', $checked);
|
296 |
|
|
$oTpl->set_var(array(
|
297 |
|
|
'HOMEPAGE_REDIRECTION_DISABLED' => $checked,
|
298 |
|
|
'HOMEPAGE_REDIRECTION_ENABLED' => '',
|
299 |
|
|
));
|
300 |
|
|
}
|
301 |
|
|
// Work-out if smart login feature is enabled
|
302 |
|
|
if(defined('SMART_LOGIN') && SMART_LOGIN == true)
|
303 |
|
|
{
|
304 |
|
|
$oTpl->set_var('SMART_LOGIN_ENABLED', $checked);
|
305 |
|
|
$oTpl->set_var(array(
|
306 |
|
|
'SMART_LOGIN_ENABLED' => $checked,
|
307 |
|
|
'SMART_LOGIN_DISABLED' => '',
|
308 |
|
|
));
|
309 |
|
|
} else {
|
310 |
|
|
$oTpl->set_var('SMART_LOGIN_DISABLED', $checked);
|
311 |
|
|
$oTpl->set_var(array(
|
312 |
|
|
'SMART_LOGIN_DISABLED' => $checked,
|
313 |
|
|
'SMART_LOGIN_ENABLED' => '',
|
314 |
|
|
));
|
315 |
|
|
}
|
316 |
|
|
|
317 |
|
|
/**
|
318 |
|
|
* <!-- END show_checkbox_3_block -->
|
319 |
|
|
*/
|
320 |
|
|
if($is_advanced)
|
321 |
|
|
{
|
322 |
|
|
$oTpl->parse('show_checkbox_3', 'show_checkbox_3_block');
|
323 |
|
|
} else {
|
324 |
|
|
$oTpl->parse('show_checkbox_3', 'show_checkbox_3_block', '');
|
325 |
|
|
}
|
326 |
|
|
|
327 |
|
|
// Work-out if frontend login feature is enabled
|
328 |
|
|
if(FRONTEND_LOGIN)
|
329 |
|
|
{
|
330 |
|
|
$oTpl->set_var(array(
|
331 |
|
|
'PRIVATE_ENABLED' => $checked,
|
332 |
|
|
'PRIVATE_DISABLED' => '',
|
333 |
|
|
));
|
334 |
|
|
} else {
|
335 |
|
|
$oTpl->set_var(array(
|
336 |
|
|
'PRIVATE_DISABLED' => $checked,
|
337 |
1779
|
Luisehahne
|
'PRIVATE_ENABLED' => '',
|
338 |
1777
|
Luisehahne
|
));
|
339 |
|
|
}
|
340 |
|
|
|
341 |
|
|
if(CONFIRMED_REGISTRATION)
|
342 |
|
|
{
|
343 |
|
|
$oTpl->set_var(array(
|
344 |
|
|
'CONFIRMED_REGISTRATION_ENABLED' => $checked,
|
345 |
|
|
'CONFIRMED_REGISTRATION_DISABLED' => '',
|
346 |
|
|
));
|
347 |
|
|
} else {
|
348 |
|
|
$oTpl->set_var(array(
|
349 |
|
|
'CONFIRMED_REGISTRATION_DISABLED' => $checked,
|
350 |
|
|
'CONFIRMED_REGISTRATION_ENABLED' => '',
|
351 |
|
|
));
|
352 |
|
|
}
|
353 |
|
|
|
354 |
|
|
// Insert groups into signup list
|
355 |
|
|
$oTpl->set_block('main_block', 'group_list_block', 'group_list');
|
356 |
2098
|
darkviper
|
$sql = 'SELECT `group_id`, `name` FROM `'.$oDb->TablePrefix.'groups` '
|
357 |
|
|
. 'WHERE `group_id` != 1';
|
358 |
|
|
if (($results = $oDb->doQuery($sql))) {
|
359 |
|
|
if ($results->numRows() > 0) {
|
360 |
|
|
while($group = $results->fetchRow(MYSQL_ASSOC)) {
|
361 |
1777
|
Luisehahne
|
$oTpl->set_var('ID', $group['group_id']);
|
362 |
|
|
$oTpl->set_var('NAME', $group['name']);
|
363 |
|
|
if(FRONTEND_SIGNUP == $group['group_id'])
|
364 |
|
|
{
|
365 |
|
|
$oTpl->set_var('SELECTED', $sSelected);
|
366 |
|
|
} else {
|
367 |
|
|
$oTpl->set_var('SELECTED', '');
|
368 |
|
|
}
|
369 |
|
|
$oTpl->parse('group_list', 'group_list_block', true);
|
370 |
|
|
}
|
371 |
|
|
} else {
|
372 |
|
|
$oTpl->set_var('ID', 'disabled');
|
373 |
2098
|
darkviper
|
$oTpl->set_var('NAME', $oTrans->MESSAGE_GROUPS_NO_GROUPS_FOUND);
|
374 |
1777
|
Luisehahne
|
$oTpl->parse('group_list', 'group_list_block', true);
|
375 |
|
|
}
|
376 |
|
|
}
|
377 |
|
|
|
378 |
|
|
/**
|
379 |
|
|
* <!-- BEGIN show_redirect_timer_block -->
|
380 |
|
|
*/
|
381 |
|
|
$oTpl->set_block('main_block', 'show_redirect_timer_block', 'show_redirect_timer');
|
382 |
|
|
|
383 |
|
|
/**
|
384 |
|
|
* <!-- END show_redirect_timer_block -->
|
385 |
|
|
*/
|
386 |
2098
|
darkviper
|
if ($is_advanced) {
|
387 |
1777
|
Luisehahne
|
$oTpl->parse('show_redirect_timer', 'show_redirect_timer_block');
|
388 |
|
|
} else {
|
389 |
|
|
$oTpl->parse('show_redirect_timer', '');
|
390 |
|
|
}
|
391 |
|
|
|
392 |
|
|
/**
|
393 |
|
|
* <!-- BEGIN show_php_error_level_block -->
|
394 |
|
|
*/
|
395 |
|
|
// Insert default error reporting values
|
396 |
|
|
require(ADMIN_PATH.'/interface/er_levels.php');
|
397 |
|
|
$oTpl->set_block('main_block', 'show_php_error_level_block', 'show_php_error_level');
|
398 |
|
|
$oTpl->set_block('show_php_error_level_block', 'php_error_list_block', 'php_error_list');
|
399 |
|
|
foreach($ER_LEVELS AS $value => $title)
|
400 |
|
|
{
|
401 |
|
|
$oTpl->set_var('VALUE', $value);
|
402 |
|
|
$oTpl->set_var('NAME', $title);
|
403 |
|
|
$selected = (ER_LEVEL == $value) ? $sSelected : '';
|
404 |
|
|
$oTpl->set_var('SELECTED', $selected);
|
405 |
|
|
$oTpl->parse('php_error_list', 'php_error_list_block', true);
|
406 |
|
|
}
|
407 |
|
|
|
408 |
|
|
/**
|
409 |
|
|
* <!-- END show_php_error_level_block -->
|
410 |
|
|
*/
|
411 |
2098
|
darkviper
|
if ($is_advanced) {
|
412 |
1777
|
Luisehahne
|
$oTpl->parse('show_php_error_level', 'show_php_error_level_block');
|
413 |
|
|
} else {
|
414 |
|
|
$oTpl->parse('show_php_error_level', '');
|
415 |
|
|
}
|
416 |
|
|
|
417 |
|
|
/**
|
418 |
|
|
* <!-- BEGIN show_wysiwyg_block -->
|
419 |
|
|
*/
|
420 |
|
|
// Insert WYSIWYG modules
|
421 |
|
|
$oTpl->set_block('main_block', 'show_wysiwyg_block', 'show_wysiwyg');
|
422 |
|
|
$oTpl->set_block('show_wysiwyg_block', 'editor_list_block', 'editor_list');
|
423 |
|
|
$file='none';
|
424 |
2098
|
darkviper
|
$module_name = $oTrans->TEXT_NONE;
|
425 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE', $file);
|
426 |
|
|
$oTpl->set_var('NAME', $module_name);
|
427 |
|
|
$selected = (!defined('WYSIWYG_EDITOR') || $file == WYSIWYG_EDITOR) ? $sSelected : '';
|
428 |
|
|
$oTpl->set_var('SELECTED', $selected);
|
429 |
|
|
$oTpl->parse('editor_list', 'editor_list_block', true);
|
430 |
2098
|
darkviper
|
$sql = 'SELECT `name`, `directory` FROM `'.$oDb->TablePrefix.'addons` '
|
431 |
|
|
. 'WHERE `type` = \'module\' AND `function` = \'wysiwyg\' '
|
432 |
|
|
. 'ORDER BY `name`';
|
433 |
|
|
if (($result = $oDb->doQuery($sql))) {
|
434 |
|
|
while ($addon = $result->fetchRow(MYSQL_ASSOC)) {
|
435 |
|
|
if ($admin->get_permission($addon['directory'],'module' )) {
|
436 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE', $addon['directory']);
|
437 |
|
|
$oTpl->set_var('NAME', $addon['name']);
|
438 |
|
|
$selected = (!defined('WYSIWYG_EDITOR') || $addon['directory'] == WYSIWYG_EDITOR) ? $sSelected : '';
|
439 |
|
|
$oTpl->set_var('SELECTED', $selected);
|
440 |
|
|
$oTpl->parse('editor_list', 'editor_list_block', true);
|
441 |
|
|
}
|
442 |
|
|
}
|
443 |
|
|
}
|
444 |
|
|
|
445 |
|
|
/**
|
446 |
|
|
* <!-- END show_wysiwyg_block -->
|
447 |
|
|
*/
|
448 |
|
|
if($is_advanced)
|
449 |
|
|
{
|
450 |
|
|
$oTpl->parse('show_wysiwyg','show_wysiwyg_block');
|
451 |
|
|
} else {
|
452 |
|
|
$oTpl->parse('show_wysiwyg', '');
|
453 |
|
|
}
|
454 |
|
|
|
455 |
|
|
// Insert language values
|
456 |
|
|
$oTpl->set_block('main_block', 'language_list_block', 'language_list');
|
457 |
2098
|
darkviper
|
$sql = 'SELECT `name`, `directory` FROM `'.$oDb->TablePrefix.'addons` '
|
458 |
|
|
. 'WHERE `type` = \'language\' AND `function` != \'theme\' '
|
459 |
|
|
. 'ORDER BY `directory`';
|
460 |
|
|
if (($result = $oDb->doQuery($sql))) {
|
461 |
1777
|
Luisehahne
|
while($addon = $result->fetchRow(MYSQL_ASSOC)) {
|
462 |
1457
|
Luisehahne
|
$langIcons = (empty($addon['directory'])) ? 'none' : strtolower($addon['directory']);
|
463 |
1777
|
Luisehahne
|
$oTpl->set_var('CODE', $addon['directory']);
|
464 |
|
|
$oTpl->set_var('NAME', $addon['name']);
|
465 |
|
|
$oTpl->set_var('FLAG', THEME_URL.'/images/flags/'.$langIcons);
|
466 |
|
|
$oTpl->set_var('SELECTED', (DEFAULT_LANGUAGE == $addon['directory'] ? $sSelected : '') );
|
467 |
|
|
$oTpl->parse('language_list', 'language_list_block', true);
|
468 |
1356
|
Luisehahne
|
}
|
469 |
|
|
}
|
470 |
1777
|
Luisehahne
|
/**
|
471 |
|
|
* <!-- BEGIN show_charset_block -->
|
472 |
|
|
*/
|
473 |
|
|
// Insert default charset values
|
474 |
|
|
$oTpl->set_block('main_block', 'show_charset_block', 'show_charset');
|
475 |
|
|
require(ADMIN_PATH.'/interface/charsets.php');
|
476 |
|
|
$oTpl->set_block('show_charset_block', 'charset_list_block', 'charset_list');
|
477 |
2098
|
darkviper
|
foreach ($CHARSETS AS $code => $title) {
|
478 |
1777
|
Luisehahne
|
$oTpl->set_var('VALUE', $code);
|
479 |
|
|
$oTpl->set_var('NAME', $title);
|
480 |
|
|
if(DEFAULT_CHARSET == $code) {
|
481 |
|
|
$oTpl->set_var('SELECTED', $sSelected);
|
482 |
|
|
} else {
|
483 |
|
|
$oTpl->set_var('SELECTED', '');
|
484 |
|
|
}
|
485 |
|
|
$oTpl->parse('charset_list', 'charset_list_block', true);
|
486 |
|
|
}
|
487 |
|
|
/**
|
488 |
|
|
* <!-- END show_charset_block -->
|
489 |
|
|
*/
|
490 |
2098
|
darkviper
|
if ($is_advanced) {
|
491 |
1777
|
Luisehahne
|
$oTpl->parse('show_charset', 'show_charset_block');
|
492 |
|
|
} else {
|
493 |
|
|
$oTpl->parse('show_charset', '');
|
494 |
|
|
}
|
495 |
1356
|
Luisehahne
|
|
496 |
2098
|
darkviper
|
// insert default timezone values
|
497 |
1356
|
Luisehahne
|
require(ADMIN_PATH.'/interface/timezones.php');
|
498 |
1777
|
Luisehahne
|
$oTpl->set_block('main_block', 'timezone_list_block','timezone_list');
|
499 |
2098
|
darkviper
|
foreach ($TIMEZONES AS $hour_offset => $title) {
|
500 |
1777
|
Luisehahne
|
// Make sure we dont list "System Default" as we are setting this value!
|
501 |
1356
|
Luisehahne
|
if($hour_offset != '-20') {
|
502 |
1777
|
Luisehahne
|
$oTpl->set_var('VALUE', $hour_offset);
|
503 |
|
|
$oTpl->set_var('NAME', $title);
|
504 |
1356
|
Luisehahne
|
if(DEFAULT_TIMEZONE == $hour_offset*60*60) {
|
505 |
1777
|
Luisehahne
|
$oTpl->set_var('SELECTED', $sSelected);
|
506 |
1356
|
Luisehahne
|
} else {
|
507 |
1777
|
Luisehahne
|
$oTpl->set_var('SELECTED', '');
|
508 |
1356
|
Luisehahne
|
}
|
509 |
1777
|
Luisehahne
|
$oTpl->parse('timezone_list', 'timezone_list_block', true);
|
510 |
1356
|
Luisehahne
|
}
|
511 |
|
|
}
|
512 |
|
|
|
513 |
1777
|
Luisehahne
|
// Insert date format list
|
514 |
1356
|
Luisehahne
|
require(ADMIN_PATH.'/interface/date_formats.php');
|
515 |
1777
|
Luisehahne
|
$oTpl->set_block('main_block', 'date_format_list_block', 'date_format_list');
|
516 |
2098
|
darkviper
|
foreach ($DATE_FORMATS AS $format => $title) {
|
517 |
1356
|
Luisehahne
|
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
518 |
|
|
if($format != 'system_default') {
|
519 |
1777
|
Luisehahne
|
$oTpl->set_var('VALUE', $format);
|
520 |
1356
|
Luisehahne
|
} else {
|
521 |
1777
|
Luisehahne
|
$oTpl->set_var('VALUE', '');
|
522 |
1356
|
Luisehahne
|
}
|
523 |
1777
|
Luisehahne
|
$oTpl->set_var('NAME', $title);
|
524 |
1356
|
Luisehahne
|
if(DEFAULT_DATE_FORMAT == $format) {
|
525 |
1777
|
Luisehahne
|
$oTpl->set_var('SELECTED', $sSelected);
|
526 |
1356
|
Luisehahne
|
} else {
|
527 |
1777
|
Luisehahne
|
$oTpl->set_var('SELECTED', '');
|
528 |
1356
|
Luisehahne
|
}
|
529 |
1777
|
Luisehahne
|
$oTpl->parse('date_format_list', 'date_format_list_block', true);
|
530 |
1356
|
Luisehahne
|
}
|
531 |
|
|
|
532 |
1777
|
Luisehahne
|
// Insert time format list
|
533 |
1356
|
Luisehahne
|
require(ADMIN_PATH.'/interface/time_formats.php');
|
534 |
1777
|
Luisehahne
|
$oTpl->set_block('main_block', 'time_format_list_block', 'time_format_list');
|
535 |
1356
|
Luisehahne
|
foreach($TIME_FORMATS AS $format => $title) {
|
536 |
|
|
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
537 |
|
|
if($format != 'system_default') {
|
538 |
1777
|
Luisehahne
|
$oTpl->set_var('VALUE', $format);
|
539 |
1356
|
Luisehahne
|
} else {
|
540 |
1777
|
Luisehahne
|
$oTpl->set_var('VALUE', '');
|
541 |
1356
|
Luisehahne
|
}
|
542 |
1777
|
Luisehahne
|
$oTpl->set_var('NAME', $title);
|
543 |
1356
|
Luisehahne
|
if(DEFAULT_TIME_FORMAT == $format) {
|
544 |
1777
|
Luisehahne
|
$oTpl->set_var('SELECTED', $sSelected);
|
545 |
1356
|
Luisehahne
|
} else {
|
546 |
1777
|
Luisehahne
|
$oTpl->set_var('SELECTED', '');
|
547 |
1356
|
Luisehahne
|
}
|
548 |
1777
|
Luisehahne
|
$oTpl->parse('time_format_list', 'time_format_list_block', true);
|
549 |
1356
|
Luisehahne
|
}
|
550 |
|
|
|
551 |
1716
|
Luisehahne
|
// Insert templates
|
552 |
2098
|
darkviper
|
$oTpl->set_block('main_block', 'template_list_block', 'template_list');
|
553 |
|
|
$sql = 'SELECT `name`, `directory` FROM `'.$oDb->TablePrefix.'addons` '
|
554 |
|
|
. 'WHERE `type` = \'template\' AND `function` != \'theme\' '
|
555 |
|
|
. 'ORDER BY `name`';
|
556 |
|
|
if (($result = $database->query($sql))) {
|
557 |
|
|
while ($addon = $result->fetchRow(MYSQL_ASSOC)) {
|
558 |
|
|
if ($admin->get_permission($addon['directory'],'template' )) {
|
559 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE', $addon['directory']);
|
560 |
|
|
$oTpl->set_var('NAME', $addon['name']);
|
561 |
1716
|
Luisehahne
|
$selected = (($addon['directory'] == DEFAULT_TEMPLATE) ? $sSelected : '');
|
562 |
1777
|
Luisehahne
|
$oTpl->set_var('SELECTED', $selected);
|
563 |
|
|
$oTpl->parse('template_list', 'template_list_block', true);
|
564 |
1716
|
Luisehahne
|
}
|
565 |
1356
|
Luisehahne
|
}
|
566 |
|
|
}
|
567 |
|
|
|
568 |
1716
|
Luisehahne
|
// Insert backend theme
|
569 |
2098
|
darkviper
|
$oTpl->set_block('main_block', 'theme_list_block', 'theme_list');
|
570 |
|
|
$sql = 'SELECT `name`, `directory` FROM `'.$oDb->TablePrefix.'addons` '
|
571 |
|
|
. 'WHERE `type` = \'template\' AND `function` = \'theme\' '
|
572 |
|
|
. 'ORDER BY `name`';
|
573 |
|
|
if (($result = $database->query($sql))) {
|
574 |
|
|
while ($addon = $result->fetchRow(MYSQL_ASSOC)) {
|
575 |
|
|
if ($admin->get_permission($addon['directory'],'template' )) {
|
576 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE', $addon['directory']);
|
577 |
|
|
$oTpl->set_var('NAME', $addon['name']);
|
578 |
1716
|
Luisehahne
|
$selected = (($addon['directory'] == DEFAULT_THEME) ? $sSelected : '');
|
579 |
1777
|
Luisehahne
|
$oTpl->set_var('SELECTED', $selected);
|
580 |
|
|
$oTpl->parse('theme_list', 'theme_list_block', true);
|
581 |
1716
|
Luisehahne
|
}
|
582 |
1356
|
Luisehahne
|
}
|
583 |
|
|
}
|
584 |
|
|
|
585 |
1777
|
Luisehahne
|
// Work-out if warn_page_leave feature is enabled
|
586 |
|
|
// if (defined('WARN_PAGE_LEAVE') && WARN_PAGE_LEAVE == true)
|
587 |
1716
|
Luisehahne
|
// {
|
588 |
1777
|
Luisehahne
|
// $oTpl->set_var(array(
|
589 |
|
|
// 'WARN_PAGE_LEAVE_ENABLED' => $checked,
|
590 |
|
|
// 'WARN_PAGE_LEAVE_DISABLED' => '',
|
591 |
|
|
// ));
|
592 |
|
|
// } else {
|
593 |
|
|
// $oTpl->set_var(array(
|
594 |
|
|
// 'MANAGE_SECTIONS_DISABLED' => $checked,
|
595 |
|
|
// 'WARN_PAGE_LEAVE_DISABLED' => '',
|
596 |
|
|
// ));
|
597 |
|
|
// }
|
598 |
|
|
|
599 |
|
|
/* Make's sure GD library is installed */
|
600 |
|
|
// if(extension_loaded('gd') && function_exists('imageCreateFromJpeg'))
|
601 |
|
|
// {
|
602 |
|
|
// $oTpl->set_var('GD_EXTENSION_ENABLED', '');
|
603 |
|
|
// } else {
|
604 |
|
|
// $oTpl->set_var('GD_EXTENSION_ENABLED', ' style="display: none;"');
|
605 |
|
|
// }
|
606 |
|
|
|
607 |
|
|
// Insert permissions values
|
608 |
|
|
// if($admin->get_permission('settings_advanced') != true)
|
609 |
|
|
// {
|
610 |
|
|
// $oTpl->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
|
611 |
|
|
// }
|
612 |
|
|
|
613 |
|
|
/**
|
614 |
|
|
*
|
615 |
|
|
*
|
616 |
|
|
*/
|
617 |
|
|
$oTpl->set_block('main_block', 'show_search_block','show_search');
|
618 |
2098
|
darkviper
|
$sql = 'SELECT * FROM `'.$oDb->TablePrefix.'search` WHERE `extra` = \'\'';
|
619 |
|
|
if (($results = $oDb->doQuery($sql))) {
|
620 |
1777
|
Luisehahne
|
// Query current settings in the db, then loop through them and print them
|
621 |
2098
|
darkviper
|
while ($setting = $results->fetchRow(MYSQL_ASSOC)) {
|
622 |
1777
|
Luisehahne
|
$setting_name = $setting['name'];
|
623 |
|
|
$setting_value = htmlspecialchars(($setting['value']));
|
624 |
|
|
switch($setting_name) {
|
625 |
|
|
// Search header
|
626 |
|
|
case 'header':
|
627 |
|
|
$oTpl->set_var('SEARCH_HEADER', $setting_value);
|
628 |
|
|
break;
|
629 |
|
|
// Search results header
|
630 |
|
|
case 'results_header':
|
631 |
|
|
$oTpl->set_var('SEARCH_RESULTS_HEADER', $setting_value);
|
632 |
|
|
break;
|
633 |
|
|
// Search results loop
|
634 |
|
|
case 'results_loop':
|
635 |
|
|
$oTpl->set_var('SEARCH_RESULTS_LOOP', $setting_value);
|
636 |
|
|
break;
|
637 |
|
|
// Search results footer
|
638 |
|
|
case 'results_footer':
|
639 |
|
|
$oTpl->set_var('SEARCH_RESULTS_FOOTER', $setting_value);
|
640 |
|
|
break;
|
641 |
|
|
// Search no results
|
642 |
|
|
case 'no_results':
|
643 |
|
|
$oTpl->set_var('SEARCH_NO_RESULTS', $setting_value);
|
644 |
|
|
break;
|
645 |
|
|
// Search footer
|
646 |
|
|
case 'footer':
|
647 |
|
|
$oTpl->set_var('SEARCH_FOOTER', $setting_value);
|
648 |
|
|
break;
|
649 |
|
|
// Search module-order
|
650 |
|
|
case 'module_order':
|
651 |
|
|
$oTpl->set_var('SEARCH_MODULE_ORDER', $setting_value);
|
652 |
|
|
break;
|
653 |
|
|
// Search max lines of excerpt
|
654 |
|
|
case 'max_excerpt':
|
655 |
|
|
$oTpl->set_var('SEARCH_MAX_EXCERPT', $setting_value);
|
656 |
|
|
break;
|
657 |
|
|
// time-limit
|
658 |
|
|
case 'time_limit':
|
659 |
|
|
$oTpl->set_var('SEARCH_TIME_LIMIT', $setting_value);
|
660 |
|
|
break;
|
661 |
|
|
// Search template
|
662 |
|
|
case 'template':
|
663 |
|
|
$search_template = $setting_value;
|
664 |
|
|
break;
|
665 |
|
|
}
|
666 |
|
|
}
|
667 |
1356
|
Luisehahne
|
}
|
668 |
|
|
|
669 |
|
|
// Insert templates for search settings
|
670 |
2098
|
darkviper
|
$oTpl->set_block('main_block', 'search_template_list_block', 'search_template_list');
|
671 |
1366
|
Luisehahne
|
$search_template = ( ($search_template == DEFAULT_TEMPLATE) || ($search_template == '') ) ? '' : $search_template;
|
672 |
1716
|
Luisehahne
|
$selected = ( ($search_template != DEFAULT_TEMPLATE) ) ? $sSelected : '';
|
673 |
1356
|
Luisehahne
|
|
674 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
675 |
2098
|
darkviper
|
'FILE' => '',
|
676 |
|
|
'TEXT_MODULE_ORDER' => $oTrans->TEXT_MODULE_ORDER,
|
677 |
|
|
'NAME' => $oTrans->TEXT_SYSTEM_DEFAULT,
|
678 |
|
|
'SELECTED' => $selected
|
679 |
|
|
));
|
680 |
1777
|
Luisehahne
|
$oTpl->parse('search_template_list', 'search_template_list_block', true);
|
681 |
2098
|
darkviper
|
$sql = 'SELECT `name`, `directory` FROM `'.$oDb->TablePrefix.'addons` '
|
682 |
|
|
. 'WHERE `type` = \'template\' AND `function` = \'template\' '
|
683 |
|
|
. 'ORDER BY `name`';
|
684 |
|
|
if (($result = $oDb->doQuery($sql))) {
|
685 |
|
|
while ($addon = $result->fetchRow(MYSQL_ASSOC)) {
|
686 |
|
|
if ($admin->get_permission($addon['directory'],'template' )) {
|
687 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE', $addon['directory']);
|
688 |
|
|
$oTpl->set_var('NAME', $addon['name']);
|
689 |
1716
|
Luisehahne
|
$selected = ($addon['directory'] == $search_template) ? $sSelected : '';
|
690 |
1777
|
Luisehahne
|
$oTpl->set_var('SELECTED', $selected);
|
691 |
|
|
$oTpl->parse('search_template_list', 'search_template_list_block', true);
|
692 |
1716
|
Luisehahne
|
}
|
693 |
1356
|
Luisehahne
|
}
|
694 |
|
|
}
|
695 |
|
|
|
696 |
1777
|
Luisehahne
|
// Insert search select
|
697 |
1912
|
Luisehahne
|
// $oTpl->set_var(array(
|
698 |
2098
|
darkviper
|
// 'TEXT_REGISTERED' => $oTrans->TEXT_REGISTERED'],
|
699 |
|
|
// 'TEXT_PUBLIC' => $oTrans->TEXT_PUBLIC,
|
700 |
|
|
// 'TEXT_PRIVATE' => $oTrans->TEXT_PRIVATE'],
|
701 |
|
|
// 'TEXT_NONE' => $oTrans->TEXT_NONE'],
|
702 |
|
|
// 'TEXT_MAX_EXCERPT' => $oTrans->TEXT_MAX_EXCERPT'],
|
703 |
|
|
// 'TEXT_TIME_LIMIT' => $oTrans->TEXT_TIME_LIMIT'],
|
704 |
|
|
// 'TEXT_VISIBILITY' => $oTrans->TEXT_VISIBILITY'],
|
705 |
|
|
// 'TEXT_SEARCH' => $oTrans->TEXT_SEARCH'],
|
706 |
1912
|
Luisehahne
|
// ));
|
707 |
1777
|
Luisehahne
|
if(SEARCH == 'private')
|
708 |
1356
|
Luisehahne
|
{
|
709 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
710 |
|
|
'PRIVATE_SEARCH' => $sSelected,
|
711 |
|
|
'REGISTERED_SEARCH' => '',
|
712 |
|
|
'NONE_SEARCH' => '',
|
713 |
1721
|
Luisehahne
|
));
|
714 |
1777
|
Luisehahne
|
} elseif(SEARCH == 'public') {
|
715 |
|
|
$oTpl->set_var(array(
|
716 |
|
|
'PRIVATE_SEARCH' => '',
|
717 |
|
|
'REGISTERED_SEARCH' => '',
|
718 |
|
|
'NONE_SEARCH' => '',
|
719 |
1721
|
Luisehahne
|
));
|
720 |
1777
|
Luisehahne
|
} elseif(SEARCH == 'registered') {
|
721 |
|
|
$oTpl->set_var(array(
|
722 |
|
|
'PRIVATE_SEARCH' => '',
|
723 |
|
|
'REGISTERED_SEARCH' => $sSelected,
|
724 |
|
|
'NONE_SEARCH' => '',
|
725 |
1721
|
Luisehahne
|
));
|
726 |
1777
|
Luisehahne
|
} elseif(SEARCH == 'none') {
|
727 |
|
|
$oTpl->set_var(array(
|
728 |
|
|
'PRIVATE_SEARCH' => '',
|
729 |
|
|
'REGISTERED_SEARCH' => '',
|
730 |
|
|
'NONE_SEARCH' => $sSelected,
|
731 |
1721
|
Luisehahne
|
));
|
732 |
1356
|
Luisehahne
|
}
|
733 |
|
|
|
734 |
2098
|
darkviper
|
if ($is_advanced) {
|
735 |
|
|
$oTpl->parse('show_search', 'show_search_block');
|
736 |
|
|
} else {
|
737 |
|
|
$oTpl->parse('show_search', '');
|
738 |
|
|
}
|
739 |
1409
|
FrankH
|
|
740 |
1777
|
Luisehahne
|
$oTpl->set_block('main_block', 'show_access_block','show_access');
|
741 |
|
|
// Work-out which wbmailer routine should be checked
|
742 |
|
|
$oTpl->set_var(array(
|
743 |
2098
|
darkviper
|
'TEXT_WBMAILER_SMTP_AUTH_NOTICE' => $oTrans->TEXT_REQUIRED.' '.$oTrans->TEXT_WBMAILER_SMTP_AUTH,
|
744 |
|
|
'SMTP_AUTH_SELECTED' => $checked,
|
745 |
|
|
'TEXT_WBMAILER_DEFAULT_SETTINGS_NOTICE' => $oTrans->TEXT_WBMAILER_DEFAULT_SETTINGS_NOTICE,
|
746 |
|
|
'TEXT_WBMAILER_DEFAULT_SENDER_MAIL' => $oTrans->TEXT_WBMAILER_DEFAULT_SENDER_MAIL,
|
747 |
|
|
'TEXT_WBMAILER_DEFAULT_SENDER_NAME' => $oTrans->TEXT_WBMAILER_DEFAULT_SENDER_NAME,
|
748 |
|
|
'TEXT_WBMAILER_NOTICE' => $oTrans->TEXT_WBMAILER_NOTICE,
|
749 |
|
|
'TEXT_WBMAILER_FUNCTION' => $oTrans->TEXT_WBMAILER_FUNCTION,
|
750 |
|
|
'TEXT_WBMAILER_SMTP_HOST' => $oTrans->TEXT_WBMAILER_SMTP_HOST,
|
751 |
|
|
'TEXT_WBMAILER_PHP' => $oTrans->TEXT_WBMAILER_PHP,
|
752 |
|
|
'TEXT_WBMAILER_SMTP' => $oTrans->TEXT_WBMAILER_SMTP,
|
753 |
|
|
'TEXT_WBMAILER_SMTP_AUTH' => $oTrans->TEXT_WBMAILER_SMTP_AUTH,
|
754 |
|
|
'TEXT_WBMAILER_SMTP_USERNAME' => $oTrans->TEXT_WBMAILER_SMTP_USERNAME,
|
755 |
|
|
'TEXT_WBMAILER_SMTP_PASSWORD' => $oTrans->TEXT_WBMAILER_SMTP_PASSWORD,
|
756 |
|
|
));
|
757 |
1356
|
Luisehahne
|
|
758 |
1668
|
Luisehahne
|
// Work-out if developer infos feature is enabled
|
759 |
2098
|
darkviper
|
if (defined('DEV_INFOS') && DEV_INFOS == true) {
|
760 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
761 |
1721
|
Luisehahne
|
'DEV_INFOS_ENABLED' => $checked,
|
762 |
|
|
'DEV_INFOS_DISABLED' => '',
|
763 |
|
|
));
|
764 |
1668
|
Luisehahne
|
} else {
|
765 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
766 |
1721
|
Luisehahne
|
'DEV_INFOS_DISABLED' => $checked,
|
767 |
|
|
'DEV_INFOS_ENABLED' => '',
|
768 |
|
|
));
|
769 |
1668
|
Luisehahne
|
}
|
770 |
|
|
|
771 |
1777
|
Luisehahne
|
// Work-out which server os should be checked
|
772 |
|
|
if(OPERATING_SYSTEM == 'linux')
|
773 |
1731
|
Luisehahne
|
{
|
774 |
1777
|
Luisehahne
|
$oTpl->set_var('LINUX_SELECTED', $checked);
|
775 |
|
|
$oTpl->set_var('WINDOWS_SELECTED', '');
|
776 |
|
|
} elseif(OPERATING_SYSTEM == 'windows') {
|
777 |
|
|
$oTpl->set_var('WINDOWS_SELECTED', $checked);
|
778 |
|
|
$oTpl->set_var('LINUX_SELECTED', '');
|
779 |
1731
|
Luisehahne
|
}
|
780 |
|
|
|
781 |
1356
|
Luisehahne
|
if(WBMAILER_ROUTINE == 'phpmail')
|
782 |
|
|
{
|
783 |
1777
|
Luisehahne
|
$oTpl->set_var('PHPMAIL_SELECTED', $checked);
|
784 |
|
|
$oTpl->set_var('SMTP_VISIBILITY', ' style="display: none;"');
|
785 |
|
|
// $oTpl->set_var('SMTP_VISIBILITY_AUTH', '');
|
786 |
|
|
$oTpl->set_var('SMTP_AUTH_SELECTED', '');
|
787 |
|
|
$oTpl->set_var('SMTPMAIL_SELECTED', '');
|
788 |
1356
|
Luisehahne
|
} elseif(WBMAILER_ROUTINE == 'smtp')
|
789 |
|
|
{
|
790 |
1777
|
Luisehahne
|
$oTpl->set_var('SMTPMAIL_SELECTED', $checked);
|
791 |
|
|
$oTpl->set_var('PHPMAIL_SELECTED', '');
|
792 |
|
|
$oTpl->set_var('SMTP_VISIBILITY', '');
|
793 |
|
|
// $oTpl->set_var('SMTP_VISIBILITY_AUTH', '');
|
794 |
1356
|
Luisehahne
|
}
|
795 |
1572
|
Luisehahne
|
/* deprecated
|
796 |
1356
|
Luisehahne
|
// Work-out if SMTP authentification should be checked
|
797 |
|
|
if(WBMAILER_SMTP_AUTH)
|
798 |
|
|
{
|
799 |
1777
|
Luisehahne
|
$oTpl->set_var('SMTP_AUTH_SELECTED', $checked);
|
800 |
1356
|
Luisehahne
|
if(WBMAILER_ROUTINE == 'smtp')
|
801 |
|
|
{
|
802 |
1777
|
Luisehahne
|
$oTpl->set_var('SMTP_VISIBILITY_AUTH', '');
|
803 |
1356
|
Luisehahne
|
|
804 |
|
|
} else {
|
805 |
1777
|
Luisehahne
|
$oTpl->set_var('SMTP_VISIBILITY_AUTH', ' style="display: none;"');
|
806 |
1356
|
Luisehahne
|
}
|
807 |
|
|
} else {
|
808 |
1777
|
Luisehahne
|
$oTpl->set_var('SMTP_VISIBILITY_AUTH', ' style="display: none;"');
|
809 |
1356
|
Luisehahne
|
}
|
810 |
1572
|
Luisehahne
|
*/
|
811 |
1356
|
Luisehahne
|
|
812 |
1777
|
Luisehahne
|
// Work-out if 777 permissions are set
|
813 |
|
|
$oTpl->set_var('WORLD_WRITEABLE_SELECTED', '');
|
814 |
|
|
if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777')
|
815 |
1356
|
Luisehahne
|
{
|
816 |
1777
|
Luisehahne
|
$oTpl->set_var('WORLD_WRITEABLE_SELECTED', $checked);
|
817 |
1356
|
Luisehahne
|
}
|
818 |
|
|
|
819 |
1716
|
Luisehahne
|
|
820 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
821 |
|
|
'FILE_U_R_CHECKED' => '',
|
822 |
|
|
'FILE_U_W_CHECKED' => '',
|
823 |
|
|
'FILE_U_E_CHECKED' => '',
|
824 |
|
|
'FILE_G_R_CHECKED' => '',
|
825 |
|
|
'FILE_G_W_CHECKED' => '',
|
826 |
|
|
'FILE_G_E_CHECKED' => '',
|
827 |
|
|
'FILE_O_R_CHECKED' => '',
|
828 |
|
|
'FILE_O_W_CHECKED' => '',
|
829 |
|
|
'FILE_O_E_CHECKED' => '',
|
830 |
|
|
'DIR_U_R_CHECKED' => '',
|
831 |
|
|
'DIR_U_W_CHECKED' => '',
|
832 |
|
|
'DIR_U_E_CHECKED' => '',
|
833 |
|
|
'DIR_G_R_CHECKED' => '',
|
834 |
|
|
'DIR_G_W_CHECKED' => '',
|
835 |
|
|
'DIR_G_E_CHECKED' => '',
|
836 |
|
|
'DIR_O_R_CHECKED' => '',
|
837 |
|
|
'DIR_O_W_CHECKED' => '',
|
838 |
|
|
'DIR_O_E_CHECKED' => '',
|
839 |
|
|
));
|
840 |
1356
|
Luisehahne
|
|
841 |
1777
|
Luisehahne
|
// Work-out which file mode boxes are checked
|
842 |
1356
|
Luisehahne
|
if(extract_permission(STRING_FILE_MODE, 'u', 'r'))
|
843 |
|
|
{
|
844 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE_U_R_CHECKED', $checked);
|
845 |
1356
|
Luisehahne
|
}
|
846 |
|
|
if(extract_permission(STRING_FILE_MODE, 'u', 'w'))
|
847 |
|
|
{
|
848 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE_U_W_CHECKED', $checked);
|
849 |
1356
|
Luisehahne
|
}
|
850 |
|
|
if(extract_permission(STRING_FILE_MODE, 'u', 'e'))
|
851 |
|
|
{
|
852 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE_U_E_CHECKED', $checked);
|
853 |
1356
|
Luisehahne
|
}
|
854 |
|
|
if(extract_permission(STRING_FILE_MODE, 'g', 'r'))
|
855 |
|
|
{
|
856 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE_G_R_CHECKED', $checked);
|
857 |
1356
|
Luisehahne
|
}
|
858 |
|
|
if(extract_permission(STRING_FILE_MODE, 'g', 'w'))
|
859 |
|
|
{
|
860 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE_G_W_CHECKED', $checked);
|
861 |
1356
|
Luisehahne
|
}
|
862 |
|
|
if(extract_permission(STRING_FILE_MODE, 'g', 'e'))
|
863 |
|
|
{
|
864 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE_G_E_CHECKED', $checked);
|
865 |
1356
|
Luisehahne
|
}
|
866 |
|
|
if(extract_permission(STRING_FILE_MODE, 'o', 'r'))
|
867 |
|
|
{
|
868 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE_O_R_CHECKED', $checked);
|
869 |
1356
|
Luisehahne
|
}
|
870 |
|
|
if(extract_permission(STRING_FILE_MODE, 'o', 'w'))
|
871 |
|
|
{
|
872 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE_O_W_CHECKED', $checked);
|
873 |
1356
|
Luisehahne
|
}
|
874 |
|
|
if(extract_permission(STRING_FILE_MODE, 'o', 'e'))
|
875 |
|
|
{
|
876 |
1777
|
Luisehahne
|
$oTpl->set_var('FILE_O_E_CHECKED', $checked);
|
877 |
1356
|
Luisehahne
|
}
|
878 |
|
|
// Work-out which dir mode boxes are checked
|
879 |
|
|
if(extract_permission(STRING_DIR_MODE, 'u', 'r'))
|
880 |
|
|
{
|
881 |
1777
|
Luisehahne
|
$oTpl->set_var('DIR_U_R_CHECKED', $checked);
|
882 |
1356
|
Luisehahne
|
}
|
883 |
|
|
if(extract_permission(STRING_DIR_MODE, 'u', 'w'))
|
884 |
|
|
{
|
885 |
1777
|
Luisehahne
|
$oTpl->set_var('DIR_U_W_CHECKED', $checked);
|
886 |
1356
|
Luisehahne
|
}
|
887 |
|
|
if(extract_permission(STRING_DIR_MODE, 'u', 'e'))
|
888 |
|
|
{
|
889 |
1777
|
Luisehahne
|
$oTpl->set_var('DIR_U_E_CHECKED', $checked);
|
890 |
1356
|
Luisehahne
|
}
|
891 |
|
|
if(extract_permission(STRING_DIR_MODE, 'g', 'r'))
|
892 |
|
|
{
|
893 |
1777
|
Luisehahne
|
$oTpl->set_var('DIR_G_R_CHECKED', $checked);
|
894 |
1356
|
Luisehahne
|
}
|
895 |
|
|
if(extract_permission(STRING_DIR_MODE, 'g', 'w'))
|
896 |
|
|
{
|
897 |
1777
|
Luisehahne
|
$oTpl->set_var('DIR_G_W_CHECKED', $checked);
|
898 |
1356
|
Luisehahne
|
}
|
899 |
|
|
if(extract_permission(STRING_DIR_MODE, 'g', 'e'))
|
900 |
|
|
{
|
901 |
1777
|
Luisehahne
|
$oTpl->set_var('DIR_G_E_CHECKED', $checked);
|
902 |
1356
|
Luisehahne
|
}
|
903 |
|
|
if(extract_permission(STRING_DIR_MODE, 'o', 'r'))
|
904 |
|
|
{
|
905 |
1777
|
Luisehahne
|
$oTpl->set_var('DIR_O_R_CHECKED', $checked);
|
906 |
1356
|
Luisehahne
|
}
|
907 |
|
|
if(extract_permission(STRING_DIR_MODE, 'o', 'w'))
|
908 |
|
|
{
|
909 |
1777
|
Luisehahne
|
$oTpl->set_var('DIR_O_W_CHECKED', $checked);
|
910 |
1356
|
Luisehahne
|
}
|
911 |
|
|
if(extract_permission(STRING_DIR_MODE, 'o', 'e'))
|
912 |
|
|
{
|
913 |
1777
|
Luisehahne
|
$oTpl->set_var('DIR_O_E_CHECKED', $checked);
|
914 |
1356
|
Luisehahne
|
}
|
915 |
1843
|
Luisehahne
|
$sReadOnly = '';
|
916 |
|
|
$sPagesEditType = 'text';
|
917 |
2098
|
darkviper
|
$sql = 'SELECT COUNT(*) FROM `'.$oDb->TablePrefix.'pages`';
|
918 |
2109
|
darkviper
|
if ($oDb->getOne($sql)) {
|
919 |
1843
|
Luisehahne
|
$sReadOnly = ' readonly="readonly"';
|
920 |
1844
|
Luisehahne
|
$sPagesEditType = 'grey bold';
|
921 |
1843
|
Luisehahne
|
}
|
922 |
1356
|
Luisehahne
|
|
923 |
1777
|
Luisehahne
|
$oTpl->set_var(array(
|
924 |
|
|
'PAGES_DIRECTORY' => PAGES_DIRECTORY,
|
925 |
1843
|
Luisehahne
|
'PAGES_READONLY' => $sReadOnly,
|
926 |
|
|
'PAGES_EDIT_TYPE' => $sPagesEditType,
|
927 |
1777
|
Luisehahne
|
'PAGE_ICON_DIR' => PAGE_ICON_DIR,
|
928 |
|
|
'MEDIA_DIRECTORY' => MEDIA_DIRECTORY,
|
929 |
|
|
'PAGE_EXTENSION' => PAGE_EXTENSION,
|
930 |
|
|
'PAGE_SPACER' => PAGE_SPACER,
|
931 |
|
|
'TABLE_PREFIX' => TABLE_PREFIX
|
932 |
|
|
));
|
933 |
1356
|
Luisehahne
|
|
934 |
|
|
// Insert Server Email value into template
|
935 |
1777
|
Luisehahne
|
$oTpl->set_var('SERVER_EMAIL', SERVER_EMAIL);
|
936 |
1356
|
Luisehahne
|
|
937 |
1777
|
Luisehahne
|
// Insert language text and messages
|
938 |
|
|
$oTpl->set_var(array(
|
939 |
2098
|
darkviper
|
'TEXT_CHANGES' => $oTrans->TEXT_CHANGES,
|
940 |
|
|
'TEXT_FILES' => strtoupper(substr($oTrans->TEXT_FILES, 0, 1)).substr($oTrans->TEXT_FILES, 1),
|
941 |
1777
|
Luisehahne
|
'TEXT_WARN_PAGE_LEAVE' => '',
|
942 |
2098
|
darkviper
|
'TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS' => $oTrans->TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS,
|
943 |
|
|
'MODE_SWITCH_WARNING' => $oTrans->MESSAGE_SETTINGS_MODE_SWITCH_WARNING,
|
944 |
|
|
'WORLD_WRITEABLE_WARNING' => $oTrans->MESSAGE_SETTINGS_WORLD_WRITEABLE_WARNING
|
945 |
1777
|
Luisehahne
|
));
|
946 |
1356
|
Luisehahne
|
|
947 |
2098
|
darkviper
|
if ($is_advanced && $admin->get_user_id()=='1') {
|
948 |
|
|
$oTpl->parse('show_access', 'show_access_block');
|
949 |
|
|
}else {
|
950 |
|
|
$oTpl->parse('show_access' , '');
|
951 |
|
|
}
|
952 |
1356
|
Luisehahne
|
|
953 |
2098
|
darkviper
|
// Parse template objects output
|
954 |
|
|
$oTpl->parse('main', 'main_block',false);
|
955 |
|
|
$oTpl->pparse('output', 'page');
|
956 |
|
|
//$oTpl->p('page');
|
957 |
|
|
unset($oTpl);
|
958 |
|
|
$admin->print_footer();
|