<?
$url_page = $_SERVER['REQUEST_URI'];
$nav_link_active = 'class="nav-link active"';
$nav_link = 'class="nav-link"';
?>
<ul class="nav nav-tabs">
  <li class="nav-item">
    <a <? if ( $url_page == '/tasks' ) echo $nav_link_active; else echo $nav_link; ?> href="/tasks">Все задания</a>
  </li>
  <li class="nav-item">
    <a <? if ( $url_page == '/tasks_work' ) echo $nav_link_active; else echo $nav_link; ?> href="/tasks_work">Выполняемые</a>
  </li>
  <li class="nav-item">
    <a <? if ( $url_page == '/tasks_wait' ) echo $nav_link_active; else echo $nav_link; ?> href="/tasks_wait">На проверке</a>
  </li>
  <li class="nav-item">
    <a <? if ( $url_page == '/tasksok' ) echo $nav_link_active; else echo $nav_link; ?> href="/tasksok">Завершенные</a>
  </li>
  <li class="nav-item">
    <a <? if ( $url_page == '/selected_tasks' ) echo $nav_link_active; else echo $nav_link; ?> href="/selected_tasks">Избранные</a>
  </li>
</ul>
<br>