SF.net SVN: postfixadmin:[622] trunk/templates
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2009-04-10 14:20:47
|
Revision: 622 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=622&view=rev Author: christian_boltz Date: 2009-04-10 14:20:46 +0000 (Fri, 10 Apr 2009) Log Message: ----------- templates/search.php: - fix displaying of vacation status in search results - was broken for a) super admins (wrong nesting of if statements) b) mailboxes with vacation switched off (empty and therefore invisible link) templates/admin_search.php: - deleted unused file Modified Paths: -------------- trunk/templates/search.php Removed Paths: ------------- trunk/templates/admin_search.php Deleted: trunk/templates/admin_search.php =================================================================== --- trunk/templates/admin_search.php 2009-04-10 14:02:06 UTC (rev 621) +++ trunk/templates/admin_search.php 2009-04-10 14:20:46 UTC (rev 622) @@ -1,111 +0,0 @@ -<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> -<?php -require(dirname(__FILE__) . '/search.tpl'); - -/* old code, should be deleted after testing the merge with templates/search.php -?> - -<div id="overview"> -<form name="search" method="post" action="search.php"> -<table width=750><tr> -<td> - <h4><?php print $PALANG['pSearch_welcome'] . $fSearch; ?></h4> -</td> -<td> - <?php print $PALANG['pSearch']; ?>:<input type="textbox" name="search"> -</td> -<td align=right><select class="flat" name="fDomain" > -<?php -print "<option value=\"$list_domains[0]\" selected>$list_domains[0]</option>\n"; -for ($i = 1; $i < sizeof ($list_domains); $i++) -{ - print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n"; -} -?> -</select> -<input class="button" type="submit" name="fGo" value="Return to <?php print $PALANG['pAdminMenu_list_virtual']; ?>" /></td> -</tr></table> -</form> -</div> - -<?php -if (sizeof ($tAlias) > 0) -{ - print "<table id=\"alias_table\">\n"; - print " <tr>\n"; - print " <td colspan=\"5\"><h3>".$PALANG['pOverview_alias_title']."</h3></td>"; - print " </tr>"; - print " <tr class=\"header\">\n"; - print " <td>" . $PALANG['pOverview_alias_address'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_alias_goto'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_alias_modified'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_alias_active'] . "</td>\n"; - print " <td colspan=\"2\"> </td>\n"; - print " </tr>\n"; - - for ($i = 0; $i < sizeof ($tAlias); $i++) - { - if ((is_array ($tAlias) and sizeof ($tAlias) > 0)) - { - print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; - print " <td>" . $tAlias[$i]['address'] . "</td>\n"; - print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n"; - print " <td>" . $tAlias[$i]['modified'] . "</td>\n"; - $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?table=alias&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"; - print " </tr>\n"; - } - } - - print "</table>\n"; -} - -if (sizeof ($tMailbox) > 0) -{ - print "<table id=\"mailbox_table\">\n"; - print " <tr>\n"; - print " <td colspan=\"7\"><h3>".$PALANG['pOverview_mailbox_title']."</h3></td>"; - print " </tr>"; - print " <tr class=\"header\">\n"; - print " <td>" . $PALANG['pOverview_mailbox_username'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_mailbox_name'] . "</td>\n"; - if ($CONF['quota'] == 'YES') print " <td>" . $PALANG['pOverview_mailbox_quota'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_mailbox_modified'] . "</td>\n"; - print " <td>" . $PALANG['pOverview_mailbox_active'] . "</td>\n"; - if ($CONF['alias_control'] == 'YES') - { - print " <td colspan=\"3\"> </td>\n"; - } - else - { - print " <td colspan=\"2\"> </td>\n"; - } - print " </tr>\n"; - - for ($i = 0; $i < sizeof ($tMailbox); $i++) - { - if ((is_array ($tMailbox) and sizeof ($tMailbox) > 0)) - { - print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n"; - print " <td>" . $tMailbox[$i]['username'] . "</td>\n"; - print " <td>" . $tMailbox[$i]['name'] . "</td>\n"; - if ($CONF['quota'] == 'YES') print " <td>" . divide_quota ($tMailbox[$i]['quota']) . "</td>\n"; - print " <td>" . $tMailbox[$i]['modified'] . "</td>\n"; - $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; - 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"; - if ($CONF['alias_control'] == 'YES') - { - print " <td><a href=\"edit-alias.php?address=" . urlencode ($tMailbox[$i]['username']) . "&domain=" . $tMailbox[$i]['domain'] . "\">" . $PALANG['pOverview_alias_edit'] . "</a></td>\n"; - } - 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?table=mailbox&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"; - print " </tr>\n"; - } - } - print "</table>\n"; -} - -/* */ -?> Modified: trunk/templates/search.php =================================================================== --- trunk/templates/search.php 2009-04-10 14:02:06 UTC (rev 621) +++ trunk/templates/search.php 2009-04-10 14:20:46 UTC (rev 622) @@ -161,12 +161,11 @@ if ($CONF['alias_control'] == 'YES') $has_alias_control = 1; } else { if ($CONF['alias_control_admin'] == 'YES') $has_alias_control = 1; - if ($CONF['vacation_control_admin'] == 'YES') - { - $v_active = ($tMailbox[$i]['v_active'] == 1) ? $PALANG['pOverview_vacation_edit'] : ''; - print " <td><a href=\"edit-vacation.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=" . $tMailbox[$i]['domain'] . "\">" . $v_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=" . $tMailbox[$i]['domain'] . "\">" . $v_active . "</a></td>\n"; + } if ($has_alias_control == 1) { print " <td><a href=\"edit-alias.php?address=" . urlencode ($tMailbox[$i]['username']) . "&domain=" . $tMailbox[$i]['domain'] . "\">" . $PALANG['pOverview_alias_edit'] . "</a></td>\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |