<?
  $url_page = $_SERVER['REQUEST_URI'];
  $bg = 'active';
?>
<div style="margin: 0 0 10px 0;">
  <ul class="nav nav-tabs">
	<li class="nav-item">
	  <a class="nav-link <? if ( strpos( $url_page, 'pay' ) ) echo $bg; ?>" href="/history=pay" >Выплаты</a>
	</li>
   <li class="nav-item dropdown">
	  <a class="nav-link dropdown-toggle <? if ( strpos( $url_page, 'serfing' ) OR strpos( $url_page, 'klink' ) OR strpos( $url_page, 'statlink' ) OR strpos( $url_page, 'chain' ) OR strpos( $url_page, 'banners' ) OR strpos( $url_page, 'tests' ) OR strpos( $url_page, 'tasks' ) ) echo $bg; ?>"  data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Рекламные площадки</a>
	  <div class="dropdown-menu">
		<a class="dropdown-item" href="/history=serfing">Серфинг</a>
		<a class="dropdown-item" href="/history=autoserfing">Авто-серфинг</a>
		<a class="dropdown-item" href="/history=tests">Оплачиваемые тесты</a>
		<a class="dropdown-item" href="/history=tasks">Оплачиваемые задания</a>
		<a class="dropdown-item" href="/history=klink">Контекстраня реклама</a>
		<a class="dropdown-item" href="/history=statlink">Статические ссылки</a>
		<a class="dropdown-item" href="/history=chain">Рекламная цепочка</a>
		<a class="dropdown-item" href="/history=banners">Баннерная реклама</a>
		<div class="dropdown-divider"></div>
		<a class="dropdown-item disabled" href="#">Вконтакте</a>
		<a class="dropdown-item disabled" href="#">Ютуб</a>
	  </div>
	</li>
	<li class="nav-item">
	  <a class="nav-link <? if ( strpos( $url_page, 'fair' ) ) echo $bg; ?>" href="/history=fair">Ярмарка</a>
	</li>
  </ul>
</div>