97 lines
5.2 KiB
Smarty
97 lines
5.2 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 ($list_domains[$domain_key]['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";
|
|
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?table=alias&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";
|
|
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 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=" . $list_domains[$domain_key]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
|
|
echo " <td><a href=\"delete.php?table=mailbox&delete=" . $row['username'] . "&domain=" . $list_domains[$domain_key]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $row['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
|
|
echo " </tr>\n";
|
|
}
|
|
echo "</table>\n";
|
|
}
|
|
?>
|