Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_COOKIE['fid'])):
- // do something
- endif;
- $('#login').click(function(){
- _gaq.push(['_trackEvent', 'viewerChose', $.cookie('whichSide')+'side']);
- });
- $("#login-btn").click(function(){
- $("#login-load-icon").css("display") = "block";
- $.post( "example.php", { user: "example", pass: "example").done(function(data){
- if(data == 1){
- location.reload();
- } else {
- $("#login-error").css("display") = "block";
- $("#login-load-icon").css("display") = "none";
- }
- });
- });
- if(isset($_POST['user']) && isset($_POST['pass'])):
- if(strtoupper($_POST['user']) == strtoupper("This would a Database Query")):
- if($_POST['pass'] == "This would you matching the hashed pass with the hash in the DB"):
- setcookie("fid", "LOGIN KEY HERE", time()+3600, "/");
- endif;
- endif;
- endif;
- // etc...
- if(isset($_COOKIE['fid')):
- if($_COOKIE['fid'] == $Database['login_key']):
- // get all the user details and they're logged in
- else:
- // they tried to trick your system
- else:
- // load the login-btn
- endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement