<?
########## 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");
include_once ("../include/module.Database.php");

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

if ((!istleer($neupw1)) || (!istleer($neupw2)))
	{
	 if ($neupw1 != $neupw2) 
		{
		 $fehlertext = ltext("empopw2_error2");
		 include("email_pop3_pwaendern.php"); 
		 exit();
		}

	 if (!valid_pw($neupw1))
		{
		 $fehlertext = ltext("empopw2_error3");
		 include("email_pop3_pwaendern.php"); 
		 exit();
		}
	 $neupw = crypt_pw($neupw1);
	 safe_query( "update pop3 set longpw = ? , kommentar = ?  where kunde = ?  and account = ? ", TRUE, new SQLString( $neupw ), new SQLString( $comment ), new SQLString( $PHP_AUTH_USER ), new SQLString( $pop3 ) );
	 safe_query( "update allgemein set newpwd='2'", TRUE );
	}

safe_query( "update pop3 set kommentar = ?  where kunde = ?  and account = ? ", TRUE, new SQLString( $comment ), new SQLString( $PHP_AUTH_USER ), new SQLString( $pop3 ) );

$fehlertitel = ltext("empopw2_error4");
$fehlertext = ltext("empopw2_error5");
db_close();
include("email_pop3.php");
exit();
?>
