    <div class="l-center">
      <div class="l-sort clearfix noselect">
        <div class="l-unit-toolbar__buttonstrip">
          <a href="/add/web/" id="btn-create" class="ui-button cancel" title="<?=__('Add Web Domain')?>"><i class="fas fa-plus-circle status-icon green"></i> <?=__('Add Web Domain')?></a>
        </div>
        <ul class="context-menu sort-order animated fadeIn" style="display:none;">
          <li entity="sort-date" sort_as_int="1"><span class="name active"><?=__('Date')?> <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-name"><span class="name"><?=__('Domain')?> <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-disk" sort_as_int="1"><span class="name"><?=__('Disk')?> <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-bandwidth" sort_as_int="1"><span class="name"><?=__('Bandwidth')?> <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><?=__('Date')?> <i class="fas fa-sort-amount-down"></i></b></span>
              </td>
              <td class="l-sort-toolbar__search-box">
                <form action="/search/" method="get">
                  <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
                  <input type="text" name="q" class="search-input" value="<? echo isset($_POST['q']) ? htmlspecialchars($_POST['q']) : '' ?>" />
                  <button type="submit" class="l-sort-toolbar__filter-apply" onclick="return doSearch('/search/')" value=""><i class="fas fa-search"></i></button>
                </form>
              </td>
              <td>
                <form action="/bulk/web/" method="post" id="objects">
                <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
                <div class="l-select">
                  <select name="action">
                    <option value=""><?=__('apply to selected')?></option>
                    <option value="rebuild"><?=__('rebuild')?></option>
                    <option value="suspend"><?=__('suspend')?></option>
                    <option value="unsuspend"><?=__('unsuspend')?></option>
                    <option value="delete"><?=__('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 narrow 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-4"><b><?php print __('Domain');?></b></div>
                <div class="clearfix l-unit__stat-col--left compact-4 text-right"><b>&nbsp;</b></div>
                <div class="clearfix l-unit__stat-col--left text-center"><b><?php print __('IP address');?></b></div>
                <div class="clearfix l-unit__stat-col--left text-center"><b><?php print __('Disk');?></b></div>
                <div class="clearfix l-unit__stat-col--left text-center compact"><b><?php print __('Bandwidth');?></b></div>
                <div class="clearfix l-unit__stat-col--left text-center"><b><?php print __('SSL');?></b></div>
                <div class="clearfix l-unit__stat-col--left text-center compact"><b><?php print __('Statistics');?></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_DOMAIN_CONFIRMATION';
                        } else {
                            $status = 'active';
                            $spnd_action = 'suspend';
                            $spnd_icon = 'fa-pause';
                            $spnd_confirmation = 'SUSPEND_DOMAIN_CONFIRMATION';
                        }
                        if (!empty($data[$key]['SSL_HOME'])) {
                            if ($data[$key]['SSL_HOME'] == 'same') {
                                $ssl_home = 'public_html';
                            } else {
                                $ssl_home = 'public_shtml';
                            }
                        } else {
                            $ssl_home = '';
                        }
                        $web_stats='no';
                        if (!empty($data[$key]['STATS'])) {
                            $web_stats=$data[$key]['STATS'];
                        }
                        $ftp_user='no';
                        if (!empty($data[$key]['FTP_USER'])) {
                            $ftp_user=$data[$key]['FTP_USER'];

                        }
                        if (strlen($ftp_user) > 24 ) {
                            $ftp_user = str_replace(':', ', ', $ftp_user);
                            $ftp_user = substr($ftp_user, 0, 24);
                            $ftp_user = trim($ftp_user, ":");
                            $ftp_user = str_replace(':', ', ', $ftp_user);
                            $ftp_user = $ftp_user.", ...";
                        } else {
                            $ftp_user = str_replace(':', ', ', $ftp_user);
                        }

                        $backend_support='no';
                        if (!empty($data[$key]['BACKEND'])) {
                            $backend_support='yes';
                        }

                        $proxy_support='no';
                        if (!empty($data[$key]['PROXY'])) {
                            $proxy_support='yes';
                        }
                        if (strlen($data[$key]['PROXY_EXT']) > 24 ) {
                            $proxy_ext_title = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
                            $proxy_ext = substr($data[$key]['PROXY_EXT'], 0, 24);
                            $proxy_ext = trim($proxy_ext, ",");
                            $proxy_ext = str_replace(',', ', ', $proxy_ext);
                            $proxy_ext = $proxy_ext.", ...";
                        } else {
                            $proxy_ext_title = '';
                            $proxy_ext = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
                        }
                    ?>

      <div class="l-unit <? if($data[$key]['SUSPENDED'] == 'yes') echo 'l-unit--suspended'; if($_SESSION['favourites']['WEB'][$key] == 1) echo ' l-unit--starred'; ?>" v_section="web" v_unit_id="<?=$key?>"
