Files
Testing/mailservices/bateworld/mail_accounts.php
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

130 lines
2.7 KiB
PHP

<?php header('Content-type: text/html; charset=utf-8');
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/mailservices/includes/');
include(PATHTOINCLUDES."base.php");
//Written by Philip Poremba 05/02/2012
$dconn=dbconnect2();
$em="";
$_SESSION["user_uri"]="/mailservices/bateworld/mail_accounts.php";
$_SESSION["pagename"]="Mail Accounts";
$_SESSION["the_section_location"] = "/mailservices//bateworld/mail_accounts.php";
$_SESSION["the_section_container"]="section_content";
$_SESSION["the_tab"]="two";
$sql="SELECT
`mail_accounts`.`maid`,
`mail_accounts`.`username`,
`mail_accounts`.`password`,
`mail_accounts`.`host`,
`mail_accounts`.`port`,
`mail_accounts`.`process_page`
FROM
`mail_accounts`
ORDER BY
`mail_accounts`.`username` ASC";
$result=mysql_query($sql) or $em=$em.mysql_error();
echo $em;
?>
<div id="mail_accounts" class="list-container">
<h1>System Mail Accounts</h1>
<div id="useraccounts" class="list-wrap">
<table width="100%" cellpadding="0" cellspacing="1" id="tb-full" class="tb-full">
<thead>
<tr>
<th class="th-first">Account</th>
<th nowrap="nowrap">No. Messages</th>
<th class="th-last" style="text-align:right;padding-right:3px;width:100%;"></th>
</tr>
</thead>
<tbody>
<?php
$rownum=0;
while ($row = mysql_fetch_assoc($result)) {
$rownum=$rownum+1;
if($rownum % 2 != 0){$rc="#ffff99";} else{$rc="#fff";}
if (($mbox = @imap_open("{b8world.com:143/novalidate-cert}INBOX", $row["username"], $row["password"])) !=false)
//if (($mbox = @imap_open("{b8world.com:143/validate-cert}INBOX", $row["username"], $row["password"])) !=false)
{
@$n_msgs = imap_num_msg($mbox);
}
else
{
$n_msgs="err";
$n_msgs=imap_last_error();
}
?>
<tr style="background:<?php echo $rc;?>" onmouseover="this.style.background='#ccffcc';" onmouseout="this.style.background='<?php echo $rc;?>';" class="trr" valign="top">
<td nowrap="nowrap" class="tdd"><?php echo $row["username"];?></td>
<td nowrap="nowrap" class="tdd" style="text-align:right"><?php echo $n_msgs;?></td>
<td nowrap="nowrap" class="tdd tdd-last">
<?php if($row["process_page"] != "") { ?>
<a href="#" onclick="getmenucontent('<?php echo $row["process_page"];?>?maid=<?php echo $row["maid"];?>','section_content','b8world_tabs','three',this.parentNode,'h')">Process</a>
l
<?php } ?>
<a href="#" onclick="getmenucontent('/mailservices//bateworld/inbox.php?maid=<?php echo $row["maid"];?>','section_content','b8world_tabs','four',this.parentNode,'h')">Inbox</a></td>
</tr>
<?php }?>
</tbody>
</table>
</div>
<div class="page-nav">
<div style="float: right;">
&nbsp;
</div>
</div>
</div>