Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. <?
  2. Error_Reporting(E_ALL & ~E_NOTICE);
  3. unset($l);
  4. session_start();
  5. session_register($l);
  6. include ("includes/config.php");
  7. include ("dbcon.php");
  8. include ("includes/functions.php");
  9. // CHECK AND UPDATE TRAFFIC STATS
  10. $date=date("d/m/y");
  11. $user_ip_address = $HTTP_SERVER_VARS["REMOTE_ADDR"]; /*Fetch the user's IP Address */
  12. $traffic_stats=mysql_fetch_array(mysql_query("select * from jsgamingcenter_traffic WHERE date='$date'", $casdb));
  13. if ($traffic_stats[1]!=$date) {
  14. mysql_query("INSERT INTO `jsgamingcenter_traffic` VALUES('', '$date', '0', '0')", $casdb);
  15. }
  16. $tuserip=mysql_fetch_array(mysql_query("select * from jsgamingcenter_users WHERE ip_reg='$user_ip_address'", $casdb));
  17. if ($tuserip[ip_reg]==$user_ip_address) {
  18. mysql_query("UPDATE jsgamingcenter_traffic set visitors_re=visitors_re+'1' where date='$date'", $casdb);
  19. }
  20. if ($tuserip[ip_reg]!=$user_ip_address) {
  21. mysql_query("UPDATE jsgamingcenter_traffic set visitors_new=visitors_new+'1' where date='$date'", $casdb);
  22. }
  23.  
  24. /***********************************************************************
  25. Check if user is logged on and display the appropriate page
  26. ************************************************************************/
  27. if($page=="" or $page==" ") {
  28. header("Location: casino_start.php");
  29. }
  30. if($page!="" && $page!=" ") {
  31. if(!isset($l)) {
  32. include ("templates/template_$page.php");
  33. } else {
  34. include ("templates/template_$page.php");
  35. }
  36. }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement