<?php
require_once(LIB_PATH . 'Dashboard.inc'); 
function x_25($x_16f = 'html', $x_16g = 0, $x_3k = Array()) { 
global $_DB; 
global $x_33; 
define('TOP_CATEGORIES', 5); 
define('TOP_PROTOCOLS', 5); 
define('TOP_WEBSITES', 5); 
$x_z = new x_10(); 
$x_z->x_1m = 'individual'; 
$x_z->x_23 = $x_3k['x_23']; 
$x_8b = new x_8c(); 
$x_mq = false; 
$x_e2 = Array(); 
if (1 == $x_16g || 'html' == $x_16f) { 
$x_7d = Array(); 
$x_7d = $x_8b->x_mv( $x_3k['periodStart'], 
$x_3k['periodEnd'], 
$x_3k['userId'], 
true, 
$x_33->x_4r()); 
$x_16t = Array(); 
$x_16t = $x_8b->x_nu( $x_3k['periodStart'], 
$x_3k['periodEnd'], 
$x_3k['userId'], 
$x_33); 
$x_e2[1] = Array('x_6u' => x_6s($x_8b->x_mt($x_3k['periodStart'], $x_3k['periodEnd'])), 
'x_dw' => $x_16t, 
'x_dx' => $x_z->kp_getOverviewTable( 
Array( '<kerio:text id="lang_total" />', 
($x_7d['dataTotal'] ? $x_7d['dataTotal'] : 0) . ' KB', 
'<kerio:text id="lang_inbound" />', 
($x_7d['dataTotal'] ? $x_7d['dataIn'] : 0) . ' KB', 
'<kerio:text id="lang_outbound" />', 
($x_7d['dataTotal'] ? $x_7d['dataOut'] : 0) . ' KB' 
)), 
'x_a9' => $x_3k['userId'] 
); 
} 
if (2 == $x_16g || 'html' == $x_16f) { 
if (-1 == $x_3k['userId']) { 
$x_16u = Array(); 
} else { 
$x_16u = $x_8b->x_lv($x_3k['periodStart'], 
$x_3k['periodEnd'], 
$x_3k['userId'], 
TOP_WEBSITES, 
$x_33); 
if (isset($x_16u['message'])) { 
$x_16u['message'] = $x_z->x_cj( $x_16u['message'], 
'individual', 
$x_3k['userId'], 
$x_33->x_34(), 
'<kerio:text id="websites_noData" /><br><kerio:text id="websites_periods"/>:'); 
} 
} 
$x_e2[2] = Array('x_6u' => '<kerio:text id="topWebsites" />', 'x_dw' => $x_16u, 'x_a9' => $x_3k['userId']); 
} 
if (3 == $x_16g || 'html' == $x_16f) { 
$x_7d = Array(); 
$x_lr = Array(); 
$x_lr = $x_8b->x_n6( $x_3k['periodStart'], 
$x_3k['periodEnd'], 
TOP_CATEGORIES, 
$x_3k['userId'], 
$x_33); 
$x_7d = $x_8b->x_n1($x_lr, TOP_CATEGORIES); 
$x_e2[3] = Array('x_6u' => '<kerio:text id="requestedCategories" />', 'x_dw' => $x_7d, 'x_a9' => $x_3k['userId']); 
} 
if (4 == $x_16g || 'html' == $x_16f) { 
$x_8b = new x_8c(); 
$x_16m = $x_8b->x_mh($x_3k['userId'], 
$x_33->x_8f()); 
$x_16l = $x_8b->x_md($x_3k['userId']); 
$x_16l['FULLNAME']['caption'] = x_54($x_16l['FULLNAME']['value'], 
368, 
false, 
true); 
$x_16l['USERNAME']['value'] = x_54($x_16l['USERNAME']['value'], 
240, 
false, 
true); 
$x_e2[4] = Array('x_6u' => $x_16m, 
'x_dw' => $x_16l, 
'x_dx' => $x_3k['userId']); 
} 
if (5 == $x_16g || 'html' == $x_16f) { 
$x_16v = Array(); 
$x_16v = $x_8b->x_mp( Array(), $x_mq, 
$x_3k['periodStart'], 
$x_3k['periodEnd'], 
TOP_PROTOCOLS, 
$x_3k['userId'], 
$x_33); 
$x_e2[5] = Array('x_6u' => '<kerio:text id="usedProtocols" />', 'x_dw' => $x_16v, 'x_a9' => $x_3k['userId']); 
} 
if ('html' == $x_16f) { 
$x_z->x_dv('L2'); 
foreach ($x_e2 as $x_kv => $x_7d) { 
$x_z->x_e0($x_kv, $x_7d); 
} 
$x_16k = $x_z->x_eb('individual') . $x_z->x_1u(); 
return $x_16k; 
} elseif('xml' == $x_16f) { 
$x_z->x_dv('L2'); 
$x_z->x_e0($x_16g, $x_e2[$x_16g]); 
return $x_z->x_e3($x_16g); 
} 
} 
?>
