<?php
class kp_HtmlElements { 
var $x_g3 = IMAGE_PATH; 
var $x_gq = Array(); 
function kp_getImage($x_gr = '', $x_gb = '', $x_gc = '', $x_gd = '', $x_3k = Array()) { 
if (is_array($x_3k)) { 
$x_gs = implode(' ', $x_3k); 
} else { 
$x_gs = $x_3k; 
} 
$x_5p = x_5g(); 
if (strpos($x_gr, '?id=') !== false && 'MSIE 6' == $x_5p['name']) { 
return '<img src="' . $this->x_g3 . 'one.gif" ' . 
'	style="width:' . $x_gb . 'px; height: ' . $x_gc . 'px; border: 0px;' . 
'filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''. $x_gr . '\', sizingMethod=\'scale\');"  ' . $x_gs . '/>'; 
} else { 
return '<img src="' . $x_gr . ($x_gb != 0 ? '" width="' . $x_gb : '') . ($x_gc != 0 ? '" height="' . $x_gc : '') 
. '" alt="' . ('' == $x_gd ? '' : $x_gd) . '" ' . $x_gs . '>'; 
} 
} 
function kp_getCountedImage($x_84 = '', 
$x_gt = 0, 
$x_gu = 0, 
$x_7d = Array(), 
$x_gv = Array(), 
$x_f1 = Array(), 
$x_3k = '', 
$x_gw = '') { 
if ($x_gt != 0 && $x_gu != 0 && !empty($x_7d)) { 
$x_1 = kerio("webiface::PhpSession"); 
$x_gx = ''; 
switch ($x_84) { 
case 'pie': 
$x_gx = $x_1->createPieGraph($x_gt, $x_gu, $x_7d['data'], &$x_gy, $x_f1, $x_gv); 
break; 
case 'bar': 
$x_gx = $x_1->createBarGraph($x_gt, $x_gu, $x_7d['data'], &$x_gy, 
$x_f1, &$x_gz); 
break; 
} 
if ( (!empty($x_gy) || !empty($x_gz)) 
&& ($x_gx != '' && !empty($x_gw) && !empty($x_7d['links']))) { 
$this->x_h0($x_gx, $x_gy, $x_gz, $x_7d['links'], $x_gw); 
$x_3k .= ' usemap="#' . $x_gx . '"'; 
$x_3k .= ' id="' . $x_gx . '"'; 
} 
return $this->kp_getImage('internal/graph?id=' . $x_gx, $x_gt, $x_gu, '', $x_3k); 
} 
} 
function x_h1($x_h2, $x_gw, $x_h3 = Array()) { 
switch ($x_gw) { 
case 'date': 
case 'dateUser': 
if (isset($x_h2['periodStart']) && isset($x_h2['periodEnd'])) { 
$x_h4 = ('date' == $x_gw ? 'overall' : 'individual'); 
$x_cm = sprintf('javascript: x_6r(\'' . $x_h4 . '\', %s, 0, %s, %s)', 
$x_h2['userId'], 
$x_h2['periodStart'], 
$x_h2['periodEnd']); 
} else { 
$x_cm = ''; 
} 
$x_h5 = Array(); 
$x_h5['x_71'] = Array('x_h6' => 'fixed', 'x_72' => 'tp', 
'x_h7' => 'absoluteX', 
'x_h8' => ($x_h3['shiftY'] ? $x_h3['shiftY'] - 30 : 30), 
'x_h9' => ($x_h3['shiftX'] ? $x_h3['shiftX'] : 0), 
'x_ha' => 1); 
$x_h5['x_76'] = Array($x_h2['label'], 
'<b>' . x_4a('lang_total') . '</b>', 
$x_h2['dataTotal'] . ' KB', 
'<b>' . x_4a('lang_inbound') . '</b>', 
$x_h2['dataIn'] . ' KB', 
'<b>' . x_4a('lang_outbound') . '</b>', 
$x_h2['dataOut'] . ' KB'); 
break; 
case 'user': 
if (isset($x_h2['periodStart']) && isset($x_h2['periodEnd'])) { 
$x_cm = sprintf('javascript: x_6r(\'individual\', %s, 0, %s, %s)', 
$x_h2['userId'], 
$x_h2['periodStart'], 
$x_h2['periodEnd']); 
} else { 
$x_cm = ''; 
} 
$x_h5 = Array(); 
$x_h5['x_71'] = Array('x_72'=>'tp', 'x_ha' => 1); 
$x_h5['x_76'] = Array($x_h2['label'], 
'<b>' . x_4a('lang_total') . '</b>', 
$x_h2['dataTotal'] . ' KB'); 
if (isset($x_h2['dataIn'])) { 
$x_h5['x_76'][] = '<b>' . x_4a('lang_inbound') . '</b>'; 
$x_h5['x_76'][] = $x_h2['dataIn'] . ' KB'; 
} 
if (isset($x_h2['dataOut'])) { 
$x_h5['x_76'][] = '<b>' . x_4a('lang_outbound') . '</b>'; 
$x_h5['x_76'][] = $x_h2['dataOut'] . ' KB'; 
} 
break; 
case 'userDet': 
case 'userDetSites': 
if (isset($x_h2['periodStart']) && isset($x_h2['periodEnd'])) { 
$x_cm = sprintf('javascript: x_6r(\'individual\', %s, 0, %s, %s)', 
$x_h2['userId'], 
$x_h2['periodStart'], 
$x_h2['periodEnd']); 
} else { 
$x_cm = ''; 
} 
$x_h5 = Array(); 
$x_h5['x_71'] = Array('x_72'=>'tp', 'x_ha' => 1); 
$x_h5['x_76'] = Array($x_h2['label'], 
'<b>' . ('userDetSites' == $x_gw ? x_4a('visits') : x_4a('requests')) . ': </b>' . $x_h2['requests'] . '</b>'); 
break; 
case 'categories': 
case 'categoriesGoTo': 
case 'categoriesLinkOnPage': 
$x_cm = ''; 
if ('categoriesLinkOnPage' == $x_gw) { 
$x_cm = sprintf('javascript:  x_hb(document.getElementById(\'scrElem%s\'))', 
$x_h2['categoryId']); 
} elseif ('categoriesGoTo' == $x_gw){ 
$x_cm = sprintf('javascript: x_6r(\'categories\', %s, 0, %s, %s, %s)', 
'false', 
$x_h2['periodStart'], 
$x_h2['periodEnd'], 
$x_h2['categoryId']); 
} 
$x_h5 = Array(); 
$x_h5['x_71'] = Array('x_72'=>'tp', 'x_ha' => 1, 
'x_h7' => 'absoluteY', 
'x_h8' => ($x_h3['shiftY'] ? $x_h3['shiftY'] : 0), 
'x_h9' => ($x_h3['shiftX'] ? $x_h3['shiftX'] + 50 : 50) 
); 
$x_h5['x_76'] = Array($x_h2['label'], 
'<b>' . x_4a('requests') . ': </b>' . $x_h2['requests'] . '</b>'); 
break; 
case 'sites': 
case 'sitesGoTo': 
case 'sitesLinkOnPage': 
$x_cm = ''; 
if ('sitesLinkOnPage' == $x_gw) { 
$x_cm = sprintf('javascript:  x_hb(document.getElementById(\'scrElem%s\'))', 
$x_h2['webId']); 
} elseif ('sitesGoTo' == $x_gw){ 
$x_cm = sprintf('javascript: x_6r(\'sites\', %s, 0, %s, %s, %s)', 
'false', 
$x_h2['periodStart'], 
$x_h2['periodEnd'], 
$x_h2['webId']); 
} 
$x_h5 = Array(); 
$x_h5['x_71'] = Array('x_72'=>'tp', 'x_ha' => 1, 
'x_h7' => 'absoluteY', 
'x_h8' => ($x_h3['shiftY'] ? $x_h3['shiftY'] : 0), 
'x_h9' => ($x_h3['shiftX'] ? $x_h3['shiftX'] + 50 : 50) 
); 
$x_h5['x_76'] = Array($x_h2['label'], 
'<b>' . x_4a('visits') . ': </b>' . $x_h2['requests'] . '</b>'); 
break; 
case 'protocols': 
case 'protocolsLink': 
$x_cm = ''; 
if ('protocolsLink' == $x_gw && !empty($x_h2['protoId'])) { 
$x_cm = sprintf('javascript:  x_6r(\'traffic\', false, 0, 0, 0, 0, %s)', 
$x_h2['protoId']); 
} 
$x_h5 = Array(); 
$x_h5['x_71'] = Array('x_72'=>'tp', 'x_ha' => 1); 
$x_h5['x_76'] = Array($x_h2['label'], 
$x_h2['dataTotal'] . ' KB'); 
break; 
} 
return Array('labelData' => $x_h5, 'linkString' => $x_cm); 
} 
function x_hc($x_7d, $x_cm, $x_h5, $x_hd, $x_h3 = Array()) { 
$x_3u = ''; 
if ($x_7d['x'] != 0 && 
$x_7d['y'] != 0 && 
$x_7d['width'] != 0 && 
$x_7d['height'] != 0) { 
$x_he = Array(); 
$bottomRight = Array(); 
$x_he['x'] = ($x_7d['x']); 
$x_he['y'] = ($x_7d['y']); 
$x_hf['x'] = ($x_7d['x'] + $x_7d['width']); 
$x_hf['y'] = ($x_7d['y'] + $x_7d['height']); 
$x_hg = implode(',', $x_he) . ',' . implode(',', $x_hf); 
if ($x_cm != '') { 
$x_6h = ' href="' . $x_cm . '" '; 
} else { 
$x_6h = ' nohref '; 
} 
if (empty($x_h3)) { 
$x_h3 = Array(); 
$x_h3['tlX'] = $x_he['x']; 
$x_h3['tlY'] = $x_he['y']; 
$x_h3['brX'] = $x_hf['x']; 
$x_h3['brY'] = $x_hf['y']; 
} 
$x_h5['x_hh'] = Array('x_hi' => $x_h3['tlX'], 'x_hj' => $x_h3['tlY'], 
'x_hk' => $x_h3['brX'], 'x_hl' => $x_h3['brY']); 
$x_3u = '<area' . $x_6h . 'shape="rect" coords="' . $x_hg . '" 


				 tooltip="' . $this->x_79($x_h5) . '" onMouseOver="x_2z.x_bb(this, \'' . $x_hd . '\');" onMouseOut="x_2z.x_bc()">'; 
} 
return $x_3u; 
} 
function x_h0($x_hd = '', $x_hm = Array(), $x_gz = Array(), 
$x_hn = Array(), $x_gw = '') { 
$x_ho = 0; 
if (count($x_gz) != 0 ) { 
$x_c5 = ''; 
if ('date' == $x_gw || 'dateUser' == $x_gw) { 
$x_c5 = 'height'; 
} else { 
$x_c5 = 'width'; 
} 
foreach ($x_gz as $x_1n) { 
if ($x_1n[$x_c5] > $x_ho) { 
$x_ho = $x_1n[$x_c5]; 
} 
} 
} else { 
$x_ho = 50; 
} 
$x_3u = Array(); 
$x_36 = count($x_hm); 
if (count($x_gz) > $x_36) { 
$x_36 = count($x_gz); 
} 
for ($x_7p = 0; $x_7p <= $x_36; $x_7p++) { 
$x_cm = ''; 
$x_hp = ''; 
$x_h3 = Array(); 
if (isset($x_gz[$x_7p])) { 
$x_7d = $x_gz[$x_7p]; 
if ('date' == $x_gw || 'dateUser' == $x_gw) { 
$x_7d['y'] = ($x_7d['y'] + $x_7d['height']) - $x_ho; 
$x_7d['height'] = $x_ho; 
$x_hq = Array(); 
$x_hq['y'] = $x_7d['y'] + $x_7d['height']; 
$x_h3['shiftX'] = $x_7d['width']; 
$x_h3['shiftY'] = $x_7d['y'] + $x_7d['height']; 
} else { 
$x_7d['width'] = $x_ho; 
$x_hq = Array(); 
$x_hq['y'] = $x_7d['y']; 
$x_h3['shiftX'] = $x_7d['x']; 
$x_h3['shiftY'] = $x_7d['y'] + $x_7d['height']; 
} 
$x_h3['tpPos']['tlX'] = $x_7d['x']; 
$x_h3['tpPos']['tlY'] = $x_7d['y']; 
$x_h3['tpPos']['brX'] = ($x_7d['x'] + $x_7d['width']); 
$x_h3['tpPos']['brY'] = ($x_7d['y'] + $x_7d['height']); 
if (isset($x_hn[$x_7p])) { 
$x_hr = $this->x_h1($x_hn[$x_7p], $x_gw, $x_h3); 
} 
$x_3u[] = $this->x_hc($x_7d, $x_hr['linkString'], 
$x_hr['labelData'], $x_hd, $x_h3['tpPos']); 
} 
if (isset($x_hm[$x_7p])) { 
$x_7d = $x_hm[$x_7p]; 
if (isset($x_hn[$x_7p])) { 
$x_hr = $this->x_h1($x_hn[$x_7p], $x_gw, $x_h3); 
} 
$x_3u[] = $this->x_hc($x_7d, $x_hr['linkString'], $x_hr['labelData'], 
$x_hd, (isset($x_h3['tpPos']) ? $x_h3['tpPos'] : Array())); 
} 
} 
if (!empty($x_3u)) { 
$this->x_gq[$x_hd] = $x_3u; 
} 
} 
function x_79($x_hs = Array()) { 
if (is_array($x_hs) && !empty($x_hs)) { 
$x_ht = ''; 
$x_7d = ''; 
$x_hg = ''; 
$x_hu = Array(); 
if ($x_hs['x_71']) { 
$x_3u = Array(); 
foreach ($x_hs['x_71'] as $x_69 => $x_1n) { 
$x_3u[] = '\'' . $x_69 . '\':\'' . $x_1n . '\''; 
} 
$x_hu[] = '\'x_71\':{' . implode(',', $x_3u) . '}'; 
} 
if ($x_hs['x_76']) { 
$x_hu[] = '\'x_76\':[\'' . implode('\',\'', $x_hs['x_76']) . '\']'; 
} 
if ($x_hs['x_hh']) { 
$x_3u = Array(); 
foreach ($x_hs['x_hh'] as $x_69 => $x_1n) { 
$x_3u[] = '\'' . $x_69 . '\':\'' . $x_1n . '\''; 
} 
$x_hu[] = '\'x_hh\':{' . implode(',', $x_3u) . '}'; 
} 
return '{' . implode(',', $x_hu) . '}'; 
} 
return; 
} 
function x_f6() { 
$x_3u = Array(); 
if (!empty($this->x_gq)) { 
foreach ($this->x_gq as $x_1m => $x_hv) { 
$x_3u[] = '<map name="' . $x_1m . '">' . implode('', $x_hv) . '</map>'; 
} 
} 
return implode('', $x_3u); 
} 
function kp_getInput($x_84 = 'text', $x_ec = '', $x_3q = '', $x_3k = Array(), $x_1m = '') { 
$x_hw = Array(); 
if ($x_84 != '') { 
$x_hw[] = 'type="' . $x_84 . '"'; 
} 
if ($x_ec != '') { 
$x_hw[] = 'name="' . $x_ec . '"'; 
} 
if ($x_3q != '') { 
$x_hw[] = 'value="' . $x_3q . '"'; 
} 
if ($x_1m != '') { 
$x_hw[] = 'id="' . $x_1m . '"'; 
} 
if (!empty($x_3k)) { 
if (is_array($x_3k)) { 
$x_hw[] = implode(' ', $x_3k); 
} else { 
$x_hw[] = $x_3k; 
} 
} 
return '<input ' . implode(' ', $x_hw) . ' >'; 
} 
function kp_getHr($x_gb = 560, $x_hx = true) { 
$x_51 = '	<div class="hr" style="width: ' . $x_gb . 'px">' 
. ($x_hx ? $this->kp_getImage($this->x_g3 . 'bgHR.png', $x_gb, 9) : '') 
. '</div>'; 
return $x_51; 
} 
function kp_tableFrame($x_3d = '', $x_hy = '', $x_gb = 650, $x_hz = '') { 
$x_i0 = '


			<table cellpadding="0" cellspacing="0" border="0" class="tableFrame">


				<colgroup span="3">


					<col width="14">


					<col width="' . ($x_gb - (2 * 14)) . '">


					<col width="14">


				</colgroup>			


				<tr>


					<td class="tableFrameCornerUL"></td>


					<td class="tableFrameMiddleU">


						<span class="tableTitle">' . $x_3d . '</span>' . $this->kp_getImage($this->x_g3 . 'tab_bgTop.png', '100%', '32', '', 'class="tableFrameBackground"') . '


					</td>


					<td class="tableFrameCornerUR"></td>


				</tr>


				<tr><td class="tableFrameContent" colspan="3" ' . ($x_hz != '' ? $x_hz : '') . '>


		'; 
$x_i1 = '


				</td></tr>		


				<tr><td class="tableFrameCornerLL"></td><td class="tableFrameMiddleL"></td><td class="tableFrameCornerLR"></td></tr></table>'; 
return $x_i0 . $x_hy . $x_i1; 
} 
function kp_getButton($x_3d = '', $x_fq = false, $x_3k = Array(), $x_i2 = '') { 
$x_gs = ''; 
if (is_array($x_3k)) { 
$x_gs = implode(' ', $x_3k); 
} else { 
$x_gs = $x_3k; 
} 
return '<button type="button" ' . $x_gs . '>' 
. ($x_i2 != '' ? $this->kp_getImage($x_i2, 16, 16, '', Array('align="absmiddle"', 'class="toolbarButtonIcon"')) : '' ) 
. $x_3d 
. ($x_fq ? $this->kp_getImage($this->x_g3 . 'tb_arrow.gif', 8, 8, '', Array('class="toolbarButtonArrow"')) : '') 
. '</button>'; 
} 
function kp_table($x_7d = Array(), $x_3k = '', $x_2d = Array(), $x_7f = 0) { 
$x_55 = ''; 
if ($x_7f != 0 ) { 
$x_i3 = 0; 
foreach ($x_7d as $x_8l) { 
$x_bk = Array(); 
if (!isset($x_8l['data']) || !is_array($x_8l)) { 
$x_bk = $x_8l; 
} else { 
$x_bk = $x_8l['data']; 
} 
$x_i4 = count($x_bk); 
if ($x_i4 > $x_i3) { 
$x_i3 = $x_i4; 
} 
} 
} 
if (!empty($x_2d)) { 
$x_55 .= '<tr><th>'; 
$x_55 .= implode('</th><th>', $x_2d); 
$x_55 .= '</th></tr>'; 
} 
if (!empty($x_7d)) { 
foreach ($x_7d as $x_i5 => $x_8l) { 
$x_bk = Array(); 
if (!isset($x_8l['data']) || !is_array($x_8l)) { 
$x_bk = $x_8l; 
$x_i6 = ''; 
} else { 
$x_bk = $x_8l['data']; 
if (array_key_exists('properties', $x_8l)) { 
$x_i6 = ' ' . $x_8l['properties']; 
} else { 
$x_i6 = ''; 
} 
} 
if (1 == $x_7f) { 
$x_55 .= '<tr><td class="divider" colspan="' . $x_i3 . '"></td></tr>'; 
} 
$x_55 .= '<tr' . $x_i6 . '>'; 
foreach ($x_bk as $x_8k) { 
$x_i7 = ''; 
if (!isset($x_8k['data']) || !is_array($x_8k)) { 
$x_i7 = $x_8k; 
$x_i8 = ''; 
} else { 
$x_i7 = $x_8k['data']; 
if (array_key_exists('properties', $x_8k)) { 
$x_i8 = ' ' . $x_8k['properties']; 
} else { 
$x_i8 = ''; 
} 
} 
$x_55 .= '<td' . $x_i8 . '>'; 
$x_55 .= $x_i7; 
$x_55 .= '</td>'; 
} 
$x_55 .= '</tr>'; 
unset($x_bk); 
} 
} 
return '<table ' . $x_3k . '><tbody>' . $x_55 . '</tbody></table>'; 
} 
function kp_documentTitle($x_3d = '', $x_i2 = 'topic_common.png', $x_3k = '', $x_i9 = 32) { 
return '<div class="documentTitle"' . ($x_3k != '' ? $x_3k : '') . '>' 
. $this->kp_getImage($this->x_g3 . $x_i2, $x_i9, $x_i9) . $x_3d . '</div>'; 
} 
function kp_getDialogPageContent($x_84 = '', $x_3d = '', $x_ia = '', $x_1w = '', $x_ib = '', $x_gb = '') { 
switch ($x_84) { 
case 'login': 
$x_ic = 'dialogBgStrip'; 
$x_id = 'dialogBg'; 
$x_ie = 'login.gif'; 
break; 
case 'logout': 
$x_ic = 'dialogBgStripLogout'; 
$x_id = 'dialogBgLogout'; 
$x_ie = 'logout.gif'; 
break; 
case 'deny': 
$x_ic = 'dialogBgStripDeny'; 
$x_id = 'dialogBgDeny'; 
$x_ie = 'deny.gif'; 
break; 
} 
$x_4y = x_4y(); 
if (!$x_4y) { 
$x_if = '	<div class="dialog"' . ($x_gb != false ? 'style="width:' . $x_gb . 'px"' : '') . '>


									<div class="dialogHeader">


										<div class="tab_UL"></div>


										<div class="tab_UM"' . ($x_gb != false ? 'style="width:' . ($x_gb-28) . 'px"' : '') . '>


											<div class="tab_caption">' . $this->kp_getImage($this->x_g3 . 'kerio_logo.gif', 300, 20) . '</div>


										</div>


										<div class="tab_UR"></div>


									</div>


									


									<div class="dialogBody">


										<div class="' . $x_ic . '">


											<div class="' . $x_id . '">


												' . $this->kp_documentTitle($x_3d , $x_ie, 'style="padding-bottom: 10px;"', 24) . '


												<span class="heading">' . $x_ia . '</span>


												<div class="' . $x_ib . '">


													' . $x_1w . '	


												</div>										


											</div>


										</div>


									</div>


	


									<div class="dialogFooter">


										<div class="tab_LL"></div>


										<div class="tab_LM"' . ($x_gb != false ? 'style="width:' . ($x_gb-28) . 'px"' : '') . '></div>


										<div class="tab_LR"></div>


									</div>


								</div>'; 
return '<div id="freeSpace"></div>


						<table id="contentTable">


							<tr><td align="center">' 
. $x_if 
. '	</td></tr>


						</table>'; 
} else { 
$x_if = '<table width="320">' . 
'<tr bgcolor="#304E70"><td>' . $this->kp_getImage($this->x_g3 . 'kerio_logo.gif', 300, 20) . '</td></tr>' . 
'<tr>' . 
'<td height="34" valign="middle">' . 
$this->kp_getImage($this->x_g3 . $x_ie, 24, 24, '', 'align="center"') . 
'<span class="documentTitle">' . $x_3d . '</span>' . 
'</td>' . 
'</tr>' . 
'<tr>' . 
'<td align="center">' . 
'<span class="heading">' . $x_ia . '</span>' . 
'</td>' . 
'</tr>' . 
'<tr>' . 
'<td align="center">' . 
$x_1w . 
'</td>' . 
'</tr>' . 
'<tr bgcolor="#304E70" height="10"><td> </td></tr>' . 
'</table>'; 
return $x_if; 
} 
} 
function kp_getOverviewTable($x_7d = Array()) { 
if (!empty($x_7d)) { 
$x_bk = Array(); 
$x_ig = count($x_7d); 
foreach ($x_7d as $x_1m => $x_1w) { 
$tr_classes = Array(); 
$td_classes = Array(); 
if (0 == $x_1m % 2) { 
$tr_classes[] = 'evenRow'; 
$td_classes[] = 'bold'; 
$x_ih = true; 
} else { 
$td_classes[] = 'valueCell'; 
$x_ih = false; 
} 
$x_bk[] = '<tr' . (!empty($tr_classes) ? ' class="' . implode(' ', $tr_classes) . '"': '') . '>


								<td' . (!empty($td_classes) ? ' class="' . implode(' ', $td_classes) . '"': '') . '>' 
. $x_1w . ($x_ih ? ':' : '') 
. '</td>


							</tr>'; 
if ($x_1m < ($x_ig-1)) { 
$tr_classes[] = 'divider'; 
$x_bk[] = '<tr><td' . (!empty($tr_classes) ? ' class="' . implode(' ', $tr_classes) . '"': '') . '></td></tr>'; 
} 
} 
return '<table cellpadding="0" cellspacing="0" border="0">' . implode('', $x_bk) . '</table>'; 
} else { 
return ''; 
} 
} 
function kp_getListTable( $x_7d = Array(), 
$x_2d = Array(), 
$x_ii = '', 
$x_h5 = Array()) { 
$x_ij = Array(); 
if (!empty($x_2d)) { 
$x_3u = Array(); 
foreach ($x_2d as $x_ik => $x_1w) { 
$td_classes = Array(); 
if (0 == $x_ik) { 
$td_classes[] ='captionCell'; 
} else { 
$td_classes[] ='valueCell'; 
} 
$x_3u[] = '<th' . (!empty($td_classes) ? ' class="' . implode(' ', $td_classes) . '"': '') . '>' 
. $x_1w . '</th>'; 
} 
$x_ij[] = '<tr>' . implode('', $x_3u) . '</tr>'; 
} 
$x_ig = count($x_7d); 
if (!empty($x_7d)) { 
foreach ($x_7d as $x_9p => $x_8l) { 
$x_il = count($x_8l); 
$x_3u = Array(); 
foreach ($x_8l as $x_ik => $x_8k) { 
$td_classes = Array(); 
if (0 == $x_ik) { 
$td_classes[] = 'captionCell'; 
} else { 
$td_classes[] = 'valueCell tdDivider'; 
} 
if ( ('x_im' != $x_ii && $x_ik != ($x_il - 1)) || 
('x_im' == $x_ii && $x_ik != ($x_il - 1) && $x_ik != ($x_il - 2)) 
) { 
$x_3u[] = '<td class="' . implode(' ', $td_classes) . '">' . $x_8k . '</td>'; 
} elseif ('x_im' == $x_ii && $x_ik == ($x_il - 2)) { 
$td_classes[] = 'progress'; 
$x_3u[] = '<td class="' . implode(' ', $td_classes) . '">' 
. '<div class="bar" style="width:' . $x_8k . '%" title="' . $x_8l[$x_il-1] . '% of total transferred data"></div>' 
. '</td>'; 
} elseif( ($x_ii != 'x_im') || 
($x_ii == 'x_im' && $x_ik != ($x_il-1) && $x_ik != ($x_il - 2)) 
) { 
$x_3u[] = '<td class="' . implode(' ', $td_classes) . '">' . $x_8k . '</td>'; 
} 
} 
$tr_classes = Array(); 
if (1 == $x_9p % 2) { 
$tr_classes[] = 'evenRow'; 
} 
if (!empty($x_h5[$x_9p])) { 
$x_in = ' tooltip="' . $x_h5[$x_9p]['label'] . '"'; 
$x_6h = ' onClick="' . $x_h5[$x_9p]['link'] . '"'; 
$tr_classes[] = 'activeArea'; 
} else { 
$x_in = ''; 
$x_6h = ''; 
} 
$x_ij[] = '<tr' . (!empty($tr_classes) ? ' class="' . implode(' ', $tr_classes) . '"': '') . $x_in . $x_6h . '>' 
. implode('', $x_3u) . '</tr>'; 
if ($x_9p < ($x_ig - 1)) { 
$tr_classes[] = 'divider'; 
$x_ij[] = '<tr' . (!empty($tr_classes) ? ' class="' . implode(' ', $tr_classes) . '"': '') . $x_in . '>' 
. '<td colspan="' . $x_il . '"></td>' 
. '</tr>'; 
} 
} 
} 
if (!empty($x_ij)) { 
return '<table cellpadding="0" cellspacing="0"' 
. ($x_in != '' ? ' onMouseOver="x_2z.x_ej(this, \'TR\')"' : '') 
. '>' 
. implode('', $x_ij) 
. '</table>'; 
} else { 
return ''; 
} 
} 
function kp_getSelect( $x_ec = '', 
$x_1m = '', 
$x_67 = Array(), 
$x_3k = '', 
$x_io = '') { 
$x_ip = Array(); 
if (is_array($x_67) && !empty($x_67)) { 
foreach ($x_67 as $x_69 => $x_3q) { 
$x_ip[] = '<option value="' . $x_3q[0] . '"' 
. ($x_3q[0] == $x_io ? ' selected' : '') 
. '>' . $x_3q[1] . '</option>'; 
} 
} 
if (is_array($x_3k)) { 
$x_gs = implode(' ', $x_3k); 
} else { 
$x_gs = $x_3k; 
} 
$x_5c = '<select name="' . $x_ec . '"' . ($x_1m != '' ? ' id="' . $x_1m . '" ' : '') . $x_gs . '>' 
. implode('', $x_ip) 
. '</select>'; 
if ($x_1m != '') { 
$x_5c .= '<div id="x_iq" class="comboValue" style="display: none;"></div>'; 
} 
return $x_5c; 
} 
function kp_getProgressBar($x_hp = '', $x_9w = '') { 
if ($x_9w > 100) { 
$x_ir = 100; 
$x_is = 'progress'; 
} else { 
$x_ir = $x_9w; 
$x_is = 'progress'; 
} 
$x_5c = '<div class="progressBar">


						<div class="percNum">' . $x_ir . '%</div>


						<div class="' . $x_is . '" style="width: ' . $x_ir . '%"></div>


					</div>'; 
return $x_5c; 
} 
function x_cj( $x_23 = Array(), 
$x_84 = '', 
$x_a9 = false, 
$x_32 = 'n/j/Y', 
$x_7h = '') { 
$x_5c = ''; 
$x_3u = Array(); 
if (!empty($x_23) && !empty($x_84)) { 
foreach ($x_23 as $x_cr) { 
$x_it = ' onClick="'; 
if (!$x_a9) { 
$x_a9 = '\'\''; 
} 
$x_it .= 'x_6r(\'' . $x_84 . '\', ' . $x_a9 . ', 0, ' 
. $x_cr['AP_BEGIN'] . ', ' . $x_cr['AP_END'] . ')'; 
$x_it .= '"'; 
$x_3u[] = '<div class="webAp ' . $x_cr['AP_TYPE'] . '"' . $x_it . '>' 
. kp_getDate($x_cr['AP_BEGIN'], $x_32) 
. ' - ' 
. kp_getDate($x_cr['AP_END'], $x_32) 
. '</div>'; 
} 
} 
if (!empty($x_3u)) { 
$x_5c = '<div class="webAp">' . $x_7h 
. implode('', $x_3u) 
. '</div>'; 
} else { 
$x_5c = ''; 
} 
return $x_5c; 
} 
function x_b9($x_iu = true) { 
$x_ga = 'dot_lightGray.gif'; 
if (!$x_iu) { 
$x_ga = 'dot_black.gif'; 
} 
return $this->kp_getImage('../nonauth/gfx/' . $x_ga, '100%', 1, '', 'style="height: 1pt;"'); 
} 
} 
?>
