Initial commit as of 2018-10-16
This commit is contained in:
24
application/controllers/admin/Calendar.php
Normal file
24
application/controllers/admin/Calendar.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Calendar extends CI_Controller {
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->model('adminModel', '', TRUE);
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
if (!isset($_SESSION['user']) || empty($_SESSION['user']) || $_SESSION['user']['rank'] < 9) redirect(base_url('login'));
|
||||
$this->load->view('admin/sidebar', ['title' => 'Dashboard']);
|
||||
$this->load->view('admin/calendar');
|
||||
$this->load->view('admin/footer');
|
||||
}
|
||||
|
||||
public function getAllEvents() {
|
||||
$events = $this->adminModel->getCalendarEvents();
|
||||
|
||||
echo json_encode($events);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user