<?php
require_once(CORE_PATH . 'common.inc'); 
require_once(CORE_PATH . 'dateTime.inc'); 
require_once(LIB_PATH . 'HtmlElements.inc'); 
class x_a4 extends kp_HtmlElements { 
var $x_4 = Array(); 
var $x_a5 = false; 
var $x_a6 = Array('web', 'messaging', 'fileTransfer', 'multimedia', 'remoteAccess'); 
var $x_a7 = 'x'; 
var $x_6v = 0; 
var $x_6w = 0; 
var $x_a8 = 0; 
var $x_a9 = 0; 
var $x_aa = 0; 
var $x_ab = Array(); 
var $x_63 = false; 
var $x_ac = 0; 
var $x_7d = Array('web' => Array('pagesTotal' => 0, 
'searchesTotal' => 0, 
'dayNum' => 0, 
'empty' => 1), 
'messaging' => Array('dataTotal' => 0, 
'messTotal' => 0, 
'imUsed' => 0, 
'dayNum' => 0, 
'empty' => 1), 
'multimedia' => Array( 'dataTotal' => 0, 
'dayNum' => 0, 
'empty' => 1), 
'fileTransfer' => Array( 'dataTotal' => 0, 
'filesTotal' => 0, 
'p2pData' => 0, 
'p2pBlocked' => 0, 
'dayNum' => 0, 
'empty' => 1), 
'remoteAccess' => Array( 'dataRa' => 0, 
'connRa' => 0, 
'vpnData' => 0, 
'vpnConn' => 0, 
'dayNum' => 0, 
'empty' => 1) 
); 
var $x_ad = Array(); 
var $x_ae = Array(); 
var $x_4w = 'en'; 
var $x_5x = 'g a'; 
var $x_af = 'h:i a'; 
var $x_32 = 'n/j/Y'; 
var $x_ag = 'n/j'; 
var $x_ah = ','; 
var $x_ai = ''; 
var $x_aj = true; 
var $x_ak = true; 
var $x_al = true; 
var $x_am = true; 
var $x_an = true; 
var $x_ao = 'block'; 
function x_a4( $x_ai, 
$x_6v, 
$x_6w, 
$x_aa, 
$x_a9, 
$x_ap) { 
$this->x_6v = intval($x_6v); 
$this->x_6w = intval($x_6w); 
$x_1 = kerio("webiface::PhpSession"); 
$x_1->getStarInfo(&$x_4); 
$this->x_4 = $x_4; 
unset($x_4); 
if ((($this->x_6w - $this->x_6v) + 1) > $this->x_4['activityDayCount']) { 
$this->x_a5 = true; 
} 
$this->x_ai = $x_ai; 
$this->x_aa = $x_aa; 
$this->x_a9 = $x_a9; 
if ('activity' == $this->x_ai) { 
$this->x_a8 = 700; 
} else { 
$this->x_a8 = 450; 
} 
if (!empty($x_ap)) { 
if (!empty($x_ap['x_5x'])) { 
$this->x_5x = $x_ap['x_5x']; 
} 
if (!empty($x_ap['x_af'])) { 
$this->x_af = $x_ap['x_af']; 
} 
if (!empty($x_ap['x_32'])) { 
$this->x_32 = $x_ap['x_32']; 
} 
if (!empty($x_ap['x_ag'])) { 
$this->x_ag = $x_ap['x_ag']; 
} 
if (!empty($x_ap['x_ah'])) { 
$this->x_ah = $x_ap['x_ah']; 
} 
} 
$this->x_4w = $x_ap['x_4w']; 
if (0 == $this->x_6w - $this->x_6v) { 
$this->x_ac = $this->x_6v; 
} else { 
$this->x_63 = true; 
} 
} 
function x_aq() { 
if ($this->x_aa != '') { 
if ($this->x_a5) { 
if ('activity' == $this->x_ai) { 
$this->x_ar(); 
} else { 
echo '<table cellpadding="0" cellspacing="0" border="0" class="fullWidth">' 
. '<tr>' 
. '<td class="bold" align="center">' 
. '<kerio:text id="noData" />' 
. '</td>' 
. '</tr>' 
. '</table>'; 
} 
return; 
} 
$x_1 = kerio("webiface::PhpSession"); 
$x_1->getActivities( $this->x_6v, 
$this->x_6w, 
$this->x_aa, 
&$x_ab); 
while ($x_ab->valid()) { 
$x_7d = Array(); 
switch ($x_ab->dataType()) { 
case webiface_ADT_WebSearch: 
$x_as = $x_ab->getOTAWebSearch(&$x_7d); 
$this->x_at($x_7d, 'search'); 
break; 
case webiface_ADT_WebConnection: 
$x_as = $x_ab->getCAWebConnection(&$x_7d); 
$this->x_at($x_7d, 'conn'); 
break; 
case webiface_ADT_Mail: 
$x_as = $x_ab->getOTAMail(&$x_7d); 
$this->x_au($x_7d, 'OTAMail'); 
break; 
case webiface_ADT_FileTransfer: 
$x_as = $x_ab->getCAFileTransfer(&$x_7d); 
switch ($x_ab->type()) { 
case webiface_AT_Download: 
$this->x_av($x_7d, 'download'); 
break; 
case webiface_AT_Upload: 
$this->x_av($x_7d, 'upload'); 
break; 
} 
break; 
case webiface_ADT_P2pAttempt: 
$x_as = $x_ab->getOTAP2pAttempt(&$x_7d); 
$this->x_av($x_7d, 'p2pAttempt'); 
break; 
case webiface_ADT_WebMultimedia: 
$x_as = $x_ab->getCAWebMultimedia(&$x_7d); 
$this->x_aw($x_7d, 'web'); 
break; 
case webiface_ADT_Connection: 
$x_as = $x_ab->getCAConnection(&$x_7d); 
switch ($x_ab->type()) { 
case webiface_AT_Multimedia: 
$this->x_aw($x_7d, 'common'); 
break; 
case webiface_AT_InstantMessaging: 
$this->x_au($x_7d, 'IM'); 
break; 
case webiface_AT_MailConnection: 
$this->x_au($x_7d, 'ATMail'); 
break; 
case webiface_AT_RemoteAccess: 
$this->x_ax($x_7d, 'ra'); 
break; 
case webiface_AT_Vpn: 
$this->x_ax($x_7d, 'vpn'); 
break; 
case webiface_AT_P2p: 
$this->x_av($x_7d, 'p2p'); 
break; 
case webiface_AT_HugeConnection: 
$this->x_av($x_7d, 'conn'); 
break; 
case webiface_AT_HTTPConnection: 
$this->x_at($x_7d, 'httpConn'); 
break; 
} 
break; 
} 
$x_ab->next(); 
} 
echo $this->x_ay(''); 
unset($x_ab); 
if ('x' == $this->x_a7) { 
if (0 == $this->x_4['activityLogEnabled'] && $this->x_ai != 'print') { 
$x_51 = '<kerio:text id="act_disabled" />'; 
} else { 
$x_51 = '<kerio:text id="noData" />'; 
} 
echo '<div class="noData">' . $x_51 . '</div>'; 
} 
} 
flush(); 
ob_flush(); 
} 
function x_az($x_ac, $x_b0) { 
$x_b1 = $x_b0 . $x_ac; 
switch ($this->x_ai) { 
case 'activity': 
$x_b2 = '<div class="dayCaption" onClick="x_b3(\'' . $x_b1 . '\')">' 
. '<div class="dayNum">' 
. kp_getDate($x_ac, $this->x_32) 
. '</div>' 
. '<div id="' . $x_b1 . 'r" class="dayRows">' 
. '</div>' 
. '</div>' 
. '<div class="dayBlock" id="' . $x_b0 . $x_ac . '" style="display: ' . $this->x_ao . '">' 
. $this->x_b4(); 
break; 
default: 
$x_b2 = '<table cellpadding="0" cellspacing="0" border="0" class="dayCaption fullWidth">' 
. '<tr>' 
. '<td class="bold leftSpace">' 
. kp_getDate($x_ac, $this->x_32) 
. '</td>' 
. '</tr>' 
. '</table>' 
. $this->x_b4(); 
} 
$this->x_ac = $x_ac; 
return $x_b2; 
} 
function x_b5($x_ac, $x_b0) { 
if (!isset($this->x_ad[$x_b0][$x_ac])) { 
$this->x_ad[$x_b0][$x_ac] = 1; 
} else { 
$this->x_ad[$x_b0][$x_ac]++; 
} 
} 
function x_2f($x_84, $x_b6 = false) { 
$x_2d = ''; 
$x_7d = ''; 
switch ($x_84) { 
case 'web': 
if ($x_b6) { 
$x_7d = '<kerio:text id="act_visitedPages" /> ' 
. x_4p($this->x_7d['web']['pagesTotal'], $this->x_ah) 
. '<br>' 
. '<kerio:text id="act_searchesPerformed" /> ' 
. x_4p($this->x_7d['web']['searchesTotal'], $this->x_ah); 
} 
$x_b7 = 'act_web.gif'; 
$x_3d = '<kerio:text id="act_webPages" />'; 
$x_b8 = 'web'; 
break; 
case 'messaging': 
if ($x_b6) { 
$x_7d = '<kerio:text id="act_emailsRecognized" /> ' 
. x_4p($this->x_7d['messaging']['messTotal'], $this->x_ah) 
. ' | ' 
. '<kerio:text id="act_dataTransferred" /> ' 
. x_4p(x_4q($this->x_7d['messaging']['dataTotal']), $this->x_ah) 
. ' KB<br>' 
. (1 == $this->x_7d['messaging']['imUsed'] ? '<kerio:text id="act_imUsed" />' : '<kerio:text id="act_imNotUsed" />'); 
} 
$x_b7 = 'act_messaging.gif'; 
$x_3d = '<kerio:text id="act_messaging" />'; 
$x_b8 = 'mail'; 
break; 
case 'multimedia': 
if ($x_b6) { 
$x_7d = '<kerio:text id="act_dataTransferred" /> ' 
. x_4p(x_4q($this->x_7d['multimedia']['dataTotal']), $this->x_ah) 
. ' KB<br>' 
. '<kerio:text id="act_connections" /> ' 
. x_4p($this->x_7d['multimedia']['connTotal'], $this->x_ah); 
} 
$x_b7 = 'act_multimedia.gif'; 
$x_3d = '<kerio:text id="act_multimedia" />'; 
$x_b8 = 'mail'; 
break; 
case 'fileTransfer': 
if ($x_b6) { 
$x_7d = '<kerio:text id="act_filesRecognized" /> ' 
. x_4p($this->x_7d['fileTransfer']['filesTotal'], $this->x_ah) 
. ' | ' 
. '<kerio:text id="act_dataTransferred" /> ' 
. x_4p(x_4q($this->x_7d['fileTransfer']['dataTotal']), $this->x_ah) 
. ' KB<br>'; 
if ($this->x_7d['fileTransfer']['p2pTotal'] != 0 ) { 
$x_7d .= '<kerio:text id="act_dataTransferredP2p" /> ' 
. x_4p(x_4q($this->x_7d['fileTransfer']['p2pTotal']), $this->x_ah) 
. ' KB' . ($this->x_7d['fileTransfer']['p2pBlocked'] != 0 ? ' | ' : ''); 
} 
if ($this->x_7d['fileTransfer']['p2pBlocked'] != 0) { 
$x_7d .= '<kerio:text id="act_p2pBlocked" /> ' 
. x_4p($this->x_7d['fileTransfer']['p2pBlocked'], $this->x_ah); 
} 
if (0 == $this->x_7d['fileTransfer']['p2pTotal'] && 0 == $this->x_7d['fileTransfer']['p2pBlocked']) { 
$x_7d .= '<kerio:text id="act_noP2p" />'; 
} 
} 
$x_b7 = 'act_fileTransfer.gif'; 
$x_3d = '<kerio:text id="act_fileTransfer" />'; 
$x_b8 = 'mail'; 
break; 
case 'remoteAccess': 
if ($x_b6) { 
$x_7d = '<kerio:text id="act_vpnConnections" /> ' 
. x_4p($this->x_7d['remoteAccess']['connVpn'], $this->x_ah) 
. ' | ' 
. '<kerio:text id="act_dataTransferred" /> ' 
. x_4p(x_4q($this->x_7d['remoteAccess']['dataVpn']), $this->x_ah) 
. ' KB' 
. '<br>' 
. '<kerio:text id="act_remoteAccessConnections" /> ' 
. x_4p($this->x_7d['remoteAccess']['connRa'], $this->x_ah) 
. ' | ' 
. '<kerio:text id="act_dataTransferred" /> ' 
. x_4p(x_4q($this->x_7d['remoteAccess']['dataRa']), $this->x_ah) 
. ' KB'; 
} 
$x_b7 = 'act_remoteAccess.gif'; 
$x_3d = '<kerio:text id="act_remoteAccess" />'; 
$x_b8 = 'mail'; 
break; 
} 
if (!$x_b6) { 
switch ($this->x_ai) { 
case 'print': 
$x_2d = '<table class="actGroup fullWidth" cellpadding="0" cellspacing="0" border="0">' . 
'<tr>' . 
'<td class="heading">' . 
$x_3d . 
'</td>' . 
'</tr>' . 
'<tr>' . 
'<td>' . $this->x_b9() . '</td>' . 
'</tr>' . 
'<tr>' . 
'<td id="' . $x_84 . 'Head" class="data">' . 
'</td>' . 
'</tr>' . 
'</table>' . 
'<div id="' . $x_84 . '" class="web">'; 
break; 
default: 
$x_2d = '<table class="activityHeader" cellpadding="0" cellspacing="0" border="0">' . 
'<tr>' . 
'<td rowspan="2" valign="middle" class="icon">' . 
$this->kp_getImage(IMAGE_PATH . $x_b7, 38) . 
'</td>' . 
'<td colspan="2" class="documentTitle">' . 
$x_3d . 
'</td>' . 
'</tr>' . 
'<tr>' . 
'<td id="' . $x_84 . 'Head" class="data">' . 
'</td>' . 
'<td align="right" valign="bottom" class="details">' . 
'<span id="show' . $x_84 
. '" style="display: none;" class="showDetails" onClick="x_ba(\'' 
. $x_84 . '\',\'x_bb\')"><kerio:text id="act_detailsShow" /></span>' . 
'<span id="hide' . $x_84 
. '" style="display: none;" class="hideDetails" onClick="x_ba(\'' 
. $x_84 . '\',\'x_bc\')"><kerio:text id="act_detailsHide" /></span>' . 
'</td>' . 
'</tr>' . 
'</table>' . 
$this->kp_getHr(576, false) . 
'<div id="' . $x_84 . '" class="web">'; 
} 
} 
$x_2d = $this->x_ay($x_84) . $x_2d 
. (!$this->x_63 ? $this->x_b4() : ''); 
if ($this->x_ai != 'html' && !$x_b6) { 
echo $x_2d; 
flush(); 
} elseif (!$x_b6) { 
return $x_2d; 
} else { 
return '<div id="' . $x_84 . 'Data">' . $x_7d . '</div>'; 
} 
unset($x_2d); 
} 
function x_b4() { 
$x_bd = '<kerio:text id="act_start" />'; 
$x_be = '<kerio:text id="act_duration" />'; 
$x_bf = '<kerio:text id="act_details" />'; 
switch ($this->x_ai) { 
case 'print': 
if ($this->x_63) { 
$x_b8 = ' leftSpaceDbl'; 
} else { 
$x_b8 = ' leftSpace'; 
} 
return $this->x_bg( '', 
'<td class="t1' . $x_b8 . '">' . 
$x_bd . 
'</td><td class="t2" style="font-weight: bold !important;">' . 
$x_be . 
'</td>', 
'<span class="bold" style="color: black !important;">' . 
$x_bf . 
'</span>'); 
break; 
default: 
return $this->x_bg( '', 
'<div class="t1 grayText">' . 
$x_bd . 
'</div><div class="t2 grayText" style="font-weight: bold !important;">' . 
$x_be . 
'</div>', 
'<span class="bold grayText">' . 
$x_bf . 
'</span>'); 
} 
} 
function x_bh() { 
if ('activity' == $this->x_ai) { 
$x_bi = 'window.top.document'; 
} else { 
$x_bi = 'document'; 
} 
$x_bj = ''; 
$x_70 = ''; 
foreach ($this->x_a6 as $x_b0) { 
$x_bj .= $this->x_2f($x_b0, true); 
$x_70 .= 'if (' . $x_bi . '.getElementById("' . $x_b0 . 'Head") != null) {'; 
$x_70 .= 'if (' . $x_bi . '.getElementById("' . $x_b0 . 'Data") != null) {'; 
$x_70 .= $x_bi . '.getElementById("' . $x_b0 . 'Head").innerHTML = ' . $x_bi . '.getElementById("' . $x_b0 . 'Data").innerHTML;'; 
if ($this->x_7d[$x_b0]['empty'] != 1 && 'activity' == $this->x_ai) { 
$x_70 .= $x_bi . '.getElementById("hide' . $x_b0 . '").style.display = "block";'; 
} 
$x_70 .= '}}'; 
} 
if (!empty($this->x_ad) && $this->x_63 && 'activity' == $this->x_ai) { 
reset($this->x_a6); 
foreach ($this->x_a6 as $x_b0) { 
if (!empty($this->x_ad[$x_b0]) && is_array($this->x_ad[$x_b0])){ 
foreach ($this->x_ad[$x_b0] as $x_7u => $x_bk) { 
$x_70 .= $x_bi . '.getElementById("' . $x_b0.$x_7u . 'r").innerHTML = "' . x_4a('act_records') . ': ' . $x_bk . '";'; 
} 
} 
} 
} 
echo '<div style="display: none">' 
. $x_bj 
. '</div>'; 
echo '<div id="x_3f" style="display: none">' 
. 'function kp_ac() {' . $x_70 . '}kp_ac();' 
. '</div>'; 
flush(); 
} 
function x_bl() { 
$x_bm = array_search($this->x_a7, $this->x_a6); 
if ($x_bm === false) { 
$x_bm = -1; 
} 
if ($x_bm < count($this->x_a6)) { 
foreach ($this->x_a6 as $x_69 => $x_b0) { 
if ($x_69 > $x_bm) { 
$this->x_2f($x_b0); 
} 
} 
} 
} 
function x_ay($x_84) { 
$x_5c = ''; 
if ($this->x_a7 != $x_84) { 
if ($this->x_a7 != '' && $this->x_63) { 
$x_5c .= '</div>'; 
} 
if ($this->x_a7 != '') { 
$x_5c .= '</div>'; 
} 
if ($x_84 != '') { 
$this->x_a7 = $x_84; 
} 
} 
return $x_5c; 
} 
function x_bn($x_5w = 0) { 
$x_5w = Date($this->x_af, $x_5w); 
if ('print' == $this->x_ai) { 
$x_b8 = 't1'; 
if ($this->x_63) { 
$x_b8 .= ' leftSpaceDbl'; 
} else { 
$x_b8 .= ' leftSpace'; 
} 
$x_5w = '<td class="' . $x_b8 . '" rowspan="2">' . $x_5w . '</td><td class="t2" rowspan="2">&nbsp;</td>'; 
} 
return $x_5w; 
} 
function x_bo($x_bd = 0, 
$x_bp = 0) { 
$x_bq = kp_getDay($x_bd, false); 
$x_br = ($x_bd != 0 ? Date($this->x_af, $x_bd): '') . 
($x_bq != $this->x_ac ? '<br>' . kp_getShortDate($x_bq, $this->x_ag) : ''); 
$x_bs = 't1'; 
$x_3d = ''; 
if ($x_bp != 0) { 
$x_bt = $x_bp - $x_bd; 
$x_bu = intval($x_bt / 3600); 
$x_bv = intval(($x_bt - ($x_bu*3600)) / 60); 
$x_bw = $x_bt - (($x_bu*3600) + ($x_bv*60)); 
if ($x_bp - $x_bd > 0) { 
if ($x_bu != 0) { 
$x_bx = sprintf('%s:%02s:%02s', $x_bu, $x_bv, $x_bw); 
} elseif ($x_bv != 0) { 
$x_bx = sprintf('%s:%02s', $x_bv, $x_bw); 
} else { 
$x_bx = sprintf('0:%02s', $x_bw); 
} 
} 
$x_by = 't2'; 
$x_3d = ' title="' . Date($this->x_af, $x_bp) . '"'; 
} else { 
$x_bx = ' <kerio:text id="act_unfinished" />'; 
$x_by = 't2 u'; 
} 
if ('activity' == $this->x_ai) { 
$x_5c = '<div class="' . $x_bs . '">' . $x_br . '</div>' 
. '<div class="' . $x_by . '"' . $x_3d . '>' . $x_bx . '</div>'; 
} else { 
if ($this->x_63) { 
$x_bs .= ' leftSpaceDbl'; 
} else { 
$x_bs .= ' leftSpace'; 
} 
$x_5c = '<td rowspan="2" class="' . $x_bs . '">' 
. $x_br 
. '</td>' 
. '<td rowspan="2" class="' . $x_by . '">' 
. $x_bx 
. '</td>'; 
} 
return $x_5c; 
} 
function x_bz($x_84, $x_7u) { 
$x_c0 = false; 
$x_c1 = false; 
$x_bq = $this->x_7d[$x_84]['dayNum']; 
$x_ac = kp_getDay($x_7u, false); 
if ($x_ac != $x_bq) { 
$x_c0 = true; 
if ($x_bq != 0) { 
$x_c1 = true; 
} 
$this->x_7d[$x_84]['dayNum'] = $x_ac; 
} 
return Array('currDay' => $x_ac, 'newDay' => $x_c0, 'dayBlockEnd' => $x_c1); 
} 
function x_bg($x_84 = '', $x_5w = '', $x_3d = '', $x_bf = '') { 
$x_8l = ''; 
switch ($this->x_ai) { 
case 'activity': 
switch ($x_84) { 
case 'small': 
$x_8l = '<div class="r"><div class="t">' 
. $x_5w 
. '</div><div class="s">' 
. $x_3d 
. '</div></div>'; 
break; 
default: 
$x_8l = '<div class="r"><div class="t">' 
. $x_5w 
. '</div><div class="d">' 
. $x_3d 
. ($x_bf != '' ? 
'<br><span' 
.(eregi('<br>',$x_5w)?' class="iebug3px">':'>') 
. $x_bf 
. '</span>' 
: '') 
. '</div></div>'; 
} 
break; 
case 'print': 
$x_b8 = ' leftSpace'; 
if ($this->x_63) { 
$x_b8 = ' leftSpaceDbl'; 
} 
switch ($x_84) { 
case 'small': 
$x_8l = '<table cellpadding="0" cellspacing="0" border="0" class="r">' 
. '<tr>' 
. $x_5w 
. '<td>' 
. $x_3d 
. '</td>' 
. '</tr>' 
. '</table>'; 
break; 
default: 
$x_8l = '<table cellpadding="0" cellspacing="0" border="0" class="r">' 
. '<tr>' 
. $x_5w 
. '<td>' 
. $x_3d 
. '</td>' 
. '</tr>' 
. ($x_bf != '' ? 
'<tr>' 
. '<td>' 
. $x_bf 
. '</td>' 
. '</tr>' 
: '') 
. '</table>'; 
} 
break; 
} 
return $x_8l; 
} 
function x_ax($x_7d, $x_84) { 
if ($this->x_an) { 
$this->x_2f('remoteAccess'); 
$this->x_an = false; 
} 
if (!empty($x_7d)) { 
$this->x_7d['remoteAccess']['empty'] = 0; 
if ($this->x_63) { 
$x_7f = $this->x_bz('remoteAccess', $x_7d['start']); 
$x_ac = $x_7f['currDay']; 
$x_c0 = $x_7f['newDay']; 
$x_c1 = $x_7f['dayBlockEnd']; 
} else { 
$x_ac = kp_getDay($x_7d['start'], false); 
$x_c0 = false; 
$x_c1 = false; 
} 
$x_b2 = ''; 
if ($x_c1) { 
$x_b2 .= '</div>'; 
} 
if ($x_c0) { 
$x_b2 .= $this->x_az($x_ac, 'remoteAccess'); 
} 
$this->x_b5($x_ac, 'remoteAccess'); 
switch ($x_84) { 
case 'ra': 
$x_c2 = $this->x_7d['remoteAccess']['dataRa']; 
$x_c2 = sum64($x_c2, $x_7d['dataIn']); 
$x_c2 = sum64($x_c2, $x_7d['dataOut']); 
$this->x_7d['remoteAccess']['dataRa'] = $x_c2; 
$x_c2 = $this->x_7d['remoteAccess']['connRa']; 
$x_c2 = sum64($x_c2, 1); 
$this->x_7d['remoteAccess']['connRa'] = $x_c2; 
break; 
case 'vpn': 
$x_c2 = $this->x_7d['remoteAccess']['dataVpn']; 
$x_c2 = sum64($x_c2, $x_7d['dataIn']); 
$x_c2 = sum64($x_c2, $x_7d['dataOut']); 
$this->x_7d['remoteAccess']['dataVpn'] = $x_c2; 
$x_c2 = $this->x_7d['remoteAccess']['connVpn']; 
$x_c2 = sum64($x_c2, 1); 
$this->x_7d['remoteAccess']['connVpn'] = $x_c2; 
break; 
} 
$x_5w = $this->x_bo($x_7d['start'], $x_7d['end']); 
$x_3d = ($x_7d['server'] != '-' ? x_4d($x_7d['server']) : '<kerio:text id="unknown_protocol" />'); 
$x_bf = ($x_7d['info'] != '-' ? x_4d($x_7d['info']) . ', ' : '') 
. $this->x_c3($x_7d['dataIn'], $x_7d['dataOut']); 
echo $x_b2 . $this->x_bg('', $x_5w, $x_3d, $x_bf); 
flush(); 
} 
} 
function x_c4($x_c5 = 0, $x_36 = 0) { 
$x_c2 = $this->x_7d['fileTransfer']['dataTotal']; 
$x_c2 = sum64($x_c2, $x_c5); 
$this->x_7d['fileTransfer']['dataTotal'] = $x_c2; 
$x_c2 = $this->x_7d['fileTransfer']['filesTotal']; 
$x_c2 = sum64($x_c2, $x_36); 
$this->x_7d['fileTransfer']['filesTotal'] = $x_c2; 
} 
function x_av($x_7d, $x_84) { 
if ($this->x_am) { 
$this->x_2f('fileTransfer'); 
$this->x_am = false; 
} 
if (!empty($x_7d)) { 
$this->x_7d['fileTransfer']['empty'] = 0; 
if ($this->x_63) { 
$x_7f = $this->x_bz('fileTransfer', $x_7d['start']); 
$x_ac = $x_7f['currDay']; 
$x_c0 = $x_7f['newDay']; 
$x_c1 = $x_7f['dayBlockEnd']; 
} else { 
$x_ac = kp_getDay($x_7d['start'], false); 
$x_c0 = false; 
$x_c1 = false; 
} 
$x_b2 = ''; 
if ($x_c1) { 
$x_b2 .= '</div>'; 
} 
if ($x_c0) { 
$x_b2 .= $this->x_az($x_ac, 'fileTransfer'); 
} 
$this->x_b5($x_ac, 'fileTransfer'); 
switch ($x_84) { 
case 'download': 
case 'upload': 
$x_3d = ('download' == $x_84 ? '<kerio:text id="act_download" /> ' : '<kerio:text id="act_upload" /> ') 
. ($x_7d['server'] != '-' ? x_4d($x_7d['server']) . ' ' : ': ') 
. x_4p(x_4q($x_7d['size']), $this->x_ah) . ' KB'; 
$x_bf = $this->x_c6($x_7d['url'], $x_7d['file']); 
$this->x_c4($x_7d['size'], 1); 
break; 
case 'p2p': 
$x_3d = '<kerio:text id="act_p2p" />'; 
$x_bf = ($x_7d['info'] != '-' ? x_4d($x_7d['info']) . ', ' : ' ') 
. $this->x_c3($x_7d['dataIn'], $x_7d['dataOut']); 
$x_c2 = $this->x_7d['fileTransfer']['p2pTotal']; 
$x_c2 = sum64($x_c2, $x_7d['dataIn']); 
$x_c2 = sum64($x_c2, $x_7d['dataOut']); 
$this->x_7d['fileTransfer']['p2pTotal'] = $x_c2; 
break; 
case 'conn': 
$x_3d = '<kerio:text id="act_connUnknown" /> ' 
. ($x_7d['server'] != '-' ? x_4d($x_7d['server']) . ', ' : ''); 
$x_bf = ($x_7d['info'] != '-' ? x_4d($x_7d['info']) . ', ' : ' ') 
. $this->x_c3($x_7d['dataIn'], $x_7d['dataOut']); 
$this->x_c4(sum64($x_7d['dataIn'], $x_7d['dataOut']), 0); 
break; 
case 'p2pAttempt': 
$x_3d = '<kerio:text id="act_p2pAttempt" />'; 
$x_5w = $this->x_bn($x_7d['time']); 
$x_c2 = $this->x_7d['fileTransfer']['p2pBlocked']; 
$x_c2 = sum64($x_c2, 1); 
$this->x_7d['fileTransfer']['p2pBlocked'] = $x_c2; 
break; 
} 
if ($x_84 != 'p2pAttempt') { 
$x_5w = $this->x_bo($x_7d['start'], $x_7d['end']); 
echo $x_b2 . $this->x_bg('', $x_5w, $x_3d, $x_bf); 
} else { 
echo $x_b2 . $this->x_bg('small', $x_5w, $x_3d); 
} 
flush(); 
} 
} 
function x_aw($x_7d, $x_84) { 
if ($this->x_al) { 
$this->x_2f('multimedia'); 
$this->x_al = false; 
} 
if (!empty($x_7d)) { 
$this->x_7d['multimedia']['empty'] = 0; 
if ($this->x_63) { 
$x_7f = $this->x_bz('multimedia', $x_7d['start']); 
$x_ac = $x_7f['currDay']; 
$x_c0 = $x_7f['newDay']; 
$x_c1 = $x_7f['dayBlockEnd']; 
} else { 
$x_ac = kp_getDay($x_7d['start'], false); 
$x_c0 = false; 
$x_c1 = false; 
} 
$x_b2 = ''; 
if ($x_c1) { 
$x_b2 .= '</div>'; 
} 
if ($x_c0) { 
$x_b2 .= $this->x_az($x_ac, 'multimedia'); 
} 
$this->x_b5($x_ac, 'multimedia'); 
$x_5w = $this->x_bo($x_7d['start'], $x_7d['end']); 
switch ($x_84) { 
case 'common': 
$x_3d = ($x_7d['info'] != '-' ? x_54($x_7d['info'], $this->x_a8) : '<kerio:text id="act_multimediaStream" />'); 
$x_bf = ($x_7d['server'] != '-' ? x_4d($x_7d['server']) . ', ' : '') 
. $this->x_c3($x_7d['dataIn'], $x_7d['dataOut']); 
break; 
case 'web': 
$x_3d = $this->x_c6($x_7d['url'], $x_7d['title']); 
$x_bf = ($x_7d['server'] != '-' ? x_4d($x_7d['server']) . ', ' : '') 
. $this->x_c3($x_7d['dataIn'], $x_7d['dataOut']); 
break; 
} 
echo $x_b2 . $this->x_bg('', $x_5w, $x_3d, $x_bf); 
flush(); 
$x_c2 = $this->x_7d['multimedia']['dataTotal']; 
$x_c2 = sum64($x_c2, $x_7d['dataIn']); 
$x_c2 = sum64($x_c2, $x_7d['dataOut']); 
$this->x_7d['multimedia']['dataTotal'] = $x_c2; 
$x_c2 = $this->x_7d['multimedia']['connTotal']; 
$x_c2 = sum64($x_c2, 1); 
$this->x_7d['multimedia']['connTotal'] = $x_c2; 
} 
} 
function x_au($x_7d, $x_84) { 
if ($this->x_ak) { 
$this->x_2f('messaging'); 
$this->x_ak = false; 
} 
if (!empty($x_7d)) { 
$this->x_7d['messaging']['empty'] = 0; 
if ('OTAMail' == $x_84) { 
$x_7u = $x_7d['time']; 
} else { 
$x_7u = $x_7d['start']; 
} 
if ($this->x_63) { 
$x_7f = $this->x_bz('mail', $x_7u); 
$x_ac = $x_7f['currDay']; 
$x_c0 = $x_7f['newDay']; 
$x_c1 = $x_7f['dayBlockEnd']; 
} else { 
$x_ac = kp_getDay($x_7u, false); 
$x_c0 = false; 
$x_c1 = false; 
} 
$x_b2 = ''; 
if ($x_c1) { 
$x_b2 .= '</div>'; 
} 
if ($x_c0) { 
$x_b2 .= $this->x_az($x_ac, 'messaging'); 
} 
$this->x_b5($x_ac, 'messaging'); 
switch ($x_84) { 
case 'OTAMail': 
switch ($x_7d['protocol']) { 
case 'POP3': 
$x_3d = intval($x_7d['mailCount']) . ' <kerio:text id="act_emailsDownloaded" /> ' 
. x_4d($x_7d['server']); 
$x_bf = x_4d($x_7d['protocol']) . ', ' 
. $this->x_c3($x_7d['dataIn'], $x_7d['dataOut']); 
break; 
case 'SMTP': 
$x_3d = intval($x_7d['mailCount']) . ' <kerio:text id="act_emailsSent" /> ' 
. x_4d($x_7d['server']); 
$x_bf = x_4d($x_7d['protocol']) . ', ' 
. $this->x_c3($x_7d['dataIn'], $x_7d['dataOut']); 
break; 
} 
$x_5w = $this->x_bn($x_7d['time']); 
break; 
case 'IM': 
$this->x_7d['messaging']['imUsed'] = 1; 
$x_5w = $this->x_bo($x_7d['start'], $x_7d['end']); 
$x_3d = '<kerio:text id="act_im" />'; 
$x_bf = ($x_7d['info'] != '-' ? x_4d($x_7d['info']) . ', ': '<kerio:text id="unknown_site" />') 
. ($x_7d['server'] != '-' ? x_4d($x_7d['server']) : ''); 
break; 
case 'ATMail': 
$x_5w = $this->x_bo($x_7d['start'], $x_7d['end']); 
$x_3d = '<kerio:text id="act_connMail" /> ' 
. ($x_7d['server'] != '-' ? x_4d($x_7d['server']) : '<kerio:text id="unknown_site" />'); 
$x_bf = ($x_7d['info'] != '-' ? x_4d($x_7d['info']) . ', ' : '') 
. $this->x_c3($x_7d['dataIn'], $x_7d['dataOut']); 
break; 
} 
echo $x_b2 . $this->x_bg('', $x_5w, $x_3d, $x_bf); 
flush(); 
$x_c2 = $this->x_7d['messaging']['dataTotal']; 
$x_c2 = sum64($x_c2, $x_7d['dataIn']); 
$x_c2 = sum64($x_c2, $x_7d['dataOut']); 
$this->x_7d['messaging']['dataTotal'] = $x_c2; 
$x_c2 = $this->x_7d['messaging']['messTotal']; 
$x_c2 = sum64($x_c2, $x_7d['mailCount']); 
$this->x_7d['messaging']['messTotal'] = $x_c2; 
} 
} 
function x_at($x_7d, $x_84) { 
if ($this->x_aj) { 
$this->x_2f('web'); 
$this->x_aj = false; 
$this->x_c7(); 
} 
if (!empty($x_7d)) { 
$this->x_7d['web']['empty'] = 0; 
$x_c0 = false; 
$x_c1 = false; 
$x_c8 = false; 
$x_c9 = false; 
if ($x_84 != 'search') { 
$x_7u = $x_7d['start']; 
} else { 
$x_7u = $x_7d['time']; 
} 
if ($this->x_63) { 
$x_7f = $this->x_bz('web', $x_7u); 
$x_ac = $x_7f['currDay']; 
$x_c0 = $x_7f['newDay']; 
$x_c1 = $x_7f['dayBlockEnd']; 
} else { 
$x_ac = kp_getDay($x_7u, false); 
$x_c0 = false; 
$x_c1 = false; 
} 
$x_b2 = ''; 
if ($x_c1) { 
$x_b2 .= '</div>'; 
} 
if ($x_c0) { 
$x_b2 .= $this->x_az($x_ac, 'web'); 
} 
$this->x_b5($x_ac, 'web'); 
switch ($x_84) { 
case 'httpConn': 
$x_5w = $this->x_bo($x_7d['start'], $x_7d['end']); 
$x_3d = '<kerio:text id="act_connHTTP" /> ' 
. ($x_7d['server'] != '-' ? x_4d($x_7d['server']) : '<kerio:text id="unknown_site" />'); 
$x_bf = ($x_7d['info'] != '-' ? x_4d($x_7d['info']) . ', ' : '') 
. $this->x_c3($x_7d['dataIn'], $x_7d['dataOut']); 
echo $x_b2 . $this->x_bg('', $x_5w, $x_3d, $x_bf); 
flush(); 
break; 
case 'conn': 
$x_5w = $this->x_bo($x_7d['start'], $x_7d['end']); 
$x_bf = '<a href="' . x_4d($x_7d['url']) . '" target="_blank">' . x_4d($x_7d['title']) . '</a>'; 
$x_3d = x_4d($x_7d['domain']) . ' | ' 
. '<kerio:text id="visits" />: ' . intval($x_7d['requests']) 
. ($x_7d['categories'] != '' ? 
' | <kerio:text id="categories" />: ' . x_4d($this->x_ca($x_7d['categories'])) 
: ''); 
echo $x_b2 . $this->x_bg('', $x_5w, $x_3d, $x_bf); 
flush(); 
$x_c2 = $this->x_7d['web']['pagesTotal']; 
$x_c2 = sum64($x_c2, $x_7d['requests']); 
$this->x_7d['web']['pagesTotal'] = $x_c2; 
break; 
case 'search': 
$x_5w = $this->x_bn($x_7d['time']); 
$x_3d = x_4d($x_7d['engine']); 
$x_cb = x_4d($x_7d['query']); 
$x_bf = '<kerio:text id="searchedFor" />: ' . 
'<a href="' . x_4d($x_7d['url']) . '" target="_blank">' . 
$x_cb . 
'</a>'; 
$x_bf = x_54( $x_bf, 
$this->x_a8, 
false, true, false, false, false, 
$x_cb); 
echo $x_b2 . $this->x_bg('', $x_5w, $x_3d, $x_bf); 
flush(); 
$x_c2 = $this->x_7d['web']['searchesTotal']; 
$x_c2 = sum64($x_c2, 1); 
$this->x_7d['web']['searchesTotal'] = $x_c2; 
break; 
} 
} 
} 
function x_c7() { 
$x_cc = new x_8c(); 
$x_3u = Array(); 
$x_3u = $x_cc->x_cd($this->x_4w); 
if (!empty($x_3u)) { 
$x_5i = Array(); 
$x_ce = Array(); 
foreach ($x_3u as $x_cf) { 
$x_5i[] = '/\b' . $x_cf['ISS_ID'] . '\b/U'; 
$x_ce[] = $x_cf['ISS_NAME']; 
} 
$x_5i[] = '/,/'; 
$x_ce[] = ', '; 
$this->x_ae = Array( 'pattern' => $x_5i, 
'replacement' => $x_ce); 
} 
} 
function x_ca($x_4m = ''){ 
if (!empty($this->x_ae)) { 
$x_4m = preg_replace ($this->x_ae['pattern'], 
$this->x_ae['replacement'], 
$x_4m, 
-1); 
} 
return $x_4m; 
} 
function x_c3($x_cg = 0, $x_ch = 0) { 
return x_4p(x_4q($x_cg), $this->x_ah) 
. ' KB <kerio:text id="in_small" />' 
. ' / ' 
. x_4p(x_4q($x_ch), $this->x_ah) 
. ' KB <kerio:text id="out_small" />'; 
} 
function x_ar() { 
$x_7h = '<kerio:text id="act_badPeriod" />' . '<br>' 
. '<kerio:text id="websites_periods" />'; 
$x_23 = Array(); 
if ($this->x_4['activityDayCount'] < 7) { 
$x_7h .= '.'; 
} elseif ($this->x_4['activityDayCount'] >= 7 && $this->x_4['activityDayCount'] < 31) { 
$x_7h .= ':'; 
$x_6x = new x_6y(); 
$x_23 = $x_6x->x_ci($this->x_6v, 
$this->x_6w, 
7, 
true); 
} else { 
$x_7h .= ':'; 
$x_6x = new x_6y(); 
$x_23 = $x_6x->x_ci($this->x_6v, 
$this->x_6w, 
7); 
} 
echo '<div class="webApContainer">' . 
$this->x_cj( $x_23, 
'activity', 
$this->x_a9, 
$this->x_32, 
$x_7h) . 
'</div>'; 
flush; 
} 
function x_c6($x_2 = '', $x_3d = '') { 
$x_ck = false; 
if ($x_2 != '-') { 
$x_ck = true; 
} 
$x_cl = false; 
if ($x_3d != '-') { 
$x_cl = true; 
} 
$x_cm = ''; 
if ($x_ck || $x_cl) { 
$x_cm = x_54( ($x_cl ? $x_3d : $x_2), 
$this->x_a8, 
true, 
true, 
$x_ck, 
'_blank', 
$x_2); 
} 
return $x_cm; 
} 
} 
?>
