芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/breadwinnerv2/application/controllers/Events.php
load->library("Aauth"); if (!$this->aauth->is_loggedin()) { redirect('/user/', 'refresh'); } if ($this->aauth->get_user()->roleid < 4) { exit('
Sorry! You have insufficient permissions to access this section
'); } $this->load->model('events_model'); } public function index() { $this->load->view('fixed/header'); $this->load->view('events/cal'); $this->load->view('fixed/footer'); } /*Get all Events */ public function getEvents() { $start = $this->input->get('start'); $end = $this->input->get('end'); $result = $this->events_model->getEvents($start, $end); echo json_encode($result); } /*Add new event */ public function addEvent() { $title = $this->input->post('title',true); $start = $this->input->post('start',true); $end = $this->input->post('end',true); $description = $this->input->post('description',true); $color = $this->input->post('color'); $result = $this->events_model->addEvent($title, $start, $end, $description, $color); } /*Update Event */ public function updateEvent() { $title = $this->input->post('title'); $id = $this->input->post('id'); $description = $this->input->post('description'); $color = $this->input->post('color'); $result = $this->events_model->updateEvent($id, $title, $description, $color); echo $result; } /*Delete Event*/ public function deleteEvent() { $result = $this->events_model->deleteEvent(); echo $result; } public function dragUpdateEvent() { $result = $this->events_model->dragUpdateEvent(); echo $result; } }