| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/local/ispconfig/interface/web/dashboard/dashlets/ |
Upload File : |
<?php
class dashlet_databasequota {
function show($limit_to_client_id = null) {
global $app;
//* Loading Template
$app->uses('tpl,quota_lib');
if (!$app->auth->verify_module_permissions('sites')) {
return;
}
$modules = explode(',', $_SESSION['s']['user']['modules']);
if(!in_array('sites', $modules)) {
return '';
}
$tpl = new tpl;
$tpl->newTemplate("dashlets/templates/databasequota.htm");
$wb = array();
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_databasequota.lng';
if(is_file($lng_file)) include $lng_file;
$tpl->setVar($wb);
$databases = $app->quota_lib->get_databasequota_data($limit_to_client_id);
//print_r($databases);
$total_used = 0;
if(is_array($databases) && !empty($databases)){
foreach ($databases as &$db) {
$db['used'] = $app->functions->formatBytes($db['used_raw'], 0);
$db['database_quota'] = $app->functions->formatBytesOrUnlimited($db['database_quota_raw'], 0);
$total_used += $db['used_raw'];
}
$databases = $app->functions->htmlentities($databases);
$tpl->setloop('databasequota', $databases);
$tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0));
return $tpl->grab();
}
}
}