<?PHP
if (!defined('beerman')) {
    exit();
}
?>
<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){?><?}else{?>
<a class="btn-reg-s" href="<? if(isset($_COOKIE["referer"])) { echo $_COOKIE["referer"]; echo "-"; } ?>reg.html">Регистрация</a>
<script type="text/javascript" src="js/p-log.js"></script>
<a class="btn-login-s" href="login.php">Вход</a>
<? } ?>

<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){
if($id_user != false){
require_once($_SERVER['DOCUMENT_ROOT']."/ref_box.php");
} }
?>


<span class="top-bl-s">Баннер 100х100</span>
<div id="contextblock" class="contextlink">
<?require 'inc/rotator100.php'; ?>
</div>
<span class="bottom-bl-s1">
<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){?>
<a href='/addbanner.html'>Разместить за 0.10 руб.</a>
<?PHP } ?>
</span>



<?
if(strpos($_SERVER['PHP_SELF'], '/tasks.php') !== false){ 
$sql = mysql_query("SELECT `name`,`reyt`,`price`,`id` FROM `seo_tasks` WHERE `modered`='1' AND `balance`>= price+(price*waits)+(price*works) AND `paused`='0' AND `inblock`>'0'");
if(mysql_num_rows($sql) > 0) {
echo "<span class='top-bl-s'>VIP Задания</span>";
while($row=mysql_fetch_assoc($sql)){
echo "<div class='uptask'><a href='tasks.php?view=".$row["id"]."' target='_blank' title='Перейти к заданию'>".$row["name"]."</a>";
echo "<span class='uptaskprice'>Цена: ".($row["price"]*5/6)." $sitevalname</span>";
echo "<span class='rating".intval($row["reyt"])."' style='float: right; margin-top: -2px;'></span></div>";
}
echo "<span class='bottom-bl-s'></span>";
}
}else{
?> 

<span class="top-bl-s">Контекстная реклама</span>
<?require_once($_SERVER['DOCUMENT_ROOT'].'/inc/statlinks.php');?>
<span class="bottom-bl-s1">
<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){?>
<a href='/addstat.html'>Разместить за 0.20 руб.</a>
<?PHP }} ?>
</span>
