Example #1
0
    echo plugin_lang_get('mbstring_unavailable');
    ?>
	</td>
</tr>

</table>
<br />
<?php 
} elseif ($t_results_utf_test = test_database_utf8()) {
    ?>
<table align="center" class="width50" cellspacing="1">

<tr>
	<td class="left">
<?php 
    echo plugin_lang_get('db_utf8_issue') . '<br /><a href="' . helper_mantis_url('admin/check.php') . '">MantisBT Administration - Check Installation</a>';
    ?>
	</td>
</tr>
<tr>
	<td class="left">
<?php 
    echo $t_results_utf_test;
    ?>
	</td>
</tr>

</table>
<br />
<?php 
}
	<td class="category" width="15%">
		<?php 
    echo lang_get('monitoring_user_list');
    ?>
	</td>
	<td>
<?php 
    if (0 == $num_users) {
        echo lang_get('no_users_monitoring_bug');
    } else {
        $t_can_delete_others = access_has_bug_level(config_get('monitor_delete_others_bug_threshold'), $f_bug_id);
        for ($i = 0; $i < $num_users; $i++) {
            echo $i > 0 ? ', ' : '';
            echo print_user($t_users[$i]);
            if ($t_can_delete_others) {
                echo ' [<a class="small" href="' . helper_mantis_url('bug_monitor_delete.php') . '?bug_id=' . $f_bug_id . '&user_id=' . $t_users[$i] . form_security_param('bug_monitor_delete') . '">' . lang_get('delete_link') . '</a>]';
            }
        }
    }
    if (access_has_bug_level(config_get('monitor_add_others_bug_threshold'), $f_bug_id)) {
        echo '<br /><br />', lang_get('username');
        ?>
		<form method="get" action="bug_monitor_add.php">
		<?php 
        echo form_security_field('bug_monitor_add');
        ?>
			<input type="hidden" name="bug_id" value="<?php 
        echo (int) $f_bug_id;
        ?>
" />
			<input type="text" name="username" />
Example #3
0
/**
 * Get the URL to the plugin wrapper page.
 * @param string Page name
 * @param string Plugin basename (defaults to current plugin)
 */
function plugin_file($p_file, $p_redirect = false, $p_basename = null)
{
    if (is_null($p_basename)) {
        $t_current = plugin_get_current();
    } else {
        $t_current = $p_basename;
    }
    if ($p_redirect) {
        return 'plugin_file.php?file=' . $t_current . '/' . $p_file;
    } else {
        return helper_mantis_url('plugin_file.php?file=' . $t_current . '/' . $p_file);
    }
}
Example #4
0
#######
auth_reauthenticate();
html_page_top1(lang_get('plugin_mite_title'));
html_page_top2();
# build config arrays for convenient access to necessary elements
#################################################################
$a_configParams['api_key'] = array('name' => Mantis2mitePlugin::DB_FIELD_API_KEY, 'value' => current_user_get_field(Mantis2mitePlugin::DB_FIELD_API_KEY), 'label' => lang_get('plugin_mite_api_key'), 'type' => 'text', 'readonly' => '', 'cssClass' => '', 'help' => '');
if ($a_configParams['api_key']['value']) {
    $a_configParams['api_key']['value'] = Mantis2mitePlugin::decodeValue($a_configParams['api_key']['value']);
}
$a_configParams['account_name'] = array('name' => Mantis2mitePlugin::DB_FIELD_ACCOUNT_NAME, 'value' => current_user_get_field(Mantis2mitePlugin::DB_FIELD_ACCOUNT_NAME), 'label' => lang_get('plugin_mite_account_name'), 'type' => 'text', 'readonly' => '', 'cssClass' => '', 'help' => '');
if ($a_configParams['account_name']['value']) {
    $a_configParams['account_name']['value'] = Mantis2mitePlugin::decodeValue($a_configParams['account_name']['value']);
}
# get the path to this plugin
$s_pluginDirPath = helper_mantis_url("plugins/" . plugin_get_current() . "/");
# get connection status
$b_miteConnectionVerified = current_user_get_field(Mantis2mitePlugin::DB_FIELD_CONNECT_VERIFIED);
# add options if the connection was verified
############################################
if ($b_miteConnectionVerified) {
    $s_miteConnectionStatus = sprintf(lang_get('plugin_mite_connection_verified'), current_user_get_field(Mantis2mitePlugin::DB_FIELD_CONNECT_LAST_UPDATED));
    $s_connectionStatusCssClass = 'plugin_mite_positive_connection_status';
    $a_configParams['account_name']['readonly'] = $a_configParams['api_key']['readonly'] = " readonly='readonly'";
    $a_configParams['account_name']['cssClass'] = $a_configParams['api_key']['cssClass'] = " class='readonly'";
    $a_configParams['api_key']['type'] = "password";
    $b_visibleBtnUnbindConnection = $b_visibleLinkChangeApiKey = $b_visibleLinkChangeAccountName = true;
    $s_bgUserAccountDataCssClass = 'mite_user_account_active';
} else {
    $s_miteConnectionStatus = lang_get('plugin_mite_connection_unverified');
    $s_connectionStatusCssClass = 'plugin_mite_negative_connection_status';
Example #5
0
/**
 * Print the menu for the summary section
 * @param string $p_page specifies the current page name so it's link can be disabled
 * @return null
 */
function print_summary_menu($p_page = '')
{
    # Plugin / Event added options
    $t_event_menu_options = event_signal('EVENT_MENU_SUMMARY');
    $t_menu_options = array();
    foreach ($t_event_menu_options as $t_plugin => $t_plugin_menu_options) {
        foreach ($t_plugin_menu_options as $t_callback => $t_callback_menu_options) {
            if (is_array($t_callback_menu_options)) {
                $t_menu_options = array_merge($t_menu_options, $t_callback_menu_options);
            } else {
                if (!is_null($t_callback_menu_options)) {
                    $t_menu_options[] = $t_callback_menu_options;
                }
            }
        }
    }
    $t_pages['print_all_bug_page.php'] = array('url' => 'print_all_bug_page.php', 'label' => 'print_all_bug_page_link');
    $t_pages['summary_page.php'] = array('url' => 'summary_page.php', 'label' => 'summary_link');
    # Remove the link from the current page
    if (isset($t_pages[$p_page])) {
        $t_pages[$p_page]['url'] = '';
    }
    echo '<div id="summary-menu">';
    echo '<ul class="menu">';
    foreach ($t_pages as $t_page) {
        if ($t_page['url'] == '') {
            echo '<li>', lang_get($t_page['label']), '</li>';
        } else {
            echo '<li><a href="' . helper_mantis_url($t_page['url']) . '">' . lang_get($t_page['label']) . '</a></li>';
        }
    }
    // Plugins menu items - these are cooked links
    foreach ($t_menu_options as $t_menu_item) {
        echo '<li>', $t_menu_item, '</li>';
    }
    echo '</ul>';
    echo '</div>';
}
Example #6
0
/**
 * return an href anchor that links to a bug REPORT page for the given bug
 * account for the user preference and site override
 * @param integer $p_user_id A valid user identifier.
 * @return string
 */
function string_get_bug_report_link($p_user_id = null)
{
    return '<a href="' . helper_mantis_url(string_get_bug_report_url($p_user_id)) . '">' . lang_get('report_bug_link') . '</a>';
}
 function get_manage_menu()
 {
     $t_manage_user_page = 'manage_user_page.php';
     $t_manage_project_menu_page = 'manage_proj_page.php';
     $t_manage_custom_field_page = 'manage_custom_field_page.php';
     $t_manage_plugin_page = 'manage_plugin_page.php';
     $t_manage_config_page = 'adm_config_report.php';
     $t_manage_prof_menu_page = 'manage_prof_menu_page.php';
     $t_manage_tags_page = 'manage_tags_page.php';
     $icon = '<i class="icon-chevron-right"></i>';
     $t_menu_options = array();
     if (access_has_global_level(config_get('manage_user_threshold'))) {
         $t_menu_options[] = '<a href="' . helper_mantis_url($t_manage_user_page) . '">' . $icon . ' ' . lang_get('manage_users_link') . '</a>';
     }
     if (access_has_project_level(config_get('manage_project_threshold'))) {
         $t_menu_options[] = '<a href="' . helper_mantis_url($t_manage_project_menu_page) . '">' . $icon . ' ' . lang_get('manage_projects_link') . '</a>';
     }
     if (access_has_global_level(config_get('tag_edit_threshold'))) {
         $t_menu_options[] = '<a href="' . helper_mantis_url($t_manage_tags_page) . '">' . $icon . ' ' . lang_get('manage_tags_link') . '</a>';
     }
     if (access_has_global_level(config_get('manage_custom_fields_threshold'))) {
         $t_menu_options[] = '<a href="' . helper_mantis_url($t_manage_custom_field_page) . '">' . $icon . ' ' . lang_get('manage_custom_field_link') . '</a>';
     }
     if (access_has_global_level(config_get('manage_global_profile_threshold'))) {
         $t_menu_options[] = '<a href="' . helper_mantis_url($t_manage_prof_menu_page) . '">' . $icon . ' ' . lang_get('manage_global_profiles_link') . '</a>';
     }
     if (access_has_global_level(config_get('manage_plugin_threshold'))) {
         $t_menu_options[] = '<a href="' . helper_mantis_url($t_manage_plugin_page) . '">' . $icon . ' ' . lang_get('manage_plugin_link') . '</a>';
     }
     if (access_has_project_level(config_get('view_configuration_threshold'))) {
         $t_menu_options[] = '<a href="' . helper_mantis_url($t_manage_config_page) . '">' . $icon . ' ' . lang_get('manage_config_link') . '</a>';
     }
     # Plugin / Event added options
     $t_event_menu_options = event_signal('EVENT_MENU_MANAGE');
     if ($t_menu_options) {
         foreach ($t_event_menu_options as $t_plugin => $t_plugin_menu_options) {
             foreach ($t_plugin_menu_options as $t_callback => $t_callback_menu_options) {
                 if (is_array($t_callback_menu_options)) {
                     $t_menu_options = array_merge($t_menu_options, $t_callback_menu_options);
                 } else {
                     if (!is_null($t_callback_menu_options)) {
                         $t_menu_options[] = $t_callback_menu_options;
                     }
                 }
             }
         }
         // Plugins menu items
         /*            foreach( $t_menu_options as $t_menu_item ) {
                         print_bracket_link_prepared( $t_menu_item );
                     }*/
     }
     return $t_menu_options;
 }
Example #8
0
html_robots_noindex();
html_page_top1(plugin_lang_get('kanban_link'));
html_page_top2();
print_recently_visited();
$f_page_number = gpc_get_int('page_number', 1);
$t_per_page = config_get('my_view_bug_count');
$t_bug_count = null;
$t_page_count = null;
$t_boxes = config_get('my_view_boxes');
asort($t_boxes);
reset($t_boxes);
$t_project_id = helper_get_current_project();
$t_icon_path = config_get('icon_path');
?>
<link rel="stylesheet" type="text/css" href="<?php 
echo helper_mantis_url('plugins/MantisKanban/files/kanban.css');
?>
"/>
<div id="kanbanPage">

<table class="hide kanbanTable" border="0" cellspacing="0" cellpadding="0" style="width: <?php 
echo count($columns) * 250;
?>
px">
    <tr>
        <td colspan="<?php 
echo count($columns) - 2;
?>
">
            <?php 
echo lang_get('sort');
Example #9
0
</tr>

<?php 
}
?>

<?php 
if ($t_can_update) {
    ?>
<tr>
<td class="center" colspan="<?php 
    echo $t_columns;
    ?>
">
<form action="<?php 
    echo helper_mantis_url('plugin.php');
    ?>
" method="get">
<input type="hidden" name="page" value="Source/edit_page"/>
<input type="hidden" name="id" value="<?php 
    echo $t_changeset->id;
    ?>
"/>
<input type="submit" value="<?php 
    echo plugin_lang_get('edit');
    ?>
"/>
</form>
</td>
</tr>
<?php 
Example #10
0
 * This upgrade moves attachments from the database to the disk
 *
 * @package MantisBT
 * @copyright Copyright 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
 * @copyright Copyright 2002  MantisBT Team - mantisbt-dev@lists.sourceforge.net
 * @link http://www.mantisbt.org
 */
/**
 * MantisBT Core API's
 */
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'core.php';
access_ensure_global_level(config_get_global('admin_site_threshold'));
# Page header, menu
html_page_top('MantisBT Administration - Moving Attachments');
echo '<div align="center"><p>';
print_bracket_link(helper_mantis_url('admin/system_utils.php'), 'Back to System Utilities');
echo '</p></div>';
# File type should be 'bug' (default) or 'project'
$f_file_type = gpc_get('type', 'bug');
$t_bug_table = db_get_table('mantis_bug_table');
$t_project_table = db_get_table('mantis_project_table');
switch ($f_file_type) {
    case 'project':
        $t_type = 'Project Files';
        $t_file_table = db_get_table('mantis_project_file_table');
        $t_query = "SELECT p.id, p.name, COUNT(f.id) disk\n\t\t\tFROM {$t_file_table} f\n\t\t\tLEFT JOIN {$t_project_table} p ON p.id = f.project_id\n\t\t\tWHERE content <> ''\n\t\t\tGROUP BY p.id, p.name\n\t\t\tORDER BY p.name";
        break;
    case 'bug':
    default:
        $t_type = 'Attachments';
        $t_file_table = db_get_table('mantis_bug_file_table');
Example #11
0
    function beforeMenu($p_event)
    {
        if (plugin_config_get('headerHeight') != '2') {
            return;
        }
        $favicon = helper_mantis_url(config_get('favicon_image'));
        $companyName = plugin_config_get('companyName');
        $imgdata = plugin_config_get('companyTinyLogo');
        ?>
	    <span  class="tinyheader">
		<a href="<?php 
        echo helper_mantis_url('my_view_page.php');
        ?>
">
			<img src="<?php 
        echo $favicon;
        ?>
"/>
		</a>
		
	    </span>
		<?php 
        if (plugin_config_get('showCompanyLogo')) {
            ?>
			<span class="tinyheader-right">
				<a href="<?php 
            echo plugin_config_get('companyUrl');
            ?>
" title="<?php 
            echo plugin_config_get('companyName');
            ?>
" target="_blank">
					<img src="<?php 
            echo $imgdata;
            ?>
" alt="<?php 
            echo plugin_config_get('companyName');
            ?>
"/>
				</a>
			</span>
		<?php 
        }
    }
 * MantisBT Core API's
 */
require_once 'core.php';
require_once 'Period.php';
access_ensure_project_level(config_get('view_summary_threshold'));
$f_interval = gpc_get_int('interval', 0);
$t_today = date('Y-m-d');
$f_type = gpc_get_int('graph_type', 0);
$f_show_as_table = gpc_get_bool('show_table', FALSE);
html_page_top1(plugin_lang_get('graph_page'));
$t_path = config_get('path');
// follows the convention in html_api::html_javascript_link
if (config_get_global('minimal_jscss')) {
    echo '<link rel="stylesheet" type="text/css" href="', helper_mantis_url('javascript/min/jscalendar/calendar-blue.css'), '">' . "\n";
} else {
    echo '<link rel="stylesheet" type="text/css" href="', helper_mantis_url('javascript/dev/jscalendar/calendar-blue.css'), '">' . "\n";
}
html_javascript_link('jscalendar/calendar.js');
html_javascript_link('jscalendar/lang/calendar-en.js');
html_javascript_link('jscalendar/calendar-setup.js');
html_page_top2();
$t_period = new Period();
$t_period->set_period_from_selector('interval');
$t_types = array(0 => plugin_lang_get('select'), 2 => plugin_lang_get('select_bystatus'), 3 => plugin_lang_get('select_summbystatus'), 4 => plugin_lang_get('select_bycat'), 6 => plugin_lang_get('select_both'));
$t_show = array(0 => plugin_lang_get('show_as_graph'), 1 => plugin_lang_get('show_as_table'));
?>
	<form name="graph_form" method="post" action="<?php 
echo plugin_page('bug_graph_page.php');
?>
">
	<table class="width100" cellspacing="1">
Example #13
0
 public function addTimeEntryRow_bugDetail($c_eventName, $i_bugId)
 {
     # don't add the time entry row, if
     # - the user can't see time entries of others AND
     # - has no verified connection to a MITE account
     # if the user has no verified connection to a MITE account but
     # is able to see time entries of other users, he should see them
     ##################################################
     if (current_user_get_field('access_level') < plugin_config_get('mite_timetracks_visible_threshold_level') && !current_user_get_field(Mantis2mitePlugin::DB_FIELD_CONNECT_VERIFIED)) {
         return;
     }
     /*
      * @local
      */
     $s_output = "\n  \t\t\t<tr " . helper_alternate_class() . ">\n\t  \t\t\t<td class='category'>\n\t  \t\t<!-- NO SCRIPT MESSAGE -->\t\n\t  \t\t\t<noscript>\n\t  \t\t\t\t<div class='plugin_mite_text_if_no_javascript'>" . lang_get('plugin_mite_no_javascript_enabled') . "\n  \t\t\t\t\t</div>\n  \t\t\t\t</noscript>\n\t  \t\t\t<div class='plugin_mite_hide_if_no_javascript'>" . lang_get('plugin_mite_time_entries') . "\n  \t\t\t\t\t<span class='plugin_mite_link_to_settings'>\n  \t\t\t\t\t\t[ <a href='" . helper_mantis_url("plugin.php?page=" . plugin_get_current() . "/user_account") . "'>" . lang_get('plugin_mite_link_to_settings') . "</a> ]\n  \t\t\t\t\t</span>\n  \t\t\t\t</div><!-- plugin_mite_text_hide_if_no_javascript -->\t\n  \t\t\t\t</td>\n\t  \t\t\t<td colspan='5' class='plugin_mite_time_entries'>\n\t  \t\t\t<div class='plugin_mite_hide_if_no_javascript'>";
     if (current_user_get_field(Mantis2mitePlugin::DB_FIELD_CONNECT_VERIFIED)) {
         $s_output .= "\t\t\n  \t\t\t\t\t<form id='plugin_mite_frm_new_time_entry'>\n  \t\t\t\t\t\t<div id='plugin_mite_show_new_time_entry_form'>\n\t  \t\t\t\t\t\t<a name='addTimeEntry' href='#addTimeEntry' title='[ctrl-t]' accesskey='t' class='addTimeEntry'>" . lang_get('plugin_mite_show_new_time_entry_form') . "\t\n\t  \t\t\t\t\t\t</a>\n\t  \t\t\t\t\t</div>\n  \t\t\t\t\t\t<div id='plugin_mite_new_time_entry'>\n\t  \t\t\t\t\t</div><!-- plugin_mite_new_time_entry -->\n\t  \t\t\t\t\t<input type='hidden' name='plugin_mite_current_bug' value='" . $i_bugId . "' />\n  \t\t\t\t\t\t<input type='hidden' name='plugin_mite_current_project' \n  \t\t\t\t\t\t   \t   value='" . bug_get_field($i_bugId, 'project_id') . "' />\n  \t\t\t\t\t</form>";
     }
     $s_output .= "\n\t  \t\t<div id='plugin_mite_time_entries'></div>\n\t\n  \t\t\t<input type='hidden' id='plugin_mite_current_bug' value='" . $i_bugId . "' />\n\t  \t\t<input type='hidden' id='plugin_mite_current_project' \n\t  \t\t\t   value='" . bug_get_field($i_bugId, 'project_id') . "' />\n  \t\t\n\t\t\t<div id='plugin_mite_messages'>\n\t\t\t\t<div>\n\t\t\t\t\t<a class='closeBtn' href='#'>" . lang_get('plugin_mite_msg_close_message') . "</a>\n\t\t\t\t\t<p></p>\n\t\t\t\t</div>\n  \t\t\t\t<input type='hidden' \n  \t\t\t\t\t   value='" . helper_mantis_url("plugins/" . plugin_get_current() . "/") . "' \n  \t\t\t\t\t   id='plugin_mite_path' />\n  \t\t\t\t<input type='hidden' id='plugin_mite_msg_error_adding_time_entry_fnf' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_msg_error_adding_time_entry_fnf') . "' />\n  \t\t\t\t<input type='hidden' id='plugin_mite_msg_error_adding_time_entry' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_msg_error_adding_time_entry') . "' />\n  \t\t\t\t<input type='hidden' id='plugin_mite_msg_success_adding_time_entry' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_msg_success_adding_time_entry') . "' />\t   \n  \t\t\t\t<input type='hidden' id='plugin_mite_msg_error_loading_time_entries_fnf' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_msg_error_loading_time_entries_fnf') . "' />\n  \t\t\t\t<input type='hidden' id='plugin_mite_msg_missing_time_entry_hours' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_msg_missing_time_entry_hours') . "' />\n  \t\t\t\t<input type='hidden' id='plugin_mite_msg_adding_new_time_entry' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_msg_adding_new_time_entry') . "' />\n\t\t\t\t<input type='hidden' id='plugin_mite_loading_time_entries' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_loading_time_entries') . "' />\n\t\t\t\t<input type='hidden' id='plugin_mite_show_new_time_entry_form' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_show_new_time_entry_form') . "' />\n  \t\t\t\t<input type='hidden' id='plugin_mite_confirm_deleting_time_entry' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_confirm_deleting_time_entry') . "' />\n  \t\t\t\t<input type='hidden' id='plugin_mite_msg_error_deleting_time_entry_fnf' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_msg_error_deleting_time_entry_fnf') . "' />\n  \t\t\t\t<input type='hidden' id='plugin_mite_msg_success_deleting_time_entry' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_msg_success_deleting_time_entry') . "' />\n\t\t\t\t<input type='hidden' id='plugin_mite_msg_error_invalid_date' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_msg_error_invalid_date') . "' />\n  \t\t\t\t<input type='hidden' id='plugin_mite_deleting_time_entry' \n  \t\t\t\t\t   value='" . lang_get('plugin_mite_deleting_time_entry') . "' />  \t\t\t\t\t\t   \n  \t\t\t\t\t   \n  \t\t\t</div><!-- plugin_mite_messages -->\n  \t\t\t</div><!-- plugin_mite_hide_if_no_javascript -->\n  \t\t</td>\n  \t\t</tr>";
     echo $s_output;
 }
