<? global $lang; ?>
<table id='paging'>
  <tr>
    <?
    if ( $this -> _bs > 1 )
    {
      ?>
      <td><a href='<?=str_replace( '[bs]', 1, $this -> _link );?>' class='paging_arrow paging_active'><?=$lang -> getTrans( 'T_PIERWSZA' );?></a></td>
      <td><a href='<?=str_replace( '[bs]', ($this -> _bs - 1 ), $this -> _link );?>' class='paging_arrow paging_active'><?=$lang -> getTrans( 'T_POPRZEDNIA' );?></a></td>
      <?
    }
    else
    {
      ?>
      <td><a class='paging_arrow paging_inactive'><?=$lang -> getTrans( 'T_PIERWSZA' );?></a></td>
      <td><a class='paging_arrow paging_inactive'><?=$lang -> getTrans( 'T_POPRZEDNIA' );?></a></td>
      <?
    }
    for ( $i = $this -> _a; $i <= $this -> _b; $i++ )
    {
      if ( $i > 0 && $i <= $this -> _ls )
      {
        echo "<td>
                <a href='" . str_replace( '[bs]', $i, $this -> _link ) . "' class='paging_numbers";
                if ( $i == $this -> _bs )
                  echo ' paging_current';
                echo "'>" . $i;
       echo "</a>
        </td>";
      }
    }
    if ( $this -> _bs < $this -> _ls )
    {
      ?>
      <td><a href='<?=str_replace( '[bs]', ( $this -> _bs + 1 ), $this -> _link );?>' class='paging_arrow paging_active'><?=$lang -> getTrans( 'T_NASTEPNA' );?></a></td>
      <td><a href='<?=str_replace( '[bs]', $this -> _ls, $this -> _link );?>' class='paging_arrow paging_active'><?=$lang -> getTrans( 'T_OSTATNIA' );?></a></td>
      <?
    }
    else
    {
      ?>
      <td><a class='paging_arrow paging_inactive'><?=$lang -> getTrans( 'T_NASTEPNA' );?></a></td>
      <td><a class='paging_arrow paging_inactive'><?=$lang -> getTrans( 'T_OSTATNIA' );?></a></td>
      <?
    }
    ?>
  </tr>
</table>