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

$id = safe_query( "select maxpop from kunden where kunde = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$maxpop = $werte["maxpop"];

$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('', 'empo_desc1');
?>
function doChange()
{
document.forms[0].submit();
}
</script>
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr>
    <td colspan=4> 
      <? echo ltext("empo_desc2", array($pop, sinnv_intwert($maxpop, ltext("g_nolimit")))); ?>
      <?
if ($pop != 0) {
?><br>
      <table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
        <tr > 
          <td  class="titel-3" >
            <? echo ltext("empo_cell_pop3"); ?>
            </td>
          <td class="titel-3" >
            <div align="center">
              <? echo ltext("empo_cell_action"); ?>
              </div>
          </td>
          <td class="titel-3" >
            <div align="center">
              <? echo ltext("empo_cell_action"); ?>
              </div>
          </td>
          <td class="titel-3" ><? echo ltext("empo_cell_comment"); ?></td>
        </tr>
        <?
$id = safe_query( "select account, kommentar from pop3 where kunde = ?  order by number", TRUE, new SQLString( $PHP_AUTH_USER ) );
while ($werte = db_fetch_array($id))	{
$pop3 = $werte["account"];
$comment = $werte["kommentar"];
?>
        <tr > 
          <td> 
            <? echo $pop3; ?>
            </td>
          <td ><a class=data href="email_pop3_pwaendern.php?pop3=<? echo $pop3; ?>">
            <? echo ltext("empo_link_change"); ?>
            </a> </td>
          <td><a class=data href="email_pop3_loeschen.php?pop3=<? echo $pop3; ?>">
            <? echo ltext("empo_link_del"); ?>
            </a></td>
          <td> 
            <? echo $comment; ?> &nbsp;
            </td>
        </tr>
        <? } ?>
        <? }
if ((($maxpop - $pop) > 0) || ($maxpop == -1)) { ?>
      <form name="form1" method="post" action="email_pop3_anlegen.php">
          <tr > 
            <td colspan="4" class="titel-3" >
              <? echo ltext("empo_cell_newpop"); ?>
              </td>
          </tr>
          <tr > 
            <td colspan=2> <? echo ltext("empo_cell_commentfield"); ?></td>
            <td colspan=2>
              <input type="text" name="comment" maxlength="120">
            </td>
          </tr>
          <tr > 
            <td colspan=2>&nbsp;</td>
            <td colspan=2><? echo std_button(ltext('empo_button1'), 'javascript:doChange()') ?></td>
          </tr>
        </table>
        <? } ?>
      </form>
      
    </td>
  </tr>
   
</table>
</BODY>
</HTML>
<?
db_close();
?>
