Location: PHPKode > projects > Webextreme > webextreme/domainedit.php
<?php
  require("functions.php");
  if(!check_login())
  {
    header("Location: index.php");
  } 
  if(check("domain", $_GET['domain'], 0))
  {
    $results = get_domaininfo($_GET['domain']);
    $domaindata = parse_domainlist($results);
  }
?>
<html>
<head>
<title><?php echo $lang['domain_management']; ?>: <?php echo $domaindata["Domain"]; ?></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">
    <form method="post" action="domainedit_post.php?domain=<?php echo $domaindata["Domain"]; ?>">
      <tr>
        <td class="highlightwhite" align="center"><?php echo $lang['domain_management']; ?>: <?php echo $domaindata["Domain"]; ?></td>
      </tr>
      <tr>
        <td bgcolor="white">
          <table border="0" cellspacing="0" cellpadding="4" width="100%">
<?php
  if(!check("domain", $domaindata["Domain"], 0))
  { 
?>
            <tr>
              <td class="highlight"><?php echo $lang['domain_name']; ?>:</td>   
              <td><input type="text" name="domain" size="10" class="norm"></td>
            </tr>
<? 
  }else
  {
?>
            <tr>
              <td class="highlight"><?php echo $lang['domain_name']; ?>:</td>   
              <td><?php echo $domaindata["Domain"]; ?><input type="hidden" name="domain" value="<?php echo $domaindata["Domain"]; ?>"></td>
            </tr>
<? 
  }
?>
      
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['default_mailbox']; ?>:</td>
              <td width="70%"><input type="text" name="defmailbox" size="10" class="norm" value="<?php echo $domaindata["DefaultMailbox"]; ?>">.<?php if(check("domain", $domaindata["Domain"], 0)) echo$domaindata["Domain"]; else echo "domain.com"; ?></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['max_in_mailsize']; ?>:</td>
              <td><input type="text" name="maxinmailsize" size="5" class="norm" value="<?php echo print_number($domaindata["MaxInMailSize"]); ?>" maxlength="10">&nbsp;<?php echo $lang['kb']; ?></td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['max_out_mailsize']; ?>:</td>
              <td><input type="text" name="maxoutmailsize" size="5" class="norm" value="<?php echo print_number($domaindata["MaxOutMailSize"]); ?>" maxlength="10">&nbsp;<?php echo $lang['kb']; ?></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['domain_disk_quota']; ?>:</td>
              <td><input type="text" name="diskquota" size="5" class="norm" value="<?php echo print_number($domaindata["DiskQuota"]); ?>" maxlength="10">&nbsp;<?php echo $lang['kb']; ?>&nbsp;<?php if(check("domain", $domaindata["Domain"], 0)) echo $lang['current_used']. ":&nbsp;" . print_number($domaindata["DiskUsed"]) . "&nbsp;" . $lang['kb']; ?></td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['default_max_in_mailsize']; ?>:</td>
              <td><input type="text" name="defmaxinmailsize" size="5" class="norm" value="<?php echo print_number($domaindata["DefaultMaxInMailSize"]); ?>" maxlength="10">&nbsp;<?php echo $lang['kb']; ?></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['default_max_out_mailsize']; ?>:</td>
              <td><input type="text" name="defmaxoutmailsize" size="5" class="norm" value="<?php echo print_number($domaindata["DefaultMaxOutMailSize"]); ?>" maxlength="10">&nbsp;<?php echo $lang['kb']; ?></td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['default_disk_quota']; ?>:</td>
              <td><input type="text" name="defdiskquota" size="5" class="norm" value="<?php echo print_number($domaindata["DefaultDiskQuota"]); ?>" maxlength="10">&nbsp;<?php echo $lang['kb']; ?></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['max_number_of_users']; ?>:</td>
              <td><input type="text" name="maxnousers" size="5" class="norm" value="<?php echo print_number($domaindata["MaxNumUsers"]); ?>" maxlength="5">&nbsp;<?php if(check("domain", $domaindata["Domain"], 0)) echo $lang['current_used'] . ":&nbsp;" . print_number($domaindata["NumUsers"]); ?></td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['max_number_of_aliases']; ?>:</td>
              <td><input type="text" name="maxnoalias" size="5" class="norm" value="<?php echo print_number($domaindata["MaxNumUserAlias"]); ?>" maxlength="5">&nbsp;<?php if(check("domain", $domaindata["Domain"], 0)) echo $lang['current_used'] . ":&nbsp;" . print_number($domaindata["UserAlias"]); ?></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['max_number_of_mailinglists']; ?>:</td>
              <td><input type="text" name="maxnomlist" size="5" class="norm" value="<?php echo print_number($domaindata["MaxNumMlist"]); ?>" maxlength="5">&nbsp;<?php if(check("domain", $domaindata["Domain"], 0)) echo $lang['current_used'] . ":&nbsp;" . print_number($domaindata["NumMlist"]); ?></td>
            </tr>

            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['show_footer']; ?>:</td>
              <td>
                <select name="showfooter" size="1">
                  <option value="0"<?php if($showfooter == "None") { echo " selected"; } ?>><?php echo $lang['none']; ?></option>
                  <option value="1"<?php if($showfooter == "Incoming mails") { echo " selected"; } ?>><?php echo $lang['incoming_mails']; ?></option>
                  <option value="2"<?php if($showfooter == "Outgoing mails") { echo " selected"; } ?>><?php echo $lang['outgoing_mails']; ?></option>
                  <option value="3"<?php if($showfooter == "Incoming mails, Outgoing mails") { echo " selected"; } ?>><?php echo $lang['incoming_outgoing_mails']; ?></option>
                </select>
              </td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['incoming_mail_footer']; ?>:</td>
              <td><input type="text" name="incomingmailfooter" size="25" class="norm" value="<?php echo $domaindata["MailInFooter"]; ?>"></td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['outgoing_mail_footer']; ?>:</td>
              <td><input type="text" name="outgoingmailfooter" size="25" class="norm" value="<?php echo $domaindata["MailOutFooter"]; ?>"></td>
            </tr>
          </table> 
        </td>
      </tr>
      <tr>
        <td bgcolor="white" align="center">
<?php
  if(check("domain", $_GET['domain'], 0))
  {
?>
          <input type="submit" value="<?php echo $lang['update']; ?>" name="action" class="norm">
          <input type="submit" value="<?php echo $lang['delete']; ?>" name="action" class="norm" onclick="return confirm('<?php echo $lang['really_delete_domain']; ?>');">
          <input type="button" value="<?php echo $lang['edit_users']; ?>" class="norm" onclick="location.href='userview.php?domain=<?php echo $domaindata["Domain"]; ?>';">
          <input type="button" value="<?php echo $lang['edit_aliases']; ?>" class="norm" onclick="location.href='aliasview.php?domain=<?php echo $domaindata["Domain"]; ?>';">
<?php
  }
  else
  {
?>
          <input type="submit" value="<?php echo $lang['save']; ?>" name="action" class="norm">
<?php
  }
?>
          <input type="reset" value="<?php echo $lang['reset']; ?>" class="norm">
          <input type="button" value="<?php echo $lang['cancel']; ?>" class="norm" onclick="location.href='domainview.php';">
        </td>
      </tr>
    </form>
  </table>
</div>

<?php display_info(); ?>

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