$csrand = rand(1, 3); if ($csrand != 1 && $csrand != 2 && $csrand != 3) { $csrand = 1; } if ($csrand == 1) { $gpass .= chr(rand(48, 57)); } if ($csrand == 2) { $gpass .= chr(rand(65, 90)); } if ($csrand == 3) { $gpass .= chr(rand(97, 122)); } ++$i; } $GuestPassword = b64e_hmac($gpass, $YourDate, $GSalt, $_POST['usehashtype']); $url_this_dir = "http://" . $Settings['idburl'] . $this_dir . "index.php?act=view"; $YourIP = $_SERVER['REMOTE_ADDR']; if ($Settings['sqltype'] == "mysql" || $Settings['sqltype'] == "mysqli") { require $SetupDir['sql'] . 'mysql.php'; } if ($Settings['sqltype'] == "pgsql") { require $SetupDir['sql'] . 'pgsql.php'; } if ($Settings['sqltype'] == "sqlite") { require $SetupDir['sql'] . 'sqlite.php'; } if ($_POST['SQLThemes'] == "on") { $OldThemeSet = $ThemeSet; $Settings['board_name'] = $_POST['NewBoardName']; $skindir = dirname(realpath("sql.php")) . "/" . $SettDir['themes'];
} if ($Settings['use_hashtype'] == "snefru") { $iDBHash = "iDBHSFRU"; $NewPassword = b64e_hmac($_POST['Password'], $OldJoined, $NewSalt, "snefru"); } if ($Settings['use_hashtype'] == "snefru256") { $iDBHash = "iDBHSFRU256"; $NewPassword = b64e_hmac($_POST['Password'], $OldJoined, $NewSalt, "snefru256"); } if ($Settings['use_hashtype'] == "gost") { $iDBHash = "iDBHGOST"; $NewPassword = b64e_hmac($_POST['Password'], $OldJoined, $NewSalt, "gost"); } if ($Settings['use_hashtype'] == "joaat") { $iDBHash = "iDBHJOAAT"; $NewPassword = b64e_hmac($_POST['Password'], $OldJoined, $NewSalt, "joaat"); } $_SESSION['UserPass'] = $NewPassword; if ($cookieDomain == null) { setcookie("SessPass", $NewPassword, time() + 7 * 86400, $cbasedir); } if ($cookieDomain != null) { if ($cookieSecure === true) { setcookie("SessPass", $NewPassword, time() + 7 * 86400, $cbasedir, $cookieDomain, 1); } if ($cookieSecure === false) { setcookie("SessPass", $NewPassword, time() + 7 * 86400, $cbasedir, $cookieDomain); } } } $_POST['Email'] = remove_spaces($_POST['Email']);
} if ($Settings['use_hashtype'] == "snefru") { $iDBHash = "iDBHSFRU"; $NewPassword = b64e_hmac($_POST['Password'], $_POST['Joined'], $HashSalt, "snefru"); } if ($Settings['use_hashtype'] == "snefru256") { $iDBHash = "iDBHSFRU256"; $NewPassword = b64e_hmac($_POST['Password'], $_POST['Joined'], $HashSalt, "snefru256"); } if ($Settings['use_hashtype'] == "gost") { $iDBHash = "iDBHGOST"; $NewPassword = b64e_hmac($_POST['Password'], $_POST['Joined'], $HashSalt, "gost"); } if ($Settings['use_hashtype'] == "joaat") { $iDBHash = "iDBHJOAAT"; $NewPassword = b64e_hmac($_POST['Password'], $_POST['Joined'], $NewHashSalt, "joaat"); } $_GET['YourPost'] = $_POST['Signature']; //require( './'.$SettDir['misc'].'HTMLTags.php'); $_GET['YourPost'] = htmlspecialchars($_GET['YourPost'], ENT_QUOTES, $Settings['charset']); //$_GET['YourPost'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_GET['YourPost']); $NewSignature = $_GET['YourPost']; $_GET['YourPost'] = preg_replace("/\t+/", " ", $_GET['YourPost']); $_GET['YourPost'] = preg_replace("/\\s\\s+/", " ", $_GET['YourPost']); $_GET['YourPost'] = remove_bad_entities($_GET['YourPost']); $Avatar = stripcslashes(htmlspecialchars($_POST['Avatar'], ENT_QUOTES, $Settings['charset'])); //$Avatar = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Avatar); $Avatar = remove_spaces($Avatar); $Website = stripcslashes(htmlspecialchars($_POST['Website'], ENT_QUOTES, $Settings['charset'])); //$Website = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Website); $Website = remove_spaces($Website);