Advertisement
Guest User

Untitled

a guest
May 10th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.86 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. if((isset($_COOKIE['username'])) && (isset($_COOKIE['password'])))
  4. {
  5. $get_username2 = $_COOKIE['username'];
  6. $get_md5_password2 = $_COOKIE['password'];
  7. $get_username_password2 = ($get_username2 . ":" . $get_md5_password2);
  8. $get_file2 = file_get_contents("accounts/usernames_and_md5_passwords.txt");
  9. if((!stristr($get_file2, $get_username_password2) === FALSE) && (strlen($get_md5_password2) == 32))
  10. {
  11. // MATCH
  12. echo("<p /><font color='purple' face='Courier' size='3'>Logged In!</font><br />");
  13. echo("<a href='../logout.php'>Logout</a></br>");
  14. echo("<a href='../profile.php?username=" . $get_username2 . "'>View Profile</a></br>");
  15. }
  16. else
  17. {
  18. echo("<form action='../login.php' method='post'><table border='0'><tr><td>");
  19. echo("<font color='purple' face='Courier' size='3'>Username:</font></td>");
  20. echo("<td><input type='text' name='username' id='username' /></td></tr>");
  21. echo("<tr><td><font color='purple' face='Courier' size='3'>Password:</font></td>");
  22. echo("<td><input type='password' name='password' id='password' /></td></tr>");
  23. echo("<tr><td>&nbsp;</td><td>");
  24. echo("<input type='submit' value='l0g1n' id='submit1' name='submit1' />&nbsp;&nbsp;<a href='../accounts/registration.php'><b>r3g15t3r</b></a></td></tr></table></form>");
  25. }
  26. }
  27. else
  28. {
  29. echo("<form action='../login.php' method='post'><table border='0'><tr><td>");
  30. echo("<font color='purple' face='Courier' size='3'>Username:</font></td>");
  31. echo("<td><input type='text' name='username' id='username' /></td></tr>");
  32. echo("<tr><td><font color='purple' face='Courier' size='3'>Password:</font></td>");
  33. echo("<td><input type='password' name='password' id='password' /></td></tr>");
  34. echo("<tr><td>&nbsp;</td><td>");
  35. echo("<input type='submit' value='l0g1n' id='submit1' name='submit1' />&nbsp;&nbsp;<a href='../accounts/registration.php'><b>r3g15t3r</b></a></td></tr></table></form>");
  36. }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement