SHARE
TWEET

Untitled

a guest May 30th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /////main.php/////////////
  2.  
  3. <div id="background">
  4.     <img src="images/background.jpg" class="stretch" alt="" />
  5. </div>
  6.  
  7. <div id="main">
  8. <?php
  9.  
  10.  
  11. if(!isset($_SESSION))
  12. {
  13. session_start();
  14. }
  15.  
  16. echo session_id();
  17.  
  18.  
  19. if ($_SESSION['account'] == "") {
  20. include "intro.php";
  21. echo '<h3><hr>You are not logged in<br>
  22. Please login on LTG first.<br>
  23. ';
  24. include "login.php";
  25. include "register.php";
  26. }
  27.  
  28. else {
  29.  
  30. include "info.php";
  31.  
  32. if ($_GET['shop'] != 1) {
  33. include "skills.php";
  34. include "messages.php";
  35. }
  36. else {
  37. include "shop.php";
  38. }
  39.  
  40. }
  41.  
  42.  
  43.  
  44.  
  45.  
  46. ?>
  47. </div>
  48.  
  49. ///////////////////////////login.php///////////////////
  50.  
  51. <?php
  52.  
  53.  
  54. echo session_id();
  55.  
  56.  
  57. $account_log = $_POST['account_log'];
  58. $password_log = $_POST['password_log'];
  59.  
  60. mysql_stuff
  61.  
  62. $login=mysql_query("SELECT * FROM accounts WHERE username = '$account_log'");
  63.  
  64. mysql_close();
  65.  
  66. $password=mysql_result($login,0,"password");
  67.  
  68.  
  69. if (($password == $password_log) && ($password !="")) {
  70. $_SESSION['account'] = $account_log;
  71. $_SESSION['password'] = $password_log;
  72. $_SESSION['profile'] = $account_log;
  73. echo "<meta http-equiv='refresh' content='1'>
  74. ";
  75. }
  76.  
  77. if (($account_log != "") && ($_SESSION['account'] != "")) {
  78. sleep(1);
  79. echo "<font color='red'><h2>Invalid username or password</font></h2>";
  80. $account_log = "";
  81. }
  82.  
  83. echo "
  84. <br>
  85. <form name='account' action='main.php' method='post'><h3>
  86. Username: <input name=account_log SIZE=12><br>
  87. Password: <input type='password' name=password_log SIZE=12><br>
  88. <input type='submit' value='Login' />
  89. </form>
  90. <hr>
  91. ";
  92.  
  93.  
  94.  
  95.  
  96.  
  97. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top