<?
########## 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 count(ident) as autoresponder from autoresponder where kunde = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$autoresponder = $werte["autoresponder"];

$id = safe_query( "select maxemail, maxautoresponder from kunden where kunde = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$maxautoresponder = $werte["maxautoresponder"];
?>
<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>
<?
echo js_f_call_help('', 'empolo_title');
?>
function doChange()
{
document.forms[0].submit();
}
</script>
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr>
    <td valign="top">
      <? echo ltext("empolo_desc", array($pop3)); ?>
    <br><br>
        <?
$id = safe_query( "select prefix, domain from email where pop3 = ? ", TRUE, new SQLString( $pop3 ) );

while ($werte = db_fetch_array($id)) {
$emailadresse = $werte["prefix"]."@".$werte["domain"];
echo $emailadresse."<br>";
}
$id = safe_query2( "SELECT prefix, domain FROM email ".
									 "WHERE pop3x = ? OR pop3x LIKE ? OR pop3x LIKE ? OR pop3x LIKE ?",
									 new SQLString($pop3),new SQLString($pop3.':%'),new SQLString('%:'.$pop3),new SQLString('%:'.$pop3.':%') );

if (db_num_rows($id) > 0) {
    ?>
      <br><br><? echo ltext("empolo_desc2"); ?><br><br>
	<?

while ($werte = db_fetch_array($id)) {
$emailadresse = $werte["prefix"]."@".$werte["domain"];
echo $emailadresse."<br>";
}
?>
<? } ?>
      <form action="email_pop3_loeschen2.php" method="post">
        <table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
          <tr >
            <td><input type="hidden" name="pop3" value="<? echo $pop3; ?>"><? echo std_button(ltext('empolo_btn'), 'javascript:doChange()') ?></td>
          </tr>
        </table>
      </form>
      <br><br><br><a class=data href="email_pop3.php"><? echo ltext("empolo_link"); ?></a>
    </td>
  </tr>
  
</table>
<P>&nbsp;</P>
</BODY>
</HTML>
<?
db_close();
?>
