本文整理汇总了PHP中POP3::Stats方法的典型用法代码示例。如果您正苦于以下问题:PHP POP3::Stats方法的具体用法?PHP POP3::Stats怎么用?PHP POP3::Stats使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类POP3
的用法示例。
在下文中一共展示了POP3::Stats方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: OpenTable
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%\"> <b>" . _MD_WEBMAIL_ACCOUNT . "</b></td><td bgcolor=\"{$bgcolor2}\" width=\"33%\" align=\"center\"> <b>" . _MD_WEBMAIL_EMAILS . "</b></td><td bgcolor=\"{$bgcolor2}\" width=\"33%\" align=\"center\"> <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\"> " . "<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: OpenTable
$pop3->Close();
$qs = '';
if ($start > 0) {
$qs = '&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();