// First we only check the submitted data then we continue... :)
//
// Did he agree to our Terms Of Usage?
- if ($_POST['agree'] != 'Y')
+ if ($_POST['agree'] != "Y")
{
$_POST['agree'] = "!";
$FAILED = true;
// Do this check only when no admin is logged in
foreach ($_POST['cat'] as $id=>$answer)
{
- if ($answer == 'Y') $cats++;
+ if ($answer == "Y") $cats++;
}
if ($cats < $_CONFIG['least_cats'])
{
$FAILED = true;
}
}
- if (($_POST['addy'] != "!") && ($_CONFIG['check_double_email'] == 'Y') && (!IS_ADMIN()))
+ if (($_POST['addy'] != "!") && ($_CONFIG['check_double_email'] == "Y") && (!IS_ADMIN()))
{
// Does the email address already exists in our database?
$CHK = SEARCH_EMAIL_USERTAB($_POST['addy']);
}
// Test the refid (because some strange hackers... :-P)
- $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0)
{
if (GET_EXT_VERSION("beg") >= "0.1.7")
{
// Okay, shall I disable now?
- if ($_CONFIG['beg_new_mem_notify'] == 'N')
+ if ($_CONFIG['beg_new_mem_notify'] == "N")
{
$ADD1 .= ", beg_ral_notify, beg_ral_en_notify";
$ADD2 .= ", UNIX_TIMESTAMP(), UNIX_TIMESTAMP()";
if (GET_EXT_VERSION("bonus") >= "0.7.7")
{
// Okay, shall I disable now?
- if ($_CONFIG['bonus_new_mem_notify'] == 'N')
+ if ($_CONFIG['bonus_new_mem_notify'] == "N")
{
$ADD1 .= ", bonus_ral_notify, bonus_ral_en_notify";
$ADD2 .= ", UNIX_TIMESTAMP(), UNIX_TIMESTAMP()";
//////////////////////////////
//
$result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_data (sex, surname, family, street_nr, %s, zip, city, email, birth_day, birth_month, birth_year, password, max_mails, receive_mails, refid, status, user_hash, REMOTE_ADDR, joined, last_update".$ADD1.")
-VALUES ('%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %d, '%s', %d, %d, %d, 'UNCONFIRMED', '%s', '%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()".$ADD2.")",
+VALUES ('%s', '%s', '%s', '%s', '%s', %s, '%s', '%s', %s, %s, %s, '%s', %s, %s, %s, 'UNCONFIRMED', '%s', '%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()".$ADD2.")",
array(
$countryRow,
SQL_ESCAPE(substr($_POST['sex'], 0, 1)),
$userid = bigintval($userid);
// Write his welcome-points
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_points WHERE userid=%d AND ref_depth=0 LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s AND ref_depth=0 LIMIT 1",
array(bigintval($userid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0)
{
// Add only when the line was not found (maybe some more secure?)
$locked = "points";
if ($_CONFIG['ref_payout'] > 0) $locked = "locked_points"; // Pay him later. First he has to confirm some mails!
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid, ref_depth, ".$locked.") VALUES(%d, 0, '%s')",
+ $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid, ref_depth, ".$locked.") VALUES(%s, 0, '%s')",
array(bigintval($userid), $_CONFIG['points_register']), __FILE__, __LINE__);
// Update mediadata as well
// Write catgories
if ((is_array($_POST['cat'])) && (count($_POST['cat']))) {
foreach ($_POST['cat'] as $cat=>$joined) {
- if ($joined == 'Y') {
+ if ($joined == "Y") {
// Insert category entry
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_cats (userid, cat_id) VALUES (%d, %d)",
+ $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_cats (userid, cat_id) VALUES (%s, %s)",
array(bigintval($userid), bigintval($cat)), __FILE__, __LINE__);
}
}
break;
default:
- $DATA['birthday'] = bigintval($_POST['month']."/".bigintval($_POST['day'])."/".bigintval($_POST['year']);
+ $DATA['birthday'] = bigintval($_POST['month'])."/".bigintval($_POST['day'])."/".bigintval($_POST['year']);
break;
}
$DATA['email'] = $EMAIL;
// Send mail to admin
- if (GET_EXT_VERSION("admins") >= "0.4.1")
- {
- // Use new system
- SEND_ADMIN_EMAILS_PRO(ADMIN_NEW_ACCOUNT, "register-admin", $DATA, $userid);
- }
- else
- {
- // Use old system
- $msg_admin = LOAD_EMAIL_TEMPLATE("register-admin", $DATA, $userid);
- SEND_ADMIN_EMAILS (ADMIN_NEW_ACCOUNT, $msg_admin);
- }
+ SEND_ADMIN_NOTIFICATION(ADMIN_NEW_ACCOUNT, "register-admin", $DATA, $userid);
// Output success registration
LOAD_TEMPLATE("admin_settings_saved", false, REGISTRATION_DONE);
}
// Shall I display the refid or shall I make it editable?
- if ($_CONFIG['display_refid'] == 'Y') {
+ if ($_CONFIG['display_refid'] == "Y") {
// Load template to enter it
define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid", true, $GLOBALS['refid']));
} else {