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; }
} # adjust date with clients local timezone $date = new GBDateTime(null, 0); if ($input['client-timezone-offset'] !== false && ($tzoffset = intval($input['client-timezone-offset'])) !== false && ($tzoffset < 43200 || $tzoffset > -43200)) { $date->offset = $tzoffset; } # author-url -> author-uri if set if ($input['author-url'] !== false) { $input['author-uri'] = gb_cfilter::apply('sanitize-url', $input['author-url']); } # if we are logged in, use the canonical email if (gb::$authorized) { $input['author-email'] = gb::$authorized->email; } # set author cookie gb_author_cookie::set($input['author-email'], $input['author-name'], $input['author-uri']); # create comment object $comment = new GBComment(array('date' => $date->__toString(), 'ipAddress' => $_SERVER['REMOTE_ADDR'], 'email' => $input['author-email'], 'uri' => $input['author-uri'], 'name' => $input['author-name'], 'body' => $input['reply-message'], 'approved' => false, 'post' => $post)); # always approve admin comments if (gb::$authorized) { $comment->approved = true; } # apply filters $comment = gb_cfilter::apply('pre-comment', $comment); # aquire referrer $referrer = gb::referrer_url(); # append to comment db if ($comment) { try { $cdb = $post->getCommentsDB(); $added = $cdb->append($comment, $input['reply-to'] ? $input['reply-to'] : null);
echo gb::url(); ?> " method="post" onsubmit="chap.submit('<?php echo $auth->nonce(); ?> ','<?php echo $auth->opaque(); ?> ','<?php echo $auth->context; ?> ')"> <div> <input type="hidden" id="chap-response" name="chap-response" value="" /> </div> <p> Username: <input type="text" id="chap-username" name="chap-username" value="<?php echo isset($_REQUEST['chap-username']) ? $_REQUEST['chap-username'] : gb_author_cookie::get('email'); ?> " /><br /> Password: <input type="password" id="chap-password" name="chap-password" /> </p> <p> <input type="submit" value="Login" /> </p> </form> </div> <?php include '../_footer.php';