コード例 #1
0
 public function create()
 {
     if ($this->data['users']->role != "admin") {
         exit;
     }
     $events = new events();
     $events->eventTitle = Input::get('eventTitle');
     $events->eventDescription = htmlspecialchars(Input::get('eventDescription'), ENT_QUOTES);
     $events->eventFor = Input::get('eventFor');
     $events->enentPlace = Input::get('enentPlace');
     $events->eventDate = Input::get('eventDate');
     $events->save();
     $events->eventDescription = strip_tags(htmlspecialchars_decode($events->eventDescription));
     return $this->panelInit->apiOutput(true, $this->panelInit->language['addEvent'], $this->panelInit->language['eventCreated'], $events->toArray());
 }