2015-11-27 17:03:42 +01:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Check role
|
|
|
|
// ============================================================================
|
|
|
|
|
2018-07-28 18:33:37 +02:00
|
|
|
checkRole(array('admin', 'editor'));
|
2018-05-20 21:48:43 +02:00
|
|
|
|
2015-11-27 17:03:42 +01:00
|
|
|
// ============================================================================
|
|
|
|
// Functions
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Main before POST
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// POST Method
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Main after POST
|
2015-11-28 15:47:03 +01:00
|
|
|
// ============================================================================
|
2017-09-09 00:33:14 +02:00
|
|
|
|
2017-09-10 23:09:44 +02:00
|
|
|
// List of published pages
|
2018-01-21 23:34:57 +01:00
|
|
|
$onlyPublished = true;
|
2018-08-06 21:46:58 +02:00
|
|
|
$numberOfItems = ITEMS_PER_PAGE_ADMIN;
|
2018-07-17 19:13:01 +02:00
|
|
|
$pageNumber = $url->pageNumber();
|
2018-08-06 21:46:58 +02:00
|
|
|
$published = $pages->getList($pageNumber, $numberOfItems, $onlyPublished);
|
2017-09-10 23:09:44 +02:00
|
|
|
|
|
|
|
// Check if out of range the pageNumber
|
2018-07-17 19:13:01 +02:00
|
|
|
if (empty($published) && $url->pageNumber()>1) {
|
2017-10-02 22:42:18 +02:00
|
|
|
Redirect::page('content');
|
2017-09-10 23:09:44 +02:00
|
|
|
}
|
|
|
|
|
2018-08-03 18:59:23 +02:00
|
|
|
$drafts = $pages->getDraftDB(true);
|
|
|
|
$scheduled = $pages->getScheduledDB(true);
|
|
|
|
$static = $pages->getStaticDB(true);
|
|
|
|
$sticky = $pages->getStickyDB(true);
|
2017-09-10 23:09:44 +02: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('Manage content');
|