Ignore:
Timestamp:
Mar 9, 2010, 11:29:05 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Jména tabulek v databází upraveny na stejná s prvními velkými písmeny.
  • Upraveno: Doplněny SQL uvozovky do mnoha SQL dotazů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/banners/banner.php

    r301 r365  
    1616    {
    1717      $Referer = 'http://'.$HostName.'/';
    18       $DbResult = $System->Database->query('SELECT * FROM `banner` WHERE `Web` = "'.$Referer.'"');
     18      $DbResult = $System->Database->query('SELECT * FROM `Banner` WHERE `Web` = "'.$Referer.'"');
    1919      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']).'")');
     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.