Location: PHPKode > projects > Webextreme > webextreme/status.php
<?php
  require("functions.php");
  if(!check_login())
  {
    header("Location: index.php");
  }
?>
<html>
<head>
<title><?php echo $lang['mailserver_status']; ?></title>
<link rel="stylesheet"                  href="style.css">
<meta http-equiv="pragma"               content="no-cache">
<meta http-equiv="content-type"         content="text/html; charset=iso-8859-1">
</head>

<body>

<div align="center">
  <table border="0" bgcolor="black" cellpadding="2" cellspacing="1">
    <tr>
      <td class="highlightwhite" align="center"><?php echo $lang['mailserver_status']; ?></td>
    </tr>
    <tr>
      <td bgcolor="white">
        <table border="0" cellspacing="0" cellpadding="4" width="100%">
          <tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mailserver_version']; ?>:</td>
              <td>
<?php
  $statusinfo = get_status();	
  $statusinfo = parse_status($statusinfo);
  echo $statusinfo["Version"];
?></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['mailserver_status']; ?>:</td>
              <td>
<?php
  if(@fsockopen($mailserver, $port))
    echo $lang['started'] . " (" . $statusinfo["Date"] .")";
  else
    echo $lang['not_started'];
?>
              </td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mailserver_uptime']; ?>:</td>
              <td>
<?php
    echo $statusinfo["UpTime"] ;

?>
              </td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['domain_s']; ?>:</td>
              <td>
<?php
  $domain = 0;
  $domains = get_domainlist(); 
  for($idx = 0; $idx < count($domains); ++$idx)
  {
    if(trim($domains[$idx]) != "")
      $domain++;
  }
  echo $domain;
?>
              </td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['users']; ?>:</td>
              <td>
<?php
  $users = 0;
  $domains = get_domainlist();
  for($idx = 0; $idx < count($domains); ++$idx)
  {
    if(trim($domains[$idx]) != "")
    {
      $user = get_userlist($domains[$idx]);
      for($idy = 0; $idy < count($user); ++$idy)
      {
        if(trim($user[$idy]) != "")
          $users++;
      }
    }
  }
  echo $users;
?>
              </td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['aliases']; ?>:</td>
              <td>
<?php
  $aliases = 0;
  $domains = get_domainlist();
  for($idx = 0; $idx < count($domains); ++$idx)
  {
    if(trim($domains[$idx]) != "")
    {
      $alias = get_aliaslist($domains[$idx]);
      for($idy = 0; $idy < count($alias); ++$idy)
      {
        if(trim($alias[$idy]) != "")
          $aliases++;
      }
    }
  }
  echo $aliases;
?>
              </td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mails']; ?>:</td>
              <td><?php echo $lang['sent'] . ": " . $statusinfo["Mailsent"] . ", " . $lang['received'] . ": " . $statusinfo["Mailrecv"]; ?></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['connections']; ?>:</td>
              <td><?php echo $lang['smtp_in'] . ": " . $statusinfo["SmtpIn"] .", " . $lang['smtp_out'] . ": " . $statusinfo["SmtpOut"] . ", " . $lang['pop3_in'] . ": " . $statusinfo["PopIn"]; ?></td>
            </tr>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td align="center" bgcolor="white">
        <form>
          <input type="button" value="<?php echo $lang['return']; ?>" class="norm" onclick="history.back();">
        </form>
      </td>
    </tr>
  </table>
</div>

<?php display_info(); ?>

</body>
</html>
Return current item: Webextreme