コード例 #1
0
ファイル: GroupChat.php プロジェクト: hiroyalty/empowered
 function getReceiverMsgByStatus($receiver, $status)
 {
     $exists = R::getAll('select * from chatmessage where receiver=? and msgstatus=?', array($receiver, $status));
     if ($exists == null) {
         $this->res['Status'] = App::getActionResponse('Empty');
         $this->res = App::getTotalResponse($this->res);
         //$this->res = App::setJSONResponse($res);
         return $this->res;
     } else {
         $jsonData = array();
         foreach ($exists as $row) {
             $jsonData[] = $row;
         }
         $this->res['chatmessage'] = $jsonData;
         $this->res['Status'] = App::getActionResponse('Success');
         $this->res = App::getTotalResponse($this->res);
         return $this->res;
     }
 }
コード例 #2
0
ファイル: User.php プロジェクト: hiroyalty/empowered
 function getSipId($phone)
 {
     $res = array();
     $exists = R::getRow('select * from user where phone=? ', array($phone));
     if ($exists == NULL) {
         $this->res['Status'] = App::getActionResponse('InvalidLogin');
         $this->res = App::getTotalResponse($this->res);
     } else {
         $dpin = $exists['sip_id'];
         $this->res['sipId'] = $dpin;
         $this->res['Status'] = App::getActionResponse('Success');
         $this->res = App::getTotalResponse($this->res);
         return $this->res;
     }
 }