0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-20 03:36:20 +02:00
postfixadmin/templates/overview-get.tpl
Christian Boltz c51b27a9c9 merged overview.php into list-domain.php and list-virtual.php
list-domain.php:
- added several admin/superadmin switches and permission checks
- merged GET and POST code
- Note: still different templates for superadmins (admin_list-domain.tpl)
  and admins (overview-get.tpl) because of large layout difference

list-virtual.php:
- added several admin/superadmin switches and permission checks
- added check for admins without any domains (redirects to domain list,
  which can handle this situation)
- migrated FIXME from overview.php 
  -> David, please review the query and remove the FIXME afterwards

overview.php:
- DELETED - no longer needed

overview.tpl:
- RENAMED overview.tpl to list-virtual.tpl
- removed admin/superadmin filename switch
- removed $incpath switch for images

menu.tpl:
- menu for domain admins now has "domain list" and "virtual list"
  instead of "overview"

delete.php, edit-active.php, edit-alias.php, edit-mailbox.php, search.php:
- changed redirect to list-virtual.php

overview-get.tpl:
- changed link to list-virtual.php

main.tpl:
- changed overview link to list-domain.php



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@181 a1433add-5e2c-0410-b055-b7f2511e0802
2007-11-03 22:24:34 +00:00

60 lines
2.5 KiB
Smarty

<div id="overview">
<form name="overview" method="get">
<select class="flat" name="domain" onChange="this.form.submit();">
<?php
for ($i = 0; $i < sizeof ($list_domains); $i++)
{
if ($fDomain == $list_domains[$i])
{
print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n";
}
else
{
print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
}
}
?>
</select>
<input class="button" type="submit" name="go" value="<?php print $PALANG['pOverview_button']; ?>" />
</form>
<form name="search" method="post" action="search.php">
<input type="textbox" name="search" size="10">
</form>
</div>
<?php
print "<table id=\"overview_table\">\n";
print " <tr>\n";
print " <td colspan=\"5\"><h3>".$PALANG['pOverview_title']."</h3></td>";
print " </tr>";
print " <tr class=\"header\">\n";
print " <td>" . $PALANG['pOverview_get_domain'] . "</td>\n";
print " <td>" . $PALANG['pOverview_get_aliases'] . "</td>\n";
print " <td>" . $PALANG['pOverview_get_mailboxes'] . "</td>\n";
if ($CONF['quota'] == 'YES') print " <td>" . $PALANG['pOverview_get_quota'] . "</td>\n";
print " </tr>\n";
for ($i = 0; $i < sizeof ($list_domains); $i++)
{
if ((is_array ($list_domains) and sizeof ($list_domains) > 0))
{
$limit = get_domain_properties ($list_domains[$i]);
if ($limit['aliases'] == 0) $limit['aliases'] = $PALANG['pOverview_unlimited'];
if ($limit['mailboxes'] == 0) $limit['mailboxes'] = $PALANG['pOverview_unlimited'];
if ($limit['maxquota'] == 0) $limit['maxquota'] = $PALANG['pOverview_unlimited'];
if ($limit['aliases'] < 0) $limit['aliases'] = $PALANG['pOverview_disabled'];
if ($limit['mailboxes'] < 0) $limit['mailboxes'] = $PALANG['pOverview_disabled'];
if ($limit['maxquota'] < 0) $limit['maxquota'] = $PALANG['pOverview_disabled'];
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
print " <td><a href=\"list-virtual.php?domain=" . $list_domains[$i] . "\">" . $list_domains[$i] . "</a></td>\n";
print " <td>" . $limit['alias_count'] . " / " . $limit['aliases'] . "</td>\n";
print " <td>" . $limit['mailbox_count'] . " / " . $limit['mailboxes'] . "</td>\n";
if ($CONF['quota'] == 'YES') print " <td>" . $limit['maxquota'] . "</td>\n";
print " </tr>\n";
}
}
print "</table>\n";
?>