opensmtpdadmin/templates/admin_list-virtual.tpl

91 lines
4.8 KiB
Smarty

<div id="admin_virtual">
<form name="list_virtual" 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[$selected_domain]['domain'] == $row['domain']) echo ' selected';
echo ">" . $row['domain'] . "</option>\n";
}
}
?>
</select>
<input type="hidden" name="limit" value="0">
<input type="submit" name="go" value="<?php echo $LANG['AdminList_virtual_button']; ?>" />
</form>
<h4><?php echo $LANG['AdminList_virtual_welcome'] . $domain; ?></h4>
<p><?php echo $LANG['AdminList_virtual_alias_alias_count'] . ": " . $list_domains[$selected_domain]['alias_count'] . " / " . $list_domains[$selected_domain]['aliases']; ?></p>
<p><?php echo $LANG['AdminList_virtual_alias_mailbox_count'] . ": " . $list_domains[$selected_domain]['mailbox_count'] . " / " . $list_domains[$selected_domain]['mailboxes']; ?></p>
<form name="search" method="post" action="search.php">
<input type="textbox" name="search" size="25">
</form>
</div>
<?php
if ($list_domains[$selected_domain]['alias_count'] > $limit || $list_domains[$selected_domain]['mailbox_count'] > $limit) {
echo "<div id=\"nav_bar\">\n";
if ($offset >= $limit) {
echo "<a href=\"list-virtual.php?domain=" . $list_domains[$selected_domain]['domain'] . "&offset=" . ($offset - $limit) . "\"><img border=\"0\" src=\"../images/arrow-l.png\" title=\"" . $LANG['Overview_left_arrow'] . "\"></a>\n";
}
if (($list_domains[$selected_domain]['alias_count'] > $limit) || ($list_domains[$selected_domain]['mailbox_count'] > $limit)) {
echo "<a href=\"list-virtual.php?domain=" . $list_domains[$selected_domain]['domain'] . "&offset=0\"><img border=\"0\" src=\"../images/arrow-u.png\" title=\"" . $LANG['Overview_up_arrow'] . "\"></a>\n";
}
if ((($offset + $limit) < $list_domains[$selected_domain]['alias_count']) || (($offset + $limit) < $list_domains[$selected_domain]['mailbox_count'])) {
echo "<a href=\"list-virtual.php?domain=" . $list_domains[$selected_domain]['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['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";
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[$selected_domain]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
echo " <td><a href=\"delete.php?table=alias" . "&delete=" . $row['address'] . "&domain=" . $list_domains[$selected_domain]['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['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";
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[$selected_domain]['domain'] . "\">" . $LANG['edit'] . "</a></td>\n";
echo " <td><a href=\"delete.php?table=mailbox" . "&delete=" . $row['username'] . "&domain=" . $list_domains[$selected_domain]['domain'] . "\"onclick=\"return confirm ('" . $LANG['confirm'] . $LANG['Overview_get_mailboxes'] . ": ". $row['username'] . "')\">" . $LANG['del'] . "</a></td>\n";
echo " </tr>\n";
}
echo "</table>\n";
}
?>