<?php
    $a = $this->router->method;
?>
<ul class="nav nav-pills alt-pills">
    <li class="nav-item">
        <a class="nav-link py-1 <?php echo ($a == 'index') ? 'active' : ''; ?>" href="/tareas">Tareas 
        <?php
            if ($_SESSION['tareas_pendientes']) {
                ?>
                    <span class="badge badge-pill badge-warning"><?php echo $_SESSION['tareas_pendientes']; ?></span>
                <?php
            }
        ?>
        </a>
    </li>
    <li class="nav-item">
        <a class="nav-link py-1 <?php echo ($a == 'solicitudes') ? 'active' : ''; ?>" href="/tareas/solicitudes">Solicitudes 
        <?php
            if ($_SESSION['tareas_validacion']) {
                ?>
                    <span class="badge badge-pill badge-warning"><?php echo $_SESSION['tareas_validacion']; ?></span>
                <?php
            }
        ?>
        </a>
    </li>
	<li class="nav-item">
        <a class="nav-link py-1 <?php echo ($a == 'autotareas') ? 'active' : ''; ?>" href="/tareas/autotareas">Autotareas 
        <?php
            if ($_SESSION['autotareas']) {
                ?>
                    <span class="badge badge-pill badge-warning"><?php echo $_SESSION['autotareas']; ?></span>
                <?php
            }
        ?>
        </a>
    </li>
</ul>