Changeset 301 for trunk/banners/banner.php
- Timestamp:
- Dec 28, 2009, 9:06:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/banners/banner.php
r208 r301 16 16 { 17 17 $Referer = 'http://'.$HostName.'/'; 18 $DbResult = mysql_query('SELECT * FROM `banner` WHERE `Web` = "'.$Referer.'"', $Database->id_connection);19 if( mysql_num_rows($DbResult)> 0)20 $Database->SQLCommand('UPDATE `banner` SET `DateLast` = NOW(), `LastURL` = "'.addslashes($_SERVER['HTTP_REFERER']).'" WHERE `Web` = "'.$Referer.'"');21 else mysql_query('INSERT INTO `banner` (`Web`, `DateFirst`, `DateLast`, LastURL`) VALUES ("'.$Referer.'", NOW(), NOW( ), "'.addslashes($_SERVER['HTTP_REFERER']).'")', $Database->id_connection);18 $DbResult = $System->Database->query('SELECT * FROM `banner` WHERE `Web` = "'.$Referer.'"'); 19 if($DbResult->num_rows > 0) 20 $System->Database->query('UPDATE `banner` SET `DateLast` = NOW(), `LastURL` = "'.addslashes($_SERVER['HTTP_REFERER']).'" WHERE `Web` = "'.$Referer.'"'); 21 else $System->Database->query('INSERT INTO `banner` (`Web`, `DateFirst`, `DateLast`, `LastURL`) VALUES ("'.$Referer.'", NOW(), NOW( ), "'.addslashes($_SERVER['HTTP_REFERER']).'")'); 22 22 } 23 23
Note:
See TracChangeset
for help on using the changeset viewer.