// 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']);
{
// Not found so we set your refid!
$_POST['refid'] = $_CONFIG['def_refid'];
- @setcookie("refid", $_CONFIG['def_refid'], (time() + $_CONFIG['online_timeout']), COOKIE_PATH);
+ set_session("refid", $_CONFIG['def_refid']);
}
// Free memory
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()";
// 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)",
array(bigintval($userid), bigintval($cat)), __FILE__, __LINE__);
'hash' => $hash,
'uid' => $userid,
'salut' => $sex,
- 'surname' => $_POST['surname'],
- 'family' => $_POST['family_name'],
- 'email' => $_POST['addy'],
- 'street' => $_POST['street_nr'],
- 'city' => $_POST['city'],
+ 'surname' => SQL_ESCAPE($_POST['surname']),
+ 'family' => SQL_ESCAPE($_POST['family_name']),
+ 'email' => SQL_ESCAPE($_POST['addy']),
+ 'street' => SQL_ESCAPE($_POST['street_nr']),
+ 'city' => SQL_ESCAPE($_POST['city']),
'zip' => bigintval($_POST['zip']),
'country' => $countryData,
- 'refid' => $_POST['refid'],
- 'pass' => $_POST['pass1'],
+ 'refid' => SQL_ESCAPE($_POST['refid']),
+ 'pass' => SQL_ESCAPE($_POST['pass1']),
);
// Continue with birthday...
switch (GET_LANGUAGE())
{
case "de":
- $DATA['birthday'] = $_POST['day'].".".$_POST['month'].".".$_POST['year'];
+ $DATA['birthday'] = bigintval($_POST['day']).".".bigintval($_POST['month']).".".bigintval($_POST['year']);
break;
default:
- $DATA['birthday'] = $_POST['month']."/".$_POST['day']."/".$_POST['year'];
+ $DATA['birthday'] = bigintval($_POST['month'])."/".bigintval($_POST['day'])."/".bigintval($_POST['year']);
break;
}
}
// Adds a table for the guests with all visible categories
- define ('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE("guest", true));
+ define('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE("guest", true));
// Adds maximum receiveable mails list... :)
- define ('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST("guest", "", true));
+ define('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST("guest", "", true));
// Check if nickname extension is active and get state if nickname is selected or userid
$nick = false;
// Is the nickname valid?
if (!$nick) {
// Nope, disable it
- if (GET_EXT_VERSION("sql_patches") != "") {
+ if (GET_EXT_VERSION("sql_patches") != '') {
// Use default refid
$GLOBALS['refid'] = $_CONFIG['def_refid'];
} else {
}
// 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 {
// Load "hide" form template
- define ('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid']));
+ define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid']));
}
// You may want to modify the register_header.tpl.xx file and not this script when you add your scripts etc. :-)