Exemple #1
0
<?php

/*
New post page
This is the page that's loaded if someone wants to make a new topic.
Information to be expected in $_GET:
	forumid: The ID of the forum that it's being posted in
*/
$ForumID = $_GET['forumid'];
if (!is_number($ForumID)) {
    error(404);
}
$Forum = Forums::get_forum_info($ForumID);
if ($Forum === false) {
    error(404);
}
if (!Forums::check_forumperm($ForumID, 'Write') || !Forums::check_forumperm($ForumID, 'Create')) {
    error(403);
}
View::show_header('Forums &gt; ' . $Forum['Name'] . ' &gt; New Topic', 'comments,bbcode,jquery.validate,form_validate');
?>
<div class="thin">
	<h2><a href="forums.php">Forums</a> &gt; <a href="forums.php?action=viewforum&amp;forumid=<?php 
echo $ForumID;
?>
"><?php 
echo $Forum['Name'];
?>
</a> &gt; <span id="newthreadtitle">New Topic</span></h2>
	<div class="hidden" id="newthreadpreview">
		<div class="linkbox">