novaconium/controllers/editpage.php
2025-08-12 23:08:20 -07:00

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);