Exemple #1
0
function mail_utilities_display_menubar($color)
{
    global $mail_utilities_hook;
    if (!mail_utilities_has_menu_plugins()) {
        return;
    }
    if (count($mail_utilities_hook['util_menu']) > 1) {
        ksort($mail_utilities_hook['util_menu']);
    }
    echo '<p><TABLE BORDER=0 WIDTH="95%" CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD>' . "\n";
    displayInternalLink('plugins/mail_utilities/utils.php', _("<b>Utilities:</b>"));
    echo '&nbsp;&nbsp; ';
    foreach ($mail_utilities_hook['util_menu'] as $function) {
        if (function_exists($function)) {
            $function($color);
        }
    }
    echo "\n</TD></TR></TABLE></p>\n";
}
Exemple #2
0
/**
 ** utils.php
 **
 **  Copyright (c) 2002 The SquirrelMail development team
 **  Licensed under the GNU GPL. For full terms see the file COPYING.
 **
 ** See the README file for details.
 **  $Id$
 **/
define('SM_PATH', '../../');
require_once SM_PATH . 'include/validate.php';
require_once SM_PATH . 'functions/page_header.php';
require_once SM_PATH . 'plugins/mail_utilities/functions.php';
displayPageHeader($color, 'None');
if (mail_utilities_has_menu_plugins()) {
    mail_utilities_display_menubar($color);
    if (mail_utilities_has_shortcuts()) {
        global $mail_utilities_hook;
        foreach ($mail_utilities_hook['util_body'] as $function) {
            echo '<P><TABLE WIDTH=95% COLS=1 ALIGN=CENTER>' . "\n";
            if (function_exists($function)) {
                echo '<TR>' . "<TD BGCOLOR=\"{$color['0']}\" ALIGN=CENTER><b>" . _($mail_utilities_hook['util_body_title'][$function]) . '</b></TD></TR>' . "\n" . '<TR><TD>';
                $function($color);
                echo '</TD></TR>' . "\n";
            }
            echo '</TABLE></P>' . "\n";
        }
    } else {
        echo '<P>There are no Utilities defined which supply shortcuts.' . ' Please select a utility from the above list.';
    }