<?php
function x_9c($x_9d = 0) { 
$x_5c = Array(); 
$x_5c['properties'] = 'rowspan="' . $x_9d . '" class="vertDivider" nowrap'; 
$x_5c['data'] = ''; 
return $x_5c; 
} 
function x_9e($x_9f = Array()) { 
$x_2a = new kp_HtmlElements(); 
$x_8j = Array(); 
$x_8l = 0; 
$x_9d = count($x_9f); 
if ($x_9d != 0 ) { 
$x_9g = Array('<kerio:text id="lang_url" />', 
'<kerio:text id="lang_allowed" />', 
'<kerio:text id="lang_content_type" />', 
'<kerio:text id="lang_time_int" />'); 
$x_9h = count($x_9g); 
$x_8k = 0; 
foreach ($x_9g as $x_9i) { 
$x_8j[$x_8l][$x_8k]['properties'] = 'class="th"'; 
$x_8j[$x_8l][$x_8k]['data'] = $x_9i; 
$x_8k++; 
if ($x_8k <= $x_9h + 1) { 
$x_8j[$x_8l][$x_8k] = x_9c($x_9d + 1); 
$x_8k++; 
} 
} 
$x_8l++; 
} 
foreach ($x_9f as $x_9j) { 
$x_3u = Array(); 
$x_8k = 0; 
if (!empty($x_9j['url'])) { 
foreach ($x_9j['url'] as $x_9k => $x_2) { 
$x_9j['url'][$x_9k] = x_54($x_2, 200); 
} 
$x_3u[$x_8k]['data'] = implode('<br>', $x_9j['url']); 
} else { 
$x_3u[$x_8k]['data'] = '<kerio:text id="any" />'; 
} 
$x_3u[$x_8k]['properties'] = 'class="bold"'; 
$x_8k++; 
if (1 == $x_9j['allowed']) { 
$x_3u[$x_8k]['data'] = $x_2a->kp_getImage(IMAGE_PATH . 'dot_allow.gif', 16, 16, '', 'valign="absmiddle"') 
. '<span><kerio:text id="yes" /></span>'; 
} else { 
$x_3u[$x_8k]['data'] = $x_2a->kp_getImage(IMAGE_PATH . 'dot_deny.gif', 16, 16, '', 'valign="absmiddle"') 
. '<span><kerio:text id="no" /></span>'; 
} 
$x_3u[$x_8k]['properties'] = 'class="ruleStatus"'; 
$x_8k++; 
if ('' == $x_9j['contentType']) { 
$x_3u[$x_8k]['data'] = '<kerio:text id="any" />'; 
} else { 
$x_3u[$x_8k]['data'] = x_4d($x_9j['contentType']); 
} 
$x_8k++; 
if (empty($x_9j['timeInterval'])) { 
$x_3u[$x_8k]['data'] = '<kerio:text id="any" />'; 
} else { 
$x_3u[$x_8k]['data'] = implode('<br>', $x_9j['timeInterval']); 
} 
$x_8k++; 
$x_8j[$x_8l]['data'] = $x_3u; 
$x_9l = Array(); 
if (!empty($x_9l)) { 
$x_8j[$x_8l]['properties'] = 'class="' . implode(' ', $x_9l) . '"'; 
} 
unset($x_9l); 
unset($x_3u); 
$x_8l++; 
} 
return $x_8j; 
} 
function x_9m($x_9n = Array(), 
$x_4w = '') { 
global $x_1; 
$x_2a = new kp_HtmlElements(); 
$x_8j = Array(); 
$x_8k = 0; 
$x_8l = 0; 
$x_9o = Array('day', 'week', 'month'); 
foreach ($x_9o as $x_9p => $x_9q) { 
for ($x_9r = 1; $x_9r <= 2; $x_9r++) { 
if (1 == $x_9r) { 
for ($x_7p = 1; $x_7p <= 5; $x_7p++) { 
if (1 == $x_7p) { 
$x_8j[$x_8l][$x_7p]['properties'] = 'rowspan="2" class="iconTD"'; 
$x_8j[$x_8l][$x_7p]['data'] = $x_2a->kp_getImage(IMAGE_PATH . $x_9q . 'Icon_big.gif', 32, 32); 
} elseif (5 == $x_7p) { 
$x_8j[$x_8l][$x_7p]['properties'] = 'rowspan="2" class="progressTD" align="center"'; 
if (1 == $x_9n[$x_9q]['enabled']) { 
$x_9s = ''; 
switch ($x_9n[$x_9q]['type']) { 
case 0: 
$x_9s = '<kerio:text id="quotaTotal" />'; 
$x_9t = $x_9n[$x_9q]['down']; 
$x_9u = $x_9n[$x_9q]['up']; 
break; 
case 1: 
$x_9s = '<kerio:text id="quotaIn" />'; 
$x_9t = $x_9n[$x_9q]['down']; 
$x_9u = 0; 
break; 
case 2: 
$x_9s = '<kerio:text id="quotaOut" />'; 
$x_9t = 0; 
$x_9u = $x_9n[$x_9q]['up']; 
break; 
} 
$x_9v = $x_9n[$x_9q]['value']; 
if (($x_9t + $x_9u != 0) && $x_9v != 0) { 
$x_9w = round( x_5s(sum64($x_9t, $x_9u), x_5s($x_9v,100)), 1); 
} else { 
$x_9w = 0; 
} 
$x_8j[$x_8l][$x_7p]['data'] = '<span class="bold">' .$x_9s . 
$x_2a->kp_getProgressBar($x_9s, $x_9w) 
. '</span>'; 
} else { 
$x_8j[$x_8l][$x_7p]['data'] = '<kerio:text id="noQuota" />'; 
} 
} else { 
switch ($x_7p) { 
case 2: 
$x_8j[$x_8l][$x_7p]['properties'] = 'class="dateLabel bold" valign="bottom"'; 
if ('day' == $x_9q) { 
$x_8j[$x_8l][$x_7p]['data'] = '<kerio:text id="today" />'; 
} else { 
$x_8j[$x_8l][$x_7p]['data'] = '<kerio:text id="this_' . $x_9q . '" />'; 
} 
break; 
case 3: 
$x_8j[$x_8l][$x_7p]['properties'] = 'class="dataLabel bold" valign="bottom"'; 
$x_8j[$x_8l][$x_7p]['data'] = '<kerio:text id="data_in" />'; 
break; 
case 4: 
$x_8j[$x_8l][$x_7p]['properties'] = 'class="numberLabel" valign="bottom" align="right"'; 
$x_8j[$x_8l][$x_7p]['data'] = x_4p(x_4q($x_9n[$x_9q]['down']), 
$x_4w->x_4r()) 
. ' KB'; 
break; 
} 
} 
} 
} else { 
for ($x_7p = 1; $x_7p <=3; $x_7p++) { 
switch ($x_7p) { 
case 1: 
$x_8j[$x_8l][$x_7p]['properties'] = 'class="dateLabel" valign="top"'; 
if ('day' == $x_9q) { 
$x_8j[$x_8l][$x_7p]['data'] = kp_getDate($x_9n[$x_9q]['since'], 
$x_4w->x_34()); 
} else { 
$x_8j[$x_8l][$x_7p]['data'] = '<kerio:text id="since" /> ' . kp_getDate($x_9n[$x_9q]['since'], 
$x_4w->x_34()); 
} 
break; 
case 2: 
$x_8j[$x_8l][$x_7p]['properties'] = 'class="dataLabel bold" valign="top"'; 
$x_8j[$x_8l][$x_7p]['data'] = '<kerio:text id="data_out" />'; 
break; 
case 3: 
$x_8j[$x_8l][$x_7p]['properties'] = 'class="numberLabel" valign="top" align="right"'; 
$x_8j[$x_8l][$x_7p]['data'] = x_4p(x_4q($x_9n[$x_9q]['up']), 
$x_4w->x_4r()) 
. ' KB'; 
break; 
} 
} 
} 
if (1 == $x_8l || 5 == $x_8l) { 
$x_8l++; 
$x_8j[$x_8l][0]['properties'] = 'colspan="5" class="divider" style="width: auto;"'; 
$x_8j[$x_8l][0]['data'] = ''; 
$x_8l++; 
} 
$x_8l++; 
} 
} 
return $x_8j; 
} 
?>
