bludit/bl-kernel/admin/controllers/settings-advanced.php

48 lines
1.6 KiB
PHP
Raw Normal View History

2015-10-19 00:45:58 +02:00
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
2015-10-19 00:45:58 +02:00
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
editSettings($_POST);
Redirect::page('settings-advanced');
2015-10-19 00:45:58 +02:00
}
// ============================================================================
// Main after POST
// ============================================================================
$allPublishedPages = buildAllpages(true);
2015-10-19 00:45:58 +02:00
2017-07-11 23:53:53 +02:00
// Homepage select options
$homepageOptions = array();
foreach($allPublishedPages as $key=>$page) {
$parentKey = $page->parentKey();
if ($parentKey) {
$homepageOptions[$key] = $pagesByParentByKey[PARENT][$parentKey]->title() .'->'. $page->title();
} else {
$homepageOptions[$key] = $page->title();
}
ksort($homepageOptions);
}
// Title of the page
$layout['title'] .= ' - '.$Language->g('Advanced Settings');