novaconium/controllers/messages.php

21 lines
476 B
PHP

<?php
$data = array_merge($data, [
'title' => 'Novaconium Messages',
'pageclass' => 'novaconium'
]);
if ( empty($session->get('username'))) {
$redirect->url('/novaconium/login');
$messages->error('You are not loggedin');
makeitso();
}
// Get the pages
$query = "SELECT id, name, email, LEFT(message, 40) AS message, created, unread FROM contactForm";
$matched = $db->getRows($query);
$data['messages'] = $matched;
view('@novacore/messages', $data);