30 lines
588 B
PHP
30 lines
588 B
PHP
<?php
|
|
$data['title'] = 'Novaconium Edit Page';
|
|
|
|
if ( empty($session->get('username'))) {
|
|
$redirect->url('/novaconium/login');
|
|
$messages->error('You are not loggedin');
|
|
makeitso();
|
|
}
|
|
|
|
$pageid = $router->parameters['id'];
|
|
$query=<<<EOSQL
|
|
SELECT
|
|
id,
|
|
title,
|
|
intro,
|
|
slug,
|
|
body,
|
|
draft,
|
|
created,
|
|
updated
|
|
FROM pages
|
|
WHERE id = '$pageid'
|
|
EOSQL;
|
|
|
|
$data['rows'] = $db->getRow($query);
|
|
$data = array_merge($data, [
|
|
'tinymce' => true,
|
|
'pageid' => 'admin-edit-page'
|
|
]);
|
|
view('@novacore/editpage', $data); |