<?php
// exit("Maintenance Mode");
session_start();
require('app/app.php');

// if (is_user_authenticated()) {
//     redirect('../raffle/login.php');
//     exit;
// }
// ensure_user_is_authenticated()

?>
<style>
<?php include ('css/raffle-registered.css'); ?>
</style>
<?php


$viewBag = [
    'heading' => ''
];
if (isset($_GET['search'])) {
    $items = Data::search_record($_GET['search'],$_GET['table-head']);

    $viewBag['heading'] = 'Search Results for: <span>' . $_GET['search'] . '</span>';
} else {
    $items = Data::get_records(8);
}

// $item = Data::get_records(20);
view('admin/raffle-registered', $items);
