function aggiungiutente() { global $SITENAME, $SITEEMAIL, $BASEURL, $VALIDATION, $USERLANG, $USE_IMAGECODE, $TABLE_PREFIX, $XBTT_USE, $language, $THIS_BASEPATH, $FORUMLINK, $db_prefix; $utente = mysql_escape_string($_POST["user"]); $pwd = mysql_escape_string($_POST["pwd"]); $pwd1 = mysql_escape_string($_POST["pwd1"]); $email = mysql_escape_string($_POST["email"]); $idlangue = intval($_POST["language"]); $idstyle = intval($_POST["style"]); $idflag = intval($_POST["flag"]); $timezone = intval($_POST["timezone"]); if (strtoupper($utente) == strtoupper("Guest")) { err_msg($language["ERROR"], $language["ERR_GUEST_EXISTS"]); stdfoot(); exit; } if ($pwd != $pwd1) { err_msg($language["ERROR"], $language["DIF_PASSWORDS"]); stdfoot(); exit; } if ($VALIDATION == "none") { $idlevel = 3; } else { $idlevel = 2; } # Create Random number $floor = 100000; $ceiling = 999999; srand((double) microtime() * 1000000); $random = rand($floor, $ceiling); if ($utente == "" || $pwd == "" || $email == "") { return -1; exit; } $res = do_sqlquery("SELECT email FROM {$TABLE_PREFIX}users WHERE email='{$email}'"); if (mysql_num_rows($res) > 0) { return -2; exit; } // valid email check - by vibes $regex = "^[_+a-z0-9-]+(\\.[_+a-z0-9-]+)*" . "@[a-z0-9-]+(\\.[a-z0-9-]{1,})*" . "\\.([a-z]{2,}){1}\$"; if (!eregi($regex, $email)) { return -3; exit; } // valid email check end // duplicate username $res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE username='******'"); if (mysql_num_rows($res) > 0) { return -4; exit; } // duplicate username if (strpos(mysql_escape_string($utente), " ") == true) { return -7; exit; } if ($USE_IMAGECODE) { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $public = $_POST['public_key']; $private = $_POST['private_key']; $p = new ocr_captcha(); if ($p->check_captcha($public, $private) != true) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } $bannedchar = array("\\", "/", ":", "*", "?", "\"", "@", "\$", "'", "`", ",", ";", ".", "<", ">", "!", "£", "%", "^", "&", "(", ")", "+", "=", "#", "~"); if (straipos(mysql_escape_string($utente), $bannedchar) == true) { return -8; exit; } if (strlen(mysql_real_escape_string($pwd)) < 4) { return -9; exit; } $pid = md5(uniqid(rand(), true)); do_sqlquery("INSERT INTO {$TABLE_PREFIX}users (username, password, random, id_level, email, style, language, flag, joined, lastconnect, pid, time_offset) VALUES ('{$utente}', '" . md5($pwd) . "', {$random}, {$idlevel}, '{$email}', {$idstyle}, {$idlangue}, {$idflag}, NOW(), NOW(),'{$pid}', '" . $timezone . "')", true); $newuid = mysql_insert_id(); // Continue to create smf members if they disable smf mode // $test=do_sqlquery("SELECT COUNT(*) FROM {$db_prefix}members"); $test = do_sqlquery("SHOW TABLES LIKE '{$db_prefix}members'"); if ($FORUMLINK == "smf" || mysql_num_rows($test)) { $smfpass = smf_passgen($utente, $pwd); $flevel = $idlevel + 10; do_sqlquery("INSERT INTO {$db_prefix}members (memberName, dateRegistered, ID_GROUP, realName, passwd, emailAddress, memberIP, memberIP2, is_activated, passwordSalt) VALUES ('{$utente}', UNIX_TIMESTAMP(), {$flevel}, '{$utente}', '{$smfpass['0']}', '{$email}', '" . getip() . "', '" . getip() . "', 1, '{$smfpass['1']}')"); $fid = mysql_insert_id(); do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = {$fid} WHERE `variable` = 'latestMember'"); do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = '{$utente}' WHERE `variable` = 'latestRealName'"); do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = UNIX_TIMESTAMP() WHERE `variable` = 'memberlist_updated'"); do_sqlquery("UPDATE {$TABLE_PREFIX}users SET smf_fid={$fid} WHERE id={$newuid}"); } // xbt if ($XBTT_USE) { $resin = do_sqlquery("INSERT INTO xbt_users (uid, torrent_pass) VALUES ({$newuid},'{$pid}')"); } if ($VALIDATION == "user") { ini_set("sendmail_from", ""); if (mysql_errno() == 0) { send_mail($email, $language["ACCOUNT_CONFIRM"], $language["ACCOUNT_MSG"] . "\n\n" . $BASEURL . "/index.php?page=account&act=confirm&confirm={$random}&language={$idlangue}"); write_log("Signup new user {$utente} ({$email})", "add"); } else { die(mysql_error()); } } return mysql_errno(); }
" maxlength="40" /></pre></td></tr> <tr><td align="center" class="tboxmidd"><pre><font size="3">Password</font>: <input type="password" size="40" name="pwd" maxlength="40" /></pre></td></tr> <tr><td colspan="2" class="tboxmidd" align="center"><input type="submit" value="Login" /></td></tr> <tr><td colspan="2" class="tboxmidd" align="center"><font size=2>You Need Cookies Enabled</font></td></tr> <tr><td class="tboxfoot"></td></tr> </table> </form> </div> <br> <?php global $USE_IMAGECODE; if ($USE_IMAGECODE) { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $p = new ocr_captcha(); $reksec = $p->display_captcha(true); $private = $p->generate_private(); } else { include "include/security_code.php"; $scode_index = rand(0, count($security_code) - 1); $scode = "<input type=hidden name=security_index value={$scode_index} />n"; $scode .= $security_code[$scode_index]["question"]; $reksec = $scode; } } else { include "include/security_code.php"; $scode_index = rand(0, count($security_code) - 1); $scode = "<input type=hidden name=security_index value={$scode_index} />n"; $scode .= $security_code[$scode_index]["question"]; $reksec = $scode;
do_sqlquery("UPDATE {$db_prefix}messages SET posterName='{$nick1}' WHERE ID_MEMBER=" . $CURUSER["smf_fid"]); } write_log($language["CHANGED_THEIR_NICK"] . $nick1, "modify"); success_msg($language["SUCCESS"], $language["NICK_CHANGE_SUCCESS"] . $nick1); stdfoot(); exit; break; case '': case 'change': default: $rentpl = array(); $rentpl["username"] = $CURUSER["username"]; // ----------------------------- // Captcha hack // ----------------------------- if ($USE_IMAGECODE) { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $p = new ocr_captcha(); $rentpl["imagecode"] = $p->display_captcha(true); $private = $p->generate_private(); } } } $rentpl["frm_action"] = "index.php?page=usercp&do=rename&action=post&uid=" . $uid . ""; $rentpl["frm_cancel"] = "index.php?page=usercp&uid=" . $uid . ""; $usercptpl->set("ren", $rentpl); break; } // <--- File End
$tpl->set("btit_version", print_version()); echo $tpl->fetch(load_template("main.tpl")); die; } elseif ($act == "recover") { } $recovertpl = new bTemplate(); global $language, $recovertpl; $recovertpl->set("language", $language); $recover = array(); $recover["action"] = "index.php?page=recover&act=takerecover"; $recovertpl->set("recover", $recover); if ($USE_IMAGECODE) { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $p = new ocr_captcha(); $recovertpl->set("CAPTCHA", true, true); $recovertpl->set("recover_captcha", $p->display_captcha(true)); $private = $p->generate_private(); } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = rand(0, count($security_code) - 1); $scode = "<input type=\"hidden\" name=\"security_index\" value=\"{$scode_index}\" />\n"; $scode .= $security_code[$scode_index]["question"]; $recovertpl->set("scode_question", $scode); $recovertpl->set("CAPTCHA", false, true); } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = rand(0, count($security_code) - 1); $scode = "<input type=\"hidden\" name=\"security_index\" value=\"{$scode_index}\" />\n";
function aggiungiutente() { global $DBDT, $INVITATIONSON, $VALID_INV, $SITENAME, $SITEEMAIL, $BASEURL, $VALIDATION, $USERLANG, $USE_IMAGECODE, $TABLE_PREFIX, $XBTT_USE, $language, $THIS_BASEPATH, $FORUMLINK, $db_prefix, $btit_settings; $dobdate = $_POST["datepicker"]; $parts = explode('-', $dobdate); $dobday = $parts[0]; $dobmonth = $parts[1]; $dobyear = $parts[2]; $utente = mysqli_real_escape_string($DBDT, $_POST["user"]); $pwd = mysqli_real_escape_string($DBDT, $_POST["pwd"]); $pwd1 = mysqli_real_escape_string($DBDT, $_POST["pwd1"]); $email = mysqli_real_escape_string($DBDT, $_POST["email"]); if (isset($_POST["language"])) { $idlangue = intval($_POST["language"]); } else { $idlangue = max(1, $btit_settings["default_language"]); } if (isset($_POST["style"])) { $idstyle = intval($_POST["style"]); } else { $idstyle = max(1, $btit_settings["default_style"]); } $idflag = intval($_POST["flag"]); $timezone = intval($_POST["timezone"]); $heard = mysqli_real_escape_string($DBDT, $_POST["heardaboutus"]); // Dt Referral if ($btit_settings["ref_on"] == true) { $rid = intval($_POST["refa"]); } // Dt Referral if (strtoupper($utente) == strtoupper("Guest")) { err_msg($language["ERROR"], $language["ERR_GUEST_EXISTS"]); stdfoot(); exit; } if ($pwd != $pwd1) { err_msg($language["ERROR"], $language["DIF_PASSWORDS"]); stdfoot(); exit; } if ($VALIDATION == "none") { $idlevel = 3; } else { $idlevel = 2; } //begin invitation system by dodge if ($INVITATIONSON == "true") { if ($VALID_INV == "true") { $idlevel = 2; } else { $idlevel = 3; } } //end invitation system # Create Random number $floor = 100000; $ceiling = 999999; srand((double) microtime() * 1000000); $random = rand($floor, $ceiling); if ($utente == "" || $pwd == "" || $email == "") { return -1; exit; } $res = do_sqlquery("SELECT email FROM {$TABLE_PREFIX}users WHERE email='{$email}'", true); if (mysqli_num_rows($res) > 0) { return -2; exit; } // valid email check - by vibes $regex = '/\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b/i'; if (!preg_match($regex, $email)) { return -3; exit; } // valid email check end //Function changed by fatepower so now the variable checks the right data. //Added the image also. Cheers boys // check if IP is already in use if ($btit_settings["dupip"] == "true") { $ip = getip(); $i = @mysqli_fetch_row(@mysqli_query($GLOBALS["___mysqli_ston"], "SELECT count(*) FROM {$TABLE_PREFIX}users WHERE cip='{$ip}'")) or die(is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)); if ($i[0] != 0) { err_msg(ERROR, "[" . $ip . "]<br /><img src=\"images/shared_ip.gif\" border=\"0\" alt=\"\" />"); block_end(); stdfoot(); exit; } } // duplicate username $res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE username='******'", true); if (mysqli_num_rows($res) > 0) { return -4; exit; } // duplicate username if (strpos(mysqli_real_escape_string($DBDT, $utente), " ") == true) { return -7; exit; } if ($btit_settings["gcsw"] == false) { if ($USE_IMAGECODE) { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $public = $_POST['public_key']; $private = $_POST['private_key']; $p = new ocr_captcha(); if ($p->check_captcha($public, $private) != true) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } } else { require_once "include/recaptchalib.php"; // reCAPTCHA supported 40+ languages listed here: https://developers.google.com/recaptcha/docs/language $lang = "en"; // The response from reCAPTCHA $resp = null; // The error code from reCAPTCHA, if any $error = null; $reCaptcha = new ReCaptcha($btit_settings["gcsekk"]); if ($_POST["g-recaptcha-response"]) { $resp = $reCaptcha->verifyResponse($_SERVER["REMOTE_ADDR"], $_POST["g-recaptcha-response"]); } else { err_msg($language["ERROR"], "Recaptcha Not submitted"); stdfoot(); exit; } if ($resp != null && $resp->success) { } else { err_msg($language["ERROR"], "Google reports , you are a Robot !"); stdfoot(); exit; } } $bannedchar = array("\\", "/", ":", "*", "?", "\"", "@", "\$", "'", "`", ",", ";", ".", "<", ">", "!", "£", "%", "^", "&", "(", ")", "+", "=", "#", "~"); if (straipos(mysqli_real_escape_string($DBDT, $utente), $bannedchar) == true) { return -8; exit; } $pass_to_test = $_POST["pwd"]; $pass_min_req = explode(",", $btit_settings["secsui_pass_min_req"]); if (strlen($pass_to_test) < $pass_min_req[0]) { return -9; exit; } $exploded = explode("@", $email); $exploded2 = explode(".", $exploded[1]); $cheapmail = mysqli_real_escape_string($DBDT, $exploded[1]); $cheapmail2 = mysqli_real_escape_string($DBDT, "@" . $exploded2[0] . "."); $mailischeap = do_sqlquery("SELECT `domain` FROM `{$TABLE_PREFIX}cheapmail` WHERE `domain`='" . $cheapmail . "' OR `domain`='" . $cheapmail2 . "'", true); if (@mysqli_num_rows($mailischeap) > 0) { return -999; } $userip = getip(); $signupipblock = @mysqli_fetch_assoc(@mysqli_query($GLOBALS["___mysqli_ston"], "SELECT `id` FROM `{$TABLE_PREFIX}signup_ip_block` WHERE `first_ip` <=INET_ATON('{$userip}') AND `last_ip` >=INET_ATON('{$userip}')")); if ($signupipblock) { return -99; exit; } $lct_count = 0; $uct_count = 0; $num_count = 0; $sym_count = 0; $pass_end = (int) (strlen($pass_to_test) - 1); $pass_position = 0; $pattern1 = '#[a-z]#'; $pattern2 = '#[A-Z]#'; $pattern3 = '#[0-9]#'; $pattern4 = '/[¬!"£$%^&*()`{}\\[\\]:@~;\'#<>?,.\\/\\-=_+\\|]/'; for ($pass_position = 0; $pass_position <= $pass_end; $pass_position++) { if (preg_match($pattern1, substr($pass_to_test, $pass_position, 1), $matches)) { $lct_count++; } elseif (preg_match($pattern2, substr($pass_to_test, $pass_position, 1), $matches)) { $uct_count++; } elseif (preg_match($pattern3, substr($pass_to_test, $pass_position, 1), $matches)) { $num_count++; } elseif (preg_match($pattern4, substr($pass_to_test, $pass_position, 1), $matches)) { $sym_count++; } } if ($lct_count < $pass_min_req[1] || $uct_count < $pass_min_req[2] || $num_count < $pass_min_req[3] || $sym_count < $pass_min_req[4]) { return -998; exit; } $multipass = hash_generate(array("salt" => ""), $_POST["pwd"], $_POST["user"]); $i = $btit_settings["secsui_pass_type"]; $sql = "SELECT value FROM {$TABLE_PREFIX}settings WHERE `key` = \"donate_upload\""; $req = mysqli_query($GLOBALS["___mysqli_ston"], $sql) or die('Erreur SQL !<br />' . $sql . '<br />' . (is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); $result = mysqli_fetch_array($req); $credit = $result['value']; $sql = "SELECT value FROM {$TABLE_PREFIX}settings WHERE `key` = \"unit\""; $req = mysqli_query($GLOBALS["___mysqli_ston"], $sql) or die('Erreur SQL !<br />' . $sql . '<br />' . (is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); $result = mysqli_fetch_array($req); $unit = $result['value']; mysqli_free_result($req) || is_object($req) && get_class($req) == "mysqli_result" ? true : false; $kb = 1024; $mb = 1024 * 1024; $gb = 1024 * 1024 * 1024; $tb = 1024 * 1024 * 1024 * 1024; if ($unit == 'Kb') { $uploaded = $credit * $kb; } elseif ($unit == 'Mb') { $uploaded = $credit * $mb; } elseif ($unit == 'Gb') { $uploaded = $credit * $gb; } elseif ($unit == 'Tb') { $uploaded = $credit * $tb; } $realdate = checkdate($dobmonth, $dobday, $dobyear); if ($realdate) { $dob = $dobyear . "-" . $dobmonth . "-" . $dobday; $age = userage($dobyear, $dobmonth, $dobday); $dobtime = mktime(0, 0, 0, $dobmonth, $dobday, $dobyear); if ($dobtime > time()) { err_msg($language["ERROR"], $language["ERR_BORN_IN_FUTURE"]); stdfoot(); exit; } elseif ($age < $btit_settings["birthday_lower_limit"]) { err_msg($language["ERROR"], $language["ERR_DOB_1"] . $age . $language["ERR_DOB_2"]); stdfoot(); exit; } elseif ($age > $btit_settings["birthday_upper_limit"]) { err_msg($language["ERROR"], $language["ERR_DOB_1"] . $age . $language["ERR_DOB_2"]); stdfoot(); exit; } } else { err_msg($language["ERROR"], $language["INVALID_DOB_1"] . $dobday . "/" . $dobmonth . "/" . $dobyear . $language["INVALID_DOB_2"]); stdfoot(); exit; } $mtpp = $btit_settings["max_torrents_per_page"]; $pid = md5(uniqid(rand(), true)); $gen = intval($_POST['gen']); do_sqlquery("INSERT INTO `{$TABLE_PREFIX}users` (`username`, `password`, `dob` ,`salt`, `pass_type`, `dupe_hash`, `random`, `id_level`, `email`, `style`, `language`, `flag`, `joined`, `lastconnect`, `pid`, `time_offset`, `whereheard`,`gender` , `torrentsperpage`) VALUES ('" . $utente . "', '" . mysqli_real_escape_string($DBDT, $multipass[$i]["rehash"]) . "', '" . $dob . "' , '" . mysqli_real_escape_string($DBDT, $multipass[$i]["salt"]) . "', '" . $i . "', '" . mysqli_real_escape_string($DBDT, $multipass[$i]["dupehash"]) . "', " . $random . ", " . $idlevel . ", '" . $email . "', " . $idstyle . ", " . $idlangue . ", " . $idflag . ", NOW(), NOW(),'" . $pid . "', '" . $timezone . "','" . $heard . "','" . $gen . "','" . $mtpp . "')", true); $newuid = is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"])) ? false : $___mysqli_res; // DT reputation system start $reput = do_sqlquery("SELECT * FROM {$TABLE_PREFIX}reputation_settings WHERE id =1"); $setrep = mysqli_fetch_array($reput); $plus = $setrep["rep_default"]; if ($setrep["rep_is_online"] == 'false') { //do nothing } else { @mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE {$TABLE_PREFIX}users SET reputation = reputation + '{$plus}' WHERE id='{$newuid}'"); } // DT reputation system end //begin invitation system by dodge if ($INVITATIONSON == "true") { $inviter = 0 + $_POST["inviter"]; $code = unesc($_POST["code"]); $res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE id = {$inviter}", true); $arr = mysqli_fetch_assoc($res); $invusername = $arr["username"]; do_sqlquery("UPDATE {$TABLE_PREFIX}users SET invited_by='" . $inviter . "' WHERE id='" . $newuid . "'", true); do_sqlquery("UPDATE {$TABLE_PREFIX}invitations SET confirmed='true' WHERE hash='{$code}'", true); $msg = sqlesc($language["WELCOME MESSAGE"]); } //end invitation system //DT referral system start if ($btit_settings["ref_on"] == true) { $rup = $btit_settings["ref_gb"] * 1024 * 1024 * 1024; $rap = $btit_settings["ref_sb"]; do_sqlquery("UPDATE {$TABLE_PREFIX}users SET referral={$rid} where id={$newuid}", true); if ($btit_settings["ref_switch"] == true) { do_sqlquery("UPDATE {$TABLE_PREFIX}users SET uploaded=uploaded + '{$rup}' where id='{$rid}'"); } else { do_sqlquery("UPDATE {$TABLE_PREFIX}users SET seedbonus=seedbonus + '{$rap}' where id='{$rid}'"); } } //DT referral system end do_sqlquery("UPDATE {$TABLE_PREFIX}users SET uploaded={$uploaded} WHERE id={$newuid}", true); // begin - announce new confirmed user in shoutbox if ($btit_settings["sbtwo"] == true) { $al = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}chat ORDER BY id DESC LIMIT 1"); $rw = mysqli_fetch_assoc($al); $ct = $rw["count"] + 1; do_sqlquery("INSERT INTO {$TABLE_PREFIX}chat (uid, time, name, text,count) VALUES (0," . time() . ", 'System','[color=green]Welcome New User :[/color][url={$BASEURL}/index.php?page=userdetails&id={$newuid}]" . $utente . "[/url]'," . $ct . ")"); } // end - announce new confirmed user in shoutbox // Continue to create smf members if they disable smf mode $test = do_sqlquery("SHOW TABLES LIKE '{$db_prefix}members'", true); if (substr($FORUMLINK, 0, 3) == "smf" || mysqli_num_rows($test)) { $smfpass = smf_passgen($utente, $pwd); $fetch = get_result("SELECT `smf_group_mirror` FROM `{$TABLE_PREFIX}users_level` WHERE `id`=" . $idlevel, true, $btit_settings["cache_duration"]); $flevel = $fetch[0]["smf_group_mirror"] > 0 ? $fetch[0]["smf_group_mirror"] : $idlevel + 10; if ($FORUMLINK == "smf") { do_sqlquery("INSERT INTO `{$db_prefix}members` (`memberName`, `dateRegistered`, `ID_GROUP`, `realName`, `passwd`, `emailAddress`, `memberIP`, `memberIP2`, `is_activated`, `passwordSalt`) VALUES ('{$utente}', UNIX_TIMESTAMP(), {$flevel}, '{$utente}', '{$smfpass['0']}', '{$email}', '" . getip() . "', '" . getip() . "', 1, '{$smfpass['1']}')", true); } else { do_sqlquery("INSERT INTO `{$db_prefix}members` (`member_name`, `date_registered`, `id_group`, `real_name`, `passwd`, `email_address`, `member_ip`, `member_ip2`, `is_activated`, `password_salt`) VALUES ('{$utente}', UNIX_TIMESTAMP(), {$flevel}, '{$utente}', '{$smfpass['0']}', '{$email}', '" . getip() . "', '" . getip() . "', 1, '{$smfpass['1']}')", true); } $fid = is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"])) ? false : $___mysqli_res; do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = {$fid} WHERE `variable` = 'latestMember'", true); do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = '{$utente}' WHERE `variable` = 'latestRealName'", true); do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = UNIX_TIMESTAMP() WHERE `variable` = 'memberlist_updated'", true); do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = `value` + 1 WHERE `variable` = 'totalMembers'", true); do_sqlquery("UPDATE `{$TABLE_PREFIX}users` SET `smf_fid`={$fid} WHERE `id`={$newuid}", true); } // Continue to create ipb members if they disable ipb mode $test = do_sqlquery("SHOW TABLES LIKE '{$ipb_prefix}members'"); if ($FORUMLINK == "ipb" || mysqli_num_rows($test)) { ipb_create($utente, $email, $pwd, $idlevel, $newuid); } // xbt if ($XBTT_USE) { $resin = do_sqlquery("INSERT INTO xbt_users (uid, torrent_pass) VALUES ({$newuid},'{$pid}')", true); } include "include/userstuff.php"; $sub = sqlesc("{$GLOBALS['welcome_sub']}"); $mess = sqlesc("{$GLOBALS['welcome_msg']}"); send_pm(0, $newuid, $sub, $mess); if ($INVITATIONSON == "true") { send_pm('2', $newuid, '" . $language["WELCOME"] . "', $msg); if ($VALID_INV == "true") { send_mail($email, "{$SITENAME} " . $language["REG_CONFIRM"] . "", $language["INVIT_MSGINFO"] . "{$email}" . $language["INVIT_MSGINFO1"] . " {$utente}\n" . $language["INVIT_MSGINFO2"] . " {$pwd}\n\n" . $language["INVIT_MSGINFO3"], "From: {$SITENAME} <{$SITEEMAIL}>"); } else { send_mail($email, "{$SITENAME} " . $language["REG_CONFIRM"] . "", $language["INVIT_MSGINFO"] . "{$email}" . $language["INVIT_MSGINFO1"] . " {$utente}\n" . $language["INVIT_MSGINFO2"] . " {$pwd}\n\n\n" . $language["INVIT_MSG_AUTOCONFIRM3"], "From: {$SITENAME} <{$SITEEMAIL}>"); } write_log("Signup new user {$utente} ({$email})", "add"); } else { if ($VALIDATION == "user") { ini_set("sendmail_from", ""); if ((is_object($GLOBALS["___mysqli_ston"]) ? mysqli_errno($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false)) == 0) { send_mail($email, $language["ACCOUNT_CONFIRM"], $language["ACCOUNT_MSG"] . "\n\n" . $BASEURL . "/index.php?page=account&act=confirm&confirm={$random}&language={$idlangue}"); write_log("Signup new user {$utente} ({$email})", "add"); } else { die(is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)); } } } return is_object($GLOBALS["___mysqli_ston"]) ? mysqli_errno($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false); }
$stisite = $_POST['stisite']; $regulament = $_POST['regulament']; $oday = $_POST['oday']; $sursaa = $_POST['sursaa']; $sursad = $_POST['sursad']; $sursaf = $_POST['sursaf']; $seet = $_POST['seet']; //captcha global $USE_IMAGECODE, $THIS_BASEPATH, $btit_settings; if ($USE_IMAGECODE) { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $public = $_POST['public_key']; $private = $_POST['private_key']; $p = new ocr_captcha(); if ($p->check_captcha($public, $private) != true) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } } else {
stderr(ERROR, ERR_IMAGE_CODE); block_end(); stdfoot(); exit; } } } } @mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM {$TABLE_PREFIX}users WHERE id=" . $CURUSER["uid"]); write_log($CURUSER["username"] . " deleted their own account", "delete"); redirect("index.php"); } block_begin("Delete Account"); // ----------------------------- // Captcha hack // ----------------------------- if ($USE_IMAGECODE) { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $p = new ocr_captcha(); $usercptpl->set("delete_cesta", "index.php?page=usercp&do=deleteme&action=change&uid=" . $CURUSER["uid"] . ""); $deltpl[$i]["opistekod"] = "<input type=\"text\" name=\"private_key\" value=\"\" maxlength=\"6\" size=\"7\">"; $deltpl[$i]["opistekod2"] = $p->display_captcha(true); $i++; $private = $p->generate_private(); } } } $usercptpl->set("delme", $deltpl); }
$erroUsuarioInvalido = ""; if (isset($SESSION_LANGUAGE)) { $_SESSION['userLang'] = $SESSION_LANGUAGE; } else { if (!isset($_SESSION['userLang'])) { $_SESSION['userLang'] = 'PT'; } } require "lostpwd_" . $_SESSION['userLang'] . ".php"; if (isset($HTTP_POST_VARS['public_key'])) { $public = $HTTP_POST_VARS['public_key']; } if (isset($HTTP_POST_VARS['private_key'])) { $private = $HTTP_POST_VARS['private_key']; } $p = new ocr_captcha(); $erroCaptcha = ""; if (isset($HTTP_POST_VARS['private_key'])) { if ($p->check_captcha($public, $private)) { $captcha = true; } else { $captcha = false; $erroCaptcha = "<font color=\"#CC0000\"><b>Caracteres da chave de segurança não conferem</b></font>"; } } import_request_variables("gpc"); include_once "globals.inc.php"; include_once "globals.php"; $dbusercat = $GLOBALS["dbusercat"]; // Verificação dos dados enviados pelo usuário //
function aggiungiutente() { global $SITENAME, $SITEEMAIL, $db, $BASEURL, $VALIDATION, $USERLANG, $USE_IMAGECODE; $utente = $db->real_escape_string($_POST["user"]); $pwd = $db->real_escape_string($_POST["pwd"]); $pwd1 = $db->real_escape_string($_POST["pwd1"]); $email = $db->real_escape_string($_POST["email"]); $idlangue = intval($_POST["language"]); $idstyle = intval($_POST["style"]); $idflag = intval($_POST["flag"]); $timezone = intval($_POST["timezone"]); if (utf8::strtoupper($utente) == utf8::strtoupper("Guest")) { print ERROR . " " . ERR_GUEST_EXISTS . "<br />\n"; print "<a href='account.php'>" . BACK . "</a>"; block_end(); stdfoot(); exit; } if ($pwd != $pwd1) { print ERROR . " " . DIF_PASSWORDS . "<br />\n"; print "<a href='account.php'>" . BACK . "</a>"; block_end(); stdfoot(); exit; } if ($VALIDATION == "none") { $idlevel = 3; } else { $idlevel = 2; } # Create Random number $floor = 100000; $ceiling = 999999; srand((double) microtime() * 1000000); $random = mt_rand($floor, $ceiling); if ($utente == "" || $pwd == "" || $email == "") { return -1; exit; } $res = $db->query("SELECT email FROM users WHERE email = '" . $email . "'"); if ($res->num_rows > 0) { return -2; exit; } if (!security::valid_email($email)) { return -3; exit; } // duplicate username $res = $db->query("SELECT username FROM users WHERE username = '******'"); if ($res->num_rows > 0) { return -4; exit; } // duplicate username if (strpos($db->real_escape_string($utente), " ") == true) { return -7; exit; } if ($USE_IMAGECODE) { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $public = $_POST['public_key']; $private = $_POST['private_key']; $p = new ocr_captcha(); if ($p->check_captcha($public, $private) != true) { err_msg(ERROR, ERR_IMAGE_CODE); block_end(); stdfoot(); exit; } } } } $bannedchar = array("\\", "/", ":", "*", "?", "\"", "@", "\$", "'", "`", ",", ";", ".", "<", ">", "!", "£", "%", "^", "&", "(", ")", "+", "=", "#", "~"); if (straipos($db->real_escape_string($utente), $bannedchar) == true) { return -8; exit; } if (utf8::strlen($db->real_escape_string($pwd)) < 4) { return -9; exit; } @$db->query("INSERT INTO users (username, password, random, id_level, email, style, language, flag, joined, lastconnect, pid, time_offset) VALUES ('" . $utente . "', '" . md5($pwd) . "', " . $random . ", " . $idlevel . ", '" . $email . "', " . $idstyle . ", " . $idlangue . ", " . $idflag . ", NOW(), NOW(), '" . md5(uniqid(mt_rand(), true)) . "', '" . $timezone . "')"); if ($VALIDATION == "user") { ini_set("sendmail_from", ""); if ($db->errno == 0) { mail($email, ACCOUNT_CONFIRM, ACCOUNT_MSG . "\n\n" . $BASEURL . "/account.php?act=confirm&confirm=" . $random . "&language=" . $idlangue . "", "From: " . $SITENAME . " <" . $SITEEMAIL . ">"); write_log("Signup new User " . $utente . " (" . $email . ")", "add"); } else { die($db->error); } } return $db->errno; }
} } } } } else { if (isset($CURUSER) && $CURUSER && $CURUSER["uid"] > 1) { $_POST['name'] = $CURUSER["username"]; } $contacttpl->set("con2", "<form name='frmSelect' method='POST' action='index.php?page=contact'>\n<table border='0'>\n<tr><td>Subject</td><td><select name='cat' onChange='handleOnChange(this);'>\n<option>Select Main Subject</option>\n<option>General Support</option>\n<option>Upload Errors</option>\n<option>Download Errors</option>\n<option>Bug Reports</option>\n<option>Advertising</option>\n</select> <select name=\"subcat\">\n<option>Select A Subcategory</option>\n</select></td></tr>\n<tr><td></td><td></td></tr>\n<tr><td>Your Username</td><td><input type=\"text\" name=\"name\" value=\"" . $_POST['name'] . "\" size=\"50\" maxlength=\"200\"></td></tr>\n<tr><td></td><td></td></tr>\n<tr><td>Email Address</td><td><input type=\"text\" name=\"email\" value=\"" . $_POST['email'] . "\" size=\"50\" maxlength=\"200\"></td></tr>\n<tr><td></td><td></td></tr>\n<tr><td>Message</td><td><textarea name=\"message\" cols=\"39\" rows=\"10\">" . $_POST['message'] . "</textarea></td></tr>"); //captcha global $USE_IMAGECODE, $THIS_BASEPATH; if ($USE_IMAGECODE && $action != "mod") { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $p = new ocr_captcha(); $contacttpl->set("CAPTCHA", true, true); $contacttpl->set("upload_captcha", $p->display_captcha(true)); $private = $p->generate_private(); } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = rand(0, count($security_code) - 1); $scode = "<input type=\"hidden\" name=\"security_index\" value=\"{$scode_index}\" />\n"; $scode .= $security_code[$scode_index]["question"]; $contacttpl->set("scode_question", $scode); $contacttpl->set("CAPTCHA", false, true); } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = rand(0, count($security_code) - 1); $scode = "<input type=\"hidden\" name=\"security_index\" value=\"{$scode_index}\" />\n";
function aggiungiutente() { global $SITENAME, $SITEEMAIL, $BASEURL, $VALIDATION, $USERLANG, $USE_IMAGECODE, $TABLE_PREFIX, $XBTT_USE, $language, $THIS_BASEPATH, $FORUMLINK, $db_prefix, $btit_settings; $utente = isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"]) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_POST["user"]) : (trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR) ? "" : ""); $pwd = isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"]) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_POST["pwd"]) : (trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR) ? "" : ""); $pwd1 = isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"]) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_POST["pwd1"]) : (trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR) ? "" : ""); $email = isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"]) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_POST["email"]) : (trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR) ? "" : ""); $idlangue = intval($_POST["language"]); $idstyle = intval($_POST["style"]); $idflag = intval($_POST["flag"]); $timezone = intval($_POST["timezone"]); if (strtoupper($utente) == strtoupper("Guest")) { err_msg($language["ERROR"], $language["ERR_GUEST_EXISTS"]); stdfoot(); exit; } if ($pwd != $pwd1) { err_msg($language["ERROR"], $language["DIF_PASSWORDS"]); stdfoot(); exit; } if ($VALIDATION == "none") { $idlevel = 3; } else { $idlevel = 2; } # Create Random number $floor = 100000; $ceiling = 999999; srand((double) microtime() * 1000000); $random = rand($floor, $ceiling); if ($utente == "" || $pwd == "" || $email == "") { return -1; exit; } $res = do_sqlquery("SELECT email FROM {$TABLE_PREFIX}users WHERE email='{$email}'", true); if (mysqli_num_rows($res) > 0) { return -2; exit; } // valid email check - by vibes $regex = '/\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b/i'; if (!preg_match($regex, $email)) { return -3; exit; } // valid email check end // duplicate username $res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE username='******'", true); if (mysqli_num_rows($res) > 0) { return -4; exit; } // duplicate username if (strpos(isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"]) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $utente) : (trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR) ? "" : ""), " ") == true) { return -7; exit; } if ($USE_IMAGECODE) { if (extension_loaded('gd')) { $arr = gd_info(); if ($arr['FreeType Support'] == 1) { $public = $_POST['public_key']; $private = $_POST['private_key']; $p = new ocr_captcha(); if ($p->check_captcha($public, $private) != true) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } } else { include "{$THIS_BASEPATH}/include/security_code.php"; $scode_index = intval($_POST["security_index"]); if ($security_code[$scode_index]["answer"] != $_POST["scode_answer"]) { err_msg($language["ERROR"], $language["ERR_IMAGE_CODE"]); stdfoot(); exit; } } $bannedchar = array("\\", "/", ":", "*", "?", "\"", "@", "\$", "'", "`", ",", ";", ".", "<", ">", "!", "£", "%", "^", "&", "(", ")", "+", "=", "#", "~"); if (straipos(isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"]) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $utente) : (trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR) ? "" : ""), $bannedchar) == true) { return -8; exit; } $pass_to_test = $_POST["pwd"]; $pass_min_req = explode(",", $btit_settings["secsui_pass_min_req"]); if (strlen($pass_to_test) < $pass_min_req[0]) { return -9; exit; } $lct_count = 0; $uct_count = 0; $num_count = 0; $sym_count = 0; $pass_end = (int) (strlen($pass_to_test) - 1); $pass_position = 0; $pattern1 = '#[a-z]#'; $pattern2 = '#[A-Z]#'; $pattern3 = '#[0-9]#'; $pattern4 = '/[¬!"£$%^&*()`{}\\[\\]:@~;\'#<>?,.\\/\\-=_+\\|]/'; for ($pass_position = 0; $pass_position <= $pass_end; $pass_position++) { if (preg_match($pattern1, substr($pass_to_test, $pass_position, 1), $matches)) { $lct_count++; } elseif (preg_match($pattern2, substr($pass_to_test, $pass_position, 1), $matches)) { $uct_count++; } elseif (preg_match($pattern3, substr($pass_to_test, $pass_position, 1), $matches)) { $num_count++; } elseif (preg_match($pattern4, substr($pass_to_test, $pass_position, 1), $matches)) { $sym_count++; } } if ($lct_count < $pass_min_req[1] || $uct_count < $pass_min_req[2] || $num_count < $pass_min_req[3] || $sym_count < $pass_min_req[4]) { return -998; exit; } $multipass = hash_generate(array("salt" => ""), $_POST["pwd"], $_POST["user"]); $i = $btit_settings["secsui_pass_type"]; $pid = md5(uniqid(rand(), true)); do_sqlquery("INSERT INTO `{$TABLE_PREFIX}users` (`username`, `password`, `salt`, `pass_type`, `dupe_hash`, `random`, `id_level`, `email`, `style`, `language`, `flag`, `joined`, `lastconnect`, `pid`, `time_offset`) VALUES ('" . $utente . "', '" . (isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"]) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $multipass[$i]["rehash"]) : (trigger_error("[MySQLConverterToo] Fix the mysqli_escape_string() call! This code does not work.", E_USER_ERROR) ? "" : "")) . "', '" . (isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"]) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $multipass[$i]["salt"]) : (trigger_error("[MySQLConverterToo] Fix the mysqli_escape_string() call! This code does not work.", E_USER_ERROR) ? "" : "")) . "', '" . $i . "', '" . (isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"]) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $multipass[$i]["dupehash"]) : (trigger_error("[MySQLConverterToo] Fix the mysqli_escape_string() call! This code does not work.", E_USER_ERROR) ? "" : "")) . "', " . $random . ", " . $idlevel . ", '" . $email . "', " . $idstyle . ", " . $idlangue . ", " . $idflag . ", NOW(), NOW(),'" . $pid . "', '" . $timezone . "')", true); $newuid = is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"])) ? false : $___mysqli_res; // Continue to create smf members if they disable smf mode $test = do_sqlquery("SHOW TABLES LIKE '{$db_prefix}members'", true); if (substr($FORUMLINK, 0, 3) == "smf" || mysqli_num_rows($test)) { $smfpass = smf_passgen($utente, $pwd); $fetch = get_result("SELECT `smf_group_mirror` FROM `{$TABLE_PREFIX}users_level` WHERE `id`=" . $idlevel, true, $btit_settings["cache_duration"]); $flevel = $fetch[0]["smf_group_mirror"] > 0 ? $fetch[0]["smf_group_mirror"] : $idlevel + 10; if ($FORUMLINK == "smf") { do_sqlquery("INSERT INTO `{$db_prefix}members` (`memberName`, `dateRegistered`, `ID_GROUP`, `realName`, `passwd`, `emailAddress`, `memberIP`, `memberIP2`, `is_activated`, `passwordSalt`) VALUES ('{$utente}', UNIX_TIMESTAMP(), {$flevel}, '{$utente}', '{$smfpass['0']}', '{$email}', '" . getip() . "', '" . getip() . "', 1, '{$smfpass['1']}')", true); } else { do_sqlquery("INSERT INTO `{$db_prefix}members` (`member_name`, `date_registered`, `id_group`, `real_name`, `passwd`, `email_address`, `member_ip`, `member_ip2`, `is_activated`, `password_salt`) VALUES ('{$utente}', UNIX_TIMESTAMP(), {$flevel}, '{$utente}', '{$smfpass['0']}', '{$email}', '" . getip() . "', '" . getip() . "', 1, '{$smfpass['1']}')", true); } $fid = is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"])) ? false : $___mysqli_res; do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = {$fid} WHERE `variable` = 'latestMember'", true); do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = '{$utente}' WHERE `variable` = 'latestRealName'", true); do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = UNIX_TIMESTAMP() WHERE `variable` = 'memberlist_updated'", true); do_sqlquery("UPDATE `{$db_prefix}settings` SET `value` = `value` + 1 WHERE `variable` = 'totalMembers'", true); do_sqlquery("UPDATE `{$TABLE_PREFIX}users` SET `smf_fid`={$fid} WHERE `id`={$newuid}", true); } // Continue to create ipb members if they disable ipb mode $test = do_sqlquery("SHOW TABLES LIKE '{$ipb_prefix}members'"); if ($FORUMLINK == "ipb" || mysqli_num_rows($test)) { ipb_create($utente, $email, $pwd, $idlevel, $newuid); } // xbt if ($XBTT_USE) { $resin = do_sqlquery("INSERT INTO xbt_users (uid, torrent_pass) VALUES ({$newuid},'{$pid}')", true); } if ($VALIDATION == "user") { ini_set("sendmail_from", ""); if ((is_object($GLOBALS["___mysqli_ston"]) ? mysqli_errno($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false)) == 0) { send_mail($email, $language["ACCOUNT_CONFIRM"], $language["ACCOUNT_MSG"] . "\n\n" . $BASEURL . "/index.php?page=account&act=confirm&confirm={$random}&language={$idlangue}"); write_log("Signup new user {$utente} ({$email})", "add"); } else { die(is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)); } } return is_object($GLOBALS["___mysqli_ston"]) ? mysqli_errno($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false); }