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

include_once( "../include/class.SQLString.php" );
include_once("auth.php");

db_connect($db_host, $db_user, $db_pass);

$id = safe_query( "select kunde from ftp where account = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
if (db_num_rows($id) > 0 ) {
    $werte = db_fetch_array($id);
    $kunde = $werte["kunde"];
} else {
    $id = safe_query( "SELECT kunde FROM kunden WHERE kunde = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
    $werte = db_fetch_array($id);
    $kunde = $werte["kunde"];
}
$id = safe_query( "select webftp from kunden where kunde = ? ", TRUE, new SQLString( $kunde ) );
$werte = db_fetch_array($id);
$webftp = $werte["webftp"];
if ($webftp == 0) {
	db_close();
	header("Location: ./allgemein_pwaendern.php");
	exit();
}

if ($webftp_user == "") {
	$id = safe_query( "select stddomain from admin", TRUE );
	$werte = db_fetch_array($id);
	$stddomain = $werte["stddomain"];
	$id = safe_query( "select kunde, pfad from ftp where account = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
	$werte = db_fetch_array($id);
	$kunde = $werte["kunde"];
	$pfad = $werte["pfad"];
	$Bef  = "SELECT domain FROM domains ";
	$Bef .= "  WHERE pfad = '/' AND kunde = ?";
	if (!$standard_dom) $Bef .= " AND richtigedomain != 3";
	$id = safe_query2( $Bef, new SQlString( $kunde ) );
	while($werte = db_fetch_array($id)) {
		$realDomain = $werte["domain"];
		if (substr($realDomain, 0, 1) != "*") break;
	}
}
?>
<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">
<br><? include("../fehler.inc.php"); ?>
<script>
function doChange()
{
document.forms[0].submit();
}
</script>
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr>

    <TD><b><? echo ltext("ftp_alst_title", array($PHP_AUTH_USER)); ?></b><br><br>
    </TD>
  </TR>
  </TBODY> 
</TABLE>
</form>
</BODY>
</HTML>
<?
db_close();
?>
