<div class="browse">
  <div class="filtr-container">
    <form method='POST' id='db_filtr_yes' action='./'>
      <input type='hidden' name='set_db_filtr' value='yes'>
      <?
      if ( is_array ( $this -> _filtr_combo ) ) foreach ( $this -> _filtr_combo as $combo )
      {
        ?>
        <div class="group">
          <label><?=ucfirst( $combo['name'] );?>:</label>
          <div class="content">
            <select name="<?= $combo['seo_name'];?>">
              <option value=''>&nbsp;</option>
              <?
              if ( is_array ( $combo['value'] ) ) foreach ( $combo['value'] as $key => $val )
              {
                ?>
                <option value='<?=$key;?>'
                  <?
                  if ( isset( $combo['val'] ) && $key == $combo['val'] )
                  {
                    ?>selected='selected'<?
                  }
                  ?>
                ><?=$val;?></option>
                <?
              }
              ?>
            </select>
          </div>
        </div>
        <?
      }

      if ( is_array( $this -> _filtr_text ) ) foreach ( $this -> _filtr_text as $text )
      {
        ?>
        <div class="group">
          <label><?=ucfirst( $text['name'] );?>:</label>
          <div class="content">
            <input type='text' name="<?=$text['seo_name'];?>" value="<? if ( isset( $text['value'] ) ) echo $text['value'];?>">
          </div>
        </div>
        <?
      }

      if ( is_array( $this -> _filtr_ttext ) ) foreach ( $this -> _filtr_ttext as $text )
      {
        ?>
        <div class="group">
          <label><?=ucfirst( $text['name'] );?>:</label>
          <div class="content">
            <input type='text' name="<?=$text['seo_name'];?>" value="<? if ( isset( $text['value'] ) ) echo $text['value'];?>">
            <?
            if ( is_array( $text['select'] ) ) foreach ( $text['select'] as $key => $val )
            {
              ?><input type='hidden' name="<?=$text['seo_name'];?>_trans[]" value="<?=htmlspecialchars( $key );?>[]<?=htmlspecialchars( $val );?>"><?
            }
            ?>
          </div>
        </div>
        <?
      }
      ?>
      <div class="filtr-buttons">
        <a class="button button_add" onClick='$("#db_filtr_yes").submit();'>Zastosuj</a>
        <a class='button button_cancel' onClick='$("#fdb_filtr_no").submit();'>Anuluj</a>
      </div>
    </form>
    <form method='POST' id='fdb_filtr_no'>
      <input type='hidden' name='set_db_filtr' value='no'>
    </form>
  </div>
</div>