Project

General

Profile

« Previous | Next » 

Revision 1843

Added by Dietmar over 11 years ago

! trash only will be shown if more than one section exists
! In the server settings the renaming of the page_directory is only possible, if no page exists

View differences:

index.php
5 5
 * @package         settings
6 6
 * @author          Ryan Djurovich, WebsiteBaker Project
7 7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
8
 * @link            http://www.websitebaker2.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
10 10
 * @platform        WebsiteBaker 2.8.x
11 11
 * @requirements    PHP 5.2.2 and higher
12 12
 * @version         $Id$
13
 * @filesource		$HeadURL$
13
 * @filesource      $HeadURL$
14 14
 * @lastmodified    $Date$
15 15
 *
16 16
 */
17 17

  
18
require('../../config.php');
19
require_once(WB_PATH.'/framework/class.admin.php');
18
// 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
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
20 28

  
21 29
if(isset($_GET['advanced']) && $_GET['advanced'] == 'yes') {
22 30
	$admin = new admin('Settings', 'settings_advanced');
......
63 71
    	$setting_name = $setting['name'];
64 72
    	$setting_value = ( $setting_name != 'wbmailer_smtp_password' ) ? htmlspecialchars($setting['value']) : htmlentities($setting['value'], ENT_COMPAT, 'UTF-8');
65 73
    	$oTpl->set_var(strtoupper($setting_name),($setting_value));
66
//        $oTpl->parse('main', 'main_block', true);
67 74
    }
68 75
}
69 76

  
......
1013 1020
	{
1014 1021
		$oTpl->set_var('DIR_O_E_CHECKED', $checked);
1015 1022
	}
1023
	$sReadOnly = '';
1024
	$sPagesEditType = 'text';
1025
	if( $bPagesCanModify = ($database->get_one('SELECT COUNT(*) FROM `'.TABLE_PREFIX.'pages`'))!=0 ) {
1026
		$sReadOnly = ' readonly="readonly"';
1027
		$sPagesEditType = 'button';
1028
	}
1016 1029

  
1017 1030
	$oTpl->set_var(array(
1018 1031
		'PAGES_DIRECTORY' => PAGES_DIRECTORY,
1032
		'PAGES_READONLY' => $sReadOnly,
1033
		'PAGES_EDIT_TYPE' => $sPagesEditType,
1019 1034
		'MODULES_DIRECTORY' => MODULES_UPGRADE_LIST,
1020 1035
		'PAGE_ICON_DIR'   => PAGE_ICON_DIR,
1021 1036
		'MEDIA_DIRECTORY' => MEDIA_DIRECTORY,

Also available in: Unified diff