<?php
|
|
class dashlet_mailquota {
|
|
function show() {
|
global $app, $conf;
|
|
//* Loading Template
|
$app->uses('tpl');
|
|
$tpl = new tpl;
|
$tpl->newTemplate("dashlets/templates/mailquota.htm");
|
|
$wb = array();
|
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_mailquota.lng';
|
if(is_file($lng_file)) include $lng_file;
|
$tpl->setVar($wb);
|
|
$emails = $app->quota_lib->get_mailquota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['default_group'] : null);
|
//print_r($emails);
|
|
$has_mailquota = false;
|
if(is_array($emails) && !empty($emails)){
|
$tpl->setloop('mailquota', $emails);
|
$has_mailquota = isset($emails[0]['used']);
|
}
|
$tpl->setVar('has_mailquota', $has_mailquota);
|
|
return $tpl->grab();
|
}
|
|
}
|
|
|
|
|
|
|
|
|
?>
|