<?php
function x_6s($x_6t = Array(), $x_9 = '', $x_6u = '', $x_6v = 'href', $x_6w = 'POST') { 
if (is_array($x_6t) && count($x_6t)!=0) { 
$x_6x = ''; 
while (list($x_1w, $x_58) = each ($x_6t)) { 
$x_6x .= '<input name="'.$x_1w.'" type="hidden" value="'.$x_58.'">'; 
} 
} 
$x_6y = 'form'.rand(); 
$x_6z = "\n\n".'<form'.($x_6v=='href' ? ' name="'.$x_6y.'" ' : ' ').'action="'.$x_9.'" method="'.$x_6w.'" style="margin:0px; padding:0px;">'."\n" 
.$x_6x."\n" 
.($x_6v=='href' ? '<a href="javascript: document.'.$x_6y.'.submit();">'.$x_6u.'</a>' : '<input type="submit" id="cancelButton" value="'.$x_6u.'">')."\n" 
.'</form>'."\n\n"; 
return $x_6z; 
} 
function x_2w($x_f = '', $x_70 = 0, $x_71 = "") 
{ 
echo '


		<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">		


		<html>


			<head>


				<META HTTP-EQUIV="Refresh" CONTENT="'.$x_70.'; URL='.$x_f.'">


				 <title>Kerio Clientless SSL-VPN</title>


 				 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


			</head>


		<body>


			'.$x_71.'


		</body>


		</html>'; 
} 
function x_v($x_o) { 
global $x_d, $x_72; 
if (is_array($x_72) && array_key_exists($x_o, $x_72)) { 
return $x_72[$x_o]; 
} elseif (-1 == $x_o) { 
return 'Operation failed!<br>Please try again.'; 
} elseif ($x_o != 0) { 
$x_d -> getSystemErrorMessage($x_o, &$x_u); 
if (!$x_u) 
$x_u= ''; 
return $x_u.'(<kerio:text id="error_number"/> '.$x_o.')'; 
} else { 
return '<kerio:text id="progress_failed"/>'; 
} 
} 
function x_6h($x_30, $x_3n) { 
$x_4n = ''; 
if ($x_3n == $x_30['type']) 
switch ($x_30['descending']) { 
case 0: 
$x_4n = '&nbsp;&nbsp;<img src="/nonauth/gfx/tb_asc.gif" width="8" height="8" alt="" border="0">'; 
break; 
case 1: 
$x_4n = '&nbsp;&nbsp;<img src="/nonauth/gfx/tb_desc.gif" width="8" height="8" alt="" border="0">'; 
break; 
default: 
$x_4n = ''; 
break; 
} 
return $x_4n; 
} 
function x_3s($x_3n = '') { 
global $x_d; 
$x_n = $x_d->getUserBookmarks(&$x_27); 
if ($x_n==0 && count($x_27)!=0) { 
$x_4n = '<form name="BSbmk" action="/browserSmall.php" target="' . ('browserSmall' == $x_3n ? 'executeIt' : 'dataWindow') . '" method="POST">


				<select name="BSbmkPath" title="'.'<kerio:text id="select_bookmark"/>'.'" style="width:150px" onChange="document.getElementById(\'BSpleaseWait\').style.display = \'block\'; document.BSbmk.submit();">


					<option value="">-- '.'<kerio:text id="bookmarks_goto_bookmark"/>'.' --</option>'; 
$x_6c = Array(); 
foreach ($x_27 as $x_21) 
$x_6c[$x_21['path']] = (strlen($x_21['description'])!=0 ? str_replace('&amp;', '&', $x_21['description']) : $x_21['path']); 
foreach ($x_6c as $x_1r => $x_5k) { 
$x_d -> getUrlForPath($x_1r, &$x_f); 
$x_4n .= '<option value="'.$x_f.'">'.$x_5k.'</option>'; 
} 
$x_4n .= '</select>


				<input name="mode" type="hidden" value="data">


				<input name="type" type="hidden" value="' . $x_3n . '">


				</form>'; 
} 
return $x_4n; 
} 
function x_73() { 
$x_3y = kerio("sslvpn::PhpConfig"); 
$x_n = $x_3y -> getAntivirusInfo(&$x_40); 
$x_4n = ''; 
$x_74 = ''; 
if ($x_n==0) 
if ($x_40['mcafee']==1) { 
$x_74 = '<img src="/nonauth/gfx/th_mcafee_logo.gif" width="111" height="37" alt="McAfee antivirus" border="0">'; 
$x_44 = "<kerio:text id='antivirus_mcafee'/>"; 
$x_75 = 1; 
} elseif ($x_40['mcafee']==0 && strlen($x_40['name'])!=0) { 
$x_44 = $x_40['name']; 
$x_75 = 0; 
} 
return Array('name' => $x_44, 'mcAfee' => $x_75, 'img' => $x_74); 
} 
function x_76($x_2e='') 
{ 
$x_4n = '


		<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">		


		<html>


			<head>


				 <title>Kerio Clientless SSL-VPN</title>


 				 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


 				 <script src="/script/mainFunc.js" type="text/javascript"></script>


			</head>


		<body>


			<script>


				x_1e (\''.addslashes($x_2e).'\');


			</script>


		</body>


		</html>'; 
echo $x_4n; 
echo '<pre>'.htmlspecialchars($x_4n).'</pre>'; 
} 
function x_10 ($x_f) { 
$x_1u = explode('/',$x_f); 
$x_77 = count($x_1u); 
$x_1q = $x_1u[($x_77-1)]; 
return $x_1q; 
} 
function x_78 ($x_12) { 
if (is_array($x_12) && count($x_12)!=0) { 
$x_4n = '<table border="0" cellpadding="0" cellspacing="0">'; 
foreach (array_reverse($x_12['dirs']) as $x_1f) 
$x_4n .= '<tr><td width="16"><img src="/nonauth/gfx/directory.gif" width="16" height="16" border="0" align="absmiddle"></td>


						<td>&nbsp;'.x_10(urldecode(urldecode($x_1f))).'</td></tr>'; 
foreach (array_reverse($x_12['files']) as $x_w) 
$x_4n .= '<tr><td width="16"><img src="/nonauth/gfx/file.gif" width="16" height="16" border="0" align="absmiddle"></td>


						<td>&nbsp;'.x_10(urldecode(urldecode($x_w))).'</td></tr>'; 
$x_4n .= '</table>'; 
} else 
$x_4n = ''; 
return $x_4n; 
} 
function x_79 ($x_27) { 
global $x_d; 
$x_n = $x_d->getUserBookmarks(&$x_2i); 
if (count($x_2i)!=0) 
foreach ($x_2i as $x_6l) 
if (in_array($x_6l['path'], $x_27)) 
$x_1u[] = $x_6l; 
if (count($x_1u)!=0) { 
$x_4n = '<table border="0" cellpadding="0" cellspacing="0">'; 
foreach ($x_1u as $x_6l) 
$x_4n .= '<tr title="'.$x_6l['path'].'"><td width="20"><img src="/nonauth/gfx/tb_bookmark.gif" width="16" height="16" border="0" align="absmiddle"></td>


						<td>&nbsp;'.(strlen($x_6l['description'])!=0 ? str_replace('&amp;', '&', $x_6l['description']) : $x_6l['path']).'</td></tr>'; 
$x_4n .= '</table>'; 
} 
return Array($x_4n, $x_1u); 
} 
function x_3q($x_f, $x_3n = '') { 
global $x_d, $x_2h; 
$x_f = urldecode($x_f); 
$x_30 = Array('type' => sslvpn_ST_Name, 'language' => $x_2h, 'descending' => 0); 
$x_n = $x_d -> getDirList($x_f, $x_30, 1, &$x_32); 
if ($x_32['entriesSystemErrorCode'] == 0) { 
if (count($x_32['entries'] != 0)) { 
$x_4n = ''; 
$x_1u = explode ('/', $x_f); 
foreach ($x_1u as $x_1w => $x_7a) 
if (strlen(trim($x_7a))!=0) 
$x_1x[] = $x_7a; 
$x_1v = count($x_1x); 
$x_5f=0; $x_7b = ''; 
foreach ($x_1x as $x_1w => $x_7a) { 
if (strlen(trim($x_7a))!=0) { 
$x_7b .= '/'.$x_7a; 
$x_4n.= '<div style="padding-left:'.(10*$x_5f).'px">' 
. '<span onClick="x_7c(\''.urlencode($x_7b).'\'' 
. ('browserSmall' == $x_3n ? ', \'browserSmall\'' : '') 
. ');" style="cursor: pointer;">


							<img src="/nonauth/gfx/'.($x_1w == ($x_1v-1) ? 'directory_open.gif' : 'directory.gif').'" width="20" height="20" border="0" align="absmiddle">'.'&nbsp;' 
. str_replace('cont:', '', urldecode($x_7a)) 
. '</span></div>'; 
$x_5f++; 
} 
} 
foreach ($x_32['entries'] as $x_6l) 
if ($x_6l['type'] != sslvpn_DET_File) { 
$x_4n.= '<div style="padding-left:'.(10*$x_5f).'px">' 
.'<span onClick="x_7c(\''.urlencode($x_6l['urlPath']).'\'' 
. ('browserSmall' == $x_3n ? ', \'browserSmall\'' : '') 
. ');" style="cursor: pointer;">' 
.x_5v($x_6l['type'], 20).'&nbsp;'.urldecode($x_6l['name']).'</span></div>'; 
} 
} 
return Array($x_4n, 'block'); 
} else 
return Array(x_v($x_32['entriesSystemErrorCode'])); 
} 
function x_23 ($x_f) { 
if ($x_f != '') { 
if (eregi('/', $x_f)) { 
$x_1r = str_replace ('/', '\\', $x_f); 
if ($x_1r[0] != '\\' || $x_1r[1] != '\\') 
$x_1r = '\\'.$x_1r; 
} else $x_1r = $x_f; 
return $x_1r; 
} else 
return $x_f; 
} 
$x_3m = 'bottom: 10px;'; 
function x_7d($x_7e = '') { 
$x_2y = kerio("sslvpn::PhpConfig"); 
if (!is_object($x_2y)) 
exit(); 
$x_n = $x_2y -> getProductInfo(&$x_3z); 
$x_7f = $x_3z['versionString']; 
$x_7g = $x_3z['osDescription']; 
$x_7h = $x_3z['osVersion']; 
$x_7i = 1; 
$x_7j = 3; 
if ($x_7i == $x_7j) { 
$x_7k = 'x_7l'; 
} 
else { 
$x_7k = 'x_7m'; 
} 
$x_7n = $_SERVER['HTTP_USER_AGENT']; 
$x_7o = $x_7e . '/weblibs'; 
printf(" <script type=\"text/javascript\" src=\"%s/waclient.js?v=%d\"></script>\n", $x_7o, $x_7p); 
$x_7q = 'var wac = x_7r(' . $x_7k . ');' . "\n"; 
$x_7q .= 'wac.x_7s("KWF ' . $x_7f . ' build ' . $x_7p . '", "' . $x_7g . ' ' . $x_7h . '", "' . $x_7n . '");' . "\n"; 
$x_7q .= 'wac.x_7t("../weblibs/AssistForm.php");' . "\n"; 
$x_7q .= 'wac.x_7u("' . $x_7o . '/");' . "\n"; 
$x_7q .= 'var texts = {' . "\n" . 
'		x_7v: "Kerio Exception Report Wizard for Web Based Administration",' . "\n" . 
'		x_7w: "Please replace this text with a brief description what you were doing when this exception occurred",' . "\n" . 
'		x_7x:     "Kerio Clientless SSL-VPN",' . "\n" . 
'		x_7y:      "",' . "\n" . 
'		x_7z:     {


  	  							x_80: 0,


  	  								0: ""}' . 
'};' . "\n"; 
$x_7q .= 'wac.x_81(texts);' . "\n"; 
$x_7q .= 'wac.x_82();' . "\n"; 
printf("<script type=\"text/javascript\">\n%s\n</script>\n", $x_7q); 
} 
function x_83($x_84 = '') { 
global $x_2h; 
if ($x_84 != '') { 
$x_85 = kerio("kwfweb::Utils"); 
$x_86 = $x_85->translate($x_2h[0],'translate-sslvpn', $x_84); 
return $x_86; 
} 
} 
function x_6d( $x_4n, 
$x_87 = 0, 
$x_88 = true, 
$x_4d = true) { 
$x_86 = ($x_88 ? x_89($x_4n) : $x_4n); 
if ($x_87 != 0) { 
if ($x_4d) { 
$x_4d = ($x_88 ? x_89($x_4n) : $x_4n); 
} else { 
$x_4d = ''; 
} 
$x_86 = '<span style="width: ' . $x_87 . 'px !important" class="ellipsis" title="' . $x_4d . '">' 
. ($x_88 ? x_89($x_4n) : $x_4n) 
. '</span>'; 
} 
return $x_86; 
} 
?>
