mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02:00
User registration works.
git-svn-id: file:///svn/phpbb/trunk@106 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -24,64 +24,63 @@
|
||||
|
||||
function error_die($db, $error_code = "", $error_msg = "")
|
||||
{
|
||||
global $template, $phpEx, $default_lang;
|
||||
|
||||
if(!$template->get("overall_header"))
|
||||
{
|
||||
if(!empty($default_lang))
|
||||
{
|
||||
include('language/lang_'.$default_lang.'.'.$phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
include('language/lang_english.'.$phpEx);
|
||||
}
|
||||
include('includes/page_header.'.$phpEx);
|
||||
}
|
||||
if(!$error_msg)
|
||||
{
|
||||
switch($error_code)
|
||||
global $template, $phpEx, $default_lang;
|
||||
if(!defined("HEADER_INC"))
|
||||
{
|
||||
case GENERAL_ERROR:
|
||||
if(!$error_msg)
|
||||
{
|
||||
$error_msg = "An Error Occured";
|
||||
}
|
||||
break;
|
||||
case SQL_CONNECT:
|
||||
$db_error = $db->sql_error();
|
||||
$error_msg = "Error: phpBB could not connect to the database. Reason: " . $db_error["message"];
|
||||
break;
|
||||
case BANNED:
|
||||
$error_msg = "You have been banned from this forum.";
|
||||
break;
|
||||
case QUERY_ERROR:
|
||||
$db_error = $db->sql_error();
|
||||
$error_msg = "Error: phpBB could not query the database. Reason: " . $db_error["message"];
|
||||
break;
|
||||
case SESSION_CREATE:
|
||||
$error_msg = "Error creating session. Could not log you in. Please go back and try again.";
|
||||
break;
|
||||
case NO_POSTS:
|
||||
$error_msg = "There are no posts in this forum. Click on the 'Post New Topic' link on this page to post one.";
|
||||
break;
|
||||
case LOGIN_FAILED:
|
||||
$error_msg = "Login Failed. You have specified an incorrect username or password, please go back and try again.";
|
||||
break;
|
||||
if(!empty($default_lang))
|
||||
{
|
||||
include('language/lang_'.$default_lang.'.'.$phpEx);
|
||||
}
|
||||
else
|
||||
{
|
||||
include('language/lang_english.'.$phpEx);
|
||||
}
|
||||
include('includes/page_header.'.$phpEx);
|
||||
}
|
||||
}
|
||||
if(DEBUG)
|
||||
{
|
||||
//$error_msg .= "<br>Line number: ".__LINE__."<br>In File: ".__FILE__;
|
||||
}
|
||||
$template->set_file(array("error_body" => "error_body.tpl"));
|
||||
$template->set_var(array("ERROR_MESSAGE" => $error_msg));
|
||||
$template->pparse("output", "error_body");
|
||||
include('includes/page_tail.'.$phpEx);
|
||||
exit();
|
||||
if(!$error_msg)
|
||||
{
|
||||
switch($error_code)
|
||||
{
|
||||
case GENERAL_ERROR:
|
||||
if(!$error_msg)
|
||||
{
|
||||
$error_msg = "An Error Occured";
|
||||
}
|
||||
break;
|
||||
case SQL_CONNECT:
|
||||
$db_error = $db->sql_error();
|
||||
$error_msg = "Error: phpBB could not connect to the database. Reason: " . $db_error["message"];
|
||||
break;
|
||||
case BANNED:
|
||||
$error_msg = "You have been banned from this forum.";
|
||||
break;
|
||||
case QUERY_ERROR:
|
||||
$db_error = $db->sql_error();
|
||||
$error_msg = "Error: phpBB could not query the database. Reason: " . $db_error["message"];
|
||||
break;
|
||||
case SESSION_CREATE:
|
||||
$error_msg = "Error creating session. Could not log you in. Please go back and try again.";
|
||||
break;
|
||||
case NO_POSTS:
|
||||
$error_msg = "There are no posts in this forum. Click on the 'Post New Topic' link on this page to post one.";
|
||||
break;
|
||||
case LOGIN_FAILED:
|
||||
$error_msg = "Login Failed. You have specified an incorrect/inactive username or invalid password, please go back and try again.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(DEBUG)
|
||||
{
|
||||
//$error_msg .= "<br>Line number: ".__LINE__."<br>In File: ".__FILE__;
|
||||
}
|
||||
$template->set_filenames(array("error_body" => "error_body.tpl"));
|
||||
$template->assign_vars(array("ERROR_MESSAGE" => $error_msg));
|
||||
$template->pparse("error_body");
|
||||
include('includes/page_tail.'.$phpEx);
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user