Example #14
0
 function summary_submenu()
 {
     $t_icon_path = config_get('icon_path');
     return array('<a href="' . helper_mantis_url('summary_page.php') . '"><img src="' . $t_icon_path . 'synthese.gif" alt="" />' . plugin_lang_get('synthesis_link') . '</a>', '<a href="' . plugin_page('summary_graph_imp_status.php') . '"><img src="' . $t_icon_path . 'synthgraph.gif" alt="" />' . plugin_lang_get('status_link') . '</a>', '<a href="' . plugin_page('summary_graph_imp_priority.php') . '"><img src="' . $t_icon_path . 'synthgraph.gif" alt="" />' . plugin_lang_get('priority_link') . '</a>', '<a href="' . plugin_page('summary_graph_imp_severity.php') . '"><img src="' . $t_icon_path . 'synthgraph.gif" alt="" />' . plugin_lang_get('severity_link') . '</a>', '<a href="' . plugin_page('summary_graph_imp_category.php') . '"><img src="' . $t_icon_path . 'synthgraph.gif" alt="" />' . plugin_lang_get('category_link') . '</a>', '<a href="' . plugin_page('summary_graph_imp_resolution.php') . '"><img src="' . $t_icon_path . 'synthgraph.gif" alt="" />' . plugin_lang_get('resolution_link') . '</a>');
 }
