mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Fixed some hard coded referances to table names
git-svn-id: file:///svn/phpbb/trunk@169 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
9468f91ea0
commit
26f5fb7dfc
2 changed files with 72 additions and 72 deletions
|
@ -1,48 +1,48 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* posting.php
|
* posting.php
|
||||||
* -------------------
|
* -------------------
|
||||||
* begin : Saturday, Feb 13, 2001
|
* begin : Saturday, Feb 13, 2001
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* copyright : (C) 2001 The phpBB Group
|
||||||
* email : support@phpbb.com
|
* email : support@phpbb.com
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
include('extension.inc');
|
include('extension.inc');
|
||||||
include('common.'.$phpEx);
|
include('common.'.$phpEx);
|
||||||
|
|
||||||
if($submit && !$preview)
|
if($submit && !$preview)
|
||||||
{
|
{
|
||||||
switch($mode)
|
switch($mode)
|
||||||
{
|
{
|
||||||
case 'newtopic':
|
case 'newtopic':
|
||||||
echo "Dave likes to submit<br>";
|
echo "Dave likes to submit<br>";
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'reply':
|
case 'reply':
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'editpost':
|
case 'editpost':
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
switch($mode)
|
switch($mode)
|
||||||
{
|
{
|
||||||
case 'newtopic':
|
case 'newtopic':
|
||||||
|
@ -50,10 +50,10 @@ else
|
||||||
{
|
{
|
||||||
error_die(GENERAL_ERROR, "Sorry, no there is no such forum");
|
error_die(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_TABLE." WHERE forum_id = '$forum_id'";
|
||||||
if(!$result = $db->sql_query($sql))
|
if(!$result = $db->sql_query($sql))
|
||||||
{
|
{
|
||||||
error_die(SQL_QUERY, "Could not obtain forum/forum access information.", __LINE__, __FILE__);
|
error_die(SQL_QUERY, "Could not obtain forum/forum access information.", __LINE__, __FILE__);
|
||||||
|
@ -61,7 +61,7 @@ else
|
||||||
$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";
|
||||||
|
@ -74,7 +74,7 @@ else
|
||||||
{
|
{
|
||||||
$about_posting = "$l_modusers $l_inthisforum";
|
$about_posting = "$l_modusers $l_inthisforum";
|
||||||
}
|
}
|
||||||
|
|
||||||
include('includes/page_header.'.$phpEx);
|
include('includes/page_header.'.$phpEx);
|
||||||
if($user_logged_in)
|
if($user_logged_in)
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ else
|
||||||
{
|
{
|
||||||
$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';
|
||||||
}
|
}
|
||||||
|
@ -120,29 +120,29 @@ 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->assign_vars(array("L_ABOUTPOST" => $l_aboutpost,
|
$template->assign_vars(array("L_ABOUTPOST" => $l_aboutpost,
|
||||||
"L_SUBJECT" => $l_subject,
|
"L_SUBJECT" => $l_subject,
|
||||||
"L_MESSAGEBODY" => $l_body,
|
"L_MESSAGEBODY" => $l_body,
|
||||||
|
@ -167,10 +167,10 @@ else
|
||||||
include('includes/page_tail.'.$phpEx);
|
include('includes/page_tail.'.$phpEx);
|
||||||
break;
|
break;
|
||||||
case 'reply':
|
case 'reply':
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'editpost':
|
case 'editpost':
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* profile.php
|
* profile.php
|
||||||
* -------------------
|
* -------------------
|
||||||
* begin : Saturday, Feb 13, 2001
|
* begin : Saturday, Feb 13, 2001
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* copyright : (C) 2001 The phpBB Group
|
||||||
* email : support@phpbb.com
|
* email : support@phpbb.com
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
include('extension.inc');
|
include('extension.inc');
|
||||||
include('common.'.$phpEx);
|
include('common.'.$phpEx);
|
||||||
|
@ -37,19 +37,19 @@ init_userprefs($userdata);
|
||||||
switch($mode)
|
switch($mode)
|
||||||
{
|
{
|
||||||
case 'viewprofile':
|
case 'viewprofile':
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'editprofile':
|
case 'editprofile':
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'register':
|
case 'register':
|
||||||
|
|
||||||
$pagetype = "register";
|
$pagetype = "register";
|
||||||
$page_title = "$l_register";
|
$page_title = "$l_register";
|
||||||
include('includes/page_header.'.$phpEx);
|
include('includes/page_header.'.$phpEx);
|
||||||
|
|
||||||
if(!isset($agreed))
|
if(!isset($agreed))
|
||||||
{
|
{
|
||||||
$template->pparse("body");
|
$template->pparse("body");
|
||||||
include('includes/page_tail.'.$phpEx);
|
include('includes/page_tail.'.$phpEx);
|
||||||
|
@ -83,12 +83,12 @@ switch($mode)
|
||||||
$error_msg .= $l_mismatch;
|
$error_msg .= $l_mismatch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($submit) && !$error)
|
if(isset($submit) && !$error)
|
||||||
{
|
{
|
||||||
// The AUTO_INCREMENT field in MySQL v3.23 dosan't work correctly when there is a row with
|
// The AUTO_INCREMENT field in MySQL v3.23 dosan't work correctly when there is a row with
|
||||||
// -1 in that field so we have to explicitly get the next user ID.
|
// -1 in that field so we have to explicitly get the next user ID.
|
||||||
$sql = "SELECT max(user_id) AS total FROM users";
|
$sql = "SELECT max(user_id) AS total FROM ".USERS_TABLE;
|
||||||
if($result = $db->sql_query($sql))
|
if($result = $db->sql_query($sql))
|
||||||
{
|
{
|
||||||
$user_id_row = $db->sql_fetchrow($result);
|
$user_id_row = $db->sql_fetchrow($result);
|
||||||
|
@ -99,8 +99,8 @@ switch($mode)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
error_die(SQL_QUERY, "Couldn't obtained next user_id information.", __LINE__, __FILE__);
|
error_die(SQL_QUERY, "Couldn't obtained next user_id information.", __LINE__, __FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
$md_pass = md5($password);
|
$md_pass = md5($password);
|
||||||
$sql = "INSERT INTO ".USERS_TABLE." (
|
$sql = "INSERT INTO ".USERS_TABLE." (
|
||||||
user_id,
|
user_id,
|
||||||
|
@ -115,7 +115,7 @@ switch($mode)
|
||||||
user_intrest,
|
user_intrest,
|
||||||
user_sig,
|
user_sig,
|
||||||
user_viewemail,
|
user_viewemail,
|
||||||
user_theme,
|
user_theme,
|
||||||
user_aim,
|
user_aim,
|
||||||
user_yim,
|
user_yim,
|
||||||
user_msnm,
|
user_msnm,
|
||||||
|
@ -172,12 +172,12 @@ switch($mode)
|
||||||
$msg = $l_coppa;
|
$msg = $l_coppa;
|
||||||
$email_msg = $l_welcomecoppa;
|
$email_msg = $l_welcomecoppa;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$msg = $l_accountadded;
|
$msg = $l_accountadded;
|
||||||
$email_msg = $l_welcomeemail;
|
$email_msg = $l_welcomeemail;
|
||||||
}
|
}
|
||||||
if(!$coppa)
|
if(!$coppa)
|
||||||
{
|
{
|
||||||
mail($email, $l_welcomesubj, $email_msg, "From: $email_from\r\n");
|
mail($email, $l_welcomesubj, $email_msg, "From: $email_from\r\n");
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ switch($mode)
|
||||||
$error_msg .= "<br>Query: $sql";
|
$error_msg .= "<br>Query: $sql";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if($error)
|
if($error)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue