diff --git a/phpBB/common.php b/phpBB/common.php
index d8348fb50d..96ef85220d 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -63,6 +63,8 @@ else
$email_sig = stripslashes($config[0]["email_sig"]);
$email_from = $config[0]["email_from"];
$default_lang = $config[0]["default_lang"];
+ $require_activation = $config[0]["require_activation"];
+ $sys_timezone = $config[0]["system_timezone"];
$sys_lang = $default_lang;
}
diff --git a/phpBB/config.php b/phpBB/config.php
index 067141b3da..733e65986d 100644
--- a/phpBB/config.php
+++ b/phpBB/config.php
@@ -29,9 +29,9 @@ $session_cookie_time = 3600;
// DB connection config
$dbms = "mysql";
$dbhost = "localhost";
-$dbname = "phpbb2";
-$dbuser = "phpbb2";
-$dbpasswd = "bbphp2bb";
+$dbname = "";
+$dbuser = "";
+$dbpasswd = "";
// Date format (needs to go into DB)
$date_format = "M d Y h:i:s a"; // American datesformat
diff --git a/phpBB/db/mysql_schema.sql b/phpBB/db/mysql_schema.sql
index 289dbfb01c..e3a2dfb89d 100644
--- a/phpBB/db/mysql_schema.sql
+++ b/phpBB/db/mysql_schema.sql
@@ -46,6 +46,7 @@ CREATE TABLE phpbb_config (
allow_bbcode tinyint(3),
allow_sig tinyint(3),
allow_namechange tinyint(3),
+ require_activation tinyint(3),
selected int(2) DEFAULT '0' NOT NULL,
posts_per_page int(10),
hot_threshold int(10),
@@ -54,6 +55,7 @@ CREATE TABLE phpbb_config (
override_themes tinyint(3),
email_sig varchar(255),
email_from varchar(100),
+ system_timezone varchar(4),
default_lang varchar(255),
PRIMARY KEY (config_id),
UNIQUE selected (selected)
@@ -298,6 +300,8 @@ CREATE TABLE phpbb_users (
user_rank int(10) DEFAULT '0',
user_level int(10) DEFAULT '1',
user_lang varchar(255),
+ user_timezone varchar(4),
+ user_active tinyint(3),
user_actkey varchar(32),
user_newpasswd varchar(32),
user_notify tinyint(3),
diff --git a/phpBB/functions/auth.php b/phpBB/functions/auth.php
index 6f355e2316..9de568bcc9 100644
--- a/phpBB/functions/auth.php
+++ b/phpBB/functions/auth.php
@@ -33,88 +33,91 @@
*/
function auth($type, $db, $id = "", $user_ip = "")
{
- global $userdata;
- switch($type)
- {
- case 'ip ban':
- $sql = "DELETE FROM ".BANLIST_TABLE."
- WHERE (ban_end < ". mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")).")
- AND (ban_end > 0)";
- $db->sql_query($sql);
- $sql = "SELECT ban_ip FROM ".BANLIST_TABLE;
- if($result = $db->sql_query($sql))
- {
- if($totalrows = $db->sql_numrows($result))
- {
- $iprow = $db->sql_fetchrowset($result);
- for($x = 0; $x < $totalrows; $x++)
- {
- $ip = $iprow[$x]["ban_ip"];
- if($ip[strlen($ip) - 1] == ".")
- {
- $db_ip = explode(".", $ip);
- $this_ip = explode(".", $user_ip);
-
- for($x = 0; $x < count($db_ip) - 1; $x++)
- {
- $my_ip .= $this_ip[$x] . ".";
- }
-
- if($my_ip == $ip)
- {
- return(FALSE);
- }
- }
- else
- {
- if($ipuser == $ip)
- {
- return(FALSE);
- }
- }
- }
- return(TRUE);
- }
- else
- {
- return(TRUE);
- }
- }
- return(TRUE);
- break;
- case 'username ban':
- $sql = "DELETE FROM ".BANLIST_TABLE."
- WHERE (ban_end < ". mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")).")
- AND (ban_end > 0)";
- $db->sql_query($sql);
- $sql = "SELECT ban_userid FROM ".BANLIST_TABLE." WHERE ban_userid = '$user_id'";
- if($result = $db->sql_query($sql))
- {
- if($db->sql_numrows($result))
- {
- return(FALSE);
- }
- else
- {
- return(TRUE);
- }
- }
- else
- {
- return(TRUE);
- }
- break;
- case 'login':
- global $password;
- if($userdata["user_password"] != md5($password))
- {
- return(FALSE);
- }
- else
- {
- return(TRUE);
- }
- }
+ global $userdata;
+ switch($type)
+ {
+ case 'ip ban':
+ $sql = "DELETE FROM ".BANLIST_TABLE."
+ WHERE (ban_end < ". mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")).")
+ AND (ban_end > 0)";
+ $db->sql_query($sql);
+ $sql = "SELECT ban_ip FROM ".BANLIST_TABLE;
+ if($result = $db->sql_query($sql))
+ {
+ if($totalrows = $db->sql_numrows($result))
+ {
+ $iprow = $db->sql_fetchrowset($result);
+ for($x = 0; $x < $totalrows; $x++)
+ {
+ $ip = $iprow[$x]["ban_ip"];
+ if($ip[strlen($ip) - 1] == ".")
+ {
+ $db_ip = explode(".", $ip);
+ $this_ip = explode(".", $user_ip);
+
+ for($x = 0; $x < count($db_ip) - 1; $x++)
+ {
+ $my_ip .= $this_ip[$x] . ".";
+ }
+ if($my_ip == $ip)
+ {
+ return(FALSE);
+ }
+ }
+ else
+ {
+ if($ipuser == $ip)
+ {
+ return(FALSE);
+ }
+ }
+ }
+ return(TRUE);
+ }
+ else
+ {
+ return(TRUE);
+ }
+ }
+ return(TRUE);
+ break;
+ case 'username ban':
+ $sql = "DELETE FROM ".BANLIST_TABLE."
+ WHERE (ban_end < ". mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")).")
+ AND (ban_end > 0)";
+ $db->sql_query($sql);
+ $sql = "SELECT ban_userid FROM ".BANLIST_TABLE." WHERE ban_userid = '$user_id'";
+ if($result = $db->sql_query($sql))
+ {
+ if($db->sql_numrows($result))
+ {
+ return(FALSE);
+ }
+ else
+ {
+ return(TRUE);
+ }
+ }
+ else
+ {
+ return(TRUE);
+ }
+ break;
+ case 'login':
+ global $password;
+ if($userdata["user_password"] != md5($password))
+ {
+ return(FALSE);
+ }
+ else if($userdata["user_active"] == 0)
+ {
+ return(FALSE);
+ }
+ else
+ {
+ return(TRUE);
+ }
+ }
}
@@ -124,41 +127,41 @@ function auth($type, $db, $id = "", $user_ip = "")
function get_userdata_from_id($userid, $db)
{
- $sql = "SELECT * FROM ".USERS_TABLE." WHERE user_id = $userid";
- if(!$result = $db->sql_query($sql))
- {
- $userdata = array("error" => "1");
- return ($userdata);
- }
- if($db->sql_numrows($result))
- {
- $myrow = $db->sql_fetchrowset($result);
- return($myrow[0]);
- }
- else
- {
- $userdata = array("error" => "1");
- return ($userdata);
- }
+ $sql = "SELECT * FROM ".USERS_TABLE." WHERE user_id = $userid";
+ if(!$result = $db->sql_query($sql))
+ {
+ $userdata = array("error" => "1");
+ return ($userdata);
+ }
+ if($db->sql_numrows($result))
+ {
+ $myrow = $db->sql_fetchrowset($result);
+ return($myrow[0]);
+ }
+ else
+ {
+ $userdata = array("error" => "1");
+ return ($userdata);
+ }
}
function get_userdata($username, $db) {
- $sql = "SELECT * FROM ".USERS_TABLE." WHERE username = '$username' AND user_level != ".DELETED;
- if(!$result = $db->sql_query($sql))
- {
- $userdata = array("error" => "1");
- }
+ $sql = "SELECT * FROM ".USERS_TABLE." WHERE username = '$username' AND user_level != ".DELETED;
+ if(!$result = $db->sql_query($sql))
+ {
+ $userdata = array("error" => "1");
+ }
- if($db->sql_numrows($result))
- {
- $myrow = $db->sql_fetchrowset($result);
- return($myrow[0]);
- }
- else
- {
- $userdata = array("error" => "1");
- return ($userdata);
- }
+ if($db->sql_numrows($result))
+ {
+ $myrow = $db->sql_fetchrowset($result);
+ return($myrow[0]);
+ }
+ else
+ {
+ $userdata = array("error" => "1");
+ return ($userdata);
+ }
}
?>
diff --git a/phpBB/functions/error.php b/phpBB/functions/error.php
index 14f9e14073..d8027e1fad 100644
--- a/phpBB/functions/error.php
+++ b/phpBB/functions/error.php
@@ -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 .= " Line number: ".__LINE__." 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 .= " Line number: ".__LINE__." 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();
}
-
-
+
+
?>
diff --git a/phpBB/functions/functions.php b/phpBB/functions/functions.php
index 53e3cd8114..0e5341d2e6 100644
--- a/phpBB/functions/functions.php
+++ b/phpBB/functions/functions.php
@@ -117,4 +117,162 @@ function make_jumpbox($db)
return($boxstring);
}
-?>
+function language_select($default, $name="language", $dirname="language/")
+{
+ global $phpEx;
+ $dir = opendir($dirname);
+ $lang_select = "\n";
+ closedir($dir);
+ return $lang_select;
+}
+
+function theme_select($default, $db)
+{
+ $sql = "SELECT theme_id, theme_name FROM ".THEMES_TABLE." ORDER BY theme_name";
+ if($result = $db->sql_query($sql))
+ {
+ $num = $db->sql_numrows($result);
+ $rowset = $db->sql_fetchrowset($result);
+ $theme_select = "\n";
+ }
+ else
+ {
+ $theme_select = "";
+ }
+ return($theme_select);
+}
+
+function tz_select($default)
+{
+ global $board_tz;
+ if(!isset($default))
+ {
+ $default == $board_tz;
+ }
+ $tz_select = "\n";
+ return($tz_select);
+}
+
+function validate_username(&$username, $db)
+{
+ $username = trim($username);
+ $username = strip_tags($username);
+ $username = htmlspecialchars($username);
+ if(empty($username))
+ {
+ return(FALSE);
+ }
+
+ $valid_name = TRUE;
+ $sql = "SELECT LOWER(username) FROM ".USERS_TABLE." WHERE username = '$username'";
+ if($result = $db->sql_query($sql))
+ {
+ if( ($numrows = $db->sql_numrows($result) ) > 0)
+ {
+ $valid_name = FALSE;
+ }
+ }
+
+ $sql = "SELECT disallow_username FROM ".DISALLOW_TABLE." WHERE disallow_username = '$username'";
+ if($result = $db->sql_query($sql))
+ {
+ if(($numrows = $db->sql_numrows($result)) > 0)
+ {
+ $valid_name = FALSE;
+ }
+ }
+
+ return($valid_name);
+}
+function generate_activation_key()
+{
+ $chars = array(
+ "a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J",
+ "k","K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T",
+ "u","U","v","V","w","W","x","X","y","Y","z","Z","1","2","3","4","5","6","7","8",
+ "9","0"
+ );
+ $max_elements = count($chars) - 1;
+ srand((double)microtime()*1000000);
+ $act_key = $chars[rand(0,$max_elements)];
+ $act_key .= $chars[rand(0,$max_elements)];
+ $act_key .= $chars[rand(0,$max_elements)];
+ $act_key .= $chars[rand(0,$max_elements)];
+ $act_key .= $chars[rand(0,$max_elements)];
+ $act_key .= $chars[rand(0,$max_elements)];
+ $act_key .= $chars[rand(0,$max_elements)];
+ $act_key .= $chars[rand(0,$max_elements)];
+ $act_key_md = md5($act_key);
+
+ return($act_key_md);
+}
+?>
\ No newline at end of file
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index c4cddbf6c2..1d3feb4c3b 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -70,7 +70,7 @@ define(POST_FORUM_URL, 'f');
define(POST_USERS_URL, 'u');
define('BANLIST_TABLE', $table_prefix.'banlist');
-define('CATEGORIES_TABLE', $table_prefix.'categories');
+define('CATEGORIES_TABLE', $table_prefix.'catagories');
define('CONFIG_TABLE', $table_prefix.'config');
define('DISALLOW_TABLE', $table_prefix.'disallow');
define('FORUM_ACCESS_TABLE', $table_prefix.'forum_access');
diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php
index d108ce0916..35841cb682 100644
--- a/phpBB/includes/page_header.php
+++ b/phpBB/includes/page_header.php
@@ -22,6 +22,8 @@
*
***************************************************************************/
+DEFINE(HEADER_INC, TRUE);
+
// Parse and show the overall header.
$template->set_filenames(array("overall_header" => "overall_header.tpl",
"overall_footer" => "overall_footer.tpl"));
@@ -131,6 +133,21 @@ switch($pagetype)
"L_POSTNEWIN" => $l_postnewin));
$template->pparse("header");
break;
+ case 'register':
+ if(!isset($agreed))
+ {
+ if(!isset($coppa))
+ {
+ $coppa = FALSE;
+ }
+ $template->set_filenames(array("body" => "agreement.tpl"));
+ $template->assign_vars(array("COPPA" => $coppa));
+ }
+ else
+ {
+ $template->set_filenames(array("body" => "profile_add_body.tpl"));
+ }
+ break;
}
?>
diff --git a/phpBB/includes/template.inc b/phpBB/includes/template.inc
index 1255937aeb..fd25a0cbfb 100644
--- a/phpBB/includes/template.inc
+++ b/phpBB/includes/template.inc
@@ -1,7 +1,26 @@
$l_mailingaddress Or fax it to: $l_faxinfo Once this information has been recived your account will be activated by the administrator and you will recive and email notification.";
+$l_acountadded = "Thank you for registering with $sitename. Your account has been successfully created.";
+$l_nowactive = "Your account is now been activated. You may login and post with this account. Thank you for using $sitename forums.";
$l_notfilledin = "Error - you did not fill in all the required fields.";
-$l_invalidname = "The username you chose \"$username\" has been taken.";
-$l_disallowname = "The username you chose, \"$username\" has been disallowed by the administrator.";
+$l_invalidname = "The username you chose \"$username\" has been taken or has been disallowed by the administrator.";
$l_welcomesubj = "Welcome to $sitename Forums";
$l_welcomemail =
@@ -217,10 +222,36 @@ Thank you for registering.
$email_sig
";
+
+$l_welcomeemailactivate =
+"
+$l_welcomesubj,
+
+Please keep this email for your records.
+
+
+Your account information is as follows:
+
+----------------------------
+Username: $username
+Password: $password
+----------------------------
+
+Your account is currently INACTIVE. You cannot use it until you visit the following link:
+http://$SERVER_NAME$PHP_SELF?mode=activate&act_key=$act_key
+
+Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you.
+However, should you forget your password we provide an easy to use script to generate and email a new, random, password.
+
+Thank you for registering.
+
+$email_sig
+";
+
$l_beenadded = "You have been added to the database.";
$l_thankregister= "Thank you for registering!";
$l_useruniq = "Must be unique. No two users can have the same Username.";
-$l_storecookie = "Store my username in a cookie for 1 year.";
+$l_storecookie = "Store my username in a cookie for 1 year";
// Prefs
$l_prefupdated = "$l_preferences updated. $l_click $l_here $l_returnindex";
@@ -235,7 +266,7 @@ $l_boardtheme = "Board Theme";
$l_boardlang = "Board Language";
$l_nothemes = "No Themes In database";
$l_saveprefs = "Save $l_preferences";
-
+$l_timezone = "Timezone";
// Search
$l_searchterms = "Keywords";
$l_searchany = "Search for ANY of the terms (Default)";
diff --git a/phpBB/login.php b/phpBB/login.php
index 8d35255036..bb59dd5acc 100644
--- a/phpBB/login.php
+++ b/phpBB/login.php
@@ -28,30 +28,30 @@ if($submit)
{
$userdata = get_userdata($username, $db);
if($userdata["error"])
- {
- error_die($db, LOGIN_FAILED);
- }
+ {
+ error_die($db, LOGIN_FAILED);
+ }
else
- {
- if(!auth("login", $db))
- {
- error_die($db, LOGIN_FAILED);
- }
- else
- {
- $sessid = new_session($userdata[user_id], $user_ip, $session_cookie_time, $db);
- set_session_cookie($sessid, $session_cookie_time, $session_cookie, "", "", 0);
- header("Location: index.$phpEx");
- }
- }
+ {
+ if(!auth("login", $db))
+ {
+ error_die($db, LOGIN_FAILED);
+ }
+ else
+ {
+ $sessid = new_session($userdata[user_id], $user_ip, $session_cookie_time, $db);
+ set_session_cookie($sessid, $session_cookie_time, $session_cookie, "", "", 0);
+ header("Location: index.$phpEx");
+ }
+ }
}
else if($logout)
{
- if($user_logged_in)
- {
- end_user_session($userdata["user_id"], $db);
- }
- header("Location: index.$phpEx");
+ if($user_logged_in)
+ {
+ end_user_session($userdata["user_id"], $db);
+ }
+ header("Location: index.$phpEx");
}
?>
diff --git a/phpBB/profile.php b/phpBB/profile.php
index b4278d1182..2b49c57ac2 100644
--- a/phpBB/profile.php
+++ b/phpBB/profile.php
@@ -1,6 +1,6 @@
+ $pagetype = "register";
+ $page_title = "$l_register";
+ include('includes/page_header.'.$phpEx);
+
+ if(!isset($agreed))
+ {
+ $template->pparse("body");
+ include('includes/page_tail.'.$phpEx);
+ }
+ else
+ {
+ if(isset($submit))
+ {
+ $error = FALSE;
+ if(empty($username) || empty($password) || empty($password_confirm) || empty($email))
+ {
+ $error = TRUE;
+ $error_msg = $l_notfilledin;
+ }
+ if(isset($username) && (!validate_username($username, $db)))
+ {
+ $error = TRUE;
+ if(isset($error_msg))
+ {
+ $error_msg .= " ";
+ }
+ $error_msg .= $l_invalidname;
+ }
+ if(isset($password) && ($password != $password_confirm))
+ {
+ $error = TRUE;
+ if(isset($error_msg))
+ {
+ $error_msg .= " ";
+ }
+ $error_msg .= $l_mismatch;
+ }
+ }
+
+ if(isset($submit) && !$error)
+ {
+ $md_pass = md5($password);
+ $sql = "INSERT INTO ".USERS_TABLE." (
+ username,
+ user_regdate,
+ user_password,
+ user_email,
+ user_icq,
+ user_website,
+ user_occ,
+ user_from,
+ user_intrest,
+ user_sig,
+ user_viewemail,
+ user_theme,
+ user_aim,
+ user_yim,
+ user_msnm,
+ user_attachsig,
+ user_desmile,
+ user_html,
+ user_bbcode,
+ user_timezone,
+ user_lang,
+ user_active,
+ user_actkey)
+ VALUES (
+ '".addslashes($username)."',
+ '".time()."',
+ '$md_pass',
+ '$email',
+ '$icq',
+ '".addslashes($website)."',
+ '".addslashes($occ)."',
+ '".addslashes($from)."',
+ '".addslashes($intrest)."',
+ '".addslashes($sig)."',
+ '$viewemail',
+ '$theme',
+ '".addslashes($aim)."',
+ '".addslashes($yim)."',
+ '".addslashes($msn)."',
+ '$alwayssig',
+ '$alwayssmile',
+ '$alwayshtml',
+ '$alwaysbbcode',
+ '$timezone',
+ '$lang',
+ ";
+ if($require_activation || $coppa)
+ {
+ $act_key = generate_activation_key();
+ $sql .= "0, '$act_key')";
+ }
+ else
+ {
+ $sql .= "1, '')";
+ }
+ if($result = $db->sql_query($sql))
+ {
+ if($require_activation)
+ {
+ $msg = $l_accountinactive;
+ $email_msg = $l_welcomeemailactivate;
+ }
+ else if($coppa)
+ {
+ $msg = $l_coppa;
+ }
+ else
+ {
+ $msg = $l_accountadded;
+ $email_msg = $l_welcomeemail;
+ }
+ mail($email, $l_welcomesubj, $email_msg, "From: $email_from\r\n");
+ error_die($db, GENERAL_ERROR, $msg);
+ }
+
+ }
+ if($error)
+ {
+ $template->set_filenames(array("reg_header" => "error_body.tpl"));
+ $template->assign_vars(array("ERROR_MESSAGE" => $error_msg));
+ $template->pparse("reg_header");
+ }
+ if(!isset($coppa))
+ {
+ $coppa = FALSE;
+ }
+ $template->assign_vars(array("COPPA" => $coppa,
+ "L_SUBMIT" => $l_submit,
+ "USERNAME" => $username,
+ "EMAIL" => $email,
+ "YIM" => $yim,
+ "ICQ" => $icq,
+ "MSN" => $msn,
+ "AIM" => $aim,
+ "OCC" => $occ,
+ "INTERESTS" => $interests,
+ "FROM" => $from,
+ "WEBSITE" => $website,
+ "SIG" => $sig,
+ "VIEWEMAIL_YES" => ($viewemail) ? "CHECKED" : "",
+ "VIEWEMAIL_NO" => (!$viewemail) ? "CHECKED" : "",
+ "STOREUSERNAME_YES" => (!isset($storeusername) || $storeusername == 1) ? "CHECKED" : "",
+ "STOREUSERNAME_NO" => (isset($storeusername) && $storeusername == 0) ? "CHECKED" : "",
+ "ALWAYSSIG_YES" => ($alwayssig) ? "CHECKED" : "",
+ "ALWAYSSIG_NO" => (!$alwayssig) ? "CHECKED" : "",
+ "ALWAYSBBCODE_YES" => ($alwaysbbcode) ? "CHECKED" : "",
+ "ALWAYSBBCODE_NO" => (!$alwaysbbcode) ? "CHECKED" : "",
+ "ALWAYSHTML_YES" => ($alwayshtml) ? "CHECKED" : "",
+ "ALWAYSHTML_NO" => (!$alwayshtml) ? "CHECKED" : "",
+ "ALWAYSSMILE_YES" => ($alwayssmile) ? "CHECKED" : "",
+ "ALWAYSSMILE_NO" => (!$alwayssmile) ? "CHECKED" : "",
+ "LANGUAGE_SELECT" => language_select($default_lang, "lang"),
+ "THEME_SELECT" => theme_select($theme, $db),
+ "TIMEZONE_SELECT" => tz_select($timezone),
+ "L_ICQNUMBER" => $l_icqnumber,
+ "L_STORECOOKIE" => $l_storecookie,
+ "L_MESSENGER" => $l_messenger,
+ "L_YAHOO" => $l_yahoo,
+ "L_WEBSITE" => $l_website,
+ "L_AIM" => $l_aim,
+ "L_FROM" => $l_from,
+ "L_OCC" => $l_occupation,
+ "L_ALWAYSSMILE" => $l_alwayssmile,
+ "L_BOARDLANG" => $l_boardlang,
+ "L_BOARDTHEME" => $l_boardtheme,
+ "L_TIMEZONE" => $l_timezone,
+ "L_YES" => $l_yes,
+ "L_NO" => $l_no,
+ "L_INTERESTS" => $l_interests,
+ "L_USERUNIQ" => $l_useruniq,
+ "L_ALWAYSBBCODE" => $l_alwaysbbcode,
+ "L_ALWAYSHTML" => $l_alwayshtml,
+ "L_ALWAYSSIG" => $l_alwayssig,
+ "L_SIGNATURE" => $l_signature,
+ "L_SIGEXPLAIN" => $l_sigexplain,
+ "L_PREFERENCES" => $l_preferences,
+ "L_PUBLICMAIL" => $l_publicmail,
+ "L_ITEMSREQ" => $l_itemsreq,
+ "MODE" => $mode,
+ "L_REGINFO" => $l_reginfo,
+ "L_PROFILEINFO" => $l_profileinfo,
+ "L_CONFIRM" => $l_confirm,
+ "L_EMAILADDRESS" => $l_emailaddress));
+ $template->pparse("body");
+ include('includes/page_tail.'.$phpEx);
+ }
+ break;
+ case 'activate':
+ $sql = "SELECT user_id FROM ".USERS_TABLE." WHERE user_actkey = '$act_key'";
+ if($result = $db->sql_query($sql))
+ {
+ if($num = $db->sql_numrows($result))
+ {
+ $rowset = $db->sql_fetchrowset($result);
+ $sql_update = "UPDATE ".USERS_TABLE." SET user_active = 1, user_actkey = '' WHERE user_id = ".$rowset[0]["user_id"];
+ if($result = $db->sql_query($sql_update))
+ {
+ error_die($db, GENERAL_ERROR, $l_nowactive);
+ }
+ else
+ {
+ error_die($db, QUERY_ERROR);
+ }
+ }
+ else
+ {
+ error_die($db, GENERAL_ERROR, $l_wrongactiv);
+ }
+ }
+ else
+ {
+ error_die($db, QUERY_ERROR);
+ }
+ break;
+}
+
+?>
\ No newline at end of file
diff --git a/phpBB/templates/Default/agreement.tpl b/phpBB/templates/Default/agreement.tpl
new file mode 100755
index 0000000000..99ba618abe
--- /dev/null
+++ b/phpBB/templates/Default/agreement.tpl
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
{SITENAME} Forums Registration Agreement
+
+
+
+ Registration to this forum is free! We do insist that you abide by the rules and policies detailed below.
+ If you agree to the terms, please press the Agree button at the end of the page.
+
+ Although the administrators and moderators of phpBB.com will attempt to keep all objectionable messages off this forum,
+ it is impossible for us to review all messages. All messages express the views of the author, the owners of phpBB.com
+ will be held responsible for the content of any message.
+
+ By clicking the Agree button, you warrant that you will not post any messages that are obscene, vulgar, sexually-orientated,
+ hateful, threatening, or otherwise violative of any laws.
+
+ The owners of phpBB.com and the moderators of this forum have the right to remove, edit, move or close any thread for any reason.
+
+