Example #15
0
/**
 * Print the menu for the summary section
 * @param string $p_page specifies the current page name so it's link can be disabled
 * @return null
 */
function print_summary_menu($p_page = '')
{
    echo '<div align="center">';
    print_bracket_link('print_all_bug_page.php', lang_get('print_all_bug_page_link'));
    print_bracket_link(helper_mantis_url('summary_page.php'), lang_get('summary_link'));
    # Plugin / Event added options
    $t_event_menu_options = event_signal('EVENT_MENU_SUMMARY');
    $t_menu_options = array();
    foreach ($t_event_menu_options as $t_plugin => $t_plugin_menu_options) {
        foreach ($t_plugin_menu_options as $t_callback => $t_callback_menu_options) {
            if (is_array($t_callback_menu_options)) {
                $t_menu_options = array_merge($t_menu_options, $t_callback_menu_options);
            } else {
                if (!is_null($t_callback_menu_options)) {
                    $t_menu_options[] = $t_callback_menu_options;
                }
            }
        }
    }
    // Plugins menu items
    // TODO: this would be a call to print_pracket_link but the events returns cooked links so we cant
    foreach ($t_menu_options as $t_menu_item) {
        echo '<span class="bracket-link">[&#160;';
        echo $t_menu_item;
        echo '&#160;]</span> ';
    }
    echo '</div>';
}
Example #16
0
/**
 * Function to be called when a user is attempting to access a page that
 * he/she is not authorised to.  This outputs an access denied message then
 * re-directs to the mainpage.
 */
