// The page already exists - let the user view the page source
exit(page_renderer::render_main("Viewing source for $page","<p>$settings->sitename does not allow anonymous users to make edits. You can view the source of $page below, but you can't edit it.</p><textarea name='content' readonly>$pagetext</textarea>"));
}
else
{
http_response_code(404);
exit(page_renderer::render_main("404 - $page","<p>The page <code>$page</code> does not exist, but you do not have permission to create it.</p><p>If you haven't already, perhaps you should try <a href='index.php?action=login'>logging in</a>.</p>"));
}
}
$content="<h1>$title</h1>";
if(!$isloggedinand$settings->anonedits)
{
$content.="<p><strong>Warning: You are not logged in! Your IP address <em>may</em> be recorded.</strong></p>";
exit(page_renderer::render_main("Error saving page - $settings->sitename","<p>$settings->sitename failed to write your changes to the disk. Your changes have not been saved, but you might be able to recover your edit by pressing the back button in your browser.</p>