Файл: core/modules/ads.php
Строк: 8
<?php
if (!defined('CMS')) { die('Access Denied!'); }
if (!empty($_REQUEST['id'])) {
$id = num($_REQUEST['id']);
$row = $db->selectRow("SELECT * FROM ?_ads WHERE `ads_id` = ? LIMIT 1", $id);
if (!empty($row)) {
$row['ads_url'] = str_replace('http://', '', $row['ads_url']);
$db->query("UPDATE ?_ads SET `ads_count` = (`ads_count` + 1) WHERE `ads_id` = ? LIMIT 1", $id);
redirect('http://' . $row['ads_url']);
}
else {
redirect($config['site_url']);
}
}
else {
redirect($config['site_url']);
}
die;
?>