function access_denied()
{
    if (!auth_is_user_authenticated()) {
        if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
            $t_return_page = $_SERVER['SCRIPT_NAME'];
            if (isset($_SERVER['QUERY_STRING'])) {
                $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
            }
            $t_return_page = string_url(string_sanitize_url($t_return_page));
            print_header_redirect('login_page.php' . '?return=' . $t_return_page);
        }
    } else {
        if (current_user_is_anonymous()) {
            if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
                $t_return_page = $_SERVER['SCRIPT_NAME'];
                if (isset($_SERVER['QUERY_STRING'])) {
                    $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
                }
                $t_return_page = string_url(string_sanitize_url($t_return_page));
                echo '<p class="center">' . error_string(ERROR_ACCESS_DENIED) . '</p><p class="center">';
                print_bracket_link(helper_mantis_url('login_page.php') . '?return=' . $t_return_page, lang_get('click_to_login'));
                echo '</p><p class="center">';
                print_bracket_link(helper_mantis_url('main_page.php'), lang_get('proceed'));
                echo '</p>';
            }
        } else {
            echo '<p class="center">' . error_string(ERROR_ACCESS_DENIED) . '</p>';
            echo '<p class="center">';
            print_bracket_link(helper_mantis_url('main_page.php'), lang_get('proceed'));
            echo '</p>';
        }
    }
    exit;
}
Example #17
0
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
html_page_top(plugin_lang_get('plugin_title'));
print_manage_menu();
plugin_require_api('core/config_api.php');
$t_this_page = 'manage_config';
ERP_print_menu($t_this_page);
?>

<br />
<table align="center" class="width75" cellspacing="1">

<tr>
	<td class="left">
<?php 
$t_link1 = helper_mantis_url('plugins/' . plugin_get_current() . '/scripts/bug_report_mail.php');
$t_link2 = plugin_page('bug_report_mail');
echo plugin_lang_get('jobsetup') . '<hr />' . '<ol><li><a href="' . $t_link1 . '">' . $t_link1 . '</a></li>' . '<li><a href="' . $t_link2 . '">' . $t_link2 . '</a></li></ol>';
?>
	</td>
</tr>

</table>
<br />

<?php 
if (!extension_loaded('mbstring')) {
    ?>
<table align="center" class="width50" cellspacing="1">

<tr>