show current count of results besides total count in listings, fixes #869

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2020-07-29 08:46:50 +02:00
parent 456a287621
commit e3d42a3f62
9 changed files with 13 additions and 11 deletions

View File

@@ -107,7 +107,7 @@ if ($page == 'admins' && $userinfo['change_serversettings'] == '1') {
$count ++;
}
$admincount = $paging->getEntries();
$admincount = $result['count'] . " / " . $paging->getEntries();
eval("echo \"" . \Froxlor\UI\Template::getTemplate("admins/admins") . "\";");
} elseif ($action == 'su') {

View File

@@ -150,7 +150,7 @@ if ($page == 'customers' && $userinfo['customers'] != '0') {
$count ++;
}
$customercount = $paging->getEntries();
$customercount = $result['count'] . " / " . $paging->getEntries();
eval("echo \"" . \Froxlor\UI\Template::getTemplate("customers/customers") . "\";");
} elseif ($action == 'su' && $id != 0) {
try {

View File

@@ -80,7 +80,7 @@ if ($page == 'domains' || $page == 'overview') {
$count++;
}
$domainscount = $paging->getEntries();
$domainscount = $result['count'] . " / " . $paging->getEntries();
// Display the list
eval("echo \"" . \Froxlor\UI\Template::getTemplate("domains/domains") . "\";");

View File

@@ -133,10 +133,10 @@ if ($page == 'overview') {
FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid`= :cid AND `isemaildomain` = '1'
");
$result = Database::pexecute_first($result_stmt, array(
$result2 = Database::pexecute_first($result_stmt, array(
"cid" => $userinfo['customerid']
));
$emaildomains_count = $result['emaildomains'];
$emaildomains_count = $result2['emaildomains'];
eval("echo \"" . \Froxlor\UI\Template::getTemplate("email/emails") . "\";");
} elseif ($action == 'delete' && $id != 0) {

View File

@@ -85,10 +85,12 @@ if ($page == 'overview') {
$mbdata_stmt = Database::prepare("SELECT SUM(data_length + index_length) as MB FROM information_schema.TABLES
WHERE table_schema = :table_schema
GROUP BY table_schema");
Database::pexecute($mbdata_stmt, array(
$mbdata = Database::pexecute_first($mbdata_stmt, array(
"table_schema" => $row['databasename']
));
$mbdata = $mbdata_stmt->fetch(PDO::FETCH_ASSOC);
if (!$mbdata) {
$mbdata = array('MB' => 0);
}
$row['size'] = \Froxlor\PhpHelper::sizeReadable($mbdata['MB'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
eval("\$mysqls.=\"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls_database') . "\";");
$count ++;

View File

@@ -3,7 +3,7 @@
<header>
<h2>
<img src="templates/{$theme}/assets/img/icons/domains_big.png" alt="" />&nbsp;
{$lng['domains']['domainsettings']}&nbsp;({$domains_count})
{$lng['domains']['domainsettings']}&nbsp;({$result['count']} / {$domains_count})
</h2>
</header>

View File

@@ -3,7 +3,7 @@
<header>
<h2>
<img src="templates/{$theme}/assets/img/icons/emails_big.png" alt="" />&nbsp;
{$lng['menue']['email']['emails']}&nbsp;({$emailscount})
{$lng['menue']['email']['emails']}&nbsp;({$result['count']} / {$emailscount})
</h2>
</header>

View File

@@ -3,7 +3,7 @@
<header>
<h2>
<img src="templates/{$theme}/assets/img/icons/group_edit_big.png" alt="" />&nbsp;
{$lng['menue']['ftp']['accounts']}&nbsp;({$ftps_count})
{$lng['menue']['ftp']['accounts']}&nbsp;({$result['count']} / {$ftps_count})
</h2>
</header>

View File

@@ -3,7 +3,7 @@
<header>
<h2>
<img src="templates/{$theme}/assets/img/icons/mysql_big.png" alt="" />&nbsp;
{$lng['menue']['mysql']['databases']}&nbsp;({$mysqls_count})
{$lng['menue']['mysql']['databases']}&nbsp;({$result['count']} / {$mysqls_count})
</h2>
</header>