<?php
include ('auth.inc'); 
include ('common.inc'); 
$x_d -> getSessionVariable('currentDir', &$x_e); 
$x_3k = '<fieldset class="dialgBodyFieldset" style="height: 175px;">'; 
$x_3l = '</fieldset>'; 
?>
<div id="x_3f" class="dialogHeader">
<img src="/nonauth/gfx/tb_new.gif" width="16" height="16" align="absmiddle">&nbsp;<kerio:text id="title_create"/>
</div>
<div class="dialogBodyMain">
<?php  
?>
<div id="startPhase" style="display: block;">
<?php
echo $x_3k; 
?>
<form id="createForm" action="actions.php" method="POST" target="executeIt" onSubmit="x_2u('startPhase', 'waitPhase')">
<table style="width:330px; _width: 350px;">
<tr>
<td colspan="2"><kerio:text id="dialog_create_newDir"/>:</td>
</tr>
<tr>
<td colspan="2">
<input id="newDirectory" type="text" name="x_h" value="<kerio:text id="browse_newdir"/>" style="width:350px;">
</td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td colspan="2"><kerio:text id="dialog_create_inDir"/>:</td>
</tr>
<tr>
<td><input id="textBox" type="text" name="x_j" style="width:264px; _width:256px" 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', 'div');" class="dialogButton"></td>
</tr>
</table>
<input type="hidden" name="x_c" value="<?php echo $x_c; ?>">
<input type="hidden" name="x_a" value="mkDir">
<input type="submit" style="display: none;">
</form>
<?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='create_simple'/>" onClick="x_2u('startPhase', 'waitPhase'); document.getElementById('createForm').submit();">
</td>
<td width="8">
&nbsp;
</td>
<td>
<input id="cancelButton" type="button" value="<kerio:text id="cancel"/>" onClick="x_43();">
</td>
</tr>
</table>
</div>
<?php ?>
<div id="waitPhase" style="display: none;">
<?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>
<?php ?>	
<div id="errorPhase" style="display: none;">
<?php
echo $x_3k; 
?>				
<table style="width:330px; _width: 350px;">
<tr>
<td width="35px;">
<img src="/nonauth/gfx/tb_error.gif" width="32" height="32" alt="!">
</td>
<td>
<strong><kerio:text id="dialog_create_error"/></strong>
</td>
</tr>
</table>
<br>
<kerio:text id="actions_details"/>:
<div id="errorMessage" class="errorMessage" style="width:345px; height: 77px;"></div>
<?php echo $x_3l; ?>
<table style="position: absolute; <?php echo $x_3m; ?> right: 12px; _right: 8px;">
<tr>
<td>
<input id="okButton_error" type="button" value="<kerio:text id="back"/>" onClick="x_2u('errorPhase', 'startPhase');" style="display: block;">
</td>
<td width="7">
&nbsp;
</td>
<td>
<input id="cancelButton" type="button" value="<kerio:text id="cancel"/>" onClick="x_43();">
</td>
</tr>
</table>
</div>
<?php ?>	
<div id="endPhase" 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_create_success"/></strong>
</td>
</tr>
</table>
<br>
<kerio:text id="actions_details"/>:	
<div id="errorMessage" class="errorMessage" style="width:345px; height: 35px;">
"<span id="errorMessageFolder" style="font-weight: bold;"></span>" <kerio:text id="create_report"/> "<span id="errorMessageServer" style="font-weight: bold;"></span>"
</div>
<table style="width:330px; _width: 350px;">
<tr>
<td width="15"><input id="pathCurrent" type="radio" name="redirectTo" checked value="<?php echo $x_e; ?>" onClick="document.getElementById('goToPath').value=this.value;"></td>
<td><label for="pathCurrent"><kerio:text id="dialog_create_stay"/></label></td>
<tr>
<tr>
<td><input id="pathNew" name="redirectTo" type="radio" onClick="document.getElementById('goToPath').value=this.value"></td>
<td><label for="pathNew"><kerio:text id="dialog_create_goto"/></label></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="ok"/>" onClick="x_1e('/browse' + document.getElementById('goToPath').value, true); x_43();">
</td>
</tr>
</table>
<input id="goToPath" type="hidden" value="">
</div>
</div>