You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-01-12 22:51:27 +03:00
templates/: refactoring and some fixes
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@68 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
<div id="footer">
|
||||
<a target="_blank" href="http://postfixadmin.com/">Postfix Admin <?php print $version; ?></a>
|
||||
|
|
||||
<?php print(isset($SESSID_USERNAME) ? "Logged as $SESSID_USERNAME | " : "") ?>
|
||||
<?php print(isset($USERID_USERNAME) ? "Logged as $USERID_USERNAME | " : "") ?>
|
||||
<?php
|
||||
if(isset($_SESSION['sessid']['username'])) {
|
||||
echo "Logged as " . authentication_get_username();
|
||||
}
|
||||
?>
|
||||
|
|
||||
<a target="_blank" href="http://postfixadmin.com/?version=<?php print $version; ?>"><?php print $PALANG['check_update']; ?></a>
|
||||
<?php
|
||||
if (($CONF['show_footer_text'] == "YES") and ($CONF['footer_link']))
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
<?php $url = "create-mailbox.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; ?>
|
||||
<li><a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pMenu_create_mailbox']; ?></a></li>
|
||||
<?php if ($CONF['sendmail'] == 'YES') { ?><li><a target="_top" href="sendmail.php"><?php print $PALANG['pMenu_sendmail']; ?></a></li><?php } ?>
|
||||
<?php if ($CONF['vacation'] == "YES") { ?>
|
||||
<li><a target="_top" href="edit-vacation.php"><?php print $PALANG['pUsersMenu_vacation']; ?></a></li>
|
||||
<?php } ?>
|
||||
<li><a target="_top" href="password.php"><?php print $PALANG['pMenu_password']; ?></a></li>
|
||||
<li><a target="_top" href="viewlog.php"><?php print $PALANG['pMenu_viewlog']; ?></a></li>
|
||||
<li><a target="_top" href="logout.php"><?php print $PALANG['pMenu_logout']; ?></a></li>
|
||||
|
||||
@@ -202,8 +202,20 @@ if (sizeof ($tMailbox) > 0)
|
||||
print " <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n";
|
||||
if ($CONF['vacation_control_admin'] == 'YES')
|
||||
{
|
||||
$v_active = ($tMailbox[$i]['v_active'] == 1) ? $PALANG['pOverview_vacation_edit'] : $PALANG['pOverview_vacation_option'];
|
||||
print " <td><a href=\"edit-vacation.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $v_active . "</a></td>\n";
|
||||
$v_active_int = $tMailbox[$i]['v_active'];
|
||||
if($v_active_int !== -1) {
|
||||
if($v_active_int == 1) {
|
||||
$v_active = $PALANG['pOverview_vacation_edit'];
|
||||
}
|
||||
else {
|
||||
$v_active = $PALANG['pOverview_vacation_option'];
|
||||
}
|
||||
print "<td><a href=\"edit-vacation.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $v_active . "</a></td>\n";
|
||||
}
|
||||
else {
|
||||
// can't tell vacation state - broken pgsql query
|
||||
echo "<td> </td>\n";
|
||||
}
|
||||
}
|
||||
if ($CONF['alias_control_admin'] == 'YES')
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</td>
|
||||
|
||||
<?php
|
||||
if (check_admin($SESSID_USERNAME)) {
|
||||
if (authentication_has_role('global-admin')) {
|
||||
print '<td></td>';
|
||||
print '<td align=right><select class="flat" name="fDomain" >';
|
||||
|
||||
@@ -25,7 +25,7 @@ for ($i = 1; $i < sizeof ($list_domains); $i++)
|
||||
?>
|
||||
</select>
|
||||
<?php
|
||||
if (check_admin($SESSID_USERNAME)) {
|
||||
if (authentication_has_role('global-admin')) {
|
||||
# TODO: make "Return to" translatable
|
||||
?>
|
||||
<input class="button" type="submit" name="fGo" value="<?php print $PALANG['pReturn_to'] . ' ' . $PALANG['pAdminMenu_list_virtual']; ?>" /></td>
|
||||
@@ -77,13 +77,13 @@ if (sizeof ($tAlias) > 0)
|
||||
}
|
||||
print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n";
|
||||
print " <td>" . $tAlias[$i]['modified'] . "</td>\n";
|
||||
if ($CONF['special_alias_control'] == 'YES' || check_admin($SESSID_USERNAME))
|
||||
if ($CONF['special_alias_control'] == 'YES' || authentication_has_role('global-admin'))
|
||||
{
|
||||
$active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
|
||||
print " <td><a href=\"edit-active.php?alias=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "&return=search.php?search=" . urlencode ($fSearch) . "\">" . $active . "</a></td>\n";
|
||||
print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "\">" . $PALANG['edit'] . "</a></td>\n";
|
||||
print " <td><a href=\"delete.php?";
|
||||
if (check_admin($SESSID_USERNAME)) {
|
||||
if (authentication_has_role('global-admin')) {
|
||||
print "table=alias&";
|
||||
}
|
||||
print "delete=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n";
|
||||
@@ -127,7 +127,7 @@ if (sizeof ($tMailbox) > 0)
|
||||
if ($CONF['vacation_control_admin'] == 'YES') $colspan=$colspan+1;
|
||||
if ($CONF['alias_control_admin'] == 'YES') $colspan=$colspan+1;
|
||||
|
||||
if (check_admin($SESSID_USERNAME) && $CONF['alias_control'] == 'YES') {
|
||||
if (authentication_has_role('global-admin') && $CONF['alias_control'] == 'YES') {
|
||||
$colspan = 3;
|
||||
}
|
||||
print " <td colspan=\"$colspan\"> </td>\n";
|
||||
@@ -158,7 +158,7 @@ if (sizeof ($tMailbox) > 0)
|
||||
print " <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=" . $tMailbox[$i]['domain'] . "&return=search.php?search=" . urlencode ($fSearch) . "\">" . $active . "</a></td>\n";
|
||||
|
||||
$has_alias_control = 0; # temporary variable to simplify admin vs. superadmin code
|
||||
if (check_admin($SESSID_USERNAME)) {
|
||||
if (authentication_has_role('global-admin')) {
|
||||
if ($CONF['alias_control'] == 'YES') $has_alias_control = 1;
|
||||
} else {
|
||||
if ($CONF['alias_control_admin'] == 'YES') $has_alias_control = 1;
|
||||
@@ -175,7 +175,7 @@ $has_alias_control = 0; # temporary variable to simplify admin vs. superadmin co
|
||||
|
||||
print " <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=" . $tMailbox[$i]['domain'] . "\">" . $PALANG['edit'] . "</a></td>\n";
|
||||
print " <td><a href=\"delete.php?";
|
||||
if (check_admin($SESSID_USERNAME)) {
|
||||
if (authentication_has_role('global-admin')) {
|
||||
print "table=mailbox&";
|
||||
}
|
||||
print "delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=" . $tMailbox[$i]['domain'] . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n";
|
||||
|
||||
@@ -27,7 +27,7 @@ else
|
||||
for ($i = 0 ; $i < sizeof ($array) ; $i++)
|
||||
{
|
||||
if (empty ($array[$i])) continue;
|
||||
if ($array[$i] == "$USERID_USERNAME@$vacation_domain")
|
||||
if ($array[$i] == "$vacation_goto")
|
||||
{
|
||||
$vacation = "YES";
|
||||
continue;
|
||||
@@ -52,7 +52,7 @@ for ($i = 0 ; $i < sizeof ($array) ; $i++)
|
||||
<tr>
|
||||
<td colspan="3" class="hlp_center">
|
||||
<input class="button" type="submit" name="submit" value="<?php print $PALANG['pEdit_alias_button']; ?>">
|
||||
<input class="button" type="submit" name="submit" value="<?php print $PALANG['exit']; ?>" action="main.php" >
|
||||
<input class="button" type="submit" name="fCancel" value="<?php print $PALANG['exit']; ?>" >
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><?php print $_SESSION['userid']['username']; ?></td>
|
||||
<td><?php print $_SESSION['sessid']['username']; ?></td>
|
||||
</tr>
|
||||
<?php if ($CONF['vacation'] == 'YES') { ?>
|
||||
<tr>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<td colspan="3" class="hlp_center">
|
||||
<input class="button" type="submit" name="fAway" value="<?php print $PALANG['pUsersVacation_button_away']; ?>" />
|
||||
<input class="button" type="submit" name="fBack" value="<?php print $PALANG['pUsersVacation_button_back']; ?>" />
|
||||
<input class="button" type="submit" name="fCancel" value="<?php print $PALANG['exit']; ?>" action="main.php" />
|
||||
<input class="button" type="submit" name="fCancel" value="<?php print $PALANG['exit']; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user