mirror of
https://github.com/serghey-rodin/vesta.git
synced 2024-12-25 21:41:13 -08:00
333 lines
16 KiB
HTML
333 lines
16 KiB
HTML
<div class="l-center">
|
|
<div class="l-sort clearfix noselect">
|
|
<?php
|
|
if ($user == 'admin') {
|
|
echo '<a class="l-sort__create-btn" href="/add/user/" title="'.__('Add User').'"></a>';
|
|
} else {
|
|
echo '<a class="l-sort__create-btn" href="/add/web/" title="'.__('Add Web Domain').'"></a>';
|
|
}
|
|
?>
|
|
<ul class="context-menu sort-order" style="display:none;">
|
|
<li entity="sort-date" sort_as_int="1"><span class="name active"><?=__('Date')?></span><span class="up"> </span></li>
|
|
<li entity="sort-name"><span class="name"><?=__('Username')?></span><span class="up"> </span></li>
|
|
<li entity="sort-disk" sort_as_int="1"><span class="name"><?=__('Disk')?></span><span class="up"> </span></li>
|
|
<li entity="sort-bandwidth" sort_as_int="1"><span class="name"><?=__('Bandwidth')?></span><span class="up"> </span></li>
|
|
<li entity="sort-star" sort_as_int="1"><span class="name"><?=__('Starred')?></span><span class="up"> </span></li>
|
|
</ul>
|
|
<div class="l-sort-toolbar clearfix">
|
|
<table>
|
|
<tr>
|
|
<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']) : '' ?>" />
|
|
<input type="submit" value="" class="l-sort-toolbar__search" onClick="return doSearch('/search/')" />
|
|
</form>
|
|
</td>
|
|
<td class="toggle-all">
|
|
<input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" onChange="checkedAll('objects');">
|
|
<label for="toggle-all" class="check-label toggle-all"><?=__('toggle all')?></label>
|
|
</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="delete"><?=__('delete')?></option>
|
|
</select>
|
|
</div>
|
|
<input type="submit" value="" class="l-sort-toolbar__filter-apply" />
|
|
</td>
|
|
<td class="sort-by">
|
|
<?=__('sort by');?>: <span><b><?=__('Date')?></b></span> <i class="l-icon-down-arrow media-top"></i>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- /.l-sort -->
|
|
</div>
|
|
|
|
<div class="l-separator"></div>
|
|
<!-- /.l-separator -->
|
|
|
|
|
|
<div class="l-center units">
|
|
<?php
|
|
foreach ($data as $key => $value) {
|
|
++$i;
|
|
if ($data[$key]['SUSPENDED'] == 'yes') {
|
|
$status = 'suspended';
|
|
$spnd_action = 'unsuspend' ;
|
|
$spnd_confirmation = 'UNSUSPEND_USER_CONFIRMATION' ;
|
|
} else {
|
|
$status = 'active';
|
|
$spnd_action = 'suspend' ;
|
|
$spnd_confirmation = 'SUSPEND_USER_CONFIRMATION' ;
|
|
}
|
|
?>
|
|
|
|
<div class="l-unit <? if($status == 'suspended') echo 'l-unit--suspended'; if($_SESSION['favourites']['USER'][$key] == 1) echo ' l-unit--starred'; ?>" v_unit_id="<?=$key?>" v_section="user"
|
|
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-toolbar clearfix">
|
|
<div class="l-unit-toolbar__col l-unit-toolbar__col--left">
|
|
<input id="check<?php echo $i ?>" class="ch-toggle" type="checkbox" name="user[]" value="<?=$key?>">
|
|
<label for="check<?php echo $i ?>" class="check-label"></label>
|
|
</div>
|
|
<!-- l-unit-toolbar__col -->
|
|
<div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
|
|
<div class="actions-panel clearfix">
|
|
<?
|
|
if ($key == $user) {
|
|
?>
|
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/logout"><?=__('logout')?> <i></i></a><span class="shortcut"> L</span></div>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/login/?loginas=<?=$key?>"><?=__('login as')?> <i></i></a><span class="shortcut"> L</span></div>
|
|
<?}?>
|
|
<div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/user/?user=<?=$key?>"><?=__('edit')?> <i></i></a><span class="shortcut enter"> ↵</span></div>
|
|
<div class="actions-panel__col actions-panel__delete shortcut-delete" key-action="js">
|
|
<a id="delete_link_<?=$i?>" class="data-controls do_delete">
|
|
<?=__('delete')?> <i class="do_delete"></i>
|
|
<input type="hidden" name="delete_url" value="/delete/user/?user=<?=$key?>&token=<?=$_SESSION['token']?>" />
|
|
<div id="delete_dialog_<?=$i?>" class="confirmation-text-delete hidden" title="<?=__('Confirmation')?>">
|
|
<p class="confirmation"><?=__('DELETE_USER_CONFIRMATION',$key)?></p>
|
|
</div>
|
|
</a>
|
|
<span class="shortcut delete"> Del</span>
|
|
</div>
|
|
</div>
|
|
<!-- /.actiona-panel -->
|
|
</div>
|
|
<!-- l-unit-toolbar__col -->
|
|
</div>
|
|
<!-- /.l-unit-toolbar -->
|
|
|
|
<div class="l-unit__col l-unit__col--left clearfix">
|
|
<div class="l-unit__date">
|
|
<?=translate_date($data[$key]['DATE'])?>
|
|
</div>
|
|
<div class="l-unit__suspended"><?__('suspended')?></div>
|
|
<div class="text-center">
|
|
<i class="l-icon-star" title="<?=__('save to favorites')?>"></i>
|
|
</div>
|
|
</div>
|
|
<!-- /.l-unit__col -->
|
|
<div class="l-unit__col l-unit__col--right">
|
|
<div class="l-unit__name">
|
|
<?=$key?>
|
|
</div>
|
|
|
|
<div class="l-unit__ip">
|
|
<?=$data[$key]['FNAME']?> <?=$data[$key]['LNAME']?>
|
|
</div>
|
|
|
|
<div class="l-unit__stats">
|
|
<table>
|
|
|
|
<tr>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix">
|
|
<div class="l-unit__stat-cols clearfix graph">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left">
|
|
<?=__('Bandwidth')?>
|
|
</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right text-right volume">
|
|
<b><?=humanize_usage_size($data[$key]['U_BANDWIDTH'])?></b> <?=humanize_usage_measure($data[$key]['U_BANDWIDTH'])?>
|
|
</div>
|
|
</div>
|
|
<div class="l-percent">
|
|
<div class="l-percent__fill" style="width: <?=get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH'])?>%"></div>
|
|
</div>
|
|
<!-- /.percent -->
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Web Domains')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['U_WEB_DOMAINS']?></b> / <?=$data[$key]['WEB_DOMAINS']?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix last">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left compact"><?=__('Email')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['CONTACT']?></b>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"></div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('DNS Domains')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['U_DNS_DOMAINS']?></b> / <?=$data[$key]['DNS_DOMAINS']?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix last">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Package')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['PACKAGE']?></b>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix graph">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Disk')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right text-right volume">
|
|
<b><?=humanize_usage_size($data[$key]['U_DISK'])?></b> <?=humanize_usage_measure($data[$key]['U_DISK'])?>
|
|
</div>
|
|
</div>
|
|
<div class="l-percent">
|
|
<div class="l-percent__fill" style="width: <?=get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA'])?>%"></div>
|
|
</div>
|
|
<!-- /.percent -->
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Mail Domains')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['U_MAIL_DOMAINS']?></b> / <?=$data[$key]['MAIL_DOMAINS']?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix last">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('SSH Access')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['SHELL']?></b>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix tiny">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left">
|
|
<?=__('Web')?>: <b><?=humanize_usage_size($data[$key]['U_DISK_WEB'])?></b> <?=humanize_usage_measure($data[$key]['U_DISK_WEB'])?>
|
|
</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<?=__('Databases')?>: <b><?=humanize_usage_size($data[$key]['U_DISK_DB'])?></b> <?=humanize_usage_measure($data[$key]['U_DISK_DB'])?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Databases')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['U_DATABASES']?></b> / <?=$data[$key]['DATABASES']?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix last">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('IP Addresses')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['IP_OWNED']?></b>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix tiny">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left">
|
|
<?=__('Mail')?>: <b><?=humanize_usage_size($data[$key]['U_DISK_MAIL'])?></b> <?=humanize_usage_measure($data[$key]['U_DISK_MAIL'])?>
|
|
</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<?=__('User Directories')?>: <b><?=humanize_usage_size($data[$key]['U_DISK_DIRS'])?></b> <?=humanize_usage_measure($data[$key]['U_DISK_DIRS'])?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Cron Jobs')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['U_CRON_JOBS']?></b> / <?=$data[$key]['CRON_JOBS']?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Backups')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=$data[$key]['U_BACKUPS']?></b> / <?=$data[$key]['BACKUPS']?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="l-unit__stat-cols clearfix">
|
|
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Name Servers')?>:</div>
|
|
<div class="l-unit__stat-col l-unit__stat-col--right">
|
|
<b><?=str_replace(',', '<br>',$data[$key]['NS'])?></b>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
<!-- /.l-unit__stats -->
|
|
</div>
|
|
<!-- /.l-unit__col -->
|
|
</div>
|
|
<!-- /.l-unit -->
|
|
<!--div class="l-separator"></div-->
|
|
<!-- /.l-separator -->
|
|
<?}?>
|
|
|
|
</div>
|
|
|
|
<div id="vstobjects">
|
|
<div class="l-separator"></div>
|
|
<div class="l-center">
|
|
<div class="l-unit-ft">
|
|
<table class='data'></table>
|
|
<div class="l-unit__col l-unit__col--left clearfix"></div>
|
|
<div class="data-count l-unit__col l-unit__col--right clearfix">
|
|
<?php
|
|
if ( $i == 1) {
|
|
echo __('1 account');
|
|
} else {
|
|
echo __('%s accounts',$i);
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|