<?php
ob_start("ob_gzhandler");error_reporting(0);ini_set("register_globals", false);
$postac = strtolower(strip_tags(preg_replace('([^a-zA-Z])', '', substr($_POST['x'], 0, 50))));
$scriptrun = strtolower(strip_tags(preg_replace('([^a-zA-Z])', '', substr($_POST['y'], 0, 4))));
echo '<meta name="robots" content="noindex, nofollow">
<title>Andeeria Account Level Checker (AALC)</title>
<b>Andeeria Account Level Checker</b><br />
To narzedzie sprawdza, czy na koncie podanej postaci sa jakies chary o levelu rownym lub wyzszym 77.<br /><br /><form action="aalc.php" method="post"><input type="hidden" name="y" value="yes" />Podaj nazwe chara: <input type="text" name="x" /><input type ="submit" /></form><hr />';
if($scriptrun == 'yes') {
// ===================================
if($postac == '' || $postac == ' ' || empty($postac)) {
echo 'Wpisz nazwe postaci!';
} else {
function wylaczmysql($kom,$sta) {echo $kom;mysql_close();exit;}
if(mysql_connect(xxx, xxx, xxx) and mysql_select_db(xxx)) {
if(get_magic_quotes_gpc()) {$postac = stripslashes($postac);}
$query_prepare = sprintf("SELECT `account` FROM `characters` WHERE `name` IN ('%s') LIMIT 1", mysql_real_escape_string($postac));
$dane = mysql_query($query_prepare) or wylaczmysql('Blad w zapytaniu MySQL');
$konto = mysql_fetch_assoc($dane);
unset($query_prepare,$dane);
if($konto['account'] > '0') {
// **********************
$query_prepare = sprintf("SELECT COUNT(`level`) AS `ile` FROM `characters` WHERE `account` = '%s' AND `level` > '76' LIMIT 1", $konto['account']);
$dane = mysql_query($query_prepare) or wylaczmysql('Blad w zapytaniu MySQL');
$wynik = mysql_fetch_assoc($dane);
unset($query_prepare,$dane,$konto);
echo 'Na koncie postaci, gdzie znajduje sie "'.ucfirst($postac);
if($wynik['ile'] > '0') {
echo '" <b>znajduje sie co najmniej jeden char</b> ';
} else {
echo '" <b>nie ma zadnych innych charow</b> ';
}
echo 'o levelu wiekszym lub rownym 77.';
// **********************
} else {
echo 'Nie znaleziono w bazie danych postaci <b>'.$postac.'</b>';
}
mysql_close();
} else {
echo 'Nie mozna sie polaczyc z baza danych';exit;
}
}
// ===================================
}
unset($scriptrun,$postac);
?>