예제 #1
0
 public function loadunread()
 {
     $mc = new MessagesCollection($_SESSION['user_id']);
     echo $mc->get_unread_count();
 }
예제 #2
0
 public function loadrecent()
 {
     $messages_collection = new MessagesCollection($_SESSION['user_id']);
     $messages = $messages_collection->load_recent(20);
     echo json_encode($messages);
 }