Exemple #1
0
function csv_array_parse($parsed, $check = false, $start = 1)
{
    $title_line = $parsed[0];
    foreach ($title_line as $n => $field) {
        $field = trim($field);
        $field = @strtolower($field);
        // $field=first_word($field); // its probably a bad idea to do this - is legacy from old import
        if (!empty($field)) {
            $title_line[$n] = $field;
        }
    }
    $arr = array();
    for ($n = $start; $n < count($parsed); $n++) {
        $item = $parsed[$n];
        $i = 0;
        foreach ($title_line as $field) {
            $item[$i] = trim($item[$i]);
            $arr[$n][$field] = $check ? string_check($item[$i]) : $item[$i];
            $i++;
        }
    }
    return $arr;
}
Exemple #2
0
}
file_check("logged,vip,vipmodule,addmoney");
// Csatlakozás a characters adatbázishoz
db_select($mysql_db_characters);
// Karakterek lekérdezése
$query_addmoney_characters = db_query("SELECT guid, name FROM characters WHERE account = '" . $user_check_accountid . "' ORDER BY name ASC");
// Inputok kitöltésének ellenõrzése
if (!empty($_POST["money"]) && !empty($_POST["mycharacter"])) {
    // Posztolt adatok átalakítás
    $post_addmoney_money = variable($_POST["money"], "", "db");
    $post_addmoney_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Inputok ellenõrzése
    string_check($post_addmoney_money, "^[0-9%]+\$", "!ereg", "Hibásan adtad meg az arany mennyiségét!");
    string_check($post_addmoney_money, 5, ">", "Ilyen sok aranyat egyszerre nem tudsz addolni!");
    string_check($post_addmoney_mycharacter, "^[0-9%]+\$", "!ereg", "A karakter input értéke hibás!");
    string_check($post_addmoney_mycharacter, 32, ">", "A karakter input értéke hibás!");
    // A karakter tulajdonosának ellenõrzése
    character_check($post_addmoney_mycharacter);
    // Jelenlegi pénz lekérése
    $query_addmoney_money = db_query("SELECT money FROM characters WHERE guid = '" . $post_addmoney_mycharacter . "'");
    $results_addmoney_money = mysqli_fetch_array($query_addmoney_money);
    $post_addmoney_money = $post_addmoney_money * 10000;
    $post_addmoney_money_final = $post_addmoney_money + $results_addmoney_money["money"];
    // Pénz frissítése
    db_query("UPDATE characters SET money = '" . $post_addmoney_money_final . "' WHERE guid = '" . $post_addmoney_mycharacter . "'");
    system_message("Sikeresen frissítettük a pénzed!");
}
?>

				 <script type="text/javascript">
				 function checkform ( form )
Exemple #3
0
    if ($results_reg_acc_check[0] != 0) {
        system_message("Ezt az account nevet már használja valaki, kérlek válassz másikat!");
    }
    // Posztolt adatok ellenõrzése
    string_check($post_reg_password, $post_reg_password2, "!=", "A jelszó és annak a megerõsítése nem egyezik meg!");
    string_check($post_reg_username, 3, "<", "Az account neved túl rövid!");
    string_check($post_reg_password, 6, "<", "A jelszavad túl rövid!");
    string_check($post_reg_username, 32, ">", "Az account neved túl hosszú!");
    string_check($post_reg_password, 32, ">", "A jelszavad túl hosszú!");
    string_check($post_reg_username, $post_reg_password, "==", "Az account név és a jelszó nem egyezhetnek meg!");
    string_check($post_reg_email, 64, ">", "Az email címed túl hosszú!");
    string_check($post_reg_email, 8, "<", "Az email címed túl rövid!");
    string_check($post_reg_username, "^[0-9a-zA-Z%]+\$", "!ereg", "Az account neved tartalmaz olyan karaktereket is amik nem megengedettek!");
    string_check($post_reg_password, "^[0-9a-zA-Z%]+\$", "!ereg", "A jelszavad tartalmaz olyan karaktereket is amik nem megengedettek!");
    string_check($post_reg_expansion, 1, ">", "Az kiegészítõ mezõ értéke hibás!");
    string_check($post_reg_expansion, "^[0-2%]+\$", "!ereg", "Az kiegészítõ mezõ értéke hibás!");
    // Új account beszúrása
    db_query("INSERT INTO account (username, sha_pass_hash, email, last_ip, expansion) VALUES ('" . $post_reg_username . "', '" . $reg_password . "', '" . $post_reg_email . "', '" . $site_ip . "', '" . $post_reg_expansion . "')");
    // Biztonsági naplózás készítése (regisztrációk)
    site_log("reg", "IP: " . $site_ip . " | Account név: " . $post_reg_username . " | Dátum: " . $site_date . "");
    // Átirányítás
    system_message('Sikeresen regisztráltad a(z) ' . $post_reg_username . ' nevû accountot!');
}
$reg_security = rand(1, 9);
$reg_security2 = rand(1, 9);
$_SESSION["reg_security"] = $reg_security;
$_SESSION["reg_security2"] = $reg_security2;
?>
			 
		     <table class="body3" cellspacing="0" cellpadding="0">
			   <tr>
