예제 #1
0
파일: jaxl.0206.php 프로젝트: ngsru/JAXL
 public static function out($jaxl, $payload)
 {
     JAXL0124::out($payload);
 }
예제 #2
0
파일: jaxl.0124.php 프로젝트: rahijain/JAXL
 public static function saveSession($xml, $jaxl)
 {
     if ($_SESSION['auth']) {
         $_SESSION['rid'] = isset($jaxl->bosh['rid']) ? $jaxl->bosh['rid'] : false;
         $_SESSION['sid'] = isset($jaxl->bosh['sid']) ? $jaxl->bosh['sid'] : false;
         $_SESSION['jid'] = $jaxl->jid;
         $_SESSION['id'] = $jaxl->lastid;
         session_write_close();
         if (self::$sess) {
             // session already closed?
             list($body, $xml) = self::unwrapBody($xml);
             JAXLog::log("[[" . $jaxl->action . "]] Auth complete, sync now\n" . json_encode($_SESSION), 5, $jaxl);
             return self::out(array('jaxl' => 'jaxl', 'xml' => urlencode($xml)));
         } else {
             self::$sess = true;
             JAXLog::log("[[" . $jaxl->action . "]] Auth complete, commiting session now\n" . json_encode($_SESSION), 5, $jaxl);
         }
     } else {
         JAXLog::log("[[" . $jaxl->action . "]] Not authed yet, Not commiting session\n" . json_encode($_SESSION), 5, $jaxl);
     }
     return $xml;
 }
예제 #3
0
파일: jaxl.0124.php 프로젝트: ZZB/JAXL
 public static function saveSession($xml, $jaxl)
 {
     if ($_SESSION['auth'] === true) {
         $_SESSION['rid'] = isset($jaxl->bosh['rid']) ? $jaxl->bosh['rid'] : false;
         $_SESSION['sid'] = isset($jaxl->bosh['sid']) ? $jaxl->bosh['sid'] : false;
         $_SESSION['jid'] = $jaxl->jid;
         $_SESSION['id'] = $jaxl->lastid;
         if ($jaxl->bosh['out']) {
             session_write_close();
         }
         if (self::$sess && $jaxl->bosh['out']) {
             list($body, $xml) = self::unwrapBody($xml);
             $jaxl->log("[[" . $_REQUEST['jaxl'] . "]] Auth complete, sync now\n" . json_encode($_SESSION), 5);
             return self::out(array('jaxl' => 'jaxl', 'xml' => urlencode($xml)));
         } else {
             self::$sess = true;
             $jaxl->log("[[" . $_REQUEST['jaxl'] . "]] Auth complete, commiting session now\n" . json_encode($_SESSION), 5);
         }
     } else {
         $jaxl->log("[[" . $_REQUEST['jaxl'] . "]] Not authed yet, Not commiting session\n" . json_encode($_SESSION), 5);
     }
     return $xml;
 }