Changeset 559 for trunk/Modules/Referrer
- Timestamp:
- Jul 31, 2013, 1:52:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Referrer/Referrer.php
r548 r559 38 38 $HostName = substr($Referrer, strpos($Referrer, '/') + 2); 39 39 $HostName = substr($HostName, 0, strpos($HostName, '/')); 40 if( in_array($HostName, $this->Excludes))40 if(!in_array($HostName, $this->Excludes)) 41 41 { 42 $DbResult = $ System->Database->query('SELECT `Id` FROM `Referrer` WHERE `Web` = "'.$HostName.'"');42 $DbResult = $this->System->Database->query('SELECT `Id` FROM `Referrer` WHERE `Web` = "'.$HostName.'"'); 43 43 if($DbResult->num_rows > 0) 44 44 { 45 45 $DbRow = $DbResult->fetch_assoc(); 46 $ System->Database->query('UPDATE `Referrer` SET `Hits` = `Hits` + 1, `DateLast` = NOW(), `LastURL` = "'.46 $this->System->Database->query('UPDATE `Referrer` SET `Hits` = `Hits` + 1, `DateLast` = NOW(), `LastURL` = "'. 47 47 addslashes($Referrer).'" WHERE `Id` = '.$DbRow['Id']); 48 } else $ System->Database->query('INSERT INTO `Referrer` (`Web`, `DateFirst`, `DateLast`, `LastURL`, `Hits`) '.48 } else $this->System->Database->query('INSERT INTO `Referrer` (`Web`, `DateFirst`, `DateLast`, `LastURL`, `Hits`) '. 49 49 'VALUES ("'.$HostName.'", NOW(), NOW( ), "'.addslashes($Referrer).'", 1)'); 50 50 }
Note:
See TracChangeset
for help on using the changeset viewer.