Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- Error_Reporting(E_ALL & ~E_NOTICE);
- unset($l);
- session_start();
- session_register($l);
- include ("includes/config.php");
- include ("dbcon.php");
- include ("includes/functions.php");
- // CHECK AND UPDATE TRAFFIC STATS
- $date=date("d/m/y");
- $user_ip_address = $HTTP_SERVER_VARS["REMOTE_ADDR"]; /*Fetch the user's IP Address */
- $traffic_stats=mysql_fetch_array(mysql_query("select * from jsgamingcenter_traffic WHERE date='$date'", $casdb));
- if ($traffic_stats[1]!=$date) {
- mysql_query("INSERT INTO `jsgamingcenter_traffic` VALUES('', '$date', '0', '0')", $casdb);
- }
- $tuserip=mysql_fetch_array(mysql_query("select * from jsgamingcenter_users WHERE ip_reg='$user_ip_address'", $casdb));
- if ($tuserip[ip_reg]==$user_ip_address) {
- mysql_query("UPDATE jsgamingcenter_traffic set visitors_re=visitors_re+'1' where date='$date'", $casdb);
- }
- if ($tuserip[ip_reg]!=$user_ip_address) {
- mysql_query("UPDATE jsgamingcenter_traffic set visitors_new=visitors_new+'1' where date='$date'", $casdb);
- }
- /***********************************************************************
- Check if user is logged on and display the appropriate page
- ************************************************************************/
- if($page=="" or $page==" ") {
- header("Location: casino_start.php");
- }
- if($page!="" && $page!=" ") {
- if(!isset($l)) {
- include ("templates/template_$page.php");
- } else {
- include ("templates/template_$page.php");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement