Revision 1825
Added by Dietmar about 12 years ago
settings.php | ||
---|---|---|
15 | 15 |
* |
16 | 16 |
*/ |
17 | 17 |
// Create new admin object |
18 |
require('../../config.php'); |
|
19 |
require_once(WB_PATH.'/framework/class.admin.php'); |
|
20 |
$admin = new admin('Pages', 'pages_settings'); |
|
18 |
if(!defined('WB_URL')) |
|
19 |
{ |
|
20 |
$config_file = realpath('../../config.php'); |
|
21 |
if(file_exists($config_file) && !defined('WB_URL')) |
|
22 |
{ |
|
23 |
require($config_file); |
|
24 |
} |
|
25 |
} |
|
21 | 26 |
|
27 |
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); } |
|
22 | 28 |
|
29 |
$admin = new admin('Pages', 'pages_settings'); |
|
23 | 30 |
/*-- Parent page list ------------------------------------------------------------------*/ |
24 | 31 |
function parent_list($parent) |
25 | 32 |
{ |
... | ... | |
129 | 136 |
$oTpl->set_file('page', 'pages_settings.htt'); |
130 | 137 |
$oTpl->set_block('page', 'main_block', 'main'); |
131 | 138 |
$oTpl->set_var('FTAN', $admin->getFTAN()); |
139 |
// $sShowIconDirText = $TEXT['EXPAND'].' '; |
|
140 |
$sql = 'SELECT `value` FROM `'.TABLE_PREFIX.'settings` WHERE `name` = \'page_exented\''; |
|
141 |
if($page_extend = $database->get_one($sql)) {} |
|
142 |
|
|
143 |
$sShowIconDirText = ($page_extend=='1') ? $TEXT['HIDE_ADVANCED'] : $TEXT['SHOW_ADVANCED']; |
|
144 |
|
|
132 | 145 |
$oTpl->set_var(array( |
133 | 146 |
'PAGE_ID' => $aCurrentPage['page_id'], |
134 | 147 |
'PAGE_IDKEY' => $admin->getIDKEY($aCurrentPage['page_id']), |
... | ... | |
141 | 154 |
'MODIFIED_BY' => $user['display_name'], |
142 | 155 |
'MODIFIED_BY_USERNAME' => $user['username'], |
143 | 156 |
'MODIFIED_WHEN' => $modified_ts, |
157 |
'TEXT_SAVE_BACK' => $TEXT['SAVE'].' & '.$TEXT['BACK'], |
|
158 |
'TEXT_EXTENDED' => $sShowIconDirText, |
|
144 | 159 |
'ADMIN_URL' => ADMIN_URL, |
145 | 160 |
'WB_URL' => WB_URL, |
146 | 161 |
'THEME_URL' => THEME_URL |
... | ... | |
176 | 191 |
'SECTIONS_LINK_AFTER' => '</a>', |
177 | 192 |
'DISPLAY_MANAGE_SECTIONS' => 'link', |
178 | 193 |
)); |
179 |
}else { |
|
194 |
} else {
|
|
180 | 195 |
// $oTpl->set_block('show_manage_sections', ''); |
181 | 196 |
$oTpl->set_var(array( |
182 | 197 |
'SECTIONS_LINK_BEFORE' => '<span class="bold grey">', |
... | ... | |
192 | 207 |
$sTemplate = ($aCurrentPage['template'] == '' ? DEFAULT_TEMPLATE : $aCurrentPage['template']); |
193 | 208 |
$sIconDir = str_replace('\\', '/', ((defined('PAGE_ICON_DIR') && PAGE_ICON_DIR != '') ? PAGE_ICON_DIR : MEDIA_DIRECTORY)); |
194 | 209 |
$sIconDir = str_replace('/*', '/'.$sTemplate, $sIconDir); |
195 |
$bIconDirHide = (defined('PAGE_EXTENDED') && PAGE_EXTENDED) ? '' : 'hide';
|
|
210 |
$bIconDirHide = ($page_extend=='1') ? '' : 'hide';
|
|
196 | 211 |
// $oTpl->set_var('ICON_DIR', WB_REL.$sIconDir); |
197 | 212 |
$sHelp = replaceVars($mLang->HELP_PAGE_IMAGE_DIR, array('icon_dir'=>WB_REL.$sIconDir ) ); |
198 | 213 |
|
... | ... | |
332 | 347 |
$oTpl->set_block('admin_group_show_list_block', 'admin_user_list_block', 'admin_user_list'); |
333 | 348 |
$sAllowedAdminUsers = trim(implode(',',$aAdminUsers)); |
334 | 349 |
$sAllowedAdminUsers = $sAllowedAdminUsers ? $sAllowedAdminUsers : '-1'; |
335 |
$sql = 'SELECT `user_id`, `display_name` ' |
|
350 |
$sql = 'SELECT `user_id`, `display_name`,`username` '
|
|
336 | 351 |
. 'FROM `'.TABLE_PREFIX.'users` ' |
337 | 352 |
. 'WHERE `active`=1 ' |
338 | 353 |
. 'ORDER BY (`user_id` NOT IN('.$sAllowedAdminUsers.')), `display_name`'; |
... | ... | |
341 | 356 |
if($aUser['user_id'] == 1) { continue; } |
342 | 357 |
$oTpl->set_var(array( |
343 | 358 |
'ID' => $aUser['user_id'], |
344 |
'NAME' => $aUser['display_name'], |
|
359 |
'NAME' => $aUser['display_name'].' ('.$aUser['username'].')',
|
|
345 | 360 |
'SELECTED' => (in_array($aUser['user_id'], $aAdminUsers) ? $sSelected : ''), |
346 | 361 |
)); |
347 | 362 |
$oTpl->parse('admin_user_list', 'admin_user_list_block', true); |
... | ... | |
362 | 377 |
$oTpl->set_block('main_block', 'viewer_user_list_block', 'viewer_user_list'); |
363 | 378 |
$sAllowedViewingUsers = trim(implode(',',$aViewingUsers)); |
364 | 379 |
$sAllowedViewingUsers = $sAllowedViewingUsers ? $sAllowedViewingUsers : '-1'; |
365 |
$sql = 'SELECT `user_id`, `display_name` ' |
|
380 |
$sql = 'SELECT `user_id`, `display_name`,`username` '
|
|
366 | 381 |
. 'FROM `'.TABLE_PREFIX.'users` ' |
367 | 382 |
. 'WHERE `active`=1 ' |
368 | 383 |
. 'ORDER BY (`user_id` NOT IN('.$sAllowedViewingUsers.')), `display_name`'; |
... | ... | |
371 | 386 |
if($aUser['user_id'] == 1) { continue; } |
372 | 387 |
$oTpl->set_var(array( |
373 | 388 |
'ID' => $aUser['user_id'], |
374 |
'NAME' => $aUser['display_name'], |
|
389 |
'NAME' => $aUser['display_name'].' ('.$aUser['username'].')',
|
|
375 | 390 |
'SELECTED' => (in_array($aUser['user_id'], $aViewingUsers) ? $sSelected : ''), |
376 | 391 |
)); |
377 | 392 |
$oTpl->parse('viewer_user_list', 'viewer_user_list_block', true); |
Also available in: Unified diff
! update page settings, add save & back Button, add extended hide/show
redesign the page settings for a better overview