if (WIKI_LOGINS) { if (!is_logged_in()) { $links[] = hyperlink($_SERVER['PHP_SELF'] . "?login", "Log in"); } else { $links[] = hyperlink($_SERVER['PHP_SELF'] . "?logout", "Log Out"); //$links[] = ("Close your browser to log out"); } } print "</p>"; print "<p>" . join(' ', $links) . "</p>"; print "<form action='" . pqurlencode($_SERVER['PHP_SELF']) . "' method='get'><p><label>Search <input type='text' name='search' size='10' /></label></p></form>"; } elseif ($action == 'reply') { if (get_magic_quotes_gpc()) { $_GET['to'] = stripslashes($_GET['to']); } print replyform($page['body'], $_GET['to']); } elseif ($action == 'edit') { if ($version != $Current) { print "<p><em><strong>Warning:</strong> You're not editing the most recent version\n\t\t\t\tof this page. If you make changes here, you'll save over\n\t\t\t\tsomething that was written since the page you're reading. Be\n\t\t\t\tnice and go to the <a\n\t\t\t\thref='" . rawurlencode($pagename) . ";{$Current}?edit'>current\n\t\t\t\tversion</a> and edit\n\t\t\t\tthat.</em></p><p><em>If you've already typed something, make\n\t\t\t\ta copy, don't hit save, go find where you're supposed to put\n\t\t\t\tit, and then save it there!</em></p>"; } print editform($page['body'], $page['header'], rcs_dereference_version($WIKI_PAGEDIR . "{$pagename}", $version)); if ($version != $Current) { print "<p><em><strong>Warning</strong>, this isn't the current\n\t\t\t\tversion of the page!</em></p>"; } } else { die("Error. Unknown Action"); } } else { http_404(); print errmsg(); exit;
function replyPreview($sid) { global $userinfo; $subject = $_POST['subject']; $comment = $_POST['comment']; require_once 'header.php'; OpenTable(); echo '<div style="text-align:center;" class="title"><b>' . _COMREPLYPRE . '</b></div><br />'; CloseTable(); OpenTable(); echo '<b>' . $subject . '</b>' . '<br /><span class="content">' . _BY . ' ' . (is_user() ? $userinfo['username'] : _ANONYMOUS) . ' ' . _ONN . '</span><br /><br />'; echo decode_bb_all(encode_bbcode(htmlprepare($comment))); CloseTable(); replyform($sid, intval($_POST['pid']), $subject, $comment); }