Example #1
0
 /**
  *
  */
 public function get()
 {
     $n = new Notifications();
     $res = $n->getNotifications();
     $view = new View(true);
     $view->addData(["result" => $res["all"], "new" => $res["new"]]);
     $view->sendResponse();
 }
Example #2
0
 /**
  *
  */
 private function handleRequest()
 {
     if (isset($_GET['action']) && $_GET['action'] == "get") {
         $process = new Models\Process();
         $process->get();
     } elseif (isset($_GET['action']) && $_GET['action'] == "markRead") {
         $view = new View();
         $n = new Notifications();
         $view->setStatus($n->read($_POST['id']));
         $view->sendResponse();
     }
 }