+ public static function set($key, $value, $days, $secure = false) {
+ global $globals;
+ $key = $globals->cookie_ns . $key;
+ if (!$secure || @$_SERVER['HTTPS']) {
+ setcookie($key, $value, time() + 86400 * $days, $globals->cookie_path, '',
+ $secure, $secure);
+ $_COOKIE[$key] = $value;
+ }
+ }
+