<?php
/* -----------------------------------------------------------------------------------------
$Id: tracking.php 1151 2005-08-12 09:19:33Z gwinger $
XT-Commerce - community made shopping
http://www.xt-commerce.com
Copyright (c) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
Third Party contribution:
Some ideas and code from TrackPro v1.0 Web Traffic Analyzer
Copyright (C) 2004 Curve2 Design www.curve2.com
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
$ref_url = parse_url($_SERVER['HTTP_REFERER']);
if ($_SESSION['tracked'] != true) { // if this visitor has not been tracked
$_SESSION['tracking']['http_referer']= $ref_url;
$_SESSION['tracked'] = true; // set tracked so they are only logged once
}
if (!isset($_SESSION['tracking']['ip']))
$_SESSION['tracking']['ip'] = $_SERVER['REMOTE_ADDR'];
if (!isset ($_SESSION['tracking']['refID'])) {
// check if referer exists
if (isset($_GET['refID'])) {
$campaign_check_query_raw = "SELECT *
FROM ".TABLE_CAMPAIGNS."
WHERE campaigns_refID = '".xtc_db_input($_GET['refID'])."'";
$campaign_check_query = xtc_db_query($campaign_check_query_raw);
if (xtc_db_num_rows($campaign_check_query) > 0) {
$_SESSION['tracking']['refID'] = xtc_db_input($_GET['refID']);
// count hit (block IP for 1 hour)
$insert_sql = array('user_ip'=>$_SESSION['tracking']['ip'],'campaign'=>xtc_db_input($_GET['refID']),'time'=>'now()');
// $check_date = mktime(0, date("i")-1, 0, date("m"), date("d"), date("Y"));
// $ip_query = xtc_db_query("SELECT * FROM ".TABLE_CAMPAIGNS_IP." WHERE campaign='".xtc_db_input($_GET['refID'])."' and user_ip='".$_SESSION['tracking']['ip']."' and time > '".$check_date."'");
// if (!xtc_db_num_rows($ip_query))
xtc_db_perform(TABLE_CAMPAIGNS_IP,$insert_sql);
}
}
}
if (!isset ($_SESSION['tracking']['date']))
$_SESSION['tracking']['date'] = (date("Y-m-d H:i:s"));
if (!isset ($_SESSION['tracking']['browser']))
$_SESSION['tracking']['browser'] = $_SERVER["HTTP_USER_AGENT"];
$i = count($_SESSION['tracking']['pageview_history']);
if ($i > 6) {
array_shift($_SESSION['tracking']['pageview_history']);
$_SESSION['tracking']['pageview_history'][6] = $ref_url;
} else {
$_SESSION['tracking']['pageview_history'][$i] = $ref_url;
}
if ($_SESSION['tracking']['pageview_history'][$i] == $_SESSION['tracking']['http_referer'])
array_shift($_SESSION['tracking']['pageview_history']);
?>| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| classes/ | 2013-11-12 21:07 | 942.5 KB | 76129f60960:kunden | dxwrx-rx-r | |
| data/ | 2013-11-12 21:05 | 241.56 KB | 76129f60960:kunden | dxwrx-rx-r | |
| econda/ | 2013-11-12 21:06 | 180 KB | 76129f60960:kunden | dxwrx-rx-r | |
| fonts/ | 2013-11-12 21:06 | 550.54 KB | 76129f60960:kunden | dxwrx-rx-r | |
| functions/ | 2013-11-12 21:05 | 11.49 KB | 76129f60960:kunden | dxwrx-rx-r | |
| local/ | 2013-11-12 21:05 | 603 B | 76129f60960:kunden | dxwrx-rx-r | |
| modules/ | 2013-11-12 21:06 | 1.13 MB | 76129f60960:kunden | dxwrx-rx-r | |
| nusoap/ | 2013-11-12 21:06 | 573.08 KB | 76129f60960:kunden | dxwrx-rx-r | |
| vrclasses/ | 2013-11-12 21:05 | 19.83 KB | 76129f60960:kunden | dxwrx-rx-r | |
| yoochoose/ | 2013-11-12 21:06 | 24.51 KB | 76129f60960:kunden | dxwrx-rx-r | |
| .htaccess | 2025-01-28 22:35 | 1.27 KB | 76129f60960:kunden | -xw-x----- | |
| application_bottom.php | 2013-11-12 21:05 | 3.16 KB | 76129f60960:kunden | -xw-x----- | |
| application_top.php | 2013-11-12 21:05 | 33.97 KB | 76129f60960:kunden | -xw-x----- | |
| application_top_callback.php | 2013-11-12 21:05 | 7.1 KB | 76129f60960:kunden | -xw-x----- | |
| application_top_export.php | 2013-11-12 21:05 | 4.04 KB | 76129f60960:kunden | -xw-x----- | |
| banners.php | 2013-11-12 21:05 | 749 B | 76129f60960:kunden | -xw-x----- | |
| cart_actions.php | 2013-11-12 21:05 | 24.67 KB | 76129f60960:kunden | -xw-x----- | |
| center_modules.php | 2013-11-12 21:05 | 1.2 KB | 76129f60960:kunden | -xw-x----- | |
| configure.org.php | 2013-11-12 22:28 | 2.69 KB | 76129f60960:kunden | -xw-x----- | |
| configure.php | 2018-03-15 01:25 | 2.62 KB | 76129f60960:kunden | -xw-x----- | |
| configure.sample.php | 2013-11-12 21:05 | 3.67 KB | 76129f60960:kunden | -xw-x----- | |
| database_tables.php | 2013-11-12 21:05 | 4.87 KB | 76129f60960:kunden | -xw-x----- | |
| debug_config.sample-extended.inc.php | 2013-11-12 21:05 | 1.97 KB | 76129f60960:kunden | -xw-x----- | |
| debug_config.sample.inc.php | 2013-11-12 21:05 | 1 KB | 76129f60960:kunden | -xw-x----- | |
| filenames.php | 2013-11-12 21:05 | 5.39 KB | 76129f60960:kunden | -xw-x----- | |
| form_check.js.php | 2013-11-12 21:05 | 5.77 KB | 76129f60960:kunden | -xw-x----- | |
| general.js | 2013-11-12 21:05 | 5.08 KB | 76129f60960:kunden | -xw-x----- | |
| google_conversiontracking.js.php | 2013-11-12 21:05 | 1.13 KB | 76129f60960:kunden | -xw-x----- | |
| header.php | 2013-11-12 21:05 | 15.95 KB | 76129f60960:kunden | -xw-x----- | |
| mb.log | 2017-01-17 22:38 | 231 B | 76129f60960:kunden | -xw-x----- | |
| tracking.php | 2013-11-12 21:05 | 2.67 KB | 76129f60960:kunden | -xw-x----- | |
| write_customers_status.php | 2013-11-12 21:05 | 9.88 KB | 76129f60960:kunden | -xw-x----- | |