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

include_once("auth.php");
include_once("../include/class.SQLInteger.php");
include("email_functions.php");
include("email_config.php");

$loUser = new SQLString($PHP_AUTH_USER);

$id = safe_query2( "SELECT ident FROM $cnf_db_deffrom WHERE pop3 = ?", $loUser );
$werte = db_fetch_array($id);
$loEmail = new SQLString( $alias );
if ( $ident = $werte["ident"] )
	safe_query2( "UPDATE $cnf_db_deffrom SET email=? WHERE ident = $ident", $loEmail );
else
	safe_query2( "INSERT INTO $cnf_db_deffrom ( email, pop3 ) VALUES ( ?,? )", $loEmail, $loUser);
?>
<HTML>
<HEAD>
<title><? echo $lang_text["wbm_deffrom_ok"] ?></title>
<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="2" leftMargin="2" topMargin="2" MARGINHEIGHT="2" MARGINWIDTH="0">
<script language="JavaScript" src="email_webmail.js" type="text/javascript"></script>
<table class="tblbgcolor" width="100%" height="100%" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr><td>
<b><? echo $lang_text["wbm_deffrom_ok"] ?></b>
<br>&nbsp;<br>
<? echo $lang_text["wbm_deffrom_status"] ?>
<br>&nbsp;<br>
</td></tr><tr><td align="center"><? echo std_button(ltext("wbm_winclose"), 'javascript:self.close()'); ?></td>
</tr></table>
</body>
</html>

