Example #1
0
<?php

require_once "include/bittorrent.php";
dbconn();
require_once get_langfile_path("", false, $CURLANGDIR);
cur_user_check();
registration_check("cardreg");
failedloginscheck("Signup");
$emailnotice = $restrictemaildomain == 'yes' ? $lang_signup['text_email_note'] . allowedemails() : "";
$smarty->assign("{$emailnotice}", ${$emailnotice});
$select = 'signupcard';
$smarty->assign("select", $select);
$smarty->assign("show", 'yes');
$signuplist = $smarty->fetch(MTPTTEMPLATES . '/signuplist.html');
$smarty->assign("signuplist", $signuplist);
$smarty->display(MTPTTEMPLATES . '/signupcard.html');
stdfoot();
Example #2
0
<?php

require "include/bittorrent.php";
dbconn();
failedloginscheck("Re-send", true);
$langid = 0 + $_GET['sitelanguage'];
if ($langid) {
    $lang_folder = validlang($langid);
    if (get_langfolder_cookie() != $lang_folder) {
        set_langfolder_cookie($lang_folder);
        header("Location: " . $_SERVER['PHP_SELF']);
    }
}
require_once get_langfile_path("", false, $CURLANGDIR);
function bark($msg)
{
    global $lang_confirm_resend;
    stdhead();
    stdmsg($lang_confirm_resend['resend_confirmation_email_failed'], $msg);
    stdfoot();
    exit;
}
if ($verification == "admin") {
    bark($lang_confirm_resend['std_need_admin_verification']);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if ($iv == "yes") {
        check_code($_POST['imagehash'], $_POST['imagestring'], "confirm_resend.php", true);
    }
    $email = unesc(htmlspecialchars(trim($_POST["email"])));
    $wantpassword = unesc(htmlspecialchars(trim($_POST["wantpassword"])));
Example #3
0
session_start();
if (empty($captchaSelection) || $_SESSION['simpleCaptchaAnswer'] != $captchaSelection) {
    header('Location: login.php');
    exit;
}
dbconn();
$lang = array_merge(load_language('global'), load_language('takelogin'));
$newpage = new page_verify();
$newpage->check('takelogin');
function bark($text = 'Username or password incorrect')
{
    global $lang;
    @fclose(@fopen('' . $INSTALLER09['dictbreaker'] . '/' . sha1($_SERVER['REMOTE_ADDR']), 'w'));
    stderr($lang['tlogin_failed'], $text);
}
failedloginscheck();
$res = sql_query("SELECT id, passhash, secret, enabled FROM users WHERE username = "******" AND status = 'confirmed'");
$row = mysql_fetch_assoc($res);
if (!$row) {
    bark();
}
if (!$row) {
    $ip = sqlesc(getip());
    $added = sqlesc(time());
    $fail = @mysql_fetch_row(@sql_query("select count(*) from failedlogins where ip={$ip}")) or sqlerr(__FILE__, __LINE__);
    if ($fail[0] == 0) {
        sql_query("INSERT INTO failedlogins (ip, added, attempts) VALUES ({$ip}, {$added}, 1)") or sqlerr(__FILE__, __LINE__);
    } else {
        sql_query("UPDATE failedlogins SET attempts = attempts + 1 where ip={$ip}") or sqlerr(__FILE__, __LINE__);
    }
    @fclose(@fopen('' . $INSTALLER09['dictbreaker'] . '/' . sha1($_SERVER['REMOTE_ADDR']), 'w'));
Example #4
0
<?php

require "include/bittorrent.php";
dbconn();
failedloginscheck("Recover", true);
$take_recover = !isset($_GET['sitelanguage']);
$langid = 0 + $_GET['sitelanguage'];
if ($langid) {
    $lang_folder = validlang($langid);
    if (get_langfolder_cookie() != $lang_folder) {
        set_langfolder_cookie($lang_folder);
        header("Location: " . $_SERVER['PHP_SELF']);
    }
}
require_once get_langfile_path("", false, $CURLANGDIR);
function bark($msg)
{
    global $lang_recover;
    stdhead();
    stdmsg($lang_recover['std_recover_failed'], $msg);
    stdfoot();
    exit;
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if ($iv == "yes") {
        check_code($_POST['imagehash'], $_POST['imagestring'], "cardrecover.php", true);
    }
    $stuid = unesc(htmlspecialchars(trim($_POST["stuid"])));
    $cardpass = unesc(htmlspecialchars(trim($_POST["password"])));
    if (!$stuid) {
        failedlogins($lang_recover['std_missing_stuid'], true);