SHARE
TWEET

Untitled

a guest Jun 18th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //------------------------------------------------------------------------------
  2.   public function resulOK($res, $js = '', $echo = 1) {
  3.     $js .= $this->onResultJs;
  4.     $this->onResultJs='';
  5.     parent::resulOK($res, $js, $echo);
  6.   }
  7.  
  8. //------------------------------------------------------------------------------
  9.   public function resultERROR($res, $js = '', $echo = 1) {
  10.     $js.=$this->onResultJs;
  11.     $this->onResultJs='';
  12.     return parent::resultERROR($res, $js, $echo);
  13.   }
  14.  
  15. //------------------------------------------------------------------------------
  16.     public function resulOK($res, $js = '', $echo = 1) {
  17.         $res = json_encode(array('res' => $res, 'js' => $js));
  18.         if ($res==false) {
  19.             file_put_contents(logsDir().'/lastJsonError.txt', $js);
  20.             die('JSON klaida: '.json_last_error_msg ());
  21.         }
  22.        
  23.         if ($echo == 1) {
  24.             echo $res;
  25.             die;
  26.         }
  27.         return $res;
  28.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top