PHP-Code:
<div style="background:url(/templates/ModernBlue/css/images/briefcase.png) no-repeat scroll 50% 0px;">
{if $settings.fads_available == 'yes'}
<div class="featured_ads" style="float:left;">
<div class="title">{$lang.txt.featuredad}</div>
<div class="fcontent">
<ul class="featured-ads">
{if getfeaturedad()}{/if}
</ul>
</div>
</div>
{/if}
{if $settings.flinks_available == 'yes'}
<div class="featured_ads">
<div class="title2">{$lang.txt.featuredlink}</div>
<div class="fcontent">
<ul class="featured-ads">
{if getfeaturedlink()}{/if}
</ul>
</div>
</div>
{/if}
<div class="clear"></div>
</div>
flink.php
PHP-Code:
define("scriptad", 1);
define("ROOTPATH", dirname(__FILE__) . "/");
define("INCLUDES", ROOTPATH . "includes/");
require_once INCLUDES . "global.php";
if (!is_numeric($input->g['id'])) {
header("location: index.php");
$db->close();
exit();
}
else {
$ad_id = $db->real_escape_string($input->g['id']);
$res = $db->fetchOne("SELECT COUNT(*) AS NUM FROM featured_link WHERE id=" . $ad_id);
if ($res != 0) {
$featuredlink = $db->fetchOne("SELECT url from featured_link WHERE id=" . $ad_id);
$upd = $db->query("UPDATE featured_link SET clicks=clicks+1 WHERE id=" . $ad_id);
header("location:" . $featuredlink);
$db->close();
exit();
}
else {
header("location: index.php");
$db->close();
exit();
}
}
exit();