Example #1
0
 /**
  * ajaxGet 接收消息
  * 接收用户消息,系统消息,todo 群组消息
  */
 public function ajaxGet()
 {
     $con = new Controller();
     $current_user = $con->current_user();
     $not = $this->model('notification')->where("is_read = 0 and receiver = 'ALL_USER' or receiver = '{$current_user}' ")->select();
     if (!$not) {
         echo jet_JSON(array('notNum' => 0, 'has' => false));
     } else {
         $notNum = count($not);
         echo jet_JSON(array('not' => $not, 'msg' => "got {$notNum} new message", 'has' => true, 'notNum' => $notNum));
     }
 }
Example #2
0
 function __construct()
 {
     parent::__construct();
     if ($this->is_login() == false) {
         $this->redirect('请先登录', 'R:home_page', '1');
     }
     $this->p = jet_Get('p');
     $this->a = jet_Get('a');
 }
Example #3
0
 function __construct()
 {
     parent::__construct();
 }