PostfixAdmin - web based virtual user administration interface for Postfix mail servers https://postfixadmin.github.io/postfixadmin/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.6 KiB

  1. <?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?>
  2. <div id="overview">
  3. <form name="overview" method="get">
  4. <select class="flat" name="domain" onChange="this.form.submit();">
  5. <?php
  6. for ($i = 0; $i < sizeof ($list_domains); $i++)
  7. {
  8. if ($fDomain == $list_domains[$i])
  9. {
  10. print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n";
  11. }
  12. else
  13. {
  14. print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
  15. }
  16. }
  17. ?>
  18. </select>
  19. <input class="button" type="submit" name="go" value="<?php print $PALANG['pOverview_button']; ?>" />
  20. </form>
  21. <form name="search" method="post" action="search.php">
  22. <input type="textbox" name="search" size="10">
  23. </form>
  24. </div>
  25. <?php
  26. print "<table id=\"overview_table\">\n";
  27. print " <tr>\n";
  28. print " <td colspan=\"5\"><h3>".$PALANG['pOverview_title']."</h3></td>";
  29. print " </tr>";
  30. print " <tr class=\"header\">\n";
  31. print " <td>" . $PALANG['pOverview_get_domain'] . "</td>\n";
  32. print " <td>" . $PALANG['pOverview_get_aliases'] . "</td>\n";
  33. print " <td>" . $PALANG['pOverview_get_mailboxes'] . "</td>\n";
  34. if ($CONF['quota'] == 'YES') print " <td>" . $PALANG['pOverview_get_quota'] . "</td>\n";
  35. print " </tr>\n";
  36. for ($i = 0; $i < sizeof ($list_domains); $i++)
  37. {
  38. if ((is_array ($list_domains) and sizeof ($list_domains) > 0))
  39. {
  40. $limit = get_domain_properties ($list_domains[$i]);
  41. if ($limit['aliases'] == 0) $limit['aliases'] = $PALANG['pOverview_unlimited'];
  42. if ($limit['mailboxes'] == 0) $limit['mailboxes'] = $PALANG['pOverview_unlimited'];
  43. if ($limit['maxquota'] == 0) $limit['maxquota'] = $PALANG['pOverview_unlimited'];
  44. if ($limit['aliases'] < 0) $limit['aliases'] = $PALANG['pOverview_disabled'];
  45. if ($limit['mailboxes'] < 0) $limit['mailboxes'] = $PALANG['pOverview_disabled'];
  46. if ($limit['maxquota'] < 0) $limit['maxquota'] = $PALANG['pOverview_disabled'];
  47. print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
  48. print " <td><a href=\"list-virtual.php?domain=" . $list_domains[$i] . "\">" . $list_domains[$i] . "</a></td>\n";
  49. print " <td>" . $limit['alias_count'] . " / " . $limit['aliases'] . "</td>\n";
  50. print " <td>" . $limit['mailbox_count'] . " / " . $limit['mailboxes'] . "</td>\n";
  51. if ($CONF['quota'] == 'YES') print " <td>" . $limit['maxquota'] . "</td>\n";
  52. print " </tr>\n";
  53. }
  54. }
  55. print "</table>\n";
  56. ?>