diff --git a/signup.php b/signup.php
index 6faef4e10..d4c03f964 100644
--- a/signup.php
+++ b/signup.php
@@ -2,7 +2,7 @@
/*
* e107 website system
*
- * Copyright (C) 2008-2013 e107 Inc (e107.org)
+ * Copyright (C) 2008-2014 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
@@ -10,13 +10,13 @@
*
*/
-
require_once("class2.php");
if(vartrue($_POST['email2'])) // spam-trap.
{
exit;
}
+
$qs = explode(".", e_QUERY);
if($qs[0] != 'activate')
@@ -34,8 +34,7 @@ e107::js('core', 'jquery.mailcheck.min.js','jquery',2);
include_once(e_HANDLER.'user_extended_class.php');
$usere = new e107_user_extended;
-// require_once(e_HANDLER.'calendar/calendar_class.ph_');
-// $cal = new DHTML_Calendar(true);
+
require_once(e_HANDLER.'validator_class.php');
// require_once(e_HANDLER.'user_handler.php');
$userMethods = e107::getUserSession();
@@ -43,8 +42,6 @@ $userMethods->deleteExpired(); // Delete time-expired partial registrations
require_once(e107::coreTemplatePath('signup')); //correct way to load a core template.
-//include_once(e_CORE.'shortcodes/batch/signup_shortcodes.php');
-
$signup_shortcodes = e107::getScBatch('signup');
// $facebook_shortcodes = e107::getScBatch('facebook',TRUE);
@@ -53,7 +50,6 @@ $text = '';
$extraErrors = array();
$error = FALSE;
-
//-------------------------------
// Resend Activation Email
//-------------------------------
@@ -61,13 +57,13 @@ if((e_QUERY == 'resend') && !USER && ($pref['user_reg_veri'] == 1))
{
require_once(HEADERF);
- $clean_email = $tp -> toDB($_POST['resend_email']);
+ $clean_email = $tp->toDB($_POST['resend_email']);
if(!check_email($clean_email))
{
$clean_email = "xxx";
}
- $new_email = $tp -> toDB(varset($_POST['resend_newemail'], ''));
+ $new_email = $tp->toDB(varset($_POST['resend_newemail'], ''));
if(!check_email($new_email ))
{
$new_email = FALSE;
@@ -79,35 +75,35 @@ if((e_QUERY == 'resend') && !USER && ($pref['user_reg_veri'] == 1))
// 'resend_newemail' - corrected email address
// 'resend_password' - password (required if changing email address)
- if($_POST['resend_email'] && !$new_email && $clean_email && $sql->db_Select_gen("SELECT * FROM #user WHERE user_ban=0 AND user_sess='' AND (`user_loginname`= '".$clean_email."' OR `user_name` = '".$clean_email."' OR `user_email` = '".$clean_email."' ) "))
+ if($_POST['resend_email'] && !$new_email && $clean_email && $sql->select_gen("SELECT * FROM #user WHERE user_ban=0 AND user_sess='' AND (`user_loginname`= '".$clean_email."' OR `user_name` = '".$clean_email."' OR `user_email` = '".$clean_email."' ) "))
{ // Account already activated
- $ns -> tablerender(LAN_SIGNUP_40,LAN_SIGNUP_41."
");
+ $ns->tablerender(LAN_SIGNUP_40,LAN_SIGNUP_41."
");
require_once(FOOTERF);
exit();
}
// Start by looking up the user
- if(!$sql->db_Select("user", "*", "(`user_loginname` = '".$clean_email."' OR `user_name` = '".$clean_email."' OR `user_email` = '".$clean_email."' ) AND `user_ban`=".USER_REGISTERED_NOT_VALIDATED." AND `user_sess` !='' LIMIT 1"))
+ if(!$sql->select("user", "*", "(`user_loginname` = '".$clean_email."' OR `user_name` = '".$clean_email."' OR `user_email` = '".$clean_email."' ) AND `user_ban`=".USER_REGISTERED_NOT_VALIDATED." AND `user_sess` !='' LIMIT 1"))
{
message_handler("ALERT",LAN_SIGNUP_64.': '.$clean_email); // email (or other info) not valid.
require_once(FOOTERF);
exit();
}
- $row = $sql -> db_Fetch();
+ $row = $sql -> fetch();
// We should have a user record here
if(trim($_POST['resend_password']) !="" && $new_email)
{ // Need to change the email address - check password to make sure
if ($userMethods->CheckPassword($_POST['resend_password'], $row['user_loginname'], $row['user_password']) === TRUE)
{
- if ($sql->db_select('user', 'user_id, user_email', "user_email='".$new_email."'"))
+ if ($sql->select('user', 'user_id, user_email', "user_email='".$new_email."'"))
{ // Email address already used by someone
message_handler("ALERT",LAN_SIGNUP_106); // Duplicate email
require_once(FOOTERF);
exit();
}
- if($sql->db_Update("user", "user_email='".$new_email."' WHERE user_id = '".$row['user_id']."' LIMIT 1 "))
+ if($sql->update("user", "user_email='".$new_email."' WHERE user_id = '".$row['user_id']."' LIMIT 1 "))
{
$row['user_email'] = $new_email;
}
@@ -133,12 +129,12 @@ if((e_QUERY == 'resend') && !USER && ($pref['user_reg_veri'] == 1))
if(!sendemail($row['user_email'], $eml['subject'], $eml['message'], $row['user_name'], "", "", $eml['attachments'], $eml['cc'], $eml['bcc'], $returnpath, $returnreceipt,$eml['inline-images']))
{
- $ns -> tablerender(LAN_ERROR,LAN_SIGNUP_42);
+ $ns->tablerender(LAN_ERROR,LAN_SIGNUP_42);
$do_log['signup_result'] = LAN_SIGNUP_62;
}
else
{
- $ns -> tablerender(LAN_SIGNUP_43,LAN_SIGNUP_44." ".$row['user_email']." - ".LAN_SIGNUP_45."
");
+ $ns->tablerender(LAN_SIGNUP_43,LAN_SIGNUP_44." ".$row['user_email']." - ".LAN_SIGNUP_45."
");
$do_log['signup_result'] = LAN_SIGNUP_61;
}
// Now log this (log will ignore if its disabled)
@@ -147,7 +143,8 @@ if((e_QUERY == 'resend') && !USER && ($pref['user_reg_veri'] == 1))
exit;
}
elseif(!$_POST['submit_resend'])
- { // Display form to get info from user
+ {
+ // Display form to get info from user
$text .= "