This is a discussion on Visitor Web Stats within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; To make it show the correct time, simply find all occureneces of now() in /catalog/includes/visitors_count.php to: date_add(now(), INTERVAL " . ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| To make it show the correct time, simply find all occureneces of now() in /catalog/includes/visitors_count.php to: date_add(now(), INTERVAL " . TIME_ZONE_OFFSET . " HOUR) =============================== To make this contribution properly work with register global off, do the following: Find if ($referer == '') { $referer = $HTTP_SERVER_VARS['HTTP_REFERER']; } Change to if ($referer == '') { // $referer = $HTTP_SERVER_VARS['HTTP_REFERER']; $referer = $_SERVER['HTTP_REFERER']; } Find $uri = sprintf("%s%s%s","http://",$HTTP_HOST,$REQUEST_URI); Change to //$uri = sprintf("%s%s%s","http://",$HTTP_HOST,$REQUEST_URI); $uri = sprintf("%s%s%s","http://",$_SERVER['HTTP_HOST'],$_SERVER['REQUEST_URI']); Find if ( function_exists('tep_get_ip_address') ) { $b_ip = tep_get_ip_address(); } else { $b_ip = getenv('REMOTE_ADDR'); } Change to if (isset($_SERVER)) { if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $test = explode(".",$_SERVER['HTTP_X_FORWARDED_FOR']); if ( ($test[0] == '127') || ($test[0] == '192' && $test[1] == '168') || ($test[0] == '172' && (int)$test[1] > 15 && (int)$test[1] < 32) || ($test[0] == '10') || ($test[0] == '169' && $test[1] == '254') ) { if (isset($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } else { $ip = $_SERVER['REMOTE_ADDR']; } } else { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } else { $ip = $_SERVER['REMOTE_ADDR']; } } else { if (getenv('HTTP_X_FORWARDED_FOR')) { $test = explode(".",$_SERVER['HTTP_X_FORWARDED_FOR']); if ( ($test[0] == '127') || ($test[0] == '192' && $test[1] == '168') || ($test[0] == '172' && (int)$test[1] > 15 && (int)$test[1] < 32) || ($test[0] == '10') || ($test[0] == '169' && $test[1] == '254') ) { if (getenv('HTTP_CLIENT_IP')) { $ip = getenv('HTTP_CLIENT_IP'); } else { $ip = getenv('REMOTE_ADDR'); } } else { $ip = getenv('HTTP_X_FORWARDED_FOR'); } } elseif (getenv('HTTP_CLIENT_IP')) { $ip = getenv('HTTP_CLIENT_IP'); } else { $ip = getenv('REMOTE_ADDR'); } } $b_ip = $ip; Also in the visitors.php file Find default: $order = str_replace('AND', 'WHERE', $robot) . $guest_only ." order by "; break; } Change to default: $order = str_replace('AND', 'WHERE', $robot) . $guest_only ." order by "; break; } $listing = $HTTP_GET_VARS['listing']; ============================ All credits for the register globals fix go to mataphore_e Please IGNORE attached file, it doesn't contain anything More...
__________________ Michael Sasek osCMax Developer
|
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple Visitor Newsletter with HTML Support | michael_s | New osCommerce Contributions | 0 | 06-06-2007 02:41 PM |
| Simple Visitor Newsletter with HTML Support | michael_s | New osCommerce Contributions | 0 | 06-06-2007 01:22 PM |
| customers stats orders | michael_s | New osCommerce Contributions | 0 | 06-06-2007 05:31 AM |
| Visitor Web Stats | michael_s | New osCommerce Contributions | 0 | 02-26-2007 02:10 PM |
| Visitor and Robot Stats from AdvancedSiteStats | michael_s | New osCommerce Contributions | 0 | 02-24-2007 03:12 PM |