<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####

include_once("auth.php");
include("ftp_header.php");

if($ftp->ftp_chdir($path)) {
	if (isset($HTTP_USER_AGENT) && strpos($HTTP_USER_AGENT,"IE") > 0){
?>
<script language="JavaScript" for=document event=onkeyup><!---
  if(window.event.keyCode == 13){
		document.forms[0].submit();
	}
//-->
</script>		
<?
	}else{
?>
<script><!---
	var was=0;	// counter to skip the second event
	function keyup(e){
		if((was==0) && (e.which==13)){ // <ENTER> is pressed at first time
			was=1;
			document.releaseEvents(Event.KEYUP);
			document.forms[0].submit();
		}
	}
	document.onkeyup = keyup;
	document.captureEvents(Event.KEYUP);
//-->
</script>
<?
	}
?>
<FORM METHOD="POST" ACTION="ftp_index.php?path=<?= urlencode($path) ?>">
<input type="hidden" name="path" value="<?= htmlspecialchars($path) ?>">
<table class="tblbgcolor" width="100%" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr><td align=right><? echo $lang_text['wftp_mkdir_newdir'] ?></td>
<td colspan="2"><input size=30 name="mkdir"></td></tr>
<tr><td align=right><? echo $lang_text['wftp_intopath'] ?>&nbsp;</td>
<td colspan="2"><input size=30 name="in_dir" value="<?= htmlspecialchars($path) ?>"></td>
</tr>
<tr>
<td align="center"><? echo std_button(ltext("wftp_back"), 'javascript:history.back()'); ?></td>
<td align="center"><? echo std_button(ltext("wftp_reset"), 'javascript:document.forms[0].reset()'); ?></td>
<td align="center"><? echo std_button(ltext("wftp_mkdir"), 'javascript:document.forms[0].submit()'); ?></td>
</tr></table>
</form>
<?
} else {
  addInfoBoxMsg($lang_text["wftp_chdir_failed"],"|%fullpath%","|$path");
}
showInfoBox();

include("ftp_footer.php");
?>

