Ejemplo n.º 1
0
$username = $xoopsUser->uname();
ob_start();
//parse_str(base64_decode($pop3_cookie));
require "pop3.php";
require "decodemessage.php";
include "mailheader.php";
include "class.rc4crypt.php";
$_GET = array_merge($_GET, $_POST);
$id = isset($_GET['id']) ? (int) $_GET['id'] : null;
$start = isset($_GET['start']) ? (int) $_GET['start'] : null;
$op = isset($_GET['op']) ? $_GET['op'] : null;
$msgid = isset($_GET['msgid']) ? $_GET['msgid'] : null;
getServer($id);
@set_time_limit(120);
$pop3 = new POP3($server, $username, $password, $port, $apop);
if (!$pop3->Open()) {
    echo "<center>Not Connectable! Please check your POP3 settings.</center><br />";
}
if ($op == "delete") {
    if (!is_array($msgid)) {
        $msgid = array($msgid);
    }
    foreach ($msgid as $mid) {
        $mid = intval($mid);
        if ($mid) {
            $pop3->DeleteMessage($mid);
            --$start;
        }
    }
    $pop3->Close();
    $qs = '';
Ejemplo n.º 2
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";
Ejemplo n.º 3
0
    }
    $server = $row[popserver];
    $port = $row[port];
    $apop = $row[apop];
    $username = $row[uname];
    $rc4 = new rc4crypt();
    $password = $rc4->endecrypt($username, $row[passwd], "de");
} else {
    echo "Error: POP Server not set properly<br />";
    include XOOPS_ROOT_PATH . "/footer.php";
    exit;
}
$ms = $msgid;
set_time_limit(0);
$pop3 = new POP3($server, $username, $password, $port, $apop);
$pop3->Open();
$message = $pop3->GetMessage($ms);
$s = $pop3->Stats();
$mailsum = $s["message"];
$body = $message["body"];
$header = $message["header"];
$full = $message["full"];
$pop3->Close();
//echo $full;
$d = new DecodeMessage();
if (defined('_MD_WEBMAIL_READMAIL_DATEFORMAT')) {
    $d->dateformat = _MD_WEBMAIL_READMAIL_DATEFORMAT;
}
if (defined('_MD_WEBMAIL_WEEKDAYS')) {
    $d->weekdays = explode(',', _MD_WEBMAIL_WEEKDAYS);
}