Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 17th, 2010 | Syntax: PHP | Size: 2.20 KB | Hits: 76 | Expires: Never
Copy text to clipboard
  1. <?php
  2. ob_start("ob_gzhandler");error_reporting(0);ini_set("register_globals", false);
  3.  
  4. $postac = strtolower(strip_tags(preg_replace('([^a-zA-Z])', '', substr($_POST['x'], 0, 50))));
  5. $scriptrun = strtolower(strip_tags(preg_replace('([^a-zA-Z])', '', substr($_POST['y'], 0, 4))));
  6.  
  7. echo '<meta name="robots" content="noindex, nofollow">
  8. <title>Andeeria Account Level Checker (AALC)</title>
  9. <b>Andeeria Account Level Checker</b><br />
  10. 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 />';
  11.  
  12. if($scriptrun == 'yes') {
  13. // ===================================
  14.  
  15. if($postac == '' || $postac == ' ' || empty($postac)) {
  16.  
  17. echo 'Wpisz nazwe postaci!';
  18.  
  19. } else {
  20.  
  21. function wylaczmysql($kom,$sta) {echo $kom;mysql_close();exit;}
  22. if(mysql_connect(xxx, xxx, xxx) and mysql_select_db(xxx)) {
  23. if(get_magic_quotes_gpc()) {$postac = stripslashes($postac);}
  24.  
  25. $query_prepare = sprintf("SELECT `account` FROM `characters` WHERE `name` IN ('%s') LIMIT 1", mysql_real_escape_string($postac));
  26. $dane = mysql_query($query_prepare) or wylaczmysql('Blad w zapytaniu MySQL');
  27. $konto = mysql_fetch_assoc($dane);
  28. unset($query_prepare,$dane);
  29.  
  30. if($konto['account'] > '0') {
  31. // **********************
  32. $query_prepare = sprintf("SELECT COUNT(`level`) AS `ile` FROM `characters` WHERE `account` = '%s' AND `level` > '76' LIMIT 1", $konto['account']);
  33. $dane = mysql_query($query_prepare) or wylaczmysql('Blad w zapytaniu MySQL');
  34. $wynik = mysql_fetch_assoc($dane);
  35. unset($query_prepare,$dane,$konto);
  36.  
  37. echo 'Na koncie postaci, gdzie znajduje sie "'.ucfirst($postac);
  38.  
  39. if($wynik['ile'] > '0') {
  40. echo '" <b>znajduje sie co najmniej jeden char</b> ';
  41. } else {
  42. echo '" <b>nie ma zadnych innych charow</b> ';
  43. }
  44.  
  45. echo 'o levelu wiekszym lub rownym 77.';
  46. // **********************
  47. } else {
  48. echo 'Nie znaleziono w bazie danych postaci <b>'.$postac.'</b>';
  49. }
  50.  
  51. mysql_close();
  52. } else {
  53. echo 'Nie mozna sie polaczyc z baza danych';exit;
  54. }
  55.  
  56. }
  57.  
  58. // ===================================
  59. }
  60.  
  61. unset($scriptrun,$postac);
  62.  
  63. ?>