Advertisement
Guest User

Untitled

a guest
Feb 24th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. if(isset($_COOKIE['fid'])):
  2. // do something
  3. endif;
  4.  
  5. $('#login').click(function(){
  6. _gaq.push(['_trackEvent', 'viewerChose', $.cookie('whichSide')+'side']);
  7. });
  8.  
  9. $("#login-btn").click(function(){
  10. $("#login-load-icon").css("display") = "block";
  11. $.post( "example.php", { user: "example", pass: "example").done(function(data){
  12. if(data == 1){
  13. location.reload();
  14. } else {
  15. $("#login-error").css("display") = "block";
  16. $("#login-load-icon").css("display") = "none";
  17. }
  18. });
  19. });
  20.  
  21. if(isset($_POST['user']) && isset($_POST['pass'])):
  22. if(strtoupper($_POST['user']) == strtoupper("This would a Database Query")):
  23. if($_POST['pass'] == "This would you matching the hashed pass with the hash in the DB"):
  24. setcookie("fid", "LOGIN KEY HERE", time()+3600, "/");
  25. endif;
  26. endif;
  27. endif;
  28. // etc...
  29.  
  30. if(isset($_COOKIE['fid')):
  31. if($_COOKIE['fid'] == $Database['login_key']):
  32. // get all the user details and they're logged in
  33. else:
  34. // they tried to trick your system
  35. else:
  36. // load the login-btn
  37. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement