Exemple #1
0
file_check("notlogged");
// Sitzung starten
session_start();
// Überprüfen der Fertigstellung der Eingänge
if (!empty($_POST["username"]) && !empty($_POST["password"]) && !empty($_POST["password2"]) && !empty($_POST["email"]) && $_POST["expansion"] != "" && !empty($_POST["security"])) {
    $reg_security_answer = $_SESSION["reg_security"] + $_SESSION["reg_security2"];
    string_check($reg_security_answer, $_POST["security"], "!=", "Ihre Antwort auf die Sicherheitsabfrage war falsch!");
    // Clear Session
    session_destroy();
    // Transformation der Daten gesendet
    $post_reg_username = variable($_POST["username"], "strtoupper", "db");
    $post_reg_password = variable($_POST["password"], "strtoupper", "db");
    $post_reg_password2 = variable($_POST["password2"], "strtoupper", "normal");
    $post_reg_email = variable($_POST["email"], "", "db");
    $post_reg_expansion = variable($_POST["expansion"], "", "db");
    $reg_password = sha_pass_hash($post_reg_username, $post_reg_password);
    // Checking Account Name
    $query_reg_acc_check = db_query("SELECT COUNT(*) FROM account WHERE username = '******'");
    $results_reg_acc_check = mysqli_fetch_array($query_reg_acc_check);
    if ($results_reg_acc_check[0] != 0) {
        system_message("Der Account Name ist schon vergeben bitte nimm einen anderen!");
    }
    // Überprüfen Daten Posztolt
    string_check($post_reg_password, $post_reg_password2, "!=", "Der Kennwort und seine Bestätigung stimmen nicht überein!");
    string_check($post_reg_username, 3, "<", "Der Account Name ist zu kurz!");
    string_check($post_reg_password, 6, "<", "Ihr Passwort ist zu kurz!");
    string_check($post_reg_username, 32, ">", "Der Account Name ist zu lang!");
    string_check($post_reg_password, 32, ">", "Ihr Passwort ist zu lang!");
    string_check($post_reg_username, $post_reg_password, "==", "Der Account Name und Passwort stimmen nicht überein!");
    string_check($post_reg_email, 64, ">", "E-Mail-Adresse ist zu lang!");
    string_check($post_reg_email, 8, "<", "E-Mail-Adresse ist zu kurz!");
Exemple #2
0
// Fájl ellenõrzése
if (!isset($mysql_connect)) {
    exit;
}
file_check("notlogged");
// Felugró ablak
if (!empty($site_popup)) {
    echo '<script type="text/javascript">alert("' . $site_popup . '");</script>';
}
// Inputok kitöltésének ellenõrzése
if (!empty($_POST["username"]) && !empty($_POST["password"]) && !empty($_POST["worktime"])) {
    // Posztolt adatok átalakítása
    $post_login_username = variable($_POST["username"], "strtoupper", "db");
    $post_login_password = variable($_POST["password"], "strtoupper", "db");
    $login_password = sha_pass_hash($post_login_username, $post_login_password);
    // Account kikeresése
    $query_login = db_query("SELECT COUNT(*) FROM account WHERE sha_pass_hash = '" . $login_password . "'");
    $results_login = mysqli_fetch_array($query_login);
    // Nombre de Cuenta és jelszó ellenõrzése
    if ($results_login[0] == 0) {
        site_log("bad-login-form", "IP: " . $site_ip . " | Nombre de Cuenta: " . $post_login_username . " | Fecha: " . $site_date . "");
        system_message("El nombre de cuenta o la contraseña no es válida!");
    }
    // Posztolt munkamenet átalakítása
    switch ($_POST["worktime"]) {
        case "5h":
            $worktime_login = 18000;
            break;
        case "2h":
            $worktime_login = 7200;
// Datei Prüfen
if (!isset($mysql_connect)) {
    exit;
}
file_check("logged");
// Überprüfung der Form die gesendet wird
if (!empty($_POST)) {
    // Überprüfung der Beendigung der Eingabe (Passwort)
    if (!empty($_POST["newpassword"]) && !empty($_POST["newpassword2"]) && !empty($_POST["password"])) {
        // Datenkonvertierung
        $post_accountmodify_password = variable($_POST["password"], "strtoupper", "db");
        $post_accountmodify_newpassword = variable($_POST["newpassword"], "strtoupper", "db");
        $post_accountmodify_newpassword2 = variable($_POST["newpassword2"], "strtoupper", "normal");
        $accountmodify_password = sha_pass_hash($user_check_accountname, $post_accountmodify_password);
        $accountmodify_password_final = sha_pass_hash($user_check_accountname, $post_accountmodify_newpassword);
        if ($accountmodify_password == $user_check_password) {
            // Postolt Überprüfung der Daten
            string_check($post_accountmodify_newpassword, $post_accountmodify_newpassword2, "!=", "Die eigebenen Passwörter stimmen nicht überein widerhole die eingabe!");
            string_check($post_accountmodify_newpassword, $user_check_accountname, "==", "Account Name und Passwort stimmen nicht überein!");
            string_check($post_accountmodify_newpassword, 6, "<", "Das Passwort ist zu kurz!");
            string_check($post_accountmodify_newpassword, 32, ">", "Ihr Passwort ist zu lang!");
            string_check($post_accountmodify_newpassword, "^[0-9a-zA-Z%]+\$", "!Error", "Das Passwort enthält Zeichen, die nicht erlaubt sind!");
            // Passwort ändern
            db_query("UPDATE account SET sha_pass_hash = '" . $accountmodify_password_final . "' WHERE id = '" . $user_check_accountid . "'");
        } else {
            system_message("Eingebenes Passwort ist falsch!");
        }
    }
    // Überprüfung der eingegebenen Email adresse
    if ($_POST["email"] != $user_check_email) {