<?
# Конфигурация
$db->query("SELECT * FROM db_conf WHERE id = '1' LIMIT 1");
$cnf = $db->fetchArray();
$price_banners = $cnf['price_banners'];
?>
<div class="alert alert-primary text-center">
<div class="row text-center">
<style>
.b468 {display:inline-block;position:relative;padding: 4px 4px 4px 4px;background: #f9f9f9;}
.b468 small a {color: #666666;font-weight: bold;}
.b468 small a:hover {color: #a62232;}
.b468 .buy468 {position: absolute; top:2px; right: 2px;color: #fff;font-size: 14px;}
.b468 .buy468::after {position: absolute; top:2px; right: 2px;content: "+"; background: #a62232;padding:1px 4px;font-weight: bold; }
.b468 .buy468:hover::after {position: absolute; top:2px; right: 2px; font-size: 16px; background: #91cb55;padding:2px 5px;}
</style>
<div class="col-lg-6 col-md-12 p-2">
<?php
$now = time();
$db->query("DELETE FROM db_advbanners WHERE `date_del` < '$now'");
$db->Query("SELECT * FROM `db_advbanners` WHERE status = '1' ORDER BY RAND() LIMIT 1");
$rows = $db->FetchArray();
$days = $rows['dayban'];
$add = $rows['date_add'];
$date_add = $add+(60*60*24*$days);
$data_del = time()+(60*60*24*$days);
?>
<?php
if($date_add >= $now){ ?>
<?php if ($uid) : ?>
<div class="b468" style="max-width: 100%;"> <a class="buy468" href="/user/banners" title="Добавить баннер за <?=$price_banners;?> руб./сутки"></a> <a href="<?php echo $rows['urlban']; ?>" target="_blank" title="">
<img src="<?php echo $rows['urlbanners']; ?>" style="width:468px; height:60px;" class="img-fluid" alt="" >
</a></div>
<?php endif;?>
<?php if (!$uid) : ?>
<div class="b468" style="max-width: 100%;"> <a class="buy468" href="/banners" title="Добавить баннер за <?=$price_banners;?> руб./сутки"></a><a href="<?php echo $rows['urlban']; ?>" target="_blank" title="">
<img src="<?php echo $rows['urlbanners']; ?>" style="width:468px; height:60px;" class="img-fluid" alt="" >
</a></div>
<?php endif;?>
<?php } else { ?>
<?php if ($uid) : ?>
<div class="b468"> <a class="buy468" href="/user/banners" title="Добавить баннер за <?=$price_banners;?> руб./сутки"></a> <a href="/user/banners" target="_blank" title="">
<img src="/img/banner44.jpg" style="max-width: 100%;" alt="" >
</a></div>
<?php endif;?>
<?php if (!$uid) : ?>
<div class="b468"> <a class="buy468" href="/banners" title="Добавить баннер за <?=$price_banners;?> руб./сутки"></a> <a href="/user/banners" target="_blank" title="">
<img src="/img/banner44.jpg" style="max-width: 100%;" alt="" >
</a></div>
<?php endif;?>
<?php } ?>
</div>
<div class="col-lg-6 col-md-12 p-2">
<?php
$now2 = time();
$db->Query("SELECT * FROM `db_advbanners` WHERE status = '1' ORDER BY RAND() LIMIT 1");
$rows2 = $db->FetchArray();
$days2 = $rows2['dayban'];
$add2 = $rows2['date_add'];
$date_add2 = $add2+(60*60*24*$days2);
$data_del2 = time()+(60*60*24*$days2);
?>
<?php
if($date_add2 >= $now2){ ?>
<?php if ($uid) : ?>
<div class="b468" style="max-width: 100%;"> <a class="buy468" href="/user/banners" title="Добавить баннер за <?=$price_banners;?> руб./сутки"></a><a href="<?php echo $rows2['urlban']; ?>" target="_blank" title="">
<img src="<?php echo $rows2['urlbanners']; ?>" style="width:468px; height:60px;" class="img-fluid" alt="" >
</a></div>
<?php endif;?>
<?php if (!$uid) : ?>
<div class="b468" style="max-width: 100%;"> <a class="buy468" href="/banners" title="Добавить баннер за <?=$price_banners;?> руб./сутки"></a><a href="<?php echo $rows2['urlban']; ?>" target="_blank" title="">
<img src="<?php echo $rows2['urlbanners']; ?>" style="width:468px; height:60px;" class="img-fluid" alt="" >
</a></div>
<?php endif;?>
<?php } else { ?>
<?php if ($uid) : ?>
<div class="b468"> <a class="buy468" href="/user/banners" title="Добавить баннер за <?=$price_banners;?> руб./сутки"></a> <a href="/user/banners" target="_blank" title="">
<img src="/img/banner44.jpg" style="max-width: 100%;" alt="" >
</a></div>
<?php endif;?>
<?php if (!$uid) : ?>
<div class="b468"> <a class="buy468" href="/banners" title="Добавить баннер за <?=$price_banners;?> руб./сутки"></a> <a href="/user/banners" target="_blank" title="">
<img src="/img/banner44.jpg" style="max-width: 100%;" alt="" >
</a></div>
<?php endif;?>
<?php } ?>
</div>
</div>
</div>