vesta/web/templates/user/list_stats.html
2016-11-15 11:29:49 +02:00

268 lines
11 KiB
HTML

<div class="l-center">
<div class="l-sort clearfix noselect">
<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></td>
<td class="step-right">
<a class="vst" href='/list/stats/'><?=__('Overall Statistics')?></a>
</td>
<td>
<form action="/list/stats/" method="get" id="objects">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<div class="l-select">
<select class="" name="user">
<option value=""><?=__('show per user')?></option>
<?
foreach ($users as $key => $value) {
echo "\t\t\t\t<option value=\"".$value."\"";
if ((!empty($v_user)) && ( $value == $_GET['user'])){
echo ' selected';
}
echo ">".$value."</option>\n";
}
?>
</select>
</div>
<input type="submit" value="" class="l-sort-toolbar__filter-apply" />
</form>
</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;
?>
<div class="l-unit <?if($_COOKIE['stats-'.sha1($key)] == 1) echo ' l-unit--starred'; ?>" uniq-id="stats-<?=sha1($key)?>">
<div class="l-unit-toolbar clearfix">
<div class="l-unit-toolbar__col l-unit-toolbar__col--left">
</div>
<!-- l-unit-toolbar__col -->
<div class="l-unit-toolbar__col l-unit-toolbar__col--right">
<div class="actions-panel clearfix">
</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($key)?>
</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 separate">
<?=__(strftime("%b", strtotime($key))).strftime(" %Y", strtotime($key))?>
</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>
</div>
</div>
</td>
<td>
<div class="l-unit__stat-cols clearfix last">
<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>
</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"><?=__('SSL Domains')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=$data[$key]['U_WEB_SSL']?></b>
</div>
</div>
</td>
<td>
<div class="l-unit__stat-cols clearfix last">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Mail Accounts')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=$data[$key]['U_MAIL_ACCOUNTS']?></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"><?=__('Web Aliases')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=$data[$key]['U_WEB_ALIASES']?></b>
</div>
</div>
</td>
<td>
<div class="l-unit__stat-cols clearfix last">
<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>
</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"><?=__('DNS domains')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=$data[$key]['U_DNS_DOMAINS']?></b>
</div>
</div>
</td>
<td>
<div class="l-unit__stat-cols clearfix last">
<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>
</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"><?=__('DNS records')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=$data[$key]['U_DNS_RECORDS']?></b>
</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>
</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 month');
} else {
echo __('%s months',$i);
}
?>
</div>
</div>
</div>
</div>