<?php
if (isset($_SESSION['username']) and isset($_SESSION['password'])) {
    $yarmarka = '<a href="/refbirj">Ярмарка</a>';
    $exit = '<a href="/exit" style="color: #800000;">Выход</a>';
	$stpx = mysql_fetch_array(mysql_query("SELECT status FROM promotion_status WHERE id = '1'"));
	$gsdfgfdsg = '<a href="/status">Карьера</a>';
	$dsfgsdfgds = '';
	$passwordrec = '';
	 $loginx = '';
	if($stpx{'status'} == 1) { $promotion = '<a href="/promotion" style="color: #1c62b9;">Акции</a>'; } else { $promotion = '<a href="/promotion" >Акции</a>'; }
} else {
    $loginx = '<a href="/login" style="color: #1c62b9;">Вход</a>';
    $passwordrec = '<a href="/pasrec" style="color: #800000;">Забыли пароль?</a>';
	$gsdfgfdsg = '';
	$dsfgsdfgds = '<a href="/register" style="color: #1c62b9;">Регистрация</a>';
	$exit = '';
	$yarmarka = '';
}
$konkurs_button = mysql_fetch_array( mysql_query("SELECT(SELECT count(*) FROM konkurs WHERE end_date > '".time()."')color_con"));
if ($konkurs_button['color_con'] >= 1) { $ksb_x = '<a href="/konkurs" style="color: #1c62b9;">Конкурсы</a>'; } else {$ksb_x = '<a href="/konkurs">Конкурсы</a>';}
?>
<a href="/home">Главная</a><a href="/news">Новости</a>
<a href="/forum">Форум</a>
<a href="/top=reyting">Топ 30</a>
<?=$ksb_x?>
<?=$promotion?>
<a href="/cat">Каталог</a>
<?=$yarmarka?>
<a href="/payments">Выплаты</a>
<?=$gsdfgfdsg?>
<a href="/tos">Правила</a>
<a href="/policy">Услуги и оплата</a>
<a href="/contact">Контакты</a>
<?=$dsfgsdfgds?>
<?=$exit?>
<?=$loginx?>
<?=$passwordrec?>