id="web-unit-<?=$i?>"  sort-ip="<?=str_replace('.', '', $data[$key]['IP'])?>"
sort-date="<?=strtotime($data[$key]['DATE'].' '.$data[$key]['TIME'])?>"
sort-name="<?=$key?>"  sort-bandwidth="<?=$data[$key]['U_BANDWIDTH']?>" sort-disk="<?=$data[$key]['U_DISK']?>" sort-star="<? if($_SESSION['WEB'][$key] == 1) echo '1'; else echo '0';?>">
      <div class="l-unit__col l-unit__col--right">
          <div class="clearfix l-unit__stat-col--left super-compact">
              <input id="check<?=$i?>" class="ch-toggle" type="checkbox" name="domain[]" value="<?=$key?>">
          </div>
          <div class="clearfix l-unit__stat-col--left wide-4"><b><a href="/edit/web/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" alt="<?=__('Edit')?>" title="<?=__('Editing Domain')?>"><?=$key?></a></b></div>
          <!-- START QUICK ACTION TOOLBAR AREA -->
          <div class="clearfix l-unit__stat-col--left compact-4 text-right">
            <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
              <div class="actions-panel clearfix">
                <? if (!empty($data[$key]['STATS'])) { ?>
                  <div class="actions-panel__col actions-panel__logs shortcut-w" key-action="href"><a href="http://<?=$key?>/vstats/"  target="_blank" title="<?=__('Statistics')?>"><i class="fas fa-chart-bar status-icon maroon status-icon dim"></i></a></div>
                <? } ?>
                <div class="actions-panel__col actions-panel__view" key-action="href"><a href="http://<?=$key?>/" target="_blank"><i class="fas fa-external-link-square-alt status-icon lightblue status-icon dim"></i></a></div>
                <div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/web/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=__('Editing Domain')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
                <div class="actions-panel__col actions-panel__logs shortcut-l" key-action="href"><a href="/list/web-log/?domain=<?php echo $key ?>&type=access#" title="<?=__('AccessLog')?>"><i class="fas fa-binoculars status-icon purple 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?>/web/?domain=<?=$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/web/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" />
                    <div id="delete_dialog_<?=$i?>" class="confirmation-text-delete hidden" title="<?=__('Confirmation')?>">
                      <p class="confirmation"><?=__('DELETE_DOMAIN_CONFIRMATION',$key)?></p>
                    </div>
                  </a>
                </div>
              </div>
            </div>
          </div>
          <!-- END QUICK ACTION TOOLBAR AREA -->
          <div class="clearfix l-unit__stat-col--left text-center"><?=empty($ips[$data[$key]['IP']]['NAT']) ? $data[$key]['IP'] : "{$ips[$data[$key]['IP']]['NAT']}"; ?></div>
          <div class="clearfix l-unit__stat-col--left text-center"><b><?=humanize_usage_size($data[$key]['U_DISK'])?></b> <span class="text-small"><?=humanize_usage_measure($data[$key]['U_DISK'])?></span></div>
          <div class="clearfix l-unit__stat-col--left text-center compact"><b><?=humanize_usage_size($data[$key]['U_BANDWIDTH'])?></b> <span class="text-small"><?=humanize_usage_measure($data[$key]['U_BANDWIDTH'])?></span></div>
          <div class="clearfix l-unit__stat-col--left text-center">
                  <b>
                    <? if($data[$key]['SUSPENDED'] == 'no'){ ?>
                        <? if($data[$key]['SSL'] == 'no'){ ?>
                          <i class="fas fa-times-circle status-icon red"></i>
                        <? } else {?>
                          <i class="fas fa-check-circle status-icon green"></i>
                        <? } ?>
                    <? } else {?>
                        <? if($data[$key]['SSL'] == 'no'){ ?>
                          <i class="fas fa-times-circle"></i>
                        <? } else {?>
                          <i class="fas fa-check-circle"></i>
                        <? } ?>
                    <? } ?>
                  </b>
          </div>
          <div class="clearfix l-unit__stat-col--left text-center compact">
                  <b>
                    <? if($data[$key]['SUSPENDED'] == 'no'){ ?>
                        <? if($web_stats == 'no'){ ?>
                          <i class="fas fa-minus-circle"></i>
                        <? } else {?>
                          <i class="fas fa-check-circle status-icon green"></i>
                        <? } ?>
                    <? } else {?>
                      <? if($web_stats == 'no'){ ?>
                        <i class="fas fa-minus-circle"></i>
                      <? } else {?>
                        <i class="fas fa-check-circle"></i>
                      <? } ?>
                    <? } ?>
                  </b>
          </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 web domain');
          } else {
            echo __('%s web domains',$i);
          }
        ?>
      </div>
  </div>
</div>
</div>