    <div class="l-center">
      <div class="l-sort clearfix noselect">
        <div class="l-unit-toolbar__buttonstrip">
        <?php
          if ($user == 'admin') {
            echo '<a href="/add/user/" id="btn-create" class="ui-button cancel"><i class="fas fa-plus-circle status-icon green"></i>'._('Add User').'</a>&nbsp;';
            echo '<a href="/list/package/" class="ui-button cancel"><i class="fas fa-box-open status-icon orange"></i>'._('Packages').'</a>&nbsp;';
          } else {
              if ((isset($_SESSION['WEB_SYSTEM'])) && (!empty($_SESSION['WEB_SYSTEM']))) {
                  if (intval($panel[$user]['WEB_DOMAINS']) > 0 || $panel[$user]['WEB_DOMAINS'] == 'unlimited') {
                      echo '<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"><?=_('Username')?> <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/user/" method="post" id="objects">
                  <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
                  <div class="l-select">
                    <select class="" name="action">
                      <option value=""><?=_('apply to selected')?></option>
                      <option value="rebuild"><?=_('rebuild')?></option>
                      <option value="rebuild web"><?=_('rebuild web')?></option>
                      <option value="rebuild dns"><?=_('rebuild dns')?></option>
                      <option value="rebuild mail"><?=_('rebuild mail')?></option>
                      <option value="rebuild db"><?=_('rebuild db')?></option>
                      <option value="rebuild cron"><?=_('rebuild cron')?></option>
                      <option value="update counters"><?=_('update counters')?></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 animated fadeIn">
        <div class="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-3"><b><?php print _('Name');?></b></div>
                  <div class="clearfix l-unit__stat-col--left compact-3"><b>&nbsp;</b></div>
                  <div class="clearfix l-unit__stat-col--left text-center"><b><?php print _('Package');?></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><?php print _('IPs');?></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-hdd" title="<?php print _('Disk');?>"></i></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center compact"><b><i class="fas fa-exchange-alt" title="<?php print _('Bandwidth');?>"></i></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-globe-americas" title="<?php print _('Web Domains');?>"></i></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-atlas" title="<?php print _('DNS Domains');?>"></i></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-mail-bulk" title="<?php print _('Mail Domains');?>"></i></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-database" title="<?php print _('Databases');?>"></i></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-clock" title="<?php print _('Cron Jobs');?>"></i></b></div>
                  <div class="clearfix l-unit__stat-col--left text-center super-compact"><b><i class="fas fa-file-archive" title="<?php print _('Backups');?>"></i></b></div>
             </div>
          </div>

      <?php
        foreach ($data as $key => $value) {
          ++$i;
      ?>

      <div class="l-unit  <? if($status == 'suspended') echo 'l-unit--suspended'; if($_SESSION['favourites']['USER'][$key] == 1) echo ' l-unit--starred';?>" v_section="user"
v_unit_id="<?=$key?>" 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['favourites']['USER'][$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="user[]" value="<?=$key?>">
          </div>
              <div class="clearfix l-unit__stat-col--left wide-3 userlist-username"><b><a href="/login/?loginas=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('login as')?>"><?php echo $data[$key]['FNAME'];?> <span style="font-weight: normal !important;">(<?=$key?>)</span></b></a>
                <br />
                <span class="userlist-email"><b><?=_('Email')?>:</b> <?=$data[$key]['CONTACT']?></span>
              </div>
              <!-- START QUICK ACTION TOOLBAR AREA -->
              <div class="clearfix l-unit__stat-col--left text-right compact-3">
                    <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
                        <div class="actions-panel clearfix">
                          <div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/user/?user=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing User')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
                        </div>
                      </div>
              </div>
              <!-- END QUICK ACTION TOOLBAR AREA -->
              <div class="clearfix l-unit__stat-col--left text-center"><b><?=$data[$key]['PACKAGE']?></b></div>
              <div class="clearfix l-unit__stat-col--left text-center super-compact"><?=$data[$key]['IP_OWNED']?></div>
              <div class="clearfix l-unit__stat-col--left text-center super-compact"><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 super-compact" title="<?=$data[$key]['U_WEB_DOMAINS']?> <?php print _('Web Domains');?>"><span class="jump-top badge gray raised"><b><?=$data[$key]['U_WEB_DOMAINS']?></b></span></div>
              <div class="clearfix l-unit__stat-col--left text-center super-compact" title="<?=$data[$key]['U_DNS_DOMAINS']?> <?php print _('DNS Domains');?>"><span class="jump-top badge gray raised"><b><?=$data[$key]['U_DNS_DOMAINS']?></b></span></div>
              <div class="clearfix l-unit__stat-col--left text-center super-compact" title="<?=$data[$key]['U_MAIL_DOMAINS']?> <?php print _('Mail Domains');?>"><span class="jump-top badge gray raised"><b><?=$data[$key]['U_MAIL_DOMAINS']?></b></span></div>
              <div class="clearfix l-unit__stat-col--left text-center super-compact" title="<?=$data[$key]['U_DATABASES']?> <?php print _('Databases');?>"><span class="jump-top badge gray raised"><b><?=$data[$key]['U_DATABASES']?></b></span></div>
              <div class="clearfix l-unit__stat-col--left text-center super-compact" title="<?=$data[$key]['U_CRON_JOBS']?> <?php print _('Cron Jobs');?>"><span class="jump-top badge gray raised"><b><?=$data[$key]['U_CRON_JOBS']?></b></span></div>
              <div class="clearfix l-unit__stat-col--left text-center super-compact" title="<?=$data[$key]['U_BACKUPS']?> <?php print _('Backups');?>"><span class="jump-top badge gray raised"><b><?=$data[$key]['U_BACKUPS']?></b></span></div>
          </div>
         </div>
      <?}?>
    </div>

    <div id="vstobjects">
        <div class="l-separator visible"></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
              printf(ngettext('%d user account', '%d user accounts', $i),$i);
            ?>
          </div>
      </div>
    </div>
  </div>
