<?php
require_once('auth.inc'); 
require_once('common.inc'); 
require_once('errorMessages.inc'); 
$x_d -> getSessionVariable('currentDir', &$x_e); 
$x_3k = '<fieldset class="dialgBodyFieldset" style="height: 170px;">


						<legend class="dialgBodyLegend">


							<img src="/nonauth/gfx/tb_upload.gif" width="16" height="16" align="absmiddle">&nbsp;<kerio:text id="title_upload_dialog"/>


						</legend>'; 
$x_3l = '</fieldset>'; 
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari')) 
$x_8k = ''; 
elseif (!strpos($_SERVER['HTTP_USER_AGENT'], 'Windows')) 
$x_8k = 'size="38"'; 
elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Windows')) 
$x_8k = 'size="49"'; 
$x_8l = x_73(); 
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Upload - Kerio Clientless SSL-VPN</title>
<link href="/nonauth/main.css" rel="stylesheet" type="text/css">
<?php include ('initAssist.inc'); ?>
<script src="/script/mainFunc.js" type="text/javascript"></script>
<script src="/script/actionsFunc.js" type="text/javascript"></script>
<script src="/script/prototype.js" type="text/javascript"></script>
<script src="/script/upload.js" type="text/javascript"></script>
<script src="/script/uploadTr.js.php" type="text/javascript"></script>
</head>
<body class="dialogBody" onLoad="window.focus();" >
<div class="dialogBodyMain">
<div id="startPhase" style="display: block;">
<?php
echo $x_3k; 
?>
<form id="frm" method="POST" action="" enctype="multipart/form-data" target="uploadIt" onSubmit="x_8m();">
<table style="width:330px; _width: 350px;">
<tr>
<td colspan="2">
<kerio:text id="dialog_upload_to"/>:
</td>
</tr>
<tr>
<td>
<input id="textBox" type="text" name="currentPath" style="width:264px" value="<?php echo x_23($x_e); ?>">
</td>
<td width="100">
<input id="browseButton" type="button" value="<kerio:text id="change"/>..." title="<kerio:text id="change_title"/>" onClick="x_8b('textBox');" class="dialogButton">
</td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td colspan="2"><kerio:text id="dialog_upload_file"/>:</td>
</tr>
<tr>
<td colspan="2">	
<input id="uniqueId" type="hidden" name="UploadId" value="">
<input id="uploadForm" type="file" name="UploadFile" <?php echo $x_8k; ?>>
<input type="hidden" name="RedirectTo" value="/session_refresh.html"/>
</td>
</tr>
</table>
<table style="position: absolute; <?php echo $x_3m; ?> right: 12px; _right: 8px;">
<tr>
<td>
<input id="okButton" type="button" value="<kerio:text id='upload_simple'/>" onClick="x_8m();">
</td>
<td width="8">
&nbsp;
</td>
<td>
<input id="cancelButton" type="button" value="<kerio:text id="cancel"/>" onClick="window.top.close();">
</td>
</tr>
</table>
</form>
<form id="fileTest" action="uploadFileExists.php" target="executeIt" method="POST">
<input id="filePath" name="filePath" type="hidden" value="">
<input id="targetPath" name="targetPath" type="hidden" value="">
<form>
<?php echo $x_3l; ?>
</div>
<div id="uploadPhase" style="display: none;">
<?php
echo $x_3k; 
?>
<table style="width:330px; _width: 350px;">
<tr>
<td colspan="2"><kerio:text id="dialog_upload_to"/>:</td>
</tr>
<tr>
<td>
<input id="uploadTo" style="width:350px" value="" disabled>
</td>
</tr>
<tr>
<td><hr style="width: 350px;"></td>
</tr>					
<tr>
<td colspan="2"><kerio:text id="dialog_upload_file"/>:</td>
</tr>
<tr>
<td>
<input id="uploadedFileName" value="" style="width:350px" disabled>
</td>
</tr>
<tr>
<td>
<span id="uploadStatus"><kerio:text id='progress_unknown'/></span>
</td>
</tr>
<tr>				
<td colspan="2">
<div id="progressBar">
<div id="progress"></div>
</div>
</td>
</tr>
</table>
<?php echo $x_3l; ?>
</div>
<div id="finishPhase" style="display: none;">
<?php
echo $x_3k; 
?>
<table style="width:330px; _width: 350px;">
<tr>
<td width="35px;">
<img src="/nonauth/gfx/tb_ok.gif" width="32" height="32" alt="OK">
</td>
<td>
<strong><kerio:text id="dialog_upload_success"/></strong>
</td>
</tr>
</table>
<br>
<kerio:text id="actions_details"/>:	
<div id="errorMessage" class="errorMessage" style="width:345px; height: 72px;">
<kerio:text id="dialog_upload_file"/> "<span id="uploadedFileNameF" style="font-weight: bold;"></span>"<br>
<kerio:text id="dialog_upload_wasUploadedInto"/> "<span id="uploadedTo" style="font-weight: bold;"></span>"
</div>
<?php echo $x_3l; ?>
<table style="position: absolute; <?php echo $x_3m; ?> right: 12px; _right: 8px;">
<td>
<input id="cancelButton" type="button" value="<kerio:text id="close_window"/>" onClick="window.top.close();">
</td>
</tr>
</table>
<input type="hidden" id="uploadPath" value="<?php echo x_23($x_e); ?>">
</div>
<div id="errorPhase" style="display: none;">
<?php
echo $x_3k; 
?>
<table style="width:330px; _width: 350px;">
<tr>
<td width="35">
<img src="/nonauth/gfx/tb_error.gif" width="32" height="32" alt="!">
</td>
<td>
<strong><kerio:text id="dialog_upload_error"/></strong>
</td>
</tr>
</table>
<br>
<kerio:text id="actions_details"/>:
<div id="errorMessageFail" class="errorMessage" style="width:345px; height: 72px; display: block;"></div>
<div id="avMessageFail" class="errorMessage" style="width:345px; height: 72px; display: none;">
<table cellspacing="0" cellpadding="2" width="340">
<tr>
<td style="font-weight: bold"><kerio:text id="progress_virus_found"/></td>
<?php echo ($x_8l['mcAfee'] == 1 ? '<td rowspan="3" valign="top">'.$x_8l['img'].'</td>':'') ?>
</tr>
<tr>
<td width="229"><?php echo $x_8l['name']; ?></td>
</tr>
<tr>
<td id="avMessage"></td>
</tr>
</table>
</div>
<div id="avScanFail" class="errorMessage" style="width:345px; height: 72px; display: none;">
<table cellspacing="0" cellpadding="2" width="340">
<tr>
<td style="font-weight: bold"><kerio:text id="progress_scan_failed"/></td>
<?php echo ($x_8l['mcAfee'] == 1 ? '<td rowspan="3" valign="top">'.$x_8l['img'].'</td>':'') ?>
</tr>
<tr>
<td width="229"><?php echo $x_8l['name']; ?></td>
</tr>
<tr>
<td id="avMessage2"></td>
</tr>
</table>
</div>
<?php echo $x_3l; ?>
<table style="position: absolute; <?php echo $x_3m; ?> right: 12px; _right: 8px;">
<tr>
<td>
<input id="okButton" type="button" value="<kerio:text id="back"/>" onClick="x_2u('errorPhase', 'startPhase');">
</td>
<td width="7">
&nbsp;
</td>
<td>
<input id="cancelButton" type="button" value="<kerio:text id="cancel"/>" onClick="window.top.close();">
</td>
</tr>
</table>
</div>			
</div>
</body>
</html>
