";
break;
case 'reply':
break;
case 'editpost':
break;
}
}
else
{
switch($mode)
{
case 'newtopic':
if(!isset($HTTP_GET_VARS[POST_FORUM_URL]))
{
error_die(GENERAL_ERROR, "Sorry, no there is no such forum");
}
$pagetype = "newtopic";
$page_title = " $l_postnew";
$sql = "SELECT forum_name, forum_access
FROM ".FORUMS_TABLE."
WHERE forum_id = $forum_id";
if(!$result = $db->sql_query($sql))
{
error_die(SQL_QUERY, "Could not obtain forum/forum access information.", __LINE__, __FILE__);
}
$forum_info = $db->sql_fetchrow($result);
$forum_name = stripslashes($forum_info['forum_name']);
$forum_access = $forum_info['forum_access'];
if($forum_access == ANONALLOWED)
{
$about_posting = "$l_anonusers $l_inthisforum $l_anonhint";
}
if($forum_access == REGONLY)
{
$about_posting = "$l_regusers $l_inthisforum";
}
if($forum_access == MODONLY)
{
$about_posting = "$l_modusers $l_inthisforum";
}
include('includes/page_header.'.$phpEx);
$template->set_filenames(array(
"body" => "posting_body.tpl",
"jumpbox" => "jumpbox.tpl")
);
$jumpbox = make_jumpbox();
$template->assign_vars(array(
"JUMPBOX_LIST" => $jumpbox,
"SELECT_NAME" => POST_FORUM_URL)
);
$template->assign_var_from_handle("JUMPBOX", "jumpbox");
$template->assign_vars(array(
"L_POSTNEWIN" => $l_postnewin,
"FORUM_ID" => $forum_id,
"FORUM_NAME" => $forum_name,
"U_VIEW_FORUM" => append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id"))
);
if($userdata['session_logged_in'])
{
$username_input = $userdata["username"];
$password_input = "";
}
else
{
if(!isset($username))
{
$username = $userdata["username"];
}
$username_input = '';
$password_input = '';
}
$subject_input = '';
$message_input = '';
if($allow_html)
{
$html_status = $l_htmlis . " " . $l_on;
$html_toggle = '";
$template->assign_vars(array(
"L_ABOUT_POST" => $l_aboutpost,
"L_SUBJECT" => $l_subject,
"L_MESSAGE_BODY" => $l_body,
"L_OPTIONS" => $l_options,
"L_PREVIEW" => $l_preview,
"L_SUBMIT" => $l_submit,
"L_CANCEL" => $l_cancelpost,
"ABOUT_POSTING" => $about_posting,
"USERNAME_INPUT" => $username_input,
"PASSWORD_INPUT" => $password_input,
"SUBJECT_INPUT" => $subject_input,
"MESSAGE_INPUT" => $message_input,
"HTML_STATUS" => $html_status,
"HTML_TOGGLE" => $html_toggle,
"SMILE_TOGGLE" => $smile_toggle,
"SIG_TOGGLE" => $sig_toggle,
"NOTIFY_TOGGLE" => $notify_toggle,
"BBCODE_TOGGLE" => $bbcode_toggle,
"BBCODE_STATUS" => $bbcode_status,
"S_POST_ACTION" => append_sid("posting.$phpEx"),
"S_HIDDEN_FORM_FIELDS" => $hidden_form_fields)
);
$template->pparse("body");
include('includes/page_tail.'.$phpEx);
break;
case 'reply':
break;
case 'editpost':
break;
}
}
?>