forked from intelliants/elitius
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxp.php
More file actions
executable file
·50 lines (45 loc) · 1.42 KB
/
Copy pathxp.php
File metadata and controls
executable file
·50 lines (45 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/***************************************************************************
*
* PROJECT: eLitius Open Source Affiliate Software
* VERSION: 1.0
* LISENSE: GNU GPL (http://www.opensource.org/licenses/gpl-license.html)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* Link to eLitius.com can not be removed from the software pages without
* permission of the eLitius respective owners. It is the only requirement
* for using this software.
*
* Copyright 2009 Intelliants LLC
* http://www.intelliants.com/
*
***************************************************************************/
require_once('classes/XpConfig.php');
require_once('classes/Xp.php');
require_once('utils/util.php');
$vid = (INT)$_GET['id'];
$pid = (INT)$_GET['pid'];
$vref = getenv("HTTP_REFERER");
if ($vid > 0)
{
$acb = $gXpDb->checkByCookie($vid, addslashes($_COOKIE['xp']), $pid);
if(!empty($_COOKIE['xp']) && count($acb)>0)
{
$gXpDb->updateVisitor(addslashes($_COOKIE['xp']), $vid, $pid);
$gXpDb->addHit($vid);
}
else
{
$uid = $_COOKIE['xp']? addslashes($_COOKIE['xp']) : registerVisitor($vid, '');//set cookies
if($uid)
{
$gXpDb->addVisitor($vid, $pid, $uid, $vref);
}
}
header("Location: {$gXpConfig['incoming_page']}");
exit;
}
?>