<?PHP
if (!defined('beerman')) {
    exit();
}?>

<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){?><?}else{?>
<span class="top-bl-s">Cтатистика - WM Rush</span>
<div class="stattablo"><?=$nasvsego ?><br>
<span>Активных пользователей</span></div>
<div class="stattablo"><?=$newtoday ?><br>
<span>Новых за 24 часа</span></div>
<div class="stattablo"><?=round($totalpaid,2); ?><br>
<span>Всего сделано выплат</span></div>
<span class="bottom-bl-s"></span>

<span class="top-bl-s">Баннер 200х300</span>
<?require_once($_SERVER['DOCUMENT_ROOT'].'/inc/rotator200.php');?>
<span class="bottom-bl-s1">
<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){?>
<a href='/addbanner.html'>Разместить за 0.25 руб.</a>
<?PHP } ?>
</span>

<?}?>
<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){require 'memberstats.php';}?>
<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){?>

<?
$str1menu = $str2menu = $str3menu = $str4menu = $str5menu = false;
if($_COOKIE["vblock1"] == 0) $str1menu = 'style="display:none;"';
if($_COOKIE["vblock2"] == 0) $str2menu = 'style="display:none;"';
if($_COOKIE["vblock3"] == 0) $str3menu = 'style="display:none;"';
if($_COOKIE["vblock4"] == 0) $str4menu = 'style="display:none;"';
if($_COOKIE["vblock5"] == 0) $str5menu = 'style="display:none;"';
?>
<span class='top-bl-s'>Меню пользователя</span>
<?
$sql = mysql_query("SELECT * FROM `b_users` WHERE `id`='$usid'") or die(mysql_error());
if(mysql_num_rows($sql) > 0){
echo <<<HTML
<div class='usermenu'><table class='profileee' width='100%' border='0' cellpadding='0' cellspacing='0' style='margin-bottom: 0;'>
<tr><td class='value1'><form method='POST'>
<input class='box' type='text' name='usid' value='' size='15' maxlength='30'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='image' src='/css/img/naiti.png' width='15' height='15'></form>
</td></tr>
</table>
HTML;
}?>
<span id='mnu_title1' class='usermnutitle-b'>Зарабатывать</span>
<div id='mnu_tblock1' class='usermnublock' <?=$str1menu?>><span class='usermnudelim'></span>
<a href='/sites.php' <?if (strpos($_SERVER['PHP_SELF'], '/sites.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?>>Серфинг сайтов<span class="usermnuline-ref"><?=$all_dyn?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/readmails.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/readmails.php'>Чтение писем<span class="usermnuline-ref"><?=$all_mail?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/tasks.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/tasks.php'>Выполнение заданий<span class="usermnuline-ref"><?=$all_task?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/tests_work.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/tests_work.php'>Прохождение тестов<span class="usermnuline-ref"><?=$all_test?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/sites1.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/sites1.php'>Фото-охота WM Rush<span class="usermnuline-ref"><?=$all_dyn_p?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/ref_comp_view.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/ref_comp_view.php'>Конкурсы реферера<span class="usermnuline-ref"><?=$ref_kon?></span></a>
<?
$pol = $_SESSION["username"];
$prov = mysql_result(mysql_query("SELECT `bonus` FROM `b_users` WHERE `username`='$pol'"),0);
if($prov == 0){
?>
<a <?if (strpos($_SERVER['PHP_SELF'], '/bonus.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/bonus.php'>Ежедневный бонус</a>
<? } ?>
<a <?if (strpos($_SERVER['PHP_SELF'], '/credit.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/credit.php'>Получить займ</a>
<span class='usermnudelim'></span></div>
<span id='mnu_title2' class='usermnutitle-b'>Разместить рекламу</span>
<div id='mnu_tblock2' class='usermnublock' <?=$str2menu?>><span class='usermnudelim'></span>
<a <?if (strpos($_SERVER['PHP_SELF'], '/skidka.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/skidka.php'>Купить скидку<span class='usermnuline-ref'><?=$skid ?> %</span></a>
<a <?
if(empty($_GET["adv"])) $_GET["adv"] = false;
if ($_GET["adv"] == "dyn") {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/adddyn.html'>Реклама в серфинге</a>
<a <?PHP if ($_GET["adv"] == "mails") { ?> class='usermnuline-act'<?PHP } else { ?> class='usermnuline' <?PHP } ?> href='/addmails.html'>Оплачиваемые письма</a>
<a <?PHP if ($_GET["adv"] == "task") { ?> class='usermnuline'<?PHP } else { ?> class='usermnuline' <?PHP } ?> href='/addtask.html'>Оплачиваемые задания</a>
<a <?PHP if ($_GET["adv"] == "test") { ?> class='usermnuline-act'<?PHP } else { ?> class='usermnuline' <?PHP } ?> href='/addtest.html'>Оплачиваемые тесты</a>
<a <?PHP if ($_GET["adv"] == "stat") { ?> class='usermnuline-act'<?PHP } else { ?> class='usermnuline' <?PHP } ?> href='/addstat.html'>Контекстная реклама</a>
<a <?PHP if ($_GET["adv"] == "banner") { ?> class='usermnuline-act'<?PHP } else { ?> class='usermnuline' <?PHP } ?> href='/addbanner.html'>Баннер</a>
<span class='usermnudelim'></span></div>
<span id='mnu_title3' class='usermnutitle-b'>Управление рекламой</span>
<div id='mnu_tblock3' class='usermnublock' <?=$str3menu?>><span class='usermnudelim'></span>
<a <?if (strpos($_SERVER['PHP_SELF'], '/advmanager.php?adv=dyn' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/advmanager.php?adv=dyn'>Реклама в сёрфинге</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/advmanager.php?adv=mails' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/advmanager.php?adv=mails'>Платные письма</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/advmanager.php?adv=task' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/advmanager.php?adv=task'>Платные задания <span class='usermnuline-mail'><?$num_task_work = mysql_num_rows(mysql_query("SELECT `id` FROM `seo_tasks` WHERE `fromid`='$id_user' AND `waits`>'0'")); if($num_task_work> 0) { echo $num_task_work;}?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/advmanager.php?adv=tests' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/advmanager.php?adv=tests'>Платные тесты</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/advmanager.php?adv=stat' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/advmanager.php?adv=stat'>Контекстная реклама</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/advmanager.php?adv=banner' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/advmanager.php?adv=banner'>Баннеры</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/convert.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/convert.html'>Пополнить счёт</a>
<span class='usermnudelim'></span></div>
<span id='mnu_title4' class='usermnutitle-b'>Реферальный кабинет</span>
<div id='mnu_tblock4' class='usermnublock' <?=$str4menu?>><span class='usermnudelim'></span>
<a <?if (strpos($_SERVER['PHP_SELF'], '/referals.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/referals.php'>Мои рефералы<span class='usermnuline-ref'><?=$referals ?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/referals2.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/referals2.php'>Мои рефералы 2-го.<span class='usermnuline-ref'><?=$referals2 ?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/reflinks.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/reflinks.php'>Пригласить рефералов</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/jarmarka.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/jarmarka.html'>Ярмарка рефералов</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/refbek.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/refbek.php'>Рефбэк и приветствие</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/mail_ref.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/mail_ref.php'>Рассылка рефералам</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/ref_comp_view.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/ref_comp_add.php'>Конкурсы для рефералов</a>
<span class='usermnudelim'></span></div>
<span id='mnu_title5' class='usermnutitle-b'>Мой кабинет</span>
<div id='mnu_tblock5' class='usermnublock' <?=$str5menu?>><span class='usermnudelim'></span>
<a <?if (strpos($_SERVER['PHP_SELF'], '/members.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/members.php'>Моя статистика</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/kupon.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/kupon.php'>Подарить сертификат</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/kupon_moy.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/kupon_moy.php'>Получить сертификат<span class='usermnuline-mail'><?=$pod; ?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/mail.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/mail.php'>Моя почта<span class='usermnuline-mail'><?=$inboxcount; ?></span></a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/editprofile.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/editprofile.php'>Мои личные данные</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/history.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/history.php'>История операций</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/dengy.html' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/dengy.html'>Получить деньги</a>
<a <?if (strpos($_SERVER['PHP_SELF'], '/faq.php' ) !== false) {?> class='usermnuline-act'<?} else {?> class='usermnuline' <?PHP } ?> href='/faq.html'>Помощь</a>
</div></div> 
<span class='bottom-bl-s'></span>

<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){?>
<span class="top-bl-s">Баннер 200х300</span>
<?require_once($_SERVER['DOCUMENT_ROOT'].'/inc/rotator200.php');?>
<span class="bottom-bl-s1">
<?if(isset($_SESSION["username"]) && isset($_SESSION["password"])){?>
<a href='/addbanner.html'>Разместить за 0.25 руб.</a>
<?PHP } ?>
</span>
<? } ?>
<?PHP } ?>