<?php
include('inc/auth.inc'); 
include('inc/common.inc'); 
include('inc/errorMessages.inc'); 
include('inc/browserFunc.inc'); 
include('inc/bookmarkFunc.inc'); 
$x_2v = $_REQUEST['mode']; 
$x_3n = $_REQUEST['type']; 
if ($_REQUEST['path']) { 
$x_1r = urldecode($_REQUEST['path']); 
} elseif ($_REQUEST['goToPath']) { 
$x_1r = urldecode($_REQUEST['goToPath']); 
} elseif ($_REQUEST['BSbmkPath']) { 
$x_1r = urldecode($_REQUEST['BSbmkPath']); 
} 
switch ($x_2v) { 
case 'get': 
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php include ('inc/initAssist.inc'); ?>
<script src="/script/mainFunc.js" type="text/javascript"></script>
</head>
<body>
<form name="bsFrm" action="/browserSmall.php" target="<?php echo ('browserSmall' == $x_3n ? 'executeIt' : 'dataWindow')?>" method="POST">
<input id="bsPath" type="text" name="path" value="">
<input type="text" name="type" value="<?php echo $x_3n; ?>">
<input type="hidden" name="mode" value="data">
</form>
<script>
<?php
if ('browserSmall' == $x_3n) { 
?>
document.getElementById('bsPath').value = window.top.document.getElementById('textBox').value;
document.bsFrm.submit();
<?php
} else { 
?>
var x_3o = x_3p(window.top);
document.getElementById('bsPath').value = x_3o.document.getElementById('textBox').value;
document.bsFrm.submit();
<?php
} 
?>
</script>
</body>
<html>
<?php
break; 
case 'data': 
$x_d -> getUrlForPath($x_1r, &$x_f); 
$x_32 = x_3q(urldecode($x_f), $x_3n); 
$x_1r = str_replace('/cont%3a', '', $x_1r); 
$x_1r = urldecode(x_23($x_1r)); 
if ("\\\\" == $x_1r) 
$x_1r = ''; 
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/script/mainFunc.js" type="text/javascript"></script>
<?php include ('inc/initAssist.inc'); ?>
</head>
<body>
<div id="directoryList"><?php echo $x_32[0]; ?></div>
<input id="BStextBox" type="text" name="goToPath" value="<?php echo $x_1r; ?>">
<script>
<?php
if ('browserSmall' == $x_3n) { 
?>
window.top.document.getElementById('directoryList').innerHTML = document.getElementById('directoryList').innerHTML;
window.top.document.getElementById('BStextBox').value = document.getElementById('BStextBox').value;
window.top.document.getElementById('BSpleaseWait').style.display = 'none';
window.top.x_2u('bsWaitPhase', 'bsStartPhase');
window.top.document.getElementById('BStextBox').focus();
<?php
} else { 
?>
window.top.frames[0].document.getElementById('directoryList').innerHTML = document.getElementById('directoryList').innerHTML;
window.top.frames[0].document.getElementById('BStextBox').value = document.getElementById('BStextBox').value;
window.top.frames[0].document.getElementById('BSpleaseWait').style.display = 'none';
window.top.frames[0].x_2u('bsWaitPhase', 'bsStartPhase');
window.top.frames[0].document.getElementById('BStextBox').focus();
<?php
} 
?>
</script>
</body>
<html>
<?php
break; 
default: 
$x_3k = '<fieldset class="dialgBodyFieldset" style="height: 347px;">'; 
if ('browserSmall' == $x_3n) { 
$x_3k .= '<legend style="font-weight: bold;">


										<img src="/nonauth/gfx/directory.gif" width="20" height="20" align="absmiddle">&nbsp;<kerio:text id="select_target_location"/>


									</legend>'; 
} 
$x_3l = '</fieldset>'; 
if ($x_3n != 'browserSmall') { 
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Select target location - Kerio Clientless SSL-VPN</title>
<link href="/nonauth/main.css" rel="stylesheet" type="text/css">
<script src="/script/mainFunc.js" type="text/javascript"></script>
<script src="/script/actionsFunc.js" type="text/javascript"></script>
<?php include ('inc/initAssist.inc'); ?>
</head>
<body class="dialogBody">					
<?php
} else { 
?>
<div id="x_3h" class="dialogHeader">
<img src="/nonauth/gfx/directory.gif" width="20" height="20" align="absmiddle">&nbsp;<kerio:text id="select_target_location"/>
</div>
<?php
} 
?>
<div class="dialogBodyMain">
<div id="bsStartPhase" style="display: none;">
<?php
echo $x_3k; 
?>
<table style="width:330px; _width: 350px;">
<tr>
<table cellpadding="0" celspacing="0" width="width:310px; _width: 330px;">
<tr>
<td><kerio:text id="head_current_path"/>:</td>
</tr>					
<tr>
<td>
<form name="<?php echo ('browserSmall' == $x_3n ? 'BSfrm' : 'frm')?>" action="/browserSmall.php" method="POST" target="<?php echo ('browserSmall' == $x_3n ? 'executeIt' : 'dataWindow')?>" onSubmit="document.getElementById('BSpleaseWait').style.display = 'block';">
<input id="BStextBox" type="text" name="goToPath" style="width:325px;" value="<?php echo urldecode(x_23($x_1r)); ?>">
<input name="type" type="hidden" value="<?php echo $x_3n ?>">
<input name="mode" type="hidden" value="data">
</form>
</td>
<td width="25">
&nbsp;<img src="/nonauth/gfx/go.gif" width="20" height="20" align="absmiddle" 
title="<kerio:text id="go_to_typed"/>"
onClick="document.getElementById('BSpleaseWait').style.display = 'block'; 


															<?php

 if ('browserSmall' == $x_3n) { 
 echo "document.BSfrm.submit()"; 
 } else { 
 echo "document.frm.submit()"; 
 } 
 ?>


															" 
style="cursor: pointer;">
</td>
</tr>
</table>
</tr>
<tr>
<td><hr style="width: 350px;"></td>
</tr>
<?php
x_2g($x_2h[0]); 
$x_3r = x_3s($x_3n); 
if (strlen($x_3r)!=0) { 
?>
<tr>
<td><kerio:text id="choose_from_bookmarks"/>:</td>
</tr>					
<tr>
<td>
<br><?php echo $x_3r; ?>
</td>
</tr>
<tr>
<td><hr style="width: 350px;"></td>
</tr>
<?php	 
} 
?>
<tr>
<td><kerio:text id="select_from_list"/>:</td>
</tr>					
<tr>
<td>
<form name="goTo" action="/browserSmall.php" method="POST">
<div id="directoryList" class="directoryList" style="width: 345px;"></div>
<input id="path" type="hidden" name="path" value="">
<input name="type" type="hidden" value="<?php echo $x_3n ?>">
</form>
</td>
</tr>
</table>
<div style="height: 13px; margin-top: 3px;"><span id="BSpleaseWait" style="display: none;"><kerio:text id="please_wait"/></span></div>
<?php echo $x_3l; ?>
<table style="position: absolute; <?php echo $x_3m; ?> right: 12px; _right: 8px;">
<tr>
<td>
<input id="okButton" type="submit" value="<kerio:text id="ok"/>" onClick="


										<?php echo ('browserSmall' == $x_3n ? 'x_3t(1)' : 'x_3u(\'BStextBox\', \'textBox\');') ?>


										">
</td>
<td width="8">
&nbsp;
</td>
<td>
<input id="cancelButton" type="button" value="<kerio:text id="cancel"/>" onClick="


									<?php echo ('browserSmall' == $x_3n ? 'x_3t()' : 'window.top.close();') ?>


									">
</td>
</tr>
</table>
</div>
<div id="bsWaitPhase" style="display: block;">
<?php
echo $x_3k; 
?>
<table style="width:330px; _width: 350px;">
<tr>
<td>
<kerio:text id="please_wait"/>
</td>
</tr>
</table>
<?php echo $x_3l; ?>
</div>
</div>
<?php
if ($x_3n != 'browserSmall') { 
?>
</body>
</html>				
<?php
} 
break; 
} 
?>
