Cloudlog/application/controllers/Logbooks.php

31 行
无行尾
796 B
PHP

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
Handles Displaying of information for Station Logbooks
*/
class Logbooks extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->helper(array('form', 'url'));
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
function index() {
$this->load->model('logbooks_model');
$data['my_logbooks'] = $this->logbooks_model->show_all();
// Render Page
$data['page_title'] = "Station Logbooks";
$this->load->view('interface_assets/header', $data);
$this->load->view('logbooks/index');
$this->load->view('interface_assets/footer');
}
}