opensmtpdadmin/templates/admin_list-virtual.tpl

91 lines
4.7 KiB
Smarty
Raw Normal View History

2022-08-18 14:01:52 +02:00
<div id="admin_virtual">
2022-09-02 23:06:08 +02:00
<form name="list_virtual" method="get">
<select name="domain" onChange="this.form.submit()";>
2022-08-18 14:01:52 +02:00
<?php
2022-09-02 23:06:08 +02:00
if (count($list_domains) > 0) {
foreach ($list_domains as $row) {
echo '<option value="' . $row['domain'] . '"';
2022-09-04 13:10:23 +02:00
if ($list_domains[$domain_key]['domain'] == $row['domain']) echo ' selected';
2022-09-02 23:06:08 +02:00
echo ">" . $row['domain'] . "</option>\n";
2022-08-18 14:01:52 +02:00
}
}
?>
</select>
<input type="hidden" name="limit" value="0">
2022-09-04 11:38:47 +02:00
<input type="submit" name="go" value="<?php echo $LANG['AdminList_virtual_button']; ?>" />
2022-08-18 14:01:52 +02:00
</form>
2022-09-02 23:06:08 +02:00
2022-09-04 11:38:47 +02:00
<h4><?php echo $LANG['AdminList_virtual_welcome'] . $domain; ?></h4>
2022-09-04 13:10:23 +02:00
<p><?php echo $LANG['AdminList_virtual_alias_alias_count'] . ": " . $list_domains[$domain_key]['alias_count'] . " / " . $list_domains[$domain_key]['aliases']; ?></p>
<p><?php echo $LANG['AdminList_virtual_alias_mailbox_count'] . ": " . $list_domains[$domain_key]['mailbox_count'] . " / " . $list_domains[$domain_key]['mailboxes']; ?></p>
2022-09-02 23:06:08 +02:00
2022-08-18 14:01:52 +02:00
<form name="search" method="post" action="search.php">
2022-09-02 23:06:08 +02:00
<input type="textbox" name="search" size="25">
2022-08-18 14:01:52 +02:00
</form>
</div>
<?php
2022-09-04 13:10:23 +02:00
if ($list_domains[$domain_key]['alias_count'] > $limit || $list_domains[$domain_key]['mailbox_count'] > $limit) {
2022-09-02 23:06:08 +02:00
echo "<div id=\"nav_bar\">\n";
if ($offset >= $limit) {
2022-09-04 13:10:23 +02:00
echo "<a href=\"list-virtual.php?domain=" . $list_domains[$domain_key]['domain'] . "&offset=" . ($offset - $limit) . "\"><img border=\"0\" src=\"../images/arrow-l.png\" title=\"" . $LANG['Overview_left_arrow'] . "\"></a>\n";
2022-09-02 23:06:08 +02:00
}
2022-09-04 13:10:23 +02:00
if (($list_domains[$domain_key]['alias_count'] > $limit) || ($list_domains[$domain_key]['mailbox_count'] > $limit)) {
2022-09-02 23:06:08 +02:00
2022-09-04 13:10:23 +02:00
echo "<a href=\"list-virtual.php?domain=" . $list_domains[$domain_key]['domain'] . "&offset=0\"><img border=\"0\" src=\"../images/arrow-u.png\" title=\"" . $LANG['Overview_up_arrow'] . "\"></a>\n";
2022-09-02 23:06:08 +02:00
}
2022-09-04 13:10:23 +02:00
if ((($offset + $limit) < $list_domains[$domain_key]['alias_count']) || (($offset + $limit) < $list_domains[$domain_key]['mailbox_count'])) {
echo "<a href=\"list-virtual.php?domain=" . $list_domains[$domain_key]['domain'] . "&offset=" . ($offset + $limit) . "\"><img border=\"0\" src=\"../images/arrow-r.png\" title=\"" . $LANG['Overview_right_arrow'] . "\"></a>\n";
2022-09-02 23:06:08 +02:00
}
echo "</div>\n";
2022-08-18 14:01:52 +02:00
}
2022-09-02 23:06:08 +02:00
if (count($list_alias) > 0) {
2022-09-04 11:38:47 +02:00
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['AdminList_virtual_alias_address'] . "</td>\n";
echo " <td>" . $LANG['AdminList_virtual_alias_goto'] . "</td>\n";
echo " <td>" . $LANG['AdminList_virtual_alias_modified'] . "</td>\n";
echo " <td colspan=\"2\">&nbsp;</td>\n";
echo " </tr>\n";
2022-08-18 14:01:52 +02:00
2022-09-02 23:06:08 +02:00
foreach ($list_alias as $row) {
2022-09-04 11:38:47 +02:00
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";
2022-09-04 13:10:23 +02:00
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";
2022-09-04 11:38:47 +02:00
echo " </tr>\n";
2022-08-18 14:01:52 +02:00
}
2022-09-04 11:38:47 +02:00
echo "</table>\n";
2022-08-18 14:01:52 +02:00
}
2022-09-02 23:06:08 +02:00
if (count($list_mailbox) > 0) {
2022-09-04 11:38:47 +02:00
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['AdminList_virtual_mailbox_username'] . "</td>\n";
echo " <td>" . $LANG['AdminList_virtual_mailbox_name'] . "</td>\n";
echo " <td>" . $LANG['AdminList_virtual_mailbox_modified'] . "</td>\n";
echo " <td colspan=\"2\">&nbsp;</td>\n";
echo " </tr>\n";
2022-08-18 14:01:52 +02:00
2022-09-02 23:06:08 +02:00
foreach ($list_mailbox as $row) {
2022-09-04 11:38:47 +02:00
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";
2022-09-04 13:10:23 +02:00
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";
2022-09-04 11:38:47 +02:00
echo " </tr>\n";
2022-08-18 14:01:52 +02:00
}
2022-09-04 11:38:47 +02:00
echo "</table>\n";
2022-08-18 14:01:52 +02:00
}
?>