2015-05-05 01:00:01 +00:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
2015-08-02 21:49:12 -03:00
|
|
|
// ============================================================================
|
|
|
|
// Check role
|
|
|
|
// ============================================================================
|
|
|
|
|
2018-07-28 18:33:37 +02:00
|
|
|
checkRole(array('admin', 'editor'));
|
2018-07-25 23:42:00 +02:00
|
|
|
|
2015-07-14 01:41:32 -03:00
|
|
|
// ============================================================================
|
|
|
|
// Functions
|
|
|
|
// ============================================================================
|
|
|
|
|
2015-08-02 21:49:12 -03:00
|
|
|
// ============================================================================
|
|
|
|
// Main before POST
|
|
|
|
// ============================================================================
|
|
|
|
|
2015-07-14 01:41:32 -03:00
|
|
|
// ============================================================================
|
|
|
|
// POST Method
|
|
|
|
// ============================================================================
|
|
|
|
|
2017-09-10 23:09:44 +02:00
|
|
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
2018-07-13 18:30:42 +02:00
|
|
|
// If the checkbox is not selected the form doesn't send the field
|
|
|
|
$_POST['noindex'] = isset($_POST['noindex'])?true:false;
|
|
|
|
$_POST['nofollow'] = isset($_POST['nofollow'])?true:false;
|
|
|
|
$_POST['noarchive'] = isset($_POST['noarchive'])?true:false;
|
|
|
|
|
2017-09-10 23:09:44 +02:00
|
|
|
createPage($_POST);
|
2017-10-02 22:42:18 +02:00
|
|
|
Redirect::page('content');
|
2015-05-30 22:06:55 -03:00
|
|
|
}
|
2015-08-02 21:49:12 -03:00
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Main after POST
|
2015-11-28 11:47:03 -03:00
|
|
|
// ============================================================================
|
2017-09-09 00:33:14 +02:00
|
|
|
|
|
|
|
// Title of the page
|
2018-08-05 17:54:20 +02:00
|
|
|
$layout['title'] = $L->g('New content').' - '.$layout['title'];
|