110 lines
5.8 KiB
Smarty
110 lines
5.8 KiB
Smarty
<div id="overview">
|
|
<form name="select_domain" method="get">
|
|
<select name="domain" onChange="this.form.submit()";>
|
|
<?php
|
|
if (count($list_domains) > 0) {
|
|
foreach ($list_domains as $row) {
|
|
echo '<option value="' . $row['domain'] . '"';
|
|
if (isset($domain) && $domain == $row['domain']) echo ' selected';
|
|
echo ">" . $row['domain'] . "</option>\n";
|
|
}
|
|
}
|
|
if ($list_domains[$domain_key]['aliases'] == 0) $list_domains[$domain_key]['aliases'] = $LANG['Overview_unlimited'];
|
|
if ($list_domains[$domain_key]['aliases'] < 0) $list_domains[$domain_key]['aliases'] = $LANG['Overview_disabled'];
|
|
if ($list_domains[$domain_key]['mailboxes'] == 0) $list_domains[$domain_key]['mailboxes'] = $LANG['Overview_unlimited'];
|
|
if ($list_domains[$domain_key]['mailboxes'] < 0) $list_domains[$domain_key]['mailboxes'] = $LANG['Overview_disabled'];
|
|
if ($list_domains[$domain_key]['maxquota'] == 0) $list_domains[$domain_key]['maxquota'] = $LANG['Overview_unlimited'];
|
|
if ($list_domains[$domain_key]['maxquota'] < 0) $list_domains[$domain_key]['maxquota'] = $LANG['Overview_disabled'];
|
|
?>
|
|
</select>
|
|
<input type="hidden" name="offset" value="0">
|
|
<input class="button" type="submit" name="go" value="<?php echo $LANG['Overview_button']; ?>" />
|
|
</form>
|
|
|
|
<h4><?php echo $LANG['Overview_welcome'] . $domain; ?></h4>
|
|
<p><?php echo $LANG['Overview_alias_alias_count'] . ": " . $list_domains[$domain_key]['alias_count'] . " / " . $list_domains[$domain_key]['aliases']; ?></p>
|
|
<p><?php echo $LANG['Overview_alias_mailbox_count'] . ": " . $list_domains[$domain_key]['mailbox_count'] . " / " . $list_domains[$domain_key]['mailboxes']; ?></p>
|
|
|
|
<form name="search" method="post" action="search.php">
|
|
<input type="textbox" name="search" size="25">
|
|
</form>
|
|
</div>
|
|
<?php
|
|
if ($list_domains[$domain_key]['alias_count'] > $limit || $list_domains[$domain_key]['mailbox_count'] > $limit) {
|
|
echo "<div id=\"nav_bar\">\n";
|
|
if ($offset >= $limit) {
|
|
|
|
echo "<a href=\"overview.php?domain=" . $_GET['domain'] . "&offset=" . ($offset - $limit) . "\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $LANG['Overview_left_arrow'] . "\"></a>\n";
|
|
}
|
|
if (($list_domains[$domain_key]['alias_count'] > $limit) || ($list_domains[$domain_key]['mailbox_count'] > $limit)) {
|
|
|
|
echo "<a href=\"overview.php?domain=" . $_GET['domain'] . "&offset=0\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $LANG['Overview_up_arrow'] . "\"></a>\n";
|
|
}
|
|
if ((($offset + $limit) < $list_domains[$domain_key]['alias_count']) || (($offset + $limit) < $list_domains[$domain_key]['mailbox_count'])) {
|
|
echo "<a href=\"overview.php?domain=" . $_GET['domain'] . "&offset=" . ($offset + $limit) . "\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $LANG['Overview_right_arrow'] . "\"></a>\n";
|
|
}
|
|
echo "</div>\n";
|
|
}
|
|
|
|
if (count($list_alias) > 0) {
|
|
echo "<table id=\"alias_table\">\n";
|
|
echo " <tr>\n";
|
|
echo " <td colspan=\"5\"><h3>".$LANG['Overview_alias_title']."</h3></td>";
|
|
echo " </tr>";
|
|
echo " <tr class=\"header\">\n";
|
|
echo " <td>" . $LANG['Overview_alias_address'] . "</td>\n";
|
|
echo " <td>" . $LANG['Overview_alias_goto'] . "</td>\n";
|
|
echo " <td>" . $LANG['Overview_alias_modified'] . "</td>\n";
|
|
echo " <td colspan=\"2\"> </td>\n";
|
|
echo " </tr>\n";
|
|
|
|
foreach ($list_alias as $row) {
|
|
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
|
echo " <td>" . $row['address'] . "</td>\n";
|
|
echo " <td>" . preg_replace("/,/", "<br>", $row['goto']) . "</td>\n";
|
|
echo " <td>" . $row['modified'] . "</td>\n";
|
|
|
|
if ($CONF['special_alias_control'] == 'YES') {
|
|
echo " <td><a href=\"edit-alias.php?address=" . $row['address'] . "&domain=" . $list_domains[$domain_key]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
|
|
echo " <td><a href=\"delete.php?delete=" . $row['address'] . "&domain=" . $list_domains[$domain_key]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_aliases'] . ": ". $row['address'] . "')\">" . $LANG['del'] . "</a></td>\n";
|
|
} else {
|
|
if (!in_array($row['goto'], $CONF['default_aliases'])) {
|
|
echo " <td><a href=\"edit-alias.php?address=" . $row['address'] . "&domain=" . $row['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
|
|
echo " <td><a href=\"delete.php?delete=" . $row['address'] . "&domain=" . $row['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_aliases'] . ": ". $row['address'] . "')\">" . $LANG['del'] . "</a></td>\n";
|
|
} else {
|
|
echo " <td> </td>\n";
|
|
echo " <td> </td>\n";
|
|
}
|
|
}
|
|
echo " </tr>\n";
|
|
}
|
|
|
|
echo "</table>\n";
|
|
}
|
|
|
|
if (count($list_mailbox) > 0) {
|
|
echo "<table id=\"mailbox_table\">\n";
|
|
echo " <tr>\n";
|
|
echo " <td colspan=\"7\"><h3>".$LANG['Overview_mailbox_title']."</h3></td>";
|
|
echo " </tr>";
|
|
echo " <tr class=\"header\">\n";
|
|
echo " <td>" . $LANG['Overview_mailbox_username'] . "</td>\n";
|
|
echo " <td>" . $LANG['Overview_mailbox_name'] . "</td>\n";
|
|
echo " <td>" . $LANG['Overview_mailbox_modified'] . "</td>\n";
|
|
echo " <td>" . $LANG['Overview_mailbox_active'] . "</td>\n";
|
|
echo " <td colspan=\"2\"> </td>\n";
|
|
echo " </tr>\n";
|
|
|
|
foreach ($list_mailbox as $row) {
|
|
echo " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
|
|
echo " <td>" . $row['username'] . "</td>\n";
|
|
echo " <td>" . $row['name'] . "</td>\n";
|
|
echo " <td>" . $row['modified'] . "</td>\n";
|
|
echo " <td><a href=\"edit-mailbox.php?username=" . $row['username'] . "&domain=$fDomain" . "\">" . $LANG['edit'] . "</a></td>\n";
|
|
echo " <td><a href=\"delete.php?delete=" . $row['username'] . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $row['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
|
|
echo " </tr>\n";
|
|
}
|
|
echo "</table>\n";
|
|
}
|
|
?>
|