:
\n"; if (boolconf('alias_domain')) { # XXX: the following block misses one intention level if ((sizeof ($tAliasDomains) > 0) || (is_array ($tTargetDomain) )) { print "\n"; print " \n"; print " "; print " "; if(sizeof ($tAliasDomains) > 0) { print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; for ($i = 0; $i < sizeof ($tAliasDomains); $i++) { print " \n"; print " \n"; print " \n"; $active = ($tAliasDomains[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " \n"; print " \n"; print " \n"; } } if(is_array($tTargetDomain)) { print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; $active = ($tTargetDomain['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " \n"; print " \n"; print " \n"; } print "

" . $PALANG['pOverview_alias_domain_title'] . "

" . sprintf($PALANG['pOverview_alias_domain_aliases'], $fDomain) . "" . $PALANG['pOverview_alias_domain_modified'] . "" . $PALANG['pOverview_alias_domain_active'] . " 
" . $tAliasDomains[$i]['alias_domain'] . "" . $tAliasDomains[$i]['modified'] . "" . $active . "" . $PALANG['del'] . "
" . sprintf($PALANG['pOverview_alias_domain_target'], $fDomain) . "" . $PALANG['pOverview_alias_domain_modified'] . "" . $PALANG['pOverview_alias_domain_active'] . " 
" . $tTargetDomain['target_domain'] . "" . $tTargetDomain['modified'] . "" . $active . "" . $PALANG['del'] . "
\n"; } # XXX: the above block misses one intention level if (!is_array($tTargetDomain)) { # TODO: don't print create link if no domains are left for aliasing print "

" . $PALANG['pMenu_create_alias_domain'] . "\n"; } } if (sizeof ($tAlias) > 0) { print "\n"; print " \n"; print " "; print " "; print " \n"; if ($CONF['show_status'] == 'YES') { print "\n"; } print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; for ($i = 0; $i < sizeof ($tAlias); $i++) { if ((is_array ($tAlias) and sizeof ($tAlias) > 0)) { print " \n"; if ($CONF['show_status'] == 'YES') { print " \n"; } print " \n"; if ($CONF['alias_goto_limit'] > 0) { print " \n"; } else { print " \n"; } print " \n"; # TODO: merge superadmin / domain admin code if (authentication_has_role('global-admin')) { # superadmin code $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " \n"; print " \n"; print " \n"; } else { # domain admin code if ($CONF['special_alias_control'] == 'YES') { $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " \n"; print " \n"; print " \n"; } else { if ( check_alias_owner ($SESSID_USERNAME, $tAlias[$i]['address'])) { $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " \n"; print " \n"; print " \n"; } else { //this is a special alias, show status only, don't allow changes $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " \n"; print " \n"; print " \n"; } } # end diff } print " \n"; } } print "

" . $PALANG['pOverview_alias_title'] . "

" . $PALANG['pOverview_alias_address'] . "" . $PALANG['pOverview_alias_goto'] . "" . $PALANG['pOverview_alias_modified'] . "" . $PALANG['pOverview_alias_active'] . " 
" . gen_show_status($tAlias[$i]['address']) . "" . $tAlias[$i]['address'] . "" . ereg_replace ( ",", "
", preg_replace( '/^(([^,]+,){'.$CONF['alias_goto_limit'].'})[^,]+,.*/', '$1' . sprintf( $PALANG['and_x_more'], (substr_count ($tAlias[$i]['goto'], ',') - $CONF['alias_goto_limit'] + 1) ), $tAlias[$i]['goto'] ) ) . "
" . ereg_replace (",", "
", $tAlias[$i]['goto']) . "
" . $tAlias[$i]['modified'] . "" . $active . "" . $PALANG['edit'] . "" . $PALANG['del'] . "" . $active . "" . $PALANG['edit'] . "" . $PALANG['del'] . "" . $active . "" . $PALANG['edit'] . "" . $PALANG['del'] . "" . $active . "  
\n"; } if($tCanAddAlias) { print "

" . $PALANG['pMenu_create_alias'] . "\n"; } if (sizeof ($tMailbox) > 0) { print "

