function menu()
 {
     if (plugin_config_get('show_menu')) {
         require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'wmApi.php';
         $projectId = helper_get_current_project();
         $userId = auth_get_current_user_id();
         $userAccessLevel = user_get_access_level($userId, $projectId);
         $whiteboardPlugins = wmApi::getWhiteboardPlugins();
         $showMenu = false;
         foreach ($whiteboardPlugins as $whiteboardPlugin) {
             $pluginAccessLevel = $whiteboardPlugin[2];
             if (user_is_administrator($userId) || $userAccessLevel >= $pluginAccessLevel) {
                 $showMenu = true;
                 break;
             }
         }
         if ($showMenu) {
             return '<a href="' . plugin_page('whiteboard_menu') . '">' . plugin_lang_get('menu_title') . '</a>';
         }
     }
     return null;
 }
html_page_top2();
print_manage_menu();
echo '<br/>';
echo '<form action="' . plugin_page('config_update') . '" method="post">';
echo form_security_field('plugin_WhiteboardMenu_config_update');
if (substr(MANTIS_VERSION, 0, 4) == '1.2.') {
    echo '<table align="center" class="width50" cellspacing="1">';
} else {
    echo '<div class="form-container">';
    echo '<table>';
}
wmApi::printFormTitle('config_caption');
wmApi::printTableRow();
wmApi::printCategoryField('config_show_footer');
wmApi::printRadioButton('show_in_footer');
echo '</tr>';
wmApi::printTableRow();
wmApi::printCategoryField('config_show_menu');
wmApi::printRadioButton('show_menu');
echo '</tr>';
echo '<tr>';
echo '<td class="center" colspan="3">';
echo '<input type="submit" name="change" class="button" value="' . lang_get('update_prefs_button') . '"/>';
echo '</td>';
echo '</tr>';
echo '</table>';
if (substr(MANTIS_VERSION, 0, 4) != '1.2.') {
    echo '</div>';
}
echo '</form>';
html_page_bottom1();
<?php

require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'wmApi.php';
echo '<link rel="stylesheet" href="plugins/WhiteboardMenu/files/whiteboardmenu.css"/>';
html_page_top1(plugin_lang_get('menu_title'));
html_page_top2();
wmApi::printWhiteboardMenu();
html_page_bottom1();
<?php

require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'wmApi.php';
auth_reauthenticate();
access_ensure_global_level(config_get('AccessLevel'));
form_security_validate('plugin_WhiteboardMenu_config_update');
wmApi::updateButton('show_in_footer');
wmApi::updateButton('show_menu');
form_security_purge('plugin_WhiteboardMenu_config_update');
print_successful_redirect(plugin_page('config_page', true));