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

include("ftp_config.php");
include("ftp_class.php");
include("ftp_functions.php");

$ftp = new ftp();
$ftp->debug = FALSE;
if (!$ftp->ftp_connect($ftp_host)) {
	die("Cannot connect\n");
}
if (!$ftp->ftp_login($ftp_user, $ftp_pass)) {
	$ftp->ftp_quit();
	echo "User: ".$ftp_user."<br>";	
	die("Login failed\n");
}

if(array_key_exists('path', $_REQUEST))
{
	$path = $_REQUEST['path'];
	setPath($path);	
}
else
{
	$path = getPath();
}
if(!$path)
{
	$path = '/';	
}
//print_r($_REQUEST);
?>
<HTML>
<HEAD>
<META content="text/html; charset=<? echo $lang_html_charset; ?>" http-equiv=Content-Type>
<LINK href="<?=$strSkinName?>/style.css" rel=stylesheet type=text/css>
</HEAD>

<BODY bgColor=#ffffff bottomMargin=0 leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
<script language="JavaScript" src="ftp_webftp.js" type="text/javascript"></script>
<script><!--
function filesSelected(){
    var i;
    if ( ! document.del_form.del_name )
			return false;
    if ( document.del_form.del_name.length ){
			for ( i=0; i<document.del_form.del_name.length; i++ ){
				if ( document.del_form.del_name[i].checked ){
					return true;
				}
			}
    }
    else
			return document.del_form.del_name.checked;
}

function hasFtpUser(){
	var i;

	if ( ! document.del_form.ftp_user ) {
		return false;
	}

	if ( document.del_form.ftp_user.length ){

		for ( i = 0; i < document.del_form.ftp_user.length; i++ ) {
			if ( document.del_form.ftp_user[i].value == 1) {
				if ( document.del_form.del_name[i].checked ) {
					return true;
				}
			}
		}

	}	else {
		if ( document.del_form.ftp_user.value == 1 ) {
			return document.del_form.del_name.checked; 
		}
	}
	return false;
}



function performDelete(){
    if ( !filesSelected() ){
	<?= js_alert(ltext("wftp_select_files")); ?>;
	return;
    }
    if ( <?= js_confirm(ltext("wftp_confirm_delete")) ?>)
	document.del_form.submit();
}

function performDeleteWithUsers(){
    if ( !filesSelected() ){
			<?= js_alert(ltext("wftp_select_files")); ?>;
			return;
    }
		if ( hasFtpUser() ) {
			if ( <?= js_confirm(ltext("wftp_confirm_deletewithusers")) ?>)
				document.del_form.submit();
		}else{
			if ( <?= js_confirm(ltext("wftp_confirm_delete")) ?>)
				document.del_form.submit();
		}
}
// -->
</script>
<br>
<table class="tblbgcolor" width="400" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr><td>
