Ignore:
Timestamp:
Dec 28, 2009, 9:06:44 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Zaznamenávání odkazujících webů na bannery
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/banners/banner.php

    r208 r301  
    1616    {
    1717      $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']).'")');
    2222    }
    2323
Note: See TracChangeset for help on using the changeset viewer.