Example #1
0
 static function get($part = null, $cookiename = 'gb-author')
 {
     if (self::$cookie === null) {
         if (isset($_COOKIE[$cookiename])) {
             $s = get_magic_quotes_gpc() ? stripslashes($_COOKIE[$cookiename]) : $_COOKIE[$cookiename];
             self::$cookie = @unserialize($s);
         }
         if (!self::$cookie) {
             self::$cookie = array();
         }
     }
     if ($part === null) {
         return self::$cookie;
     }
     return isset(self::$cookie[$part]) ? self::$cookie[$part] : null;
 }