<?
########## 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");

if ($neupw1 != $neupw2)
	{
	 $fehlertext = ltext("toftpw2_error2");
	 include("tools_ftp_pwaendern.php");
	 exit();
	}

if (!valid_pw($neupw1))
	{
	 $fehlertext = ltext("toftpw2_error3");
	 include("tools_ftp_pwaendern.php");
	 exit();
	}

db_connect($db_host, $db_user, $db_pass);
$neupw = crypt_pw($neupw1);
safe_query( "update ftp set longpw = ?  where kunde = ?  and account = ? ", TRUE, new SQLString( $neupw ), new SQLString( $PHP_AUTH_USER ), new SQLString( $account ) );
safe_query( "update allgemein set newpwd='1'", TRUE );
$fehlertitel = ltext("toftpw2_error4");
$fehlertext = ltext("toftpw2_error5");
db_close();
include("tools_ftp.php");
exit();
?>
