public static function SGet() { $ref = Ko_Web_Request::SCookie(self::COOKIE_NAME); if ('' == $ref) { return 'http://' . MAIN_DOMAIN; } return $ref; }
public function iGetLoginUid(&$exinfo = '') { static $s_iUid; if (is_null($s_iUid)) { $token = Ko_Web_Request::SCookie(self::SESSION_TOKEN_NAME); $s_iUid = $token ? $this->iCheckSessionToken($token, $exinfo, $iErrno) : 0; if (!$s_iUid) { $token = Ko_Web_Request::SCookie(self::PERSISTENT_TOKEN_NAME); $s_iUid = $token ? $this->iCheckPersistentToken($token, $newtoken, $iErrno) : 0; if ($s_iUid) { Ko_Web_Response::VSetCookie(self::PERSISTENT_TOKEN_NAME, $newtoken, time() + 2592000, '/', '.' . MAIN_DOMAIN); } } if ($s_iUid) { $token = $s_iUid ? $this->sGetSessionToken($s_iUid, $exinfo) : ''; Ko_Web_Response::VSetCookie(self::SESSION_TOKEN_NAME, $token, 0, '/', '.' . MAIN_DOMAIN); } } return $s_iUid; }
public static function get() { $str = Ko_Web_Request::SCookie(self::COOKIE_NAME); return json_decode($str, true); }