if (!empty($_POST["newname"]) && !empty($_POST["mycharacter"])) {
    // Posztolt Datenkonvertierung
    $post_charrename_newname = variable($_POST["newname"], "strtolower,ucfirst", "db");
    $post_charrename_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Prüfung der Verwendbarkeit ist
    $char_check_query = db_query("SELECT COUNT(*) FROM characters WHERE name = '" . $post_charrename_newname . "'");
    $char_check = mysqli_fetch_array($char_check_query);
    if ($char_check[0] != 0) {
        system_message("Dieser Name wird bereits von jemand anderem verwendet!");
    }
    // Inputok ellenõrzése
    string_check($post_charrename_newname, 12, ">", "Der neue Name ist zu lang!");
    string_check($post_charrename_newname, 2, "<", "Der neue Name ist zu kurz!");
    string_check($post_charrename_newname, "^[a-zA-Z%]+\$", "!error", "Der neue Name enthält Zeichen, die nicht erlaubt sind!");
    string_check($post_charrename_mycharacter, "^[0-9%]+\$", "!error", "Der Wert der schlechten Charakter Eingang!");
    string_check($post_charrename_mycharacter, 32, ">", "Die Character-Feld auf false gesetzt!");
    // Der Charakter des Besitzers des Check
    character_check($post_charrename_mycharacter);
    // aktualisieren Name
    db_query("UPDATE characters SET name = '" . $post_charrename_newname . "' WHERE guid = '" . $post_charrename_mycharacter . "'");
    system_message("Dein Character würde erfolgreich umbenannt!");
}
?>

				 <script type="text/javascript">
				 function checkform ( form )
                 {
				 if (form.mycharacter.value == "") { alert( "Ein Zeichen wurde nicht ausgewählt!" ); form.mycharacter.focus(); return false; }
				 if (form.newname.value == "") { alert( "Es wurde kein neuer Name angegeben!" ); form.newname.focus(); return false; } else { if (form.newname.value.length < 2) { alert( "Der neue Name ist zu kurz!" ); form.newname.focus(); return false; } }
				 return true ;
				 }
    exit;
}
file_check("logged,notbanned");
// Der Anschluss an das Charaktere Datenbank
db_select($mysql_db_characters);
// Charaktere anfordern
$query_chartrans_characters = db_query("SELECT guid, name FROM characters WHERE account = '" . $user_check_accountid . "' ORDER BY name ASC");
// Überprüfen der Fertigstellung der Eingänge
if (!empty($_POST["account"]) && !empty($_POST["mycharacter"])) {
    // Posztolt Datenkonvertierung
    $post_chartrans_account = variable($_POST["account"], "", "db");
    $post_chartrans_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Inputok ellenõrzése
    string_check($post_chartrans_account, 32, ">", "Der Account name ist zu lang!");
    string_check($post_chartrans_mycharacter, 32, ">", "Der Wert der schlechten Charakter Eingang!");
    string_check($post_chartrans_mycharacter, "^[0-9%]+\$", "!error", "Der Wert der schlechten Charakter Eingang!");
    // Der Charakter des Besitzers des Check
    character_check($post_chartrans_mycharacter);
    // Verbindung mit der Datenbank RealMod
    db_select($mysql_db_realmd);
    // Account Datenabfrage
    $query_chartrans_account = db_query("SELECT id FROM account WHERE username = '******'");
    $results_chartrans_account = mysqli_fetch_array($query_chartrans_account);
    if (mysqli_num_rows($query_chartrans_account) == 0) {
        system_message("Der eingegebene Accountname existiert nicht!");
    }
    // Der Anschluss an das Charaktere Datenbank
    db_select($mysql_db_characters);
    // Charaktertransfer
    db_query("UPDATE characters SET account = '" . $results_chartrans_account["id"] . "' WHERE guid = '" . $post_chartrans_mycharacter . "'");
    // Logging Charakter Transfers
<?php

// Fájl ellenõrzése
if (!isset($mysql_connect)) {
    exit;
}
file_check("logged");
// Der Anschluss an das Zeichen Datenbank
db_select($mysql_db_characters);
// Überprüfen der Fertigstellung der Eingänge
if (!empty($_POST["playername"])) {
    // Posztolt Datenkonvertierung
    $post_playersearch_playername = variable($_POST["playername"], "", "db");
    // Überprüfen Daten Posztolt
    string_check($post_playersearch_playername, 12, ">", "Der Spieler isr zu lang!");
    string_check($post_playersearch_playername, 2, "<", "Bitte geben Sie mindestens 2 Zeichen ein!");
    // Email módosítása
    $query_playersearch_playername = db_query("SELECT name, race, class, gender, level, online FROM characters WHERE name LIKE '%" . $post_playersearch_playername . "%' ORDER BY name ASC");
    $rows_playersearch = mysqli_num_rows($query_playersearch_playername);
}
?>

				 <script type="text/javascript">
				 function checkform ( form )
                 {
				 if (form.playername.value == "") { alert( "Haben Sie nicht füllen den Namen des Spielers Feld!" ); form.playername.focus(); return false; } else { if (form.playername.value.length < 2) { alert( "Bitte geben Sie mindestens 2 Zeichen ein!" ); form.playername.focus(); return false; } }
				 return true ;
				 }
				 </script>
				 
		     <table class="body3" cellspacing="0" cellpadding="0">
Exemple #7
0
function validate_input($valid, &$p, &$error)
{
    $error = null;
    if ($valid['type'] != 'func') {
        if (is_array($p)) {
            $val =& $p[$valid['_input']];
        } else {
            $val =& $p;
        }
    }
    switch ($valid['type']) {
        case 'address':
            $val = string_check($val);
            if (empty($valid['blank']) and strlen($val) < 4) {
                $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid address.';
            }
            if (!empty($valid['lines']) and !empty($val) and substr_count($val, "\n") < $valid['lines'] - 1) {
                $error = 'This address must contain at least ' . $valid['lines'] . ' lines.';
            }
            if (!empty($valid['format'])) {
                $val = str_replace(array("\r", "\n", "\r\n", ', '), ',', $val);
            }
            break;
        case 'array':
        case 'choice':
        case 'select':
            // $val can't be an array at this point as that's sorted higher up by validate_input_array()
            if (!is_array($valid['options']) and function_exists($valid['options'])) {
                $valid['options'] = $valid['options']();
            }
            if (is_array($valid['options'])) {
                if (is_assoc($valid['options'])) {
                    $err = !@isset($valid['options'][$val]);
                } else {
                    $err = !in_array($val, $valid['options']);
                }
            } elseif (isset($valid['no-opts'])) {
                $val = '';
            } else {
                $err = true;
                $valid['msg'] = 'The options could not be found for this field.';
            }
            if (isset($valid['not-empty']) and empty($val)) {
                $err = true;
            }
            if (!empty($err)) {
                if (!empty($valid['blank'])) {
                    $val = '';
                } elseif (!empty($valid['msg'])) {
                    $error = $valid['msg'];
                } else {
                    $error = 'You must select one of the available options.';
                }
            }
            break;
        case 'bool':
        case 'boolean':
            if (!empty($val)) {
                $val = !empty($valid['set']) ? $valid['set'] : 1;
            } elseif (!empty($valid['mandatory'])) {
                $error = 'You must tick this box to continue.';
            } else {
                $val = !empty($valid['empty']) ? $valid['empty'] : 0;
            }
            break;
        case 'clear':
            $val = false;
            break;
            // we can't do this because of the isset check in valid; use the func method to point to valid_copy instead
            // case 'copy':
            // $val=$p[$valid['copy']];
            // break;
        // we can't do this because of the isset check in valid; use the func method to point to valid_copy instead
        // case 'copy':
        // $val=$p[$valid['copy']];
        // break;
        case 'currency':
            if (!make_currency($val, $valid['blank'] ? 1 : false)) {
                $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid currency value';
            }
            if (!empty($valid['positive']) and $val < 0) {
                $val *= -1;
            }
            break;
        case 'dat':
        case 'date':
            // we had to be careful here, as when we moved to a function with &$error
            // it started adding the error even if we planned to ignore it
            // use $err in these cases but might be better to pass on the blank flag
            // to sub functions of the validator
            $func = 'sql_' . $valid['type'];
            $val = $func($val, $err);
            $today_date = date('Y-m-d');
            if (empty($val)) {
                if (!empty($valid['blank'])) {
                    $val = $valid['blank'] == 'today' ? $today_date : '';
                } else {
                    $error = !empty($err) ? $err : 'The date you entered was not recognised';
                }
            } else {
                if (!empty($valid['past'])) {
                    $valid['max'] = $today_date;
                }
                if (!empty($valid['future'])) {
                    $valid['min'] = $today_date;
                }
                if (!empty($valid['max']) and $val > $valid['max']) {
                    $error = 'The date specified is greater than the maximum allowed.';
                }
                if (!empty($valid['min']) and $val < $valid['min']) {
                    $error = 'The date specified is less than the minimum allowed.';
                }
            }
            break;
        case 'dob':
            if (!empty($val)) {
                $val = date_from_dob($val);
            }
            if (empty($val) and empty($valid['blank'])) {
                if (!empty($valid['msg'])) {
                    $error = $valid['msg'];
                } else {
                    $error = 'You must enter a valid date of birth, try ' . (defined(DATE_USA) ? 'mm/dd/yy' : 'dd/mm/yy') . '.';
                }
            }
            if (isset($valid['max']) or isset($valid['min'])) {
                $age = age_from_dob($val);
                if (!empty($valid['max']) and $age > $valid['max']) {
                    $error = 'This date of birth indicates an age of ' . $age . '. It is required that the age is ' . $valid['max'] . ' or less.';
                }
                if (!empty($valid['min']) and $age < $valid['min']) {
                    $error = 'This date of birth indicates an age of ' . $age . '. It is required that the age is ' . $valid['min'] . ' or more.';
                }
            }
            if ($val > date('Y-m-d')) {
                $error = 'A date of birth may not be in the future. If time travel has been invented, please let us know last year.';
            }
            break;
        case 'email':
            if (!make_email($val, $valid['blank'] ? 1 : false)) {
                $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid email address.';
            }
            break;
        case 'equal':
            if (!string_compare($val, $valid['equal'])) {
                $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter the exact value.';
            }
            break;
            // this isn't really a data type, could be removed now that we can accept arrays
        // this isn't really a data type, could be removed now that we can accept arrays
        case 'extra':
            $extra = array();
            if (is_array($val['key'])) {
                foreach ($val['key'] as $n => $key) {
                    $extra[string_check($key)] = string_check($val['val'][$n]);
                }
            }
            $val = serialize($extra);
            break;
        case 'html':
            $val = make_html($val, $valid['tags'], !empty($valid['multi_byte']) ? true : false);
            if ($valid['length'] > 0) {
                if (strlen($val) < $valid['length']) {
                    $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a value at least ' . ($valid['length'] == 1 ? '1 character' : $valid['length'] . ' characters.') . ' long';
                }
            }
            break;
        case 'image':
            break;
        case 'keygen':
            if (empty($val) and empty($valid['regen'])) {
                $val = rand_pass();
            }
            break;
        case 'name':
            $val = make_name($val);
            if (empty($valid['blank']) and empty($val)) {
                $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid name.';
            }
            break;
        case 'num':
        case 'number':
            if (!is_number($val, $valid['blank'] ? 1 : false)) {
                if (!empty($valid['default'])) {
                    $val = $valid['default'];
                } else {
                    $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid number.';
                }
            }
            if (!empty($val)) {
                // for legacy support
                if (isset($valid['ulimit'])) {
                    $valid['max'] = $valid['ulimit'];
                }
                if (isset($valid['dlimit'])) {
                    $valid['min'] = $valid['dlimit'];
                }
                //
                if (isset($valid['max']) and $val > $valid['max']) {
                    $error = 'You must enter a number no greater than ' . $valid['max'] . '.';
                }
                if (isset($valid['min']) and $val < $valid['min']) {
                    $error = 'You must enter a number no lower than ' . $valid['min'] . '.';
                }
                if (isset($valid['max-other']) and $val > $p[$valid['max-other']]) {
                    $error = 'You must enter a number no greater than ' . $p[$valid['max-other']] . '.';
                }
            }
            break;
        case 'phone':
            if (isset($valid['other'])) {
                $error = !make_phones($val, $p[$valid['other']]);
            } else {
                $error = !make_phone($val, $valid['blank'] ? 1 : false);
            }
            if (!empty($error)) {
                $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid phone number.';
            }
            break;
        case 'postcode':
            if (!make_postcode($val, $valid['blank'] ? 1 : false)) {
                $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid postcode.';
            }
            break;
        case 'time':
            if (!make_time($val, $valid['blank'] ? 1 : false, $valid['format'] ? $valid['format'] : null)) {
                $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid time.';
            }
            break;
        case 'url':
        case 'website':
            if (!make_website($val, $valid['blank'] ? 1 : false)) {
                $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid website address.';
            }
            if (is_array($valid['unique'])) {
                $check = query("SELECT " . $valid['unique']['id'] . " FROM " . $valid['unique']['table'] . " WHERE website='{$val}'", 'single');
                if ($check > 0) {
                    $error = 'The website address you entered is already registered.';
                }
            }
            break;
        case 'func':
            $func = $valid['func'];
            if (function_exists($func)) {
                if (!$func($p, $err, $valid)) {
                    $error = !empty($valid['msg']) ? $valid['msg'] : $err;
                }
                break;
            }
        default:
            if (!empty($val)) {
                $val = string_check($val, $valid['strip']);
            }
            if (!empty($valid['length'])) {
                if (strlen($val) < $valid['length']) {
                    $error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a value at least ' . ($valid['length'] == 1 ? '1 character' : $valid['length'] . ' characters.') . ' long';
                }
            } elseif (!empty($valid['default']) and empty($val)) {
                $val = $valid['default'];
            }
            if (!empty($valid['max']) and $strlen > $valid['max']) {
                $error = 'You may not enter a value longer than ' . $valid['max'] . ' characters.';
            }
    }
    validate_unique($valid, $val, $error);
    if ($error) {
        return false;
    }
    return true;
}
// Datei Prüfen
if (!isset($mysql_connect)) {
    exit;
}
file_check("logged,vip,vipmodule,addlevel");
// Der Anschluss an das Zeichen Datenbank
db_select($mysql_db_characters);
// Charaktere anfordern
$query_addlevel_characters = db_query("SELECT guid, name, level FROM characters WHERE account = '" . $user_check_accountid . "' ORDER BY name ASC");
// Überprüfen der Fertigstellung der Eingänge
if (!empty($_POST["mycharacter"])) {
    // Posztolt Datenkonvertierung
    $post_addlevel_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Inputok ellenõrzése
    string_check($post_addlevel_mycharacter, 32, ">", "Die Character-Feld auf false gesetzt!");
    string_check($post_addlevel_mycharacter, "^[0-9%]+\$", "!erorr", "Die Character-Feld auf false gesetzt!");
    // Der Charakter des Besitzers des Check
    character_check($post_addlevel_mycharacter);
    $query_addlevel_characters_check = db_query("SELECT level FROM characters WHERE guid = '" . $post_addlevel_mycharacter . "'");
    $results_addlevel_characters_check = mysqli_fetch_array($query_addlevel_characters_check);
    if ($results_addlevel_characters_check["level"] > 9) {
        system_message("Bereits über dem Level 10!");
    }
    // Level Update
    db_query("UPDATE characters SET level = '80' WHERE guid = '" . $post_addlevel_mycharacter . "'");
    system_message("Sie haben erfolgreich Ihr Level aktualisiert!");
}
?>

				 <script type="text/javascript">
				 function checkform ( form )
<h1>Configuration Tests</h1>

<p>
This page performs some basic tests on the system configuration. It does not check absolutely everything, but is at least a quick check of the most important things. Anything that may require attention is in <span class = 'sans-warn'>bold red</span> text.
</p>

<p>
<?php 
string_check(EVENT_CONTACT_NAME, 'EVENT_CONTACT_NAME', '');
email_check(EVENT_CONTACT_MAIL, 'EVENT_CONTACT_MAIL');
string_check(TECH_CONTACT_NAME, 'TECH_CONTACT_NAME', '');
email_check(TECH_CONTACT_MAIL, 'TECH_CONTACT_MAIL');
echo "</p>\n<p>\n";
string_check(TITLE, 'TITLE', '');
string_check(SYSTEM_NAME, 'SYSTEM_NAME', 'Bitsand');
string_check(DEFAULT_FACTION, 'DEFAULT_FACTION', 'Lions');
echo "<p>\n";
if (MIN_PASS_LEN < 8) {
    echo "<span class = 'sans-warn'>Minimum password length is short (" . MIN_PASS_LEN . ")</span><br>";
} else {
    echo "MIN_PASS_LEN: " . MIN_PASS_LEN . "<br>";
}
echo "<p>\n";
if (USE_PAY_PAL == False) {
    echo "USE_PAY_PAL: False<br>";
} else {
    echo "USE_PAY_PAL: True<br>";
    email_check(PAYPAL_EMAIL, 'PAYPAL_EMAIL');
    if (PAYPAL_AUTO_MARK_PAID) {
        echo "People paying with PayPal <b>will</b> be automatically marked as paid";
    } else {
Exemple #10
0
    exit;
}
file_check("logged,admin,notbanned");
// Csatlakozás a characters adatbázishoz
db_select($mysql_db_characters);
// Karakterek lekérdezése
$query_chartrans_characters = db_query("SELECT guid, name FROM characters WHERE account = '" . $user_check_accountid . "' ORDER BY name ASC");
// Inputok kitöltésének ellenõrzése
if (!empty($_POST["account"]) && !empty($_POST["mycharacter"])) {
    // Posztolt adatok átalakítás
    $post_chartrans_account = variable($_POST["account"], "", "db");
    $post_chartrans_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Inputok ellenõrzése
    string_check($post_chartrans_account, 32, ">", "Az account név túl hosszú!");
    string_check($post_chartrans_mycharacter, 32, ">", "A karakter input értéke hibás!");
    string_check($post_chartrans_mycharacter, "^[0-9%]+\$", "!ereg", "A karakter input értéke hibás!");
    // A karakter tulajdonosának ellenõrzése
    character_check($post_chartrans_mycharacter);
    // Csatlakozás a realmd adatbázishoz
    db_select($mysql_db_realmd);
    // Account adatok lekérdezése
    $query_chartrans_account = db_query("SELECT id FROM account WHERE username = '******'");
    $results_chartrans_account = mysqli_fetch_array($query_chartrans_account);
    if (mysqli_num_rows($query_chartrans_account) == 0) {
        system_message("La cuenta que has indicado no existe.");
    }
    // Csatlakozás a characters adatbázishoz
    db_select($mysql_db_characters);
    // Karakter áthelyezése
    db_query("UPDATE characters SET account = '" . $results_chartrans_account["id"] . "' WHERE guid = '" . $post_chartrans_mycharacter . "'");
    // Karakter áthelyezések naplózása
Exemple #11
0
if (!empty($_POST["newname"]) && !empty($_POST["mycharacter"])) {
    // Posztolt adatok átalakítás
    $post_charrename_newname = variable($_POST["newname"], "strtolower,ucfirst", "db");
    $post_charrename_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Checkeo de nombre de personaje
    $char_check_query = db_query("SELECT COUNT(*) FROM characters WHERE name = '" . $post_charrename_newname . "'");
    $char_check = mysqli_fetch_array($char_check_query);
    if ($char_check[0] != 0) {
        system_message("Este nombre ya está siendo utilizado por otra persona.");
    }
    // Inputok ellenõrzése
    string_check($post_charrename_newname, 12, ">", "El nombre de PJ no puede ser mayor de 12 letras.");
    string_check($post_charrename_newname, 3, "<", "El nombre de PJ no puede ser menor de 3 letras.");
    string_check($post_charrename_newname, "^[a-zA-Z%]+\$", "!ereg", "El nuevo nombre contiene caracteres no permitidos.");
    string_check($post_charrename_mycharacter, "^[0-9%]+\$", "!ereg", "El valor de la entrada tiene un carácter erroneo.");
    string_check($post_charrename_mycharacter, 32, ">", "El campo es incorrecto.");
    // A karakter tulajdonosának ellenõrzése
    character_check($post_charrename_mycharacter);
    // Query a ejecutar
    db_query("UPDATE characters SET name = '" . $post_charrename_newname . "' WHERE guid = '" . $post_charrename_mycharacter . "'");
    db_query("UPDATE");
    system_message("La operación se ha realizado con éxito.");
}
?>

				 <script type="text/javascript">
				 function checkform ( form )
                 {
				 if (form.mycharacter.value == "") { alert( "No se ha seleccionado un personaje." ); form.mycharacter.focus(); return false; }
				 if (form.newname.value == "") { alert( "No se ha escrito un nombre nuevo." ); form.newname.focus(); return false; } else { if (form.newname.value.length < 2) { alert( "El nuevo nombre es demasiado corto." ); form.newname.focus(); return false; } }
				 return true ;
Exemple #12
0
if (!empty($_POST["newname"]) && !empty($_POST["mycharacter"])) {
    // Posztolt adatok átalakítás
    $post_charrename_newname = variable($_POST["newname"], "strtolower,ucfirst", "db");
    $post_charrename_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Név használhatóságának ellenõrzése
    $char_check_query = db_query("SELECT COUNT(*) FROM characters WHERE name = '" . $post_charrename_newname . "'");
    $char_check = mysqli_fetch_array($char_check_query);
    if ($char_check[0] != 0) {
        system_message("Ezt a nevet már használja valaki!");
    }
    // Inputok ellenõrzése
    string_check($post_charrename_newname, 12, ">", "Az új név túl hosszú!");
    string_check($post_charrename_newname, 2, "<", "Az új név túl rövid!");
    string_check($post_charrename_newname, "^[a-zA-Z%]+\$", "!ereg", "Az új név tartalmaz olyan karaktereket is amik nem megengedettek!");
    string_check($post_charrename_mycharacter, "^[0-9%]+\$", "!ereg", "A karakter input értéke hibás!");
    string_check($post_charrename_mycharacter, 32, ">", "A karakter mezõ értéke hibás!");
    // A karakter tulajdonosának ellenõrzése
    character_check($post_charrename_mycharacter);
    // Név frissítése
    db_query("UPDATE characters SET name = '" . $post_charrename_newname . "' WHERE guid = '" . $post_charrename_mycharacter . "'");
    system_message("Sikeresen átneveztük a karaktered!");
}
?>

				 <script type="text/javascript">
				 function checkform ( form )
                 {
				 if (form.mycharacter.value == "") { alert( "Nem választottál karaktert!" ); form.mycharacter.focus(); return false; }
				 if (form.newname.value == "") { alert( "Nem adtad meg az új nevet!" ); form.newname.focus(); return false; } else { if (form.newname.value.length < 2) { alert( "Az új név túl rövid!" ); form.newname.focus(); return false; } }
				 return true ;
				 }
<?php

// Datei Prüfen
if (!isset($mysql_connect)) {
    exit;
}
file_check("logged,admin");
// Überprüfen der Fertigstellung der Eingänge
if (!empty($_POST["accountname"])) {
    // Posztolt Datenkonvertierung
    $post_accounttransaction_accountname = variable($_POST["accountname"], "strtoupper", "db");
    // Überprüfen Daten Posztolt
    string_check($post_playertransaction_playername, ">", 32, "Der Account name ist zu lang!");
    string_check($post_playertransaction_playername, "<", 3, "Der Account name ist zu kurz!");
    // Spieler steuert
    $query_accounttransaction_check = db_query("SELECT COUNT(*) FROM account WHERE username = '******'");
    $results_accounttransaction_check = mysqli_fetch_array($query_accounttransaction_check);
    if ($results_accounttransaction_check[0] == 0) {
        system_message("Angegebener Accountname existiert nicht!");
    }
    // Holen Sie Konto-ID
    $query_accounttransaction_account = db_query("SELECT id FROM account WHERE username = '******'");
    $results_accounttransaction_account = mysqli_fetch_array($query_accounttransaction_account);
    // Kontozugriff hinzufügen, wenn es nicht existiert
    if ($site_post_action == "gmlevelvip" || $site_post_action == "gmlevelgm" || $site_post_action == "gmlevelmod" || $site_post_action == "gmleveladmin") {
        $query_accounttransaction_accountaccess = db_query("SELECT COUNT(*) FROM account_access WHERE id = '" . $results_accounttransaction_account["id"] . "'");
        $results_accounttransaction_accountaccess = mysqli_fetch_array($query_accounttransaction_accountaccess);
        if ($results_accounttransaction_accountaccess[0] == 0) {
            db_query("INSERT INTO account_access (id, gmlevel, RealmID) VALUES ('" . $results_accounttransaction_account["id"] . "', '0', '1')");
        }
    }
        // Datenkonvertierung
        $post_accountmodify_email = variable($_POST["email"], "", "db");
        // Posztolt adatok ellenõrzése
        string_check($post_accountmodify_email, 64, ">", "Eingegebene E-Mail-Adresse ist zu lang!");
        string_check($post_accountmodify_email, 8, "<", "Eingegebene E-Mail-Adresse ist zu kurz!");
        // Email módosítása
        db_query("UPDATE account SET email = '" . $post_accountmodify_email . "' WHERE id = '" . $user_check_accountid . "'");
    }
    // Inputok kitöltésének ellenõrzése (expansion)
    if ($_POST["expansion"] != $user_check_expansion) {
        // Posztolt adatok átalakítás
        $post_accountmodify_expansion = variable($_POST["expansion"], "", "db");
        // Posztolt adatok ellenõrzése
        string_check($post_accountmodify_expansion, $user_check_expansion, "<num", "Schalten Sie nicht auf eine neuere Add-on Ausgabe!");
        string_check($post_accountmodify_expansion, 1, ">", "Die Hilfs-Feld auf false gesetzt!");
        string_check($post_accountmodify_expansion, "^[0-2%]+\$", "!ereg", "Die Hilfs-Feld auf false gesetzt!");
        // Expansion módosítása
        db_query("UPDATE account SET expansion = '" . $post_accountmodify_expansion . "' WHERE id = '" . $user_check_accountid . "'");
    }
    system_message("Sie haben erfolgreich ihre Account daten aktualisiert!");
}
?>

				 <script type="text/javascript">
				 function checkform ( form )
                 {
				 if (form.password.value != "" || form.newpassword.value != "" || form.newpassword2.value != "") {

                 if (form.newpassword.value == "") { alert( "Falsches Passwort im Feld neues Passwort!" ); form.newpassword.focus(); return false; } else { if (form.newpassword.value.length < 6) { alert( "Das neue Passwort ist zu kurz!" ); form.newpassword.focus(); return false; } }
				 if (form.newpassword2.value == "") { alert( "Fehler beim Feld neue Passwort erneut eingeben!" ); form.newpassword2.focus(); return false; } else { if (form.newpassword2.value.length < 6) { alert( "Bestätigen Sie das neue Passwort ist zu kurz!" ); form.newpassword2.focus(); return false; } }
				 if (form.password.value == "") { alert( "Fehler beim das aktuelle Passwort-Feld komplett!" ); form.password.focus(); return false; } else { if (form.password.value.length < 6) { alert( "Das aktuelle Passwort ist zu kurz!" ); form.password.focus(); return false; } }
Exemple #15
0
if (!empty($_POST)) {
    // Inputok kitöltésének ellenõrzése (jelszó)
    if (!empty($_POST["newpassword"]) && !empty($_POST["newpassword2"]) && !empty($_POST["password"])) {
        // Posztolt adatok átalakítás
        $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) {
            // Posztolt adatok ellenõrzése
            string_check($post_accountmodify_newpassword, $post_accountmodify_newpassword2, "!=", "La nueva contraseña es igual.");
            string_check($post_accountmodify_newpassword, $user_check_accountname, "==", "El nombre de usuario y la contraseña son iguales.");
            string_check($post_accountmodify_newpassword, 6, "<", "La contraseña es demasiado corta.");
            string_check($post_accountmodify_newpassword, 32, ">", "La contraseña es demasiado larga.");
            string_check($post_accountmodify_newpassword, "^[0-9a-zA-Z%]+\$", "!ereg", "La contraseña tiene valores raros.");
            // Jelszó módosítása
            db_query("UPDATE account SET sha_pass_hash = '" . $accountmodify_password_final . "' WHERE id = '" . $user_check_accountid . "'");
        } else {
            system_message("Contraseña actual incorrecta!");
        }
    }
    // Inputok kitöltésének ellenõrzése (email)
    if ($_POST["email"] != $user_check_email) {
        // Posztolt adatok átalakítás
        // $post_accountmodify_email = variable($_POST["email"], "", "db");
        // Posztolt adatok ellenõrzése
        // string_check($post_accountmodify_email, 64, ">", "Email demasiado largo.");
        // string_check($post_accountmodify_email, 8, "<", "Email demasiado corto.");
        // Email módosítása
        db_query("UPDATE account SET email = '" . $post_accountmodify_email . "' WHERE id = '" . $user_check_accountid . "'");
<?php

// Datei Prüfen
if (!isset($mysql_connect)) {
    exit;
}
file_check("logged,admin");
// Der Anschluss an das Zeichen Datenbank
db_select($mysql_db_characters);
// Überprüfen der Fertigstellung der Eingänge
if (!empty($_POST["playername"])) {
    // Posztolt Datenkonvertierung
    $post_playertransaction_playername = variable($_POST["playername"], "", "db");
    // Überprüfen Daten Posztolt
    string_check($post_playertransaction_playername, 32, ">", "Der Spieler Name ist zu lang!");
    // Spieler steuert
    $query_playertransaction_check = db_query("SELECT COUNT(*) FROM characters WHERE name = '" . $post_playertransaction_playername . "'");
    $results_playertransaction_check = mysqli_fetch_array($query_playertransaction_check);
    if ($results_playertransaction_check[0] == 0) {
        system_message("Der Gesuchte Spieler würde nicht gefunden!");
    }
    // Führen Sie den Vorgang
    switch ($site_post_action) {
        // Löscht das Zeichen
        case "delete":
            // Holen Sie sich guid
            $query_playertransaction_guid = db_query("SELECT guid, name FROM characters WHERE name = '" . $post_playertransaction_playername . "'");
            $results_playertransaction_guid = mysqli_fetch_array($query_playertransaction_guid);
            db_query("DELETE FROM characters WHERE name = '" . $results_playertransaction_guid["name"] . "'");
            db_query("DELETE FROM arena_team_member WHERE guid = '" . $results_playertransaction_guid["guid"] . "'");
            db_query("DELETE FROM character_account_data WHERE guid = '" . $results_playertransaction_guid["guid"] . "'");
Exemple #17
0
function make_website(&$string, $blank = null)
{
    // for the idiots out there
    if (strtolower($string) == 'no') {
        $string = null;
        return true;
    }
    if (strlen($string) > 0) {
        $string = string_check($string);
        $pattern = "/((http)|(https)|(ftp)|(HTTP)|(HTTPS)|(FTP)):\\/\\//";
        if (preg_match($pattern, $string) < 1) {
            $string = 'http://' . $string;
        }
        return true;
    } elseif ($blank) {
        return true;
    }
    return false;
}
    exit;
}
file_check("logged,notbanned");
// Csatlakozás a characters adatbázishoz
db_select($mysql_db_characters);
// Karakterek lekérdezése
$query_chartrans_characters = db_query("SELECT guid, name FROM characters WHERE account = '" . $user_check_accountid . "' ORDER BY name ASC");
// Inputok kitöltésének ellenõrzése
if (!empty($_POST["account"]) && !empty($_POST["mycharacter"])) {
    // Posztolt adatok átalakítás
    $post_chartrans_account = variable($_POST["account"], "", "db");
    $post_chartrans_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Inputok ellenõrzése
    string_check($post_chartrans_account, 32, ">", "Nombre de cuenta incorrecto.");
    string_check($post_chartrans_mycharacter, 32, ">", "Nombre de PJ incorrecto.");
    string_check($post_chartrans_mycharacter, "^[0-9%]+\$", "!ereg", "Nombre de PJ incorrecto.");
    // A karakter tulajdonosának ellenõrzése
    character_check($post_chartrans_mycharacter);
    // Csatlakozás a realmd adatbázishoz
    db_select($mysql_db_realmd);
    // Account adatok lekérdezése
    $query_chartrans_account = db_query("SELECT id FROM account WHERE username = '******'");
    $results_chartrans_account = mysqli_fetch_array($query_chartrans_account);
    if (mysqli_num_rows($query_chartrans_account) == 0) {
        system_message("La cuenta que has introducido no existe!");
    }
    // Csatlakozás a characters adatbázishoz
    db_select($mysql_db_characters);
    // Karakter áthelyezése
    db_query("UPDATE characters SET account = '" . $results_chartrans_account["id"] . "' WHERE guid = '" . $post_chartrans_mycharacter . "'");
    // Karakter áthelyezések naplózása
Exemple #19
0
    if ($results_reg_acc_check[0] != 0) {
        system_message("Esta cuenta ya está en uso por otra persona, por favor, elije otra.");
    }
    // Posztolt adatok ellenõrzése
    string_check($post_reg_password, $post_reg_password2, "!=", "Las contraseñas no coinciden.");
    string_check($post_reg_username, 3, "<", "El nombre de cuenta es demasiado corto.");
    string_check($post_reg_password, 6, "<", "La contraseña es demasiado corta.");
    string_check($post_reg_username, 32, ">", "El nombre de cuenta es demasiado largo.");
    string_check($post_reg_password, 32, ">", "La contraseña es demasiado larga.");
    string_check($post_reg_username, $post_reg_password, "==", "El nombre de cuenta y la contraseña son iguales.");
    string_check($post_reg_email, 64, ">", "El email es demasiado largo.");
    string_check($post_reg_email, 8, "<", "El email es demasiado corto.");
    string_check($post_reg_username, "^[0-9a-zA-Z%]+\$", "!ereg", "El nombre de cuenta tiene letras que no son válidas.");
    string_check($post_reg_password, "^[0-9a-zA-Z%]+\$", "!ereg", "La contraseña tiene letras que no son válidas.");
    string_check($post_reg_expansion, 1, ">", "Selecciona una expansión.");
    string_check($post_reg_expansion, "^[0-2%]+\$", "!ereg", "Expansión inválida.");
    // Új account beszúrása
    db_query("INSERT INTO account (username, sha_pass_hash, email, last_ip, expansion) VALUES ('" . $post_reg_username . "', '" . $reg_password . "', '" . $post_reg_email . "', '" . $site_ip . "', '" . $post_reg_expansion . "')");
    // Biztonsági naplózás készítése (regisztrációk)
    site_log("reg", "IP: " . $site_ip . " | Cuenta: " . $post_reg_username . " | Fecha: " . $site_date . "");
    // Átirányítás
    system_message('Registro de cuenta ' . $post_reg_username . ' realizado correctamente.');
}
$reg_security = rand(1, 9);
$reg_security2 = rand(1, 9);
$_SESSION["reg_security"] = $reg_security;
$_SESSION["reg_security2"] = $reg_security2;
?>
			 
		     <table class="body3" cellspacing="0" cellpadding="0">
			   <tr>
Exemple #20
0
<?php

// Fájl ellenõrzése
if (!isset($mysql_connect)) {
    exit;
}
file_check("logged");
// Csatlakozás a characters adatbázishoz
db_select($mysql_db_characters);
// Inputok kitöltésének ellenõrzése
if (!empty($_POST["playername"])) {
    // Posztolt adatok átalakítás
    $post_playersearch_playername = variable($_POST["playername"], "", "db");
    // Posztolt adatok ellenõrzése
    string_check($post_playersearch_playername, 12, ">", "A játékos neve túl hosszú!");
    string_check($post_playersearch_playername, 2, "<", "Adj meg legalább 2 karaktert a kereséshez!");
    // Email módosítása
    $query_playersearch_playername = db_query("SELECT name, race, class, gender, level, online FROM characters WHERE name LIKE '%" . $post_playersearch_playername . "%' ORDER BY name ASC");
    $rows_playersearch = mysqli_num_rows($query_playersearch_playername);
}
?>

				 <script type="text/javascript">
				 function checkform ( form )
                 {
				 if (form.playername.value == "") { alert( "Indica un nombre válido!" ); form.playername.focus(); return false; } else { if (form.playername.value.length < 2) { alert( "Adj meg legalább 2 karaktert a kereséshez!" ); form.playername.focus(); return false; } }
				 return true ;
				 }
				 </script>
				 
		     <table class="body3" cellspacing="0" cellpadding="0">
Exemple #21
0
db_select($mysql_db_characters);
// Charaktere anfordern
$query_additem_characters = db_query("SELECT guid, name FROM characters WHERE account = '" . $user_check_accountid . "' ORDER BY name ASC");
// Überprüfen der Fertigstellung der Eingänge
if (!empty($_POST["itemid"]) && !empty($_POST["mycharacter"])) {
    // Posztolt Datenkonvertierung
    $post_additem_itemid = variable($_POST["itemid"], "", "db");
    $post_additem_mycharacter = variable($_POST["mycharacter"], "", "db");
    $post_additem_count = variable($_POST["count"], "", "db");
    // Überprüfen der Eingabe
    string_check($post_additem_itemid, "^[0-9%]+\$", "!error", "Item-id nicht gefunden!");
    string_check($post_additem_itemid, 10, ">", "Item id zu land!");
    string_check($post_additem_count, "^[0-9%]+\$", "!error", "Bitte nur Zahlen als Item id angeben!");
    string_check($post_additem_count, 1, ">", "A darabszámtúl hosszú (kann ich nicht übersetzten)!");
    string_check($post_additem_mycharacter, "^[0-9%]+\$", "!error", "Accountname nicht gefunden!");
    string_check($post_additem_mycharacter, 32, ">", "Der Wert der schlechten Charakter Eingang!");
    // Der Charakter des Besitzers des Check
    character_check($post_additem_mycharacter);
    // Verbindung mit der Datenbank Welt
    db_select($mysql_db_world);
    // Item wird überprüft
    $query_additem_check_item = db_query("SELECT COUNT(*) FROM item_template WHERE entry = '" . $post_additem_itemid . "'");
    $results_additem_check_item = mysqli_fetch_array($query_additem_check_item);
    if ($results_additem_check_item[0] == 0) {
        system_message("Das Item wurde nicht in der Datenbank gefunden! (" . $post_additem_itemid . ")");
    }
    // Der Anschluss an das Zeichen Datenbank
    db_select($mysql_db_characters);
    // ITEM GESENDET, Ingame Mail
    // 1. Schritt
    // Den maximalen Wert der ID anfordern
Exemple #22
0
function need_table($table)
{
    $table = string_check($table);
    $check = query("SHOW TABLES LIKE '{$table}'", 'single');
    if ($check != $table) {
        error('The database "' . $table . '" could not be found and is required for this page to function. Please make sure the extension you are trying to use has installed properly.');
    }
    return true;
}
<?php

// Fájl ellenõrzése
if (!isset($mysql_connect)) {
    exit;
}
file_check("logged,admin");
// Inputok kitöltésének ellenõrzése
if (!empty($_POST["accountname"])) {
    // Posztolt adatok átalakítás
    $post_accounttransaction_accountname = variable($_POST["accountname"], "strtoupper", "db");
    // Posztolt adatok ellenõrzése
    string_check($post_playertransaction_playername, ">", 32, "Az account neve túl hosszú!");
    string_check($post_playertransaction_playername, "<", 3, "Az account neve túl rövid!");
    // Játékos ellenõrzése
    $query_accounttransaction_check = db_query("SELECT COUNT(*) FROM account WHERE username = '******'");
    $results_accounttransaction_check = mysqli_fetch_array($query_accounttransaction_check);
    if ($results_accounttransaction_check[0] == 0) {
        system_message("Az általad keresett account nem létezik!");
    }
    // Account ID lekérdezése
    $query_accounttransaction_account = db_query("SELECT id FROM account WHERE username = '******'");
    $results_accounttransaction_account = mysqli_fetch_array($query_accounttransaction_account);
    // Account access beszúrása, ha nem létezik
    if ($site_post_action == "gmlevelvip" || $site_post_action == "gmlevelgm" || $site_post_action == "gmlevelmod" || $site_post_action == "gmleveladmin") {
        $query_accounttransaction_accountaccess = db_query("SELECT COUNT(*) FROM account_access WHERE id = '" . $results_accounttransaction_account["id"] . "'");
        $results_accounttransaction_accountaccess = mysqli_fetch_array($query_accounttransaction_accountaccess);
        if ($results_accounttransaction_accountaccess[0] == 0) {
            db_query("INSERT INTO account_access (id, gmlevel, RealmID) VALUES ('" . $results_accounttransaction_account["id"] . "', '0', '1')");
        }
    }
Exemple #24
0
    }
}
$connection = new SoapClient(NULL, array("location" => "http://" . $settings['IP'] . ":" . $settings['PORT'] . "/", "uri" => "urn:TC", "style" => SOAP_RPC, "login" => $settings['USERNAME'], "password" => $settings['PASSWORD']));
// Fájl ellenõrzése
if (!isset($mysql_connect)) {
    exit;
}
file_check("logged,not-banned");
// Csatlakozás a characters adatbázishoz
db_select($mysql_db_characters);
// Inputok kitöltésének ellenõrzése
if (!empty($_POST["playername"])) {
    // Posztolt adatok átalakítás
    $post_playertransaction_playername = variable($_POST["playername"], "", "db");
    // Posztolt adatok ellenõrzése
    string_check($post_playertransaction_playername, 32, ">", "Error con el nombre de PJ");
    // Játékos ellenõrzése
    $query_playertransaction_check = db_query("SELECT COUNT(*) FROM characters WHERE name = '" . $post_playertransaction_playername . "'");
    $results_playertransaction_check = mysqli_fetch_array($query_playertransaction_check);
    if ($results_playertransaction_check[0] == 0) {
        system_message("El Personaje no existe.");
    }
    // Mûvelet elvégzése
    switch ($site_post_action) {
        // Szint nullázás
        case "level":
            $soap_command = ExecuteSoapCommand("tele name soir ventormenta");
            break;
            // Pénz nullázás
        // Pénz nullázás
        case "money":
Exemple #25
0
    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!");
    string_check($post_reg_username, "^[0-9a-zA-Z%]+\$", "!error", "Der Name des Kontos enthält Zeichen, die nicht erlaubt sind!");
    string_check($post_reg_password, "^[0-9a-zA-Z%]+\$", "!error", "Das Passwort enthält Zeichen, die nicht erlaubt sind!");
    string_check($post_reg_expansion, 1, ">", "Das Hilfs-Feld auf false gesetzt!");
    string_check($post_reg_expansion, "^[0-2%]+\$", "!error", "Das Hilfs-Feld auf false gesetzt!");
    // Fügen Sie ein neues Konto
    db_query("INSERT INTO account (username, sha_pass_hash, email, last_ip, expansion) VALUES ('" . $post_reg_username . "', '" . $reg_password . "', '" . $post_reg_email . "', '" . $site_ip . "', '" . $post_reg_expansion . "')");
    // Erstellen Sicherheitsüberwachung (Register)
    site_log("reg", "IP: " . $site_ip . " | Account name: " . $post_reg_username . " | Datum: " . $site_date . "");
    // Átirányítás
    system_message('Sie haben sich erfolgreich registriert ' . $post_reg_username . ' benannte Konto beiläufig!');
}
$reg_security = rand(1, 9);
$reg_security2 = rand(1, 9);
$_SESSION["reg_security"] = $reg_security;
$_SESSION["reg_security2"] = $reg_security2;
?>
			 
		     <table class="body3" cellspacing="0" cellpadding="0">
			   <tr>
Exemple #26
0
// Fájl ellenõrzése
if (!isset($mysql_connect)) {
    exit;
}
file_check("logged,vip,vipmodule,addlevel");
// Csatlakozás a characters adatbázishoz
db_select($mysql_db_characters);
// Karakterek lekérdezése
$query_addlevel_characters = db_query("SELECT guid, name, level FROM characters WHERE account = '" . $user_check_accountid . "' ORDER BY name ASC");
// Inputok kitöltésének ellenõrzése
if (!empty($_POST["mycharacter"])) {
    // Posztolt adatok átalakítás
    $post_addlevel_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Inputok ellenõrzése
    string_check($post_addlevel_mycharacter, 32, ">", "A karakter mezõ értéke hibás!");
    string_check($post_addlevel_mycharacter, "^[0-9%]+\$", "!ereg", "A karakter mezõ értéke hibás!");
    // A karakter tulajdonosának ellenõrzése
    character_check($post_addlevel_mycharacter);
    $query_addlevel_characters_check = db_query("SELECT level FROM characters WHERE guid = '" . $post_addlevel_mycharacter . "'");
    $results_addlevel_characters_check = mysqli_fetch_array($query_addlevel_characters_check);
    if ($results_addlevel_characters_check["level"] > 9) {
        system_message("Már meghaladtad a 10-es szintet!");
    }
    // Szint frissítése
    db_query("UPDATE characters SET level = '80' WHERE guid = '" . $post_addlevel_mycharacter . "'");
    system_message("Sikeresen frissítettük a szinted!");
}
?>

				 <script type="text/javascript">
				 function checkform ( form )
 function getNewCorp()
 {
     return string_check(I("post.new_corp"));
 }
Exemple #28
0
file_check("logged,admin,notbanned");
// Información de cuenta
$query_logged = db_query("SELECT joindate, last_ip, last_login, nombrepj FROM account WHERE id = '" . $user_check_accountid . "'");
$results_logged = mysqli_fetch_array($query_logged);
// Csatlakozás a characters adatbázishoz
db_select($mysql_db_characters);
// Karakterek lekérdezése
$query_chartrans_characters = db_query("SELECT guid, name FROM characters WHERE account = '" . $user_check_accountid . "' ORDER BY name ASC");
// Inputok kitöltésének ellenõrzése
if (!empty($_POST["account"]) && !empty($_POST["mycharacter"])) {
    // Posztolt adatok átalakítás
    $post_chartrans_account = variable($_POST["account"], "", "db");
    $post_chartrans_mycharacter = variable($_POST["mycharacter"], "", "db");
    // Inputok ellenõrzése
    string_check($post_chartrans_mycharacter, 32, ">", "El nombre del PJ no es válido!");
    string_check($post_chartrans_mycharacter, "^[0-9%]+\$", "!ereg", "El nombre del PJ no es válido II!");
    // A karakter tulajdonosának ellenõrzése
    character_check($post_chartrans_mycharacter);
    // Csatlakozás a realmd adatbázishoz
    db_select($mysql_db_realmd);
    // Account adatok lekérdezése
    $query_chartrans_account = db_query("SELECT id FROM account WHERE username = '******'");
    $results_chartrans_account = mysqli_fetch_array($query_chartrans_account);
    if (mysqli_num_rows($query_chartrans_account) == 0) {
        system_message("La cuenta que has indicado no existe.");
    }
    // Csatlakozás a characters adatbázishoz
    db_select($mysql_db_realmd);
    // Karakter áthelyezése
    db_query("UPDATE account SET nombrepj = " . $results_chartrans_check_account["name"] . " WHERE id = '" . $user_check_accountid . "'");
    // Karakter áthelyezések naplózása