\n
"; if ( $limit['mbox_pgindex_count'] ) print "".$PALANG['pOverview_mailbox_title']."  "; ($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; for ($i = 0; $i < $limit['mbox_pgindex_count']; $i++) { if ( $i == $highlight_at ) { print "" . $limit['mbox_pgindex'][$i] . "\n"; } else { print "" . $limit['mbox_pgindex'][$i] . "\n"; } } print ""; if ($tDisplay_back_show == 1) { print "\""\n"; } if ($tDisplay_up_show == 1) { print "\""\n"; } if ($tDisplay_next_show == 1) { print "\""\n"; } print "
\n"; $colspan=8; if ($CONF['vacation_control_admin'] == 'YES') $colspan=$colspan+1; if ($CONF['alias_control_admin'] == 'YES') $colspan=$colspan+1; print "\n"; print " \n"; print " "; print " "; print " \n"; if ($CONF['show_status'] == 'YES') { print "\n"; } print " \n"; print " \n"; if ($CONF['quota'] == 'YES') print " \n"; print " \n"; print " \n"; $colspan = $colspan - 6; print " \n"; print " \n"; for ($i = 0; $i < sizeof ($tMailbox); $i++) { if ((is_array ($tMailbox) and sizeof ($tMailbox) > 0)) { print " \n"; if ($CONF['show_status'] == 'YES') { print " \n"; } print " \n"; print " \n"; if ($CONF['quota'] == 'YES') { print " \n"; } print " \n"; $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " \n"; if ($CONF['vacation_control_admin'] == 'YES' && $CONF['vacation'] == 'YES') { $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 "\n"; } else { // can't tell vacation state - broken pgsql query echo "\n"; } } $edit_aliases=0; if ( (! authentication_has_role('global-admin')) && $CONF['alias_control_admin'] == 'YES') $edit_aliases = 1; if ( authentication_has_role('global-admin') && $CONF['alias_control'] == 'YES') $edit_aliases = 1; if ($edit_aliases == 1) { print " \n"; } print " \n"; print " \n"; print " \n"; } } print "

" . $PALANG['pOverview_mailbox_title'] . "

" . $PALANG['pOverview_mailbox_username'] . "" . $PALANG['pOverview_mailbox_name'] . "" . $PALANG['pOverview_mailbox_quota'] . "" . $PALANG['pOverview_mailbox_modified'] . "" . $PALANG['pOverview_mailbox_active'] . " 
" . gen_show_status($tMailbox[$i]['username']) . "" . $tMailbox[$i]['username'] . "" . $tMailbox[$i]['name'] . ""; if ($tMailbox[$i]['quota'] == 0) { print $PALANG['pOverview_unlimited']; } elseif ($tMailbox[$i]['quota'] < 0) { print $PALANG['pOverview_disabled']; } else { if (boolconf('used_quotas') == 'YES') print divide_quota ($tMailbox[$i]['current']).'/'; print divide_quota ($tMailbox[$i]['quota']); } print "" . $tMailbox[$i]['modified'] . "" . $active . "" . $v_active . "   " . $PALANG['pOverview_alias_edit'] . "" . $PALANG['edit'] . "" . $PALANG['del'] . "
\n"; print "
\n"; if ($tDisplay_back_show == 1) { print "\""\n"; } if ($tDisplay_up_show == 1) { print "\""\n"; } if ($tDisplay_next_show == 1) { print "\""\n"; } print "
\n"; } if($tCanAddMailbox) { print "

" . $PALANG['pMenu_create_mailbox'] . "\n"; } if ($CONF['show_status'] == 'YES' && $CONF['show_status_key'] == 'YES') { print "

"; if ($CONF['show_undeliverable'] == 'YES') { print " " . $CONF['show_status_text'] . "=" . $PALANG['pStatus_undeliverable'] . "\n"; } if ($CONF['show_popimap'] == 'YES') { print " " . $CONF['show_status_text'] . "=" . $PALANG['pStatus_popimap'] . "\n"; } if ( count($CONF['show_custom_domains']) > 0 ) { for ($i = 0; $i < sizeof ($CONF['show_custom_domains']); $i++) { print " " . $CONF['show_status_text'] . "=" . $PALANG['pStatus_custom'] . $CONF['show_custom_domains'][$i] . "\n"; } } } /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>