Advertisement
Guest User

Untitled

a guest
Oct 10th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?php
  2. $page = currentPage();
  3. if(isset($user) && $user->isLoggedIn()){
  4. if($page != 'location.php' && $page != 'patch.php'){
  5. $dest=encodeURIComponent("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");
  6. $date = new DateTime("now");
  7. $last = new DateTime($user->data()->last_loc);
  8. $last->modify("+2 minutes");
  9. if($last < $date){
  10. Redirect::to($us_url_root."location.php?dest=".$dest);
  11. }
  12. }
  13. }
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement