Advertisement
Guest User

Untitled

a guest
Aug 15th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. <?php error_reporting(0);
  2. if (!defined('AXE'))
  3. exit;
  4. //if session set, then we shoudlnt be here
  5. if (isset($_SESSION['user']))
  6. {
  7. print "Du bist schon eingeloggt!."; $tpl_footer = new Template("styles/".$style."/footer.php");
  8. $tpl_footer->setVar("imagepath", 'styles/'.$style.'/images/');
  9. print $tpl_footer->toString();
  10. exit;
  11. }
  12. //common include
  13. $box_simple_wide = new Template("styles/".$style."/box_simple_wide.php");
  14. $box_wide = new Template("styles/".$style."/box_wide.php");
  15. $box_wide->setVar("imagepath", 'styles/'.$style.'/images/');
  16. $box_simple_wide->setVar("imagepath", 'styles/'.$style.'/images/');
  17. //end common include
  18. if (isset($_POST['action']))
  19. {
  20. if (pun_htmlspecialchars($_POST['username'])=='')
  21. {
  22. $cont2= "Login/username cannot be blank. <meta http-equiv='refresh' content='2;url=./quest.php?name=login'/>";
  23. }
  24. elseif (pun_htmlspecialchars($_POST['username'])=='')
  25. {
  26. $cont2= "Password cannot be blank! <meta http-equiv='refresh' content='2;url=./quest.php?name=login'/>";
  27. }
  28. //lets select acc db
  29. mysql_select_db($acc_db);
  30. special_core_exec_onlogin(pun_htmlspecialchars($_POST['username']));
  31.  
  32. $a = mysql_query("SELECT ".$db_translation['encrypted_password']." FROM ".$db_translation['accounts']." WHERE ".$db_translation['login']." = '".$db->escape(pun_htmlspecialchars($_POST['username']))."'") or die (mysql_error());
  33. $a2 = mysql_fetch_array($a);
  34. if ($a2[0]==sha1(strtoupper(pun_htmlspecialchars($_POST['username'])).':'.strtoupper(pun_htmlspecialchars($_POST['password']))))
  35. {
  36. if (pun_htmlspecialchars($_POST['username'])=='')
  37. {
  38. $cont2= "Login/username cannot be blank. <meta http-equiv='refresh' content='0;url=./quest.php?name=login'/>";
  39. }
  40. elseif (pun_htmlspecialchars($_POST['password'])=='')
  41. {
  42. $cont2= "Password cannot be blank! <meta http-equiv='refresh' content='0;url=./quest.php?name=login'/>";
  43. }
  44. else
  45. {
  46. $_SESSION['user']=pun_htmlspecialchars($_POST['username']);
  47. $cont2= "You are now logged in! <meta http-equiv='refresh' content='0;url=./'/>";
  48. }
  49. $box_wide->setVar("content_title", "Login");
  50. $box_wide->setVar("content", $cont2);
  51. print $box_wide->toString();
  52. $tpl_footer = new Template("styles/".$style."/footer.php");
  53. $tpl_footer->setVar("imagepath", 'styles/'.$style.'/images/');
  54. print $tpl_footer->toString();
  55. exit;
  56. }
  57. else
  58. {
  59. $warn = "<font color='red'>(!)</font>";
  60. $warn2 = "<strong>Incorrect username or password!</strong>";
  61. }
  62. }
  63.  
  64.  
  65. $cont2='
  66. <form action="" method="post">
  67. <table align="center" border="0">
  68.  
  69. <tr>
  70. <td class="td">
  71. <label for="username">
  72. Username: </label> </td>
  73. <td>
  74. <input type="text" id="username" maxlength="20" name="username" /> '. $warn.' </td>
  75. </tr>
  76.  
  77. <tr>
  78. <td class="td">
  79. <label for="password">
  80. Password: </label> </td>
  81. <td>
  82. <input type="password" id="password" maxlength="20" name="password" /> '. $warn .' </td>
  83. </tr>
  84. </table><center>'. $warn2.'<br />
  85. *Use your in-game account details*<br /><br />
  86. <a href="./quest.php?name=gimmepass">Forgot password?</a><br /><br />
  87. <input type="submit" name="action" value="Login" class="button doit" />
  88. </form></center>';
  89. $box_wide->setVar("content_title", "Login");
  90. $box_wide->setVar("content", $cont2);
  91. print $box_wide->toString();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement