Location: PHPKode > projects > Webextreme > webextreme/domainview.php
<?php
  require("functions.php");
  if(!check_login())
  {
    header("Location: index.php");
  }
  $connection = @mysql_connect($dbhost, $dbusername, $dbpassword) or die(db_error("connection"));
  $sql = "SELECT domainname FROM $dbusertable WHERE username = '" . $_SERVER['PHP_AUTH_USER'] . "';";
  $result = @mysql($dbname, $sql) or die(db_error("query"));
?>
<html>
<head>
<title><?php echo $lang['domain_view']; ?></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['domain_management']; ?></td>
    </tr>
    <tr>
      <td bgcolor="white">
        <table border="0" cellspacing="1" cellpadding="4">
          <tr bgcolor="C0C0C0" align="center">
            <td class="header" valign="top"><?php echo $lang['domain_name']; ?></td>
            <td class="header" valign="top"><?php echo $lang['users']; ?></td>
            <td class="header" valign="top"><?php echo $lang['aliases']; ?></td>
            <td class="header" valign="top"><?php echo $lang['default_mailbox']; ?></td>
            <td class="header" valign="top"><?php echo $lang['default_disk_quota_kb']; ?></td>
            <td class="header" valign="top"><?php echo $lang['max_in_mailsize_kb']; ?></td>
            <td class="header" valign="top"><?php echo $lang['max_out_mailsize_kb']; ?></td>
          </tr>
<?php
  $row = mysql_fetch_array($result);
  $domains[0] = $row[domainname];

  if(mysql_numrows($result) == 1 && $domains[0] != "*")
  {
    $domains[0] = $row[domainname];
  }
  else
  {
    $domains = get_domainlist();
    sort($domains);
  }
  $count = true;
  mysql_close($connection);

  for ($idx = 0; $idx < count($domains); ++$idx)
  {
    if(trim($domains[$idx]) != "")
    {
      $results = get_domaininfo($domains[$idx]);
      $domaindata = parse_domainlist($results);
		
      if($count)
      {
?>
          <tr class="menu" onmouseover="className='menuhover';" onmouseout="className='menu';" onclick="javascript:location.href='domainedit.php?domain=<?php echo $domaindata["Domain"]; ?>';" valign="top">
<?php
        $count = false; 
      }
      else 
      {
?>
          <tr class="menu" onmouseover="className='menuhover';" onmouseout="className='menu';" bgcolor="#E0E0E0" onclick="javascript:location.href='domainedit.php?domain=<?php echo $domaindata["Domain"]; ?>';" valign="top">
<?php
        $count = true;
      }
?>
            <td align="left"><?php echo $domaindata["Domain"]; ?></td>
            <td align="right"><?php echo $domaindata["NumUsers"] . "/" . $domaindata["MaxNumUsers"]; ?></td>
            <td align="right"><?php echo $domaindata["UserAlias"] . "/" . $domaindata["MaxNumUserAlias"]; ?></td>
            <td align="left"><?php echo $domaindata["DefaultMailbox"]; ?></td>
            <td align="right"><?php echo $domaindata["DiskUsed"] . "/" . $domaindata["DiskQuota"]; ?>&nbsp;<?php echo $lang['kb']; ?></td>
            <td align="right"><?php echo $domaindata["MaxInMailSize"]; ?>&nbsp;<?php echo $lang['kb']; ?></td>
            <td align="right"><?php echo $domaindata["MaxOutMailSize"]; ?>&nbsp;<?php echo $lang['kb']; ?></td>
          </tr>
<?php
    }
  }
?>
        </table>
      </td>
    </tr>
<?php   
  if(count($domains) > 1)
  {
?>
    <tr>
      <td align="center" bgcolor="white"><input type="button" value="<?php echo $lang['add_domain']; ?>" class="norm" onclick="location.href='domainedit.php';"></td>
    </tr>
<? 
  }
?>

  </table>
</div>

<?php display_info(); ?>

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