mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-08 00:25:19 +02:00
Updates related to message.php and transaction update
git-svn-id: file:///svn/phpbb/trunk@547 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
356f845abc
commit
bed1d3ab9a
@ -65,6 +65,7 @@ include('includes/auth.'.$phpEx);
|
|||||||
include('includes/functions.'.$phpEx);
|
include('includes/functions.'.$phpEx);
|
||||||
include('includes/db.'.$phpEx);
|
include('includes/db.'.$phpEx);
|
||||||
|
|
||||||
|
|
||||||
// Obtain and encode users IP
|
// Obtain and encode users IP
|
||||||
//$get_user_ip = ;
|
//$get_user_ip = ;
|
||||||
$user_ip = encode_ip(($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR);
|
$user_ip = encode_ip(($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR);
|
||||||
@ -89,7 +90,7 @@ if(!$result = $db->sql_query($sql))
|
|||||||
$board_config['default_lang'] = "english";
|
$board_config['default_lang'] = "english";
|
||||||
$board_config['gzip_compress'] = 0;
|
$board_config['gzip_compress'] = 0;
|
||||||
|
|
||||||
message_die(SQL_QUERY, "Could not query config information", "", __LINE__, __FILE__);
|
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -37,8 +37,8 @@ define(USER, 0);
|
|||||||
define(ADMIN, 1);
|
define(ADMIN, 1);
|
||||||
|
|
||||||
// Topic state
|
// Topic state
|
||||||
define(UNLOCKED, 0);
|
define(TOPIC_UNLOCKED, 0);
|
||||||
define(LOCKED, 1);
|
define(TOPIC_LOCKED, 1);
|
||||||
|
|
||||||
// Topic types
|
// Topic types
|
||||||
define(POST_NORMAL, 0);
|
define(POST_NORMAL, 0);
|
||||||
@ -46,22 +46,22 @@ define(POST_STICKY, 1);
|
|||||||
define(POST_ANNOUNCE, 2);
|
define(POST_ANNOUNCE, 2);
|
||||||
define(POST_GLOBAL_ANNOUNCE, 3);
|
define(POST_GLOBAL_ANNOUNCE, 3);
|
||||||
|
|
||||||
// Ban time types
|
// SQL codes
|
||||||
define(SECONDS, 1);
|
define(BEGIN_TRANSACTION, 1);
|
||||||
define(MINUTES, 2);
|
define(END_TRANSACTION, 2);
|
||||||
define(HOURS, 3);
|
|
||||||
define(DAYS, 4);
|
|
||||||
define(YEARS, 5);
|
|
||||||
|
|
||||||
// Error codes
|
// Error codes
|
||||||
|
define(GENERAL_MESSAGE, 200);
|
||||||
|
define(GENERAL_ERROR, 202);
|
||||||
|
define(CRITICAL_MESSAGE, 203);
|
||||||
|
define(CRITICAL_ERROR, 204);
|
||||||
|
|
||||||
define(SQL_CONNECT, 1);
|
define(SQL_CONNECT, 1);
|
||||||
define(BANNED, 2);
|
define(BANNED, 2);
|
||||||
define(QUERY_ERROR, 3);
|
define(QUERY_ERROR, 3);
|
||||||
define(SESSION_CREATE, 4);
|
define(SESSION_CREATE, 4);
|
||||||
define(NO_TOPICS, 5);
|
define(NO_TOPICS, 5);
|
||||||
define(GENERAL_ERROR, 6);
|
|
||||||
define(LOGIN_FAILED, 7);
|
define(LOGIN_FAILED, 7);
|
||||||
define(GENERAL_MESSAGE, 10);
|
|
||||||
|
|
||||||
// Private messaging
|
// Private messaging
|
||||||
define(PRIVMSGS_READ_MAIL, 0);
|
define(PRIVMSGS_READ_MAIL, 0);
|
||||||
@ -128,7 +128,8 @@ define('GROUPS_TABLE', $table_prefix.'groups');
|
|||||||
define('POSTS_TABLE', $table_prefix.'posts');
|
define('POSTS_TABLE', $table_prefix.'posts');
|
||||||
define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
|
define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
|
||||||
define('PRIVMSGS_TABLE', $table_prefix.'privmsgs');
|
define('PRIVMSGS_TABLE', $table_prefix.'privmsgs');
|
||||||
define('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');
|
define('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');
|
||||||
|
define('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');
|
||||||
define('RANKS_TABLE', $table_prefix.'ranks');
|
define('RANKS_TABLE', $table_prefix.'ranks');
|
||||||
define('SESSIONS_TABLE', $table_prefix.'session');
|
define('SESSIONS_TABLE', $table_prefix.'session');
|
||||||
define('THEMES_TABLE', $table_prefix.'themes');
|
define('THEMES_TABLE', $table_prefix.'themes');
|
||||||
@ -137,4 +138,5 @@ define('USER_GROUP_TABLE', $table_prefix.'user_group');
|
|||||||
define('USERS_TABLE', $table_prefix.'users');
|
define('USERS_TABLE', $table_prefix.'users');
|
||||||
define('WORDS_TABLE', $table_prefix.'words');
|
define('WORDS_TABLE', $table_prefix.'words');
|
||||||
define('PRUNE_TABLE', $table_prefix.'forum_prune');
|
define('PRUNE_TABLE', $table_prefix.'forum_prune');
|
||||||
?>
|
|
||||||
|
?>
|
@ -42,10 +42,9 @@ switch($dbms)
|
|||||||
|
|
||||||
// Make the database connection.
|
// Make the database connection.
|
||||||
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
|
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
|
||||||
if(!$db)
|
if(!$db->db_connect_id)
|
||||||
{
|
{
|
||||||
$db_error = $db->sql_error();
|
message_die(CRITICAL_ERROR, "Could not connect to the database");
|
||||||
error_die(SQL_CONNECT, $db_error['message']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user