本文整理汇总了PHP中string_check函数的典型用法代码示例。如果您正苦于以下问题:PHP string_check函数的具体用法?PHP string_check怎么用?PHP string_check使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了string_check函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: csv_array_parse
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;
}
开发者ID:m1ke,项目名称:easy-site-utils,代码行数:23,代码来源:common.php
示例2: file_check
}
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 )
开发者ID:Jougito,项目名称:Dyn2011,代码行数:31,代码来源:add-money.php
示例3: system_message
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>
开发者ID:Jougito,项目名称:Dyn2011,代码行数:31,代码来源:reg.php
示例4: variable
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 ;
}
开发者ID:Rastrian,项目名称:WAM-TRINTIYCORE,代码行数:31,代码来源:character-rename.php
示例5: file_check
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 = '" . $post_chartrans_account . "'");
$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
开发者ID:Rastrian,项目名称:WAM-TRINTIYCORE,代码行数:31,代码来源:character-transfer.php
示例6: file_check
<?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">
开发者ID:Rastrian,项目名称:WAM-TRINTIYCORE,代码行数:31,代码来源:player-search.php
示例7: validate_input
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 {
//.........这里部分代码省略.........
开发者ID:m1ke,项目名称:easy-site-utils,代码行数:101,代码来源:data.php
示例8: file_check
// 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 )
开发者ID:Rastrian,项目名称:WAM-TRINTIYCORE,代码行数:31,代码来源:add-level.php
示例9: string_check
<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 {
开发者ID:jfharden,项目名称:bitsand,代码行数:31,代码来源:admin_config_db_test.php
示例10: file_check
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 = '" . $post_chartrans_account . "'");
$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
开发者ID:Jougito,项目名称:Dyn2011,代码行数:31,代码来源:donate2.php
示例11: variable
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 ;
开发者ID:Jougito,项目名称:Dyn2011,代码行数:31,代码来源:donate1.php
示例12: variable
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 ;
}
开发者ID:Jougito,项目名称:Dyn2011,代码行数:31,代码来源:character-rename.php
示例13: file_check
<?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 = '" . $post_accounttransaction_accountname . "'");
$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 = '" . $post_accounttransaction_accountname . "'");
$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')");
}
}
开发者ID:Rastrian,项目名称:WAM-TRINTIYCORE,代码行数:31,代码来源:account-transaction.php
示例14: variable
// 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; } }
开发者ID:Rastrian,项目名称:WAM-TRINTIYCORE,代码行数:31,代码来源:account-modify.php
示例15: variable
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 . "'");
开发者ID:Jougito,项目名称:Dyn2011,代码行数:31,代码来源:account-modify.php
示例16: file_check
<?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"] . "'");
开发者ID:Rastrian,项目名称:WAM-TRINTIYCORE,代码行数:31,代码来源:player-transaction.php
示例17: make_website
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;
}
开发者ID:m1ke,项目名称:easy-site-utils,代码行数:19,代码来源:string.php
示例18: file_check
<?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">
开发者ID:Jougito,项目名称:Dyn2011,代码行数:31,代码来源:player-search.php
示例19: db_select
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 ic
|
请发表评论