mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Moved include files
git-svn-id: file:///svn/phpbb/trunk@94 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6be03b553d
commit
d3d031d9ee
12 changed files with 238 additions and 206 deletions
|
@ -23,25 +23,24 @@
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
include('config.'.$phpEx);
|
include('config.'.$phpEx);
|
||||||
|
include('includes/constants.'.$phpEx);
|
||||||
|
|
||||||
// Find Users real IP (if possible)
|
// Find Users real IP (if possible)
|
||||||
$ip = ($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR;
|
$ip = ($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR;
|
||||||
define("USER_IP",$ip);
|
define("USER_IP",$ip);
|
||||||
unset($ip);
|
unset($ip);
|
||||||
|
|
||||||
include('template.inc');
|
|
||||||
// Setup what template to use. Currently just use default
|
// Setup what template to use. Currently just use default
|
||||||
|
include('includes/template.inc');
|
||||||
$template = new Template("./templates/Default", "remove");
|
$template = new Template("./templates/Default", "remove");
|
||||||
|
|
||||||
include('functions/error.'.$phpEx);
|
include('functions/error.'.$phpEx);
|
||||||
include('functions/sessions.'.$phpEx);
|
include('functions/sessions.'.$phpEx);
|
||||||
include('functions/auth.'.$phpEx);
|
include('functions/auth.'.$phpEx);
|
||||||
include('functions/functions.'.$phpEx);
|
include('functions/functions.'.$phpEx);
|
||||||
include('db.'.$phpEx);
|
include('includes/db.'.$phpEx);
|
||||||
|
|
||||||
// Initalize these variables to keep them safe.
|
// Initalize to keep safe
|
||||||
$user_logged_in = 0;
|
|
||||||
$logged_in = 0;
|
|
||||||
$userdata = Array();
|
$userdata = Array();
|
||||||
|
|
||||||
// Setup forum wide options.
|
// Setup forum wide options.
|
||||||
|
@ -68,7 +67,9 @@ else
|
||||||
$default_lang = $config[0]["default_lang"];
|
$default_lang = $config[0]["default_lang"];
|
||||||
$sys_lang = $default_lang;
|
$sys_lang = $default_lang;
|
||||||
}
|
}
|
||||||
|
|
||||||
include('language/lang_'.$default_lang.'.'.$phpEx);
|
include('language/lang_'.$default_lang.'.'.$phpEx);
|
||||||
|
|
||||||
// Check if user is banned
|
// Check if user is banned
|
||||||
if(!auth("ip ban", $db, "", USER_IP))
|
if(!auth("ip ban", $db, "", USER_IP))
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,53 +22,6 @@
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
// Constants
|
|
||||||
// Debug Level
|
|
||||||
define(DEBUG, 1); // Debugging on
|
|
||||||
//define(DEBUG, 0); // Debugging off
|
|
||||||
|
|
||||||
// User Levels
|
|
||||||
define(ADMIN, 4);
|
|
||||||
define(SUPERMOD, 3);
|
|
||||||
define(MODERATOR, 2);
|
|
||||||
define(USER, 1);
|
|
||||||
define(DELETED, -1);
|
|
||||||
define(ANONYMOUS, -1);
|
|
||||||
|
|
||||||
// Forum access levels
|
|
||||||
define(PUBLIC, 1);
|
|
||||||
define(PRIVATE, 2);
|
|
||||||
|
|
||||||
// Forum posting levels
|
|
||||||
define(ANONALLOWED, 2);
|
|
||||||
define(REGONLY, 1);
|
|
||||||
define(MODONLY, 3);
|
|
||||||
|
|
||||||
// Topic state
|
|
||||||
define(UNLOCKED, 0);
|
|
||||||
define(LOCKED, 1);
|
|
||||||
|
|
||||||
// Ban time types
|
|
||||||
define(SECONDS, 1);
|
|
||||||
define(MINUTES, 2);
|
|
||||||
define(HOURS, 3);
|
|
||||||
define(DAYS, 4);
|
|
||||||
define(YEARS, 5);
|
|
||||||
|
|
||||||
// Error codes
|
|
||||||
define(SQL_CONNECT, 1);
|
|
||||||
define(BANNED, 2);
|
|
||||||
define(QUERY_ERROR, 3);
|
|
||||||
define(SESSION_CREATE, 4);
|
|
||||||
define(NO_TOPICS, 5);
|
|
||||||
define(GENERAL_ERROR, 6);
|
|
||||||
define(LOGIN_FAILED, 7);
|
|
||||||
|
|
||||||
// URL PARAMETERS
|
|
||||||
define(POST_TOPIC_URL, 't');
|
|
||||||
define(POST_FORUM_URL, 'f');
|
|
||||||
define(POST_USERS_URL, 'u');
|
|
||||||
|
|
||||||
// Session data
|
// Session data
|
||||||
$session_cookie = "phpBBsession";
|
$session_cookie = "phpBBsession";
|
||||||
$session_cookie_time = 3600;
|
$session_cookie_time = 3600;
|
||||||
|
@ -81,28 +34,11 @@ $dbuser = "";
|
||||||
$dbpasswd = "";
|
$dbpasswd = "";
|
||||||
|
|
||||||
// Date format (needs to go into DB)
|
// Date format (needs to go into DB)
|
||||||
$date_format = "M d Y h:i:s a";
|
$date_format = "M d Y h:i:s a"; // American datesformat
|
||||||
|
//$date_format = "d-m-Y H:i:s"; // European datesformat
|
||||||
|
|
||||||
// DB table config
|
// DB table prefix
|
||||||
$table_prefix = "phpbb_";
|
$table_prefix = "phpbb_";
|
||||||
define('BANLIST_TABLE', $table_prefix.'banlist');
|
|
||||||
define('CATEGORIES_TABLE', $table_prefix.'categories');
|
|
||||||
define('CONFIG_TABLE', $table_prefix.'config');
|
|
||||||
define('DISALLOW_TABLE', $table_prefix.'disallow');
|
|
||||||
define('FORUM_ACCESS_TABLE', $table_prefix.'forum_access');
|
|
||||||
define('FORUM_MODS_TABLE', $table_prefix.'forum_mods');
|
|
||||||
define('FORUMS_TABLE', $table_prefix.'forums');
|
|
||||||
define('HEADERMETAFOOTER_TABLE', $table_prefix.'headermetafooter');
|
|
||||||
define('POSTS_TABLE', $table_prefix.'posts');
|
|
||||||
define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
|
|
||||||
define('PRIV_MSGS_TABLE', $table_prefix.'priv_msgs');
|
|
||||||
define('RANKS_TABLE', $table_prefix.'ranks');
|
|
||||||
define('SESSIONS_TABLE', $table_prefix.'sessions');
|
|
||||||
define('THEMES_TABLE', $table_prefix.'themes');
|
|
||||||
define('TOPICS_TABLE', $table_prefix.'topics');
|
|
||||||
define('USERS_TABLE', $table_prefix.'users');
|
|
||||||
define('WHOSONLINE_TABLE', $table_prefix.'whosonline');
|
|
||||||
define('WORDS_TABLE', $table_prefix.'words');
|
|
||||||
|
|
||||||
$url_images = "images";
|
$url_images = "images";
|
||||||
$image_quote = "$url_images/quote.gif";
|
$image_quote = "$url_images/quote.gif";
|
||||||
|
|
|
@ -36,7 +36,7 @@ function error_die($db, $error_code = "", $error_msg = "")
|
||||||
{
|
{
|
||||||
include('language/lang_english.'.$phpEx);
|
include('language/lang_english.'.$phpEx);
|
||||||
}
|
}
|
||||||
include('page_header.'.$phpEx);
|
include('includes/page_header.'.$phpEx);
|
||||||
}
|
}
|
||||||
if(!$error_msg)
|
if(!$error_msg)
|
||||||
{
|
{
|
||||||
|
@ -77,7 +77,7 @@ function error_die($db, $error_code = "", $error_msg = "")
|
||||||
$template->set_file(array("error_body" => "error_body.tpl"));
|
$template->set_file(array("error_body" => "error_body.tpl"));
|
||||||
$template->set_var(array("ERROR_MESSAGE" => $error_msg));
|
$template->set_var(array("ERROR_MESSAGE" => $error_msg));
|
||||||
$template->pparse("output", "error_body");
|
$template->pparse("output", "error_body");
|
||||||
include('page_tail.'.$phpEx);
|
include('includes/page_tail.'.$phpEx);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
91
phpBB/includes/constants.php
Normal file
91
phpBB/includes/constants.php
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
<?php
|
||||||
|
/***************************************************************************
|
||||||
|
* includes.php
|
||||||
|
* -------------------
|
||||||
|
* begin : Saturday, Feb 13, 2001
|
||||||
|
* copyright : (C) 2001 The phpBB Group
|
||||||
|
* email : support@phpbb.com
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
// Debug Level
|
||||||
|
define(DEBUG, 1); // Debugging on
|
||||||
|
//define(DEBUG, 0); // Debugging off
|
||||||
|
|
||||||
|
// User Levels
|
||||||
|
define(ADMIN, 4);
|
||||||
|
define(SUPERMOD, 3);
|
||||||
|
define(MODERATOR, 2);
|
||||||
|
define(USER, 1);
|
||||||
|
define(DELETED, -1);
|
||||||
|
define(ANONYMOUS, -1);
|
||||||
|
|
||||||
|
// Forum access levels
|
||||||
|
define(PUBLIC, 1);
|
||||||
|
define(PRIVATE, 2);
|
||||||
|
|
||||||
|
// Forum posting levels
|
||||||
|
define(ANONALLOWED, 2);
|
||||||
|
define(REGONLY, 1);
|
||||||
|
define(MODONLY, 3);
|
||||||
|
|
||||||
|
// Topic state
|
||||||
|
define(UNLOCKED, 0);
|
||||||
|
define(LOCKED, 1);
|
||||||
|
|
||||||
|
// Ban time types
|
||||||
|
define(SECONDS, 1);
|
||||||
|
define(MINUTES, 2);
|
||||||
|
define(HOURS, 3);
|
||||||
|
define(DAYS, 4);
|
||||||
|
define(YEARS, 5);
|
||||||
|
|
||||||
|
// Error codes
|
||||||
|
define(SQL_CONNECT, 1);
|
||||||
|
define(BANNED, 2);
|
||||||
|
define(QUERY_ERROR, 3);
|
||||||
|
define(SESSION_CREATE, 4);
|
||||||
|
define(NO_TOPICS, 5);
|
||||||
|
define(GENERAL_ERROR, 6);
|
||||||
|
define(LOGIN_FAILED, 7);
|
||||||
|
|
||||||
|
// URL PARAMETERS
|
||||||
|
define(POST_TOPIC_URL, 't');
|
||||||
|
define(POST_FORUM_URL, 'f');
|
||||||
|
define(POST_USERS_URL, 'u');
|
||||||
|
|
||||||
|
define('BANLIST_TABLE', $table_prefix.'banlist');
|
||||||
|
define('CATEGORIES_TABLE', $table_prefix.'categories');
|
||||||
|
define('CONFIG_TABLE', $table_prefix.'config');
|
||||||
|
define('DISALLOW_TABLE', $table_prefix.'disallow');
|
||||||
|
define('FORUM_ACCESS_TABLE', $table_prefix.'forum_access');
|
||||||
|
define('FORUM_MODS_TABLE', $table_prefix.'forum_mods');
|
||||||
|
define('FORUMS_TABLE', $table_prefix.'forums');
|
||||||
|
define('HEADERMETAFOOTER_TABLE', $table_prefix.'headermetafooter');
|
||||||
|
define('POSTS_TABLE', $table_prefix.'posts');
|
||||||
|
define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
|
||||||
|
define('PRIV_MSGS_TABLE', $table_prefix.'priv_msgs');
|
||||||
|
define('RANKS_TABLE', $table_prefix.'ranks');
|
||||||
|
define('SESSIONS_TABLE', $table_prefix.'sessions');
|
||||||
|
define('THEMES_TABLE', $table_prefix.'themes');
|
||||||
|
define('TOPICS_TABLE', $table_prefix.'topics');
|
||||||
|
define('USERS_TABLE', $table_prefix.'users');
|
||||||
|
define('WHOSONLINE_TABLE', $table_prefix.'whosonline');
|
||||||
|
define('WORDS_TABLE', $table_prefix.'words');
|
||||||
|
|
||||||
|
?>
|
|
@ -24,6 +24,9 @@
|
||||||
include('extension.inc');
|
include('extension.inc');
|
||||||
include('common.'.$phpEx);
|
include('common.'.$phpEx);
|
||||||
|
|
||||||
|
$pagetype = "index";
|
||||||
|
$page_title = "Forum Index";
|
||||||
|
|
||||||
$total_users = get_user_count($db, "");
|
$total_users = get_user_count($db, "");
|
||||||
$total_posts = get_total_posts($db, "");
|
$total_posts = get_total_posts($db, "");
|
||||||
$newest_userdata = get_newest_user($db, "");
|
$newest_userdata = get_newest_user($db, "");
|
||||||
|
@ -36,9 +39,7 @@ if(empty($viewcat))
|
||||||
$viewcat = -1;
|
$viewcat = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pagetype = "index";
|
include('includes/page_header.'.$phpEx);
|
||||||
$page_title = "Forum Index";
|
|
||||||
include('page_header.'.$phpEx);
|
|
||||||
|
|
||||||
$template->set_block("body", "catrow", "cats");
|
$template->set_block("body", "catrow", "cats");
|
||||||
$template->set_block("catrow", "forumrow", "forums");
|
$template->set_block("catrow", "forumrow", "forums");
|
||||||
|
@ -182,5 +183,5 @@ else
|
||||||
}
|
}
|
||||||
$template->pparse("output", "body");
|
$template->pparse("output", "body");
|
||||||
|
|
||||||
include('page_tail.'.$phpEx);
|
include('includes/page_tail.'.$phpEx);
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -46,125 +46,125 @@ else
|
||||||
switch($mode)
|
switch($mode)
|
||||||
{
|
{
|
||||||
case 'newtopic':
|
case 'newtopic':
|
||||||
if(!isset($forum_id))
|
if(!isset($forum_id))
|
||||||
{
|
{
|
||||||
error_die($db, GENERAL_ERROR, "Sorry, no there is no such forum");
|
error_die($db, GENERAL_ERROR, "Sorry, no there is no such forum");
|
||||||
}
|
}
|
||||||
|
|
||||||
$pagetype = "newtopic";
|
$pagetype = "newtopic";
|
||||||
$page_title = " $l_postnew";
|
$page_title = " $l_postnew";
|
||||||
$sql = "SELECT forum_name, forum_access FROM forums WHERE forum_id = '$forum_id'";
|
$sql = "SELECT forum_name, forum_access FROM forums WHERE forum_id = '$forum_id'";
|
||||||
if(!$result = $db->sql_query($sql))
|
if(!$result = $db->sql_query($sql))
|
||||||
{
|
{
|
||||||
error_die($db, QUERY_ERROR);
|
error_die($db, QUERY_ERROR);
|
||||||
}
|
}
|
||||||
$forum_info = $db->sql_fetchrowset($result);
|
$forum_info = $db->sql_fetchrowset($result);
|
||||||
$forum_name = stripslashes($forum_info[0]["forum_name"]);
|
$forum_name = stripslashes($forum_info[0]["forum_name"]);
|
||||||
$forum_access = $forum_info[0]["forum_access"];
|
$forum_access = $forum_info[0]["forum_access"];
|
||||||
|
|
||||||
if($forum_access == ANONALLOWED)
|
if($forum_access == ANONALLOWED)
|
||||||
{
|
{
|
||||||
$about_posting = "$l_anonusers $l_inthisforum $l_anonhint";
|
$about_posting = "$l_anonusers $l_inthisforum $l_anonhint";
|
||||||
}
|
}
|
||||||
if($forum_access == REGONLY)
|
if($forum_access == REGONLY)
|
||||||
{
|
{
|
||||||
$about_posting = "$l_regusers $l_inthisforum";
|
$about_posting = "$l_regusers $l_inthisforum";
|
||||||
}
|
}
|
||||||
if($forum_access == MODONLY)
|
if($forum_access == MODONLY)
|
||||||
{
|
{
|
||||||
$about_posting = "$l_modusers $l_inthisforum";
|
$about_posting = "$l_modusers $l_inthisforum";
|
||||||
}
|
}
|
||||||
|
|
||||||
include('page_header.'.$phpEx);
|
include('includes/page_header.'.$phpEx);
|
||||||
if($user_logged_in)
|
if($user_logged_in)
|
||||||
{
|
{
|
||||||
$username_input = $userdata["username"];
|
$username_input = $userdata["username"];
|
||||||
$password_input = "";
|
$password_input = "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!isset($username))
|
if(!isset($username))
|
||||||
{
|
{
|
||||||
$username = $userdata["username"];
|
$username = $userdata["username"];
|
||||||
}
|
}
|
||||||
$username_input = '<input type="text" name="username" value="'.$username.'" size="25" maxlength="50">';
|
$username_input = '<input type="text" name="username" value="'.$username.'" size="25" maxlength="50">';
|
||||||
$password_input = '<input type="password" name="password" size="25" maxlenght="40">';
|
$password_input = '<input type="password" name="password" size="25" maxlenght="40">';
|
||||||
}
|
}
|
||||||
$subject_input = '<input type="text" name="subject" value="'.$subject.'" size="50" maxlenght="255">';
|
$subject_input = '<input type="text" name="subject" value="'.$subject.'" size="50" maxlenght="255">';
|
||||||
$message_input = '<textarea name="message" rows="10" cols="35" wrap="virtual">'.$message.'</textarea>';
|
$message_input = '<textarea name="message" rows="10" cols="35" wrap="virtual">'.$message.'</textarea>';
|
||||||
if($allow_html)
|
if($allow_html)
|
||||||
{
|
{
|
||||||
$html_status = $l_htmlis . " " . $l_on;
|
$html_status = $l_htmlis . " " . $l_on;
|
||||||
$html_toggle = '<input type="checkbox" name="disable_html" ';
|
$html_toggle = '<input type="checkbox" name="disable_html" ';
|
||||||
if($disable_html)
|
if($disable_html)
|
||||||
{
|
{
|
||||||
$html_toggle .= 'checked';
|
$html_toggle .= 'checked';
|
||||||
}
|
}
|
||||||
$html_toggle .= "> $l_disable $l_html $l_onthispost";
|
$html_toggle .= "> $l_disable $l_html $l_onthispost";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$html_status = $l_htmlis . " " . $l_off;
|
$html_status = $l_htmlis . " " . $l_off;
|
||||||
}
|
}
|
||||||
if($allow_bbcode)
|
if($allow_bbcode)
|
||||||
{
|
{
|
||||||
$bbcode_status = $l_bbcodeis . " " . $l_on;
|
$bbcode_status = $l_bbcodeis . " " . $l_on;
|
||||||
$bbcode_toggle = '<input type="checkbox" name="disable_bbcode" ';
|
$bbcode_toggle = '<input type="checkbox" name="disable_bbcode" ';
|
||||||
if($disable_bbcode)
|
if($disable_bbcode)
|
||||||
{
|
{
|
||||||
$bbcode_toggle .= "checked";
|
$bbcode_toggle .= "checked";
|
||||||
}
|
}
|
||||||
$bbcode_toggle .= "> $l_disable $l_bbcode $l_onthispost";
|
$bbcode_toggle .= "> $l_disable $l_bbcode $l_onthispost";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$bbcode_status = $l_bbcodeis . " " . $l_off;
|
$bbcode_status = $l_bbcodeis . " " . $l_off;
|
||||||
}
|
}
|
||||||
|
|
||||||
$smile_toggle = '<input type="checkbox" name="disable_smile" ';
|
$smile_toggle = '<input type="checkbox" name="disable_smile" ';
|
||||||
if($disable_smile)
|
if($disable_smile)
|
||||||
{
|
{
|
||||||
$smile_toggle .= "checked";
|
$smile_toggle .= "checked";
|
||||||
}
|
}
|
||||||
$smile_toggle .= "> $l_disable $l_smilies $l_onthispost";
|
$smile_toggle .= "> $l_disable $l_smilies $l_onthispost";
|
||||||
|
|
||||||
$sig_toggle = '<input type="checkbox" name="attach_sig" ';
|
$sig_toggle = '<input type="checkbox" name="attach_sig" ';
|
||||||
if($attach_sig || $userdata["attach_sig"] == 1)
|
if($attach_sig || $userdata["attach_sig"] == 1)
|
||||||
{
|
{
|
||||||
$sig_toggle .= "checked";
|
$sig_toggle .= "checked";
|
||||||
}
|
}
|
||||||
$sig_toggle .= "> $l_attachsig";
|
$sig_toggle .= "> $l_attachsig";
|
||||||
|
|
||||||
$notify_toggle = '<input type="checkbox" name="notify" ';
|
$notify_toggle = '<input type="checkbox" name="notify" ';
|
||||||
if($notify || $userdata["always_notify"] == 1)
|
if($notify || $userdata["always_notify"] == 1)
|
||||||
{
|
{
|
||||||
$notify_toggle .= "checked";
|
$notify_toggle .= "checked";
|
||||||
}
|
}
|
||||||
$notify_toggle .= "> $l_notify";
|
$notify_toggle .= "> $l_notify";
|
||||||
|
|
||||||
|
|
||||||
$template->set_var(array("L_ABOUTPOST" => $l_aboutpost,
|
$template->set_var(array("L_ABOUTPOST" => $l_aboutpost,
|
||||||
"L_SUBJECT" => $l_subject,
|
"L_SUBJECT" => $l_subject,
|
||||||
"L_MESSAGEBODY" => $l_body,
|
"L_MESSAGEBODY" => $l_body,
|
||||||
"L_OPTIONS" => $l_options,
|
"L_OPTIONS" => $l_options,
|
||||||
"L_PREVIEW" => $l_preview,
|
"L_PREVIEW" => $l_preview,
|
||||||
"L_SUBMIT" => $l_submit,
|
"L_SUBMIT" => $l_submit,
|
||||||
"L_CANCEL" => $l_cancelpost,
|
"L_CANCEL" => $l_cancelpost,
|
||||||
"MODE" => $mode,
|
"MODE" => $mode,
|
||||||
"ABOUT_POSTING" => $about_posting,
|
"ABOUT_POSTING" => $about_posting,
|
||||||
"USERNAME_INPUT" => $username_input,
|
"USERNAME_INPUT" => $username_input,
|
||||||
"PASSWORD_INPUT" => $password_input,
|
"PASSWORD_INPUT" => $password_input,
|
||||||
"SUBJECT_INPUT" => $subject_input,
|
"SUBJECT_INPUT" => $subject_input,
|
||||||
"MESSAGE_INPUT" => $message_input,
|
"MESSAGE_INPUT" => $message_input,
|
||||||
"HTML_STATUS" => $html_status,
|
"HTML_STATUS" => $html_status,
|
||||||
"HTML_TOGGLE" => $html_toggle,
|
"HTML_TOGGLE" => $html_toggle,
|
||||||
"SMILE_TOGGLE" => $smile_toggle,
|
"SMILE_TOGGLE" => $smile_toggle,
|
||||||
"SIG_TOGGLE" => $sig_toggle,
|
"SIG_TOGGLE" => $sig_toggle,
|
||||||
"NOTIFY_TOGGLE" => $notify_toggle,
|
"NOTIFY_TOGGLE" => $notify_toggle,
|
||||||
"BBCODE_TOGGLE" => $bbcode_toggle,
|
"BBCODE_TOGGLE" => $bbcode_toggle,
|
||||||
"BBCODE_STATUS" => $bbcode_status));
|
"BBCODE_STATUS" => $bbcode_status));
|
||||||
$template->pparse("output", "body");
|
$template->pparse("output", "body");
|
||||||
include('page_tail.'.$phpEx);
|
include('includes/page_tail.'.$phpEx);
|
||||||
break;
|
break;
|
||||||
case 'reply':
|
case 'reply':
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
include('extension.inc');
|
include('extension.inc');
|
||||||
include('common.'.$phpEx);
|
include('common.'.$phpEx);
|
||||||
|
|
||||||
|
$pagetype = "viewforum";
|
||||||
|
$page_title = "View Forum - $forum_name";
|
||||||
|
|
||||||
// Check if the user has acutally sent a forum ID with his/her request
|
// Check if the user has acutally sent a forum ID with his/her request
|
||||||
// If not give them a nice error page.
|
// If not give them a nice error page.
|
||||||
if(isset($forum_id))
|
if(isset($forum_id))
|
||||||
|
@ -68,9 +71,8 @@ for($x = 0; $x < $db->sql_numrows($result); $x++)
|
||||||
$forum_moderators .= ", ";
|
$forum_moderators .= ", ";
|
||||||
$forum_moderators .= "<a href=\"profile.$phpEx?mode=viewprofile&user_id=".$forum_row[$x]["user_id"]."\">".$forum_row[$x]["username"]."</a>";
|
$forum_moderators .= "<a href=\"profile.$phpEx?mode=viewprofile&user_id=".$forum_row[$x]["user_id"]."\">".$forum_row[$x]["username"]."</a>";
|
||||||
}
|
}
|
||||||
$pagetype = "viewforum";
|
|
||||||
$page_title = "View Forum - $forum_name";
|
include('includes/page_header.'.$phpEx);
|
||||||
include('page_header.'.$phpEx);
|
|
||||||
|
|
||||||
$template->set_block("body", "topicrow", "topics");
|
$template->set_block("body", "topicrow", "topics");
|
||||||
|
|
||||||
|
@ -150,6 +152,6 @@ else
|
||||||
error_die($db, NO_POSTS);
|
error_die($db, NO_POSTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
include('page_tail.'.$phpEx);
|
include('includes/page_tail.'.$phpEx);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* viewtopic.php
|
* viewtopic.php
|
||||||
* -------------------
|
* -------------------
|
||||||
* begin : Saturday, Feb 13, 2001
|
* begin : Saturday, Feb 13, 2001
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* copyright : (C) 2001 The phpBB Group
|
||||||
|
@ -23,6 +23,9 @@
|
||||||
include('extension.inc');
|
include('extension.inc');
|
||||||
include('common.'.$phpEx);
|
include('common.'.$phpEx);
|
||||||
|
|
||||||
|
$page_title = "View Topic - $topic_title";
|
||||||
|
$topic_title = stripslashes($topic_info[0]["topic_title"]);
|
||||||
|
|
||||||
if(!isset($HTTP_GET_VARS['topic'])) // For backward compatibility
|
if(!isset($HTTP_GET_VARS['topic'])) // For backward compatibility
|
||||||
{
|
{
|
||||||
$topic_id = $HTTP_GET_VARS[POST_TOPIC_URL];
|
$topic_id = $HTTP_GET_VARS[POST_TOPIC_URL];
|
||||||
|
@ -73,11 +76,9 @@ for($x = 0; $x < $total_rows; $x++)
|
||||||
// Add checking for private forums here
|
// Add checking for private forums here
|
||||||
//
|
//
|
||||||
|
|
||||||
$page_title = "View Topic - $topic_title";
|
|
||||||
$topic_title = stripslashes($topic_info[0]["topic_title"]);
|
|
||||||
$total_replies = $topic_info[0]["topic_replies"] + 1;
|
$total_replies = $topic_info[0]["topic_replies"] + 1;
|
||||||
$pagetype = "viewtopic";
|
$pagetype = "viewtopic";
|
||||||
include('page_header.'.$phpEx);
|
include('includes/page_header.'.$phpEx);
|
||||||
|
|
||||||
if(!isset($start))
|
if(!isset($start))
|
||||||
{
|
{
|
||||||
|
@ -252,6 +253,6 @@ $template->set_var(array("PAGES" => $pages,
|
||||||
|
|
||||||
$template->pparse("output", array("posts", "body"));
|
$template->pparse("output", array("posts", "body"));
|
||||||
|
|
||||||
include('page_tail.'.$phpEx);
|
include('includes/page_tail.'.$phpEx);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue