示例#1
0
if ($action == "list") {
    OpenTable();
    echo "<center><b>" . _MD_WEBMAIL_MAILBOXESFOR . " {$username}</b></center>";
    echo "<br /><table border=\"1\" align=\"center\" width=\"80%\">" . "<tr class='bg2'><td bgcolor=\"{$bgcolor2}\" width=\"33%\">&nbsp;<b>" . _MD_WEBMAIL_ACCOUNT . "</b></td><td bgcolor=\"{$bgcolor2}\" width=\"33%\" align=\"center\">&nbsp;<b>" . _MD_WEBMAIL_EMAILS . "</b></td><td bgcolor=\"{$bgcolor2}\" width=\"33%\" align=\"center\">&nbsp;<b>" . _MD_WEBMAIL_TOTALSIZE . "</b></td></tr>";
    while ($row = $xoopsDB->fetchArray($result)) {
        $count++;
        $server = $row[popserver];
        $port = $row[port];
        $apop = $row[apop];
        $username = $row[uname];
        $rc4 = new rc4crypt();
        $password = $rc4->endecrypt($username, $row[passwd], "de");
        $account = $row[account];
        $serverid = $row[id];
        $pop3 = new POP3($server, $username, $password, $port, $apop);
        if ($pop3->Open()) {
            $stats = $pop3->Stats();
            $mailsum = $stats["message"];
            $mailmem = round($stats["size"] / 1024) . " Kbytes";
            $pop3->Close();
        } else {
            $mailsum = "Not Connectable!";
            $mailmem = "N/A";
        }
        echo "<tr>" . "<td align=\"left\">&nbsp;" . "<a href='inbox.php?id={$serverid}'>{$account}</a></td>" . "<td align=\"center\">{$mailsum}</td>" . "<td align=\"center\">{$mailmem}</td></tr>";
    }
    echo "</table><br /><br />" . "<center>" . _MD_WEBMAIL_SELECTACCOUNT . "</center>";
    CloseTable();
}
echo "<div align='right'>" . $xoopsModule->name() . " Var. " . $webmail_var . "<br />" . $webmail_credits . "</div>";
include XOOPS_ROOT_PATH . "/footer.php";
示例#2
0
    $pop3->Close();
    $qs = '';
    if ($start > 0) {
        $qs = '&amp;start=' . $start;
    }
    ob_end_clean();
    redirect_header(XOOPS_URL . '/modules/WebMail/inbox.php?id=' . $id . $qs, 1, _MD_WEBMAIL_MSG_DELETED);
    exit;
}
include XOOPS_ROOT_PATH . "/header.php";
ob_end_flush();
$query = "select account from " . $xoopsDB->prefix('webmail_popsettings') . " where id='{$id}' AND uid='{$userid}'";
$result = $xoopsDB->query($query, 0, 1);
$row = $xoopsDB->fetchArray($result);
$account = $row[account];
$s = $pop3->Stats();
$mailsum = $s["message"];
if ($mailsum) {
    if (is_null($start) || $mailsum < $start) {
        $start = $upperlimit = $mailsum;
    } else {
        $upperlimit = $start;
    }
    $lowerlimit = $upperlimit - $numshow;
    if ($lowerlimit < 0) {
        $lowerlimit = 0;
    }
    $showstart = $mailsum - $upperlimit + 1;
    $showend = $mailsum - $lowerlimit;
    echo "<form action=inbox.php method=post>\n\t    <input type=hidden name=id value={$id}>\n\t    <input type=hidden name=start value={$start}>\n\t    <input type=hidden name=op value='delete'>";
    OpenTable();