    <div class="l-center">
      <div class="l-sort clearfix noselect">
        <div class="l-unit-toolbar__buttonstrip">
          <a class="ui-button cancel" id="btn-back" href="/list/server/"><i class="fas fa-arrow-left status-icon blue"></i> <?=__('Back')?></a>
          <a href="/add/firewall/" id="btn-create" class="ui-button cancel" title="<?=__('Add Rule')?>"><i class="fas fa-plus-circle status-icon green"></i> <?=__('Add Rule')?></a>
          <?php if(!empty($_SESSION['FIREWALL_EXTENSION'])): ?>
            <a class="ui-button cancel" href="/list/firewall/banlist/"><i class="fas fa-eye status-icon red"></i> <?=__('list fail2ban')?></a>
            <a class="ui-button cancel" href="/list/firewall/ipset/"><i class="fas fa-list status-icon blue"></i> <?=__('list ipset')?></a>
          <?php endif; ?>
        </div>
        <ul class="context-menu sort-order animated fadeIn" style="display:none;">
          <li entity="sort-action"><span class="name"><?=__('Action')?> <i class="fas fa-sort-amount-down"></i></span><span class="up active"><i class="fas fa-sort-amount-up"></i></span></li>
          <li entity="sort-protocol"><span class="name"><?=__('Protocol')?> <i class="fas fa-sort-amount-down"></i></span><span class="up"><i class="fas fa-sort-amount-up"></i></span></li>
          <li entity="sort-port"><span class="name"><?=__('Port')?> <i class="fas fa-sort-amount-down"></i></span><span class="up"><i class="fas fa-sort-amount-up"></i></span></li>
          <li entity="sort-ip" sort_as_int="1"><span class="name"><?=__('IP address')?> <i class="fas fa-sort-amount-down"></i></span><span class="up"><i class="fas fa-sort-amount-up"></i></span></li>
          <li entity="sort-comment"><span class="name"><?=__('Comment')?> <i class="fas fa-sort-amount-down"></i></span><span class="up"><i class="fas fa-sort-amount-up"></i></span></li>
        </ul>
        <div class="l-sort-toolbar clearfix">
          <table>
            <tr>
              <td class="sort-by">
                  <?=__('sort by');?>: <span><b><?=__('Action')?> <i class="fas fa-sort-amount-up"></i></b></span>
              </td>
              <td>
                <form action="/bulk/firewall/" method="post" id="objects">
                <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
                <div class="l-select">
                  <select name="action" id="">
                    <option value=""><?=__('apply to selected')?></option>
                    <option value="delete"><?php print __('delete') ?></option>
                  </select>
                </div>
                <button type="submit" class="l-sort-toolbar__filter-apply" value=""><i class="fas fa-arrow-right"></i></button>
              </td>
            </tr>
          </table>
        </div>
      </div>
    </div>

    <div class="l-separator"></div>

    <div class="l-center units compact animated fadeIn">         
          <div class="header table-header">     
            <div class="l-unit__col l-unit__col--right">
                  <div class="clearfix l-unit__stat-col--left super-compact">
                      <input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" onChange="checkedAll('objects');">
                  </div>
                  <div class="clearfix l-unit__stat-col--left wide-2"><b><?php print __('Action');?></b></div>
                  <div class="clearfix l-unit__stat-col--left compact-2 text-right"><b>&nbsp;</b></div>
                  <div class="clearfix l-unit__stat-col--left wide-1 text-center"><b><?php print __('Comment');?></b></div>   
                  <div class="clearfix l-unit__stat-col--left text-center"><b><?php print __('Protocol');?></b></div>
                  <div class="clearfix l-unit__stat-col--left wide-3 text-center"><b><?php print __('Port');?></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center"><b><?php print __('IP address');?></b></div>
            </div>
          </div>

      <?php
        foreach ($data as $key => $value) {
          ++$i;
          if ($data[$key]['SUSPENDED'] == 'yes') {
            $status = 'suspended';
            $spnd_action = 'unsuspend';
            $spnd_icon = 'fa-play';
            $spnd_confirmation = 'UNSUSPEND_RULE_CONFIRMATION' ;
          } else {
            $status = 'active';
            $spnd_action = 'suspend';
            $spnd_icon = 'fa-pause';
            $spnd_confirmation = 'SUSPEND_RULE_CONFIRMATION' ;
          }
      ?>

      <div class="l-unit<? if($status == 'suspended') echo ' l-unit--suspended'; if($_SESSION['favourites']['FIREWALL'][$key] == 1) echo ' l-unit--starred'; ?>" v_unit_id="<?=$key?>" v_section="firewall"
sort-action="<?=$data[$key]['ACTION']?>" sort-protocol="<?=$data[$key]['PROTOCOL']?>" sort-port="<?=$data[$key]['PORT']?>"
sort-ip="<?=str_replace('.', '', $data[$key]['IP'])?>" sort-comment="<?=$data[$key]['COMMENT']?>" sort-star="<? if($_SESSION['favourites']['FIREWALL'][$key] == 1) echo '1'; else echo '2'; ?>">
        <div class="l-unit__col l-unit__col--right">
          <div>
              <div class="clearfix l-unit__stat-col--left super-compact">
                <input id="check<?php echo $i ?>" class="ch-toggle" type="checkbox" name="rule[]" value="<?php echo $key ?>">
              </div>
            <div class="clearfix l-unit__stat-col--left wide-2"><b><a href="/edit/firewall/?rule=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=__('Editing Firewall Rule')?>">
                <? if($data[$key]['SUSPENDED'] == 'no'){ ?>
                  <? if ($data[$key]['ACTION'] == 'DROP') { ?>
                    <i class="fas fa-minus-circle status-icon red icon-pad-right"></i> <?=__($data[$key]['ACTION'])?>
                  <? } else {?>
                    <i class="fas fa-check-circle status-icon green icon-pad-right"></i> <?=__($data[$key]['ACTION'])?>
                  <? } ?>
                <? } else {?>
                  <? if ($data[$key]['ACTION'] == 'DROP') { ?>
                    <i class="fas fa-minus-circle icon-pad-right" style=""></i> <?=__($data[$key]['ACTION'])?>
                  <? } else {?>
                    <i class="fas fa-check-circle icon-pad-right"></i> <?=__($data[$key]['ACTION'])?>
                  <? } ?>
                <? } ?>
              </a></b>
            </div>
            <!-- START QUICK ACTION TOOLBAR AREA -->
            <div class="clearfix l-unit__stat-col--left compact-2 text-right">
              <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
                <div class="actions-panel clearfix">
                  <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/firewall/?rule=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=__('Editing Firewall Rule')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
                        
                  <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">
                    <a id="<?=$spnd_action ?>_link_<?=$i?>" class="data-controls do_<?=$spnd_action?>" title="<?=__($spnd_action)?>">
                      <i class="fas <?=$spnd_icon?> status-icon highlight status-icon dim do_<?=$spnd_action?>"></i>
                      <input type="hidden" name="<?=$spnd_action?>_url" value="/<?=$spnd_action?>/firewall/?rule=<?=$key?>&token=<?=$_SESSION['token']?>" />
                      <div id="<?=$spnd_action?>_dialog_<?=$i?>" class="confirmation-text-suspention hidden" title="<?=__('Confirmation')?>">
                        <p class="confirmation"><?=__($spnd_confirmation,$key)?></p>
                      </div>
                    </a>
                  </div>
                  <div class="actions-panel__col actions-panel__delete shortcut-delete" key-action="js">
                    <a id="delete_link_<?=$i?>" class="data-controls do_delete" title="<?=__('delete')?>">
                      <i class="fas fa-trash status-icon red status-icon dim do_delete"></i>
                      <input type="hidden" name="delete_url" value="/delete/firewall/?rule=<?=$key?>&token=<?=$_SESSION['token']?>" />
                      <div id="delete_dialog_<?=$i?>" class="confirmation-text-delete hidden" title="<?=__('Confirmation')?>">
                        <p class="confirmation"><?=__('DELETE_RULE_CONFIRMATION',$key)?></p>
                      </div>
                    </a>
                  </div>
                 </div>
              </div>
            </div>
            <!-- END QUICK ACTION TOOLBAR AREA -->
            <div class="clearfix l-unit__stat-col--left wide-1 text-center"><b><? if(!empty($data[$key]['COMMENT'])) echo '' . $data[$key]['COMMENT']; else echo "&nbsp;"; ?></b></div>
            <div class="clearfix l-unit__stat-col--left text-center"><?=__($data[$key]['PROTOCOL'])?></div>
            <div class="clearfix l-unit__stat-col--left wide-3 text-center"><b><?=$data[$key]['PORT']?></b></div>
            <div class="clearfix l-unit__stat-col--left text-center"><?=$data[$key]['IP']?></div>
          </div>
        </div>
      </div>
      <?}?>

    </div>

    <div id="vstobjects">
        <div class="l-separator"></div>
    <div class="l-center">
        <div class="l-unit-ft">
          <table class='data'></table>
          <div class="data-count l-unit__col l-unit__col--right clearfix">
            <?php
              if ( $i == 1) {
                echo __('1 firewall rule');
              } else {
                echo __('%s firewall rules',$i);
              }
            ?>
          </div>
      </div>
    </div>
  </div>
