<?
include('admin.auth.php');
?>
<?
unset($PORT);
$PORT['POP3'] = ( ($port = getservbyname('pop3', 'tcp')) > 0) ? ($port) : (110);
$PORT['SMTP'] = ( ($port = getservbyname('smtp', 'tcp')) > 0) ? ($port) : (25);
unset($OPTIONS);
$OPTIONS['mailto'] = 'hide@address.com'; //Administrator's Email
// Email subjects to be sent. You may change these, however they should be ok.
unset($ERROR);
$ERROR['POP3'] = 'POP3 Server offline on ' . $_SERVER['SERVER_NAME'];
$ERROR['SMTP'] = 'SMTP Server offline on ' . $_SERVER['SERVER_NAME'];
?>
<html>
<head>
<title>MyMail :: Simple Administration</title>
<style type="text/css">
<!--
.dir A:link {color: #142E56; text-decoration: underline;}
.dir A:visited {color: #142E56; text-decoration: underline;}
.dir A:active {color: #142E56; text-decoration: underline;}
.dir A:hover {background-color: #CCCCCC; text-decoration: underline;}
.top A:link {color: #FFFFFF; text-decoration: none;}
.top A:visited {color: #FFFFFF; text-decoration: none;}
.top A:active {color: #FFFFFF; text-decoration: none;}
.top A:hover {color: #FFD400; text-decoration: underline;}
-->
</style>
</head>
<body bgcolor=#FFFFFF text=#000000 link=#142E56 alink=#142E56 vlink=#142E56 marginwidth=0 marginheight=0 leftmargin=0 rightmargin=0 bottommargin=0 topmargin=0">
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr width=100% height=124>
<td width=100% height=124 background="../bg_top.gif">
<table width=100% height=124 border=0 cellpadding=0 cellspacing=0>
<tr width=100% height=124>
<td width=99% height=124 valign=top align=left background="">
<!-- left segment -->
<table width=100% height=124 border=0 cellpadding=0 cellspacing=0>
<tr width=100% height=66>
<td width=100% height=66 valign=middle align=left>
<table border=0 height=66 cellpadding=0 cellspacing=0 width=100%>
<tr>
<td valign=middle height=66><br>
<nobr></nobr></td>
<td valign=middle height=66><br>
</td>
<td valign=middle height=66 width=100% align=center></td>
</tr>
</table>
</td>
</tr>
<tr width=100% height=21>
<td width=100% height=21 valign=middle align=right> </td>
</tr>
<tr width=100% height=17>
<td width=100% height=17 valign=middle align=right background=""> <font face="Verdana,arial,helvetica,sans-serif" size=2> <font face="arial, helvetica" size=1 color=white>
<center>
<strong>MyMail Server Status</strong>
</center>
</font></td>
</tr>
<tr width=100% height=20>
<td width=100% height=20 valign=middle align=left background=""> </td>
</tr>
</table>
</td>
<!-- right segment -->
<td width=1% valign=top align=right height=124> </td>
</tr>
</table>
</td>
</tr>
<tr width=100% height=100%>
<td width=100% height=100% background="">
<table width="974" border=0 cellpadding=0 cellspacing=0>
<tr width=150>
<td valign=top align=center>
<table width=95% height="320" border=0 cellpadding=15 cellspacing=0>
<tr width=100%>
<td width=100% valign=top align=left class="dir"><p align="center">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
<?php while (list($svc, $port) = each($PORT)): ?>
<tr bgcolor="#FFFFFF">
<td align="right" width="20">•</td>
<td align="left" width="30%"><font face="verdana" size="2"><?php echo $svc; ?></font></td>
<td align="right">
<?php
if ( ($fp = @fsockopen($_SERVER['SERVER_NAME'], $port, $errno, $errstr, 10)) ){
echo '<font color="green" face="verdana" size="2"><b>Running</b></font>';
} else {
echo '<font color="red" face="verdana" size="2"><b>Offline</b></font>';
}
@fclose($fp);
$fp = null;
?>
</td>
</tr>
<?php endwhile; ?>
<tr bgcolor="#FFFFFF">
<td align="right" style="width: 20px;">•</td>
<td align="left" width="30%"><font face=verdana size=2>Server Uptime</font></td>
<td align="right">
<font color=green face=verdana size=2><b>
<?php
preg_match('/([0-9]+) days/', exec('uptime'), $m);
$uptime = $m[1];
echo $uptime;
?>
<font color="green">Days</font></b><font color="green"> </font></font>
</td>
</tr>
</table></p>
</td>
</tr>
</table>
</td>
</tr>
<td align=center> <font color=#666666 face="arial, helvetica, sans-serif" size=1>© 2003
Resiware, Inc.</font> <font color="#666666" size="1" face="Geneva, Arial, Helvetica, sans-serif">MyMail Version 3.0</font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>