Changeset 42 for banners/banner.php
- Timestamp:
- Jan 29, 2009, 12:18:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
banners/banner.php
r41 r42 8 8 $Database->SelectDatabase($Config['Database']['Database']); 9 9 10 header('Content-Type: image/png');10 //header('Content-Type: image/png'); 11 11 $Referer = addslashes($_SERVER['HTTP_REFERER']); 12 $Database->SQLCommand('REPLACE INTO `banner` (`Web`, `DateLast`) VALUES ("'.$Referer.'",NOW() )'); 12 $DbResult = mysql_query('SELECT * FROM `banner` WHERE `Web` = "'.$Referer.'"', $Database->id_connection); 13 if(mysql_num_rows($DbResult) > 0) 14 $Database->SQLCommand('UPDATE `banner` SET `DateLast` = NOW() WHERE `Web` = "'.$Referer.'"'); 15 else mysql_query('INSERT INTO `banner` (`Web`, `DateFirst`, `DateLast`) VALUES ("'.$Referer.'", NOW(), NOW( ))', $Database->id_connection); 13 16 $Image = imagecreatefromjpeg(addslashes($_GET['image'])); 14 17 imagepng($Image);
Note:
See TracChangeset
for help on using the changeset viewer.