*/ /** * MantisBT Core API's */ require_once 'core.php'; form_security_validate('account_delete'); auth_ensure_user_authenticated(); current_user_ensure_unprotected(); # Only allow users to delete their own accounts if allow_account_delete = ON or # the user has permission to manage user accounts. if (OFF == config_get('allow_account_delete') && !access_has_global_level(config_get('manage_user_threshold'))) { print_header_redirect('account_page.php'); } # check that we are not deleting the last administrator account $t_admin_threshold = config_get_global('admin_site_threshold'); if (current_user_is_administrator() && user_count_level($t_admin_threshold) <= 1) { trigger_error(ERROR_USER_CHANGE_LAST_ADMIN, ERROR); } helper_ensure_confirmed(lang_get('confirm_delete_msg'), lang_get('delete_account_button')); form_security_purge('account_delete'); $t_user_id = auth_get_current_user_id(); auth_logout(); user_delete($t_user_id); html_page_top1(); html_page_top2a(); ?> <br /> <div align="center"> <?php echo lang_get('account_removed_msg') . '<br />';
?> " /> <input type="hidden" name="manage_page" value="<?php echo $t_manage_page; ?> " /> <select name="other_project_id"> <?php print_project_option_list(null, true, $t_project_id); ?> </select> <?php # Skip "Copy From" if the current project is ALL PROJECTS, the current page is management page, and the user is not administrator if (!$t_manage_page || $t_project_id != ALL_PROJECTS || current_user_is_administrator()) { ?> <input type="submit" name="copy_from" class="button" value="<?php echo lang_get('copy_columns_from'); ?> " /><?php } ?> <input type="submit" name="copy_to" class="button" value="<?php echo lang_get('copy_columns_to'); ?> " /> </fieldset> </form> </div>
if (lang_exists($p_custom_field_name, lang_get_current())) { $t_str = lang_get($p_custom_field_name); } else { $t_str = plugin_lang_get($p_custom_field_name); } return $t_str; } $t_locale_ranking_order = lang_get_failsave_custom_field('RankingOrder'); $t_locale_presentable = lang_get_failsave_custom_field('Presentable'); $t_locale_technical = lang_get_failsave_custom_field('Technical'); $t_locale_in_release_doku = lang_get_failsave_custom_field('InReleaseDocu'); $t_locale_planned_work = lang_get_failsave_custom_field('PlannedWork'); html_page_top(plugin_lang_get('manage_settings_title')); $disable_combobox_task_unit = ""; # checks if the current user is administrator oder agileMantis administrator if (current_user_is_administrator() || $_SESSION['AGILEMANTIS_ISMANTISADMIN'] == 1) { ?> <br> <?php if ($_GET['error'] == 'workday_error') { $system = plugin_lang_get('manage_settings_error_984100'); } if ($_GET['error'] == 'sprint_length_error') { $system = plugin_lang_get('manage_settings_error_984101'); } if ($_GET['error'] == 'no_license_error') { $system = plugin_lang_get('manage_settings_error_984102'); } if ($_GET['error'] == 'could_not_find_error') { $system = plugin_lang_get('manage_settings_error_984103'); }
require_api('project_api.php'); require_api('project_hierarchy_api.php'); form_security_validate('manage_proj_create'); auth_reauthenticate(); access_ensure_global_level(config_get('create_project_threshold')); $f_name = gpc_get_string('name'); $f_description = gpc_get_string('description'); $f_view_state = gpc_get_int('view_state'); $f_status = gpc_get_int('status'); $f_file_path = gpc_get_string('file_path', ''); $f_inherit_global = gpc_get_bool('inherit_global', 0); $f_inherit_parent = gpc_get_bool('inherit_parent', 0); $f_parent_id = gpc_get_int('parent_id', 0); if (0 != $f_parent_id) { project_ensure_exists($f_parent_id); } $t_project_id = project_create(strip_tags($f_name), $f_description, $f_status, $f_view_state, $f_file_path, true, $f_inherit_global); if ($f_view_state == VS_PRIVATE && false === current_user_is_administrator()) { $t_access_level = access_get_global_level(); $t_current_user_id = auth_get_current_user_id(); project_add_user($t_project_id, $t_current_user_id, $t_access_level); } if (0 != $f_parent_id) { project_hierarchy_add($t_project_id, $f_parent_id, $f_inherit_parent); } event_signal('EVENT_MANAGE_PROJECT_CREATE', array($t_project_id)); form_security_purge('manage_proj_create'); $t_redirect_url = 'manage_proj_page.php'; html_page_top(null, $t_redirect_url); html_operation_successful($t_redirect_url); html_page_bottom();
</span></label> <span class="select"> <select id="project-view-state" name="view_state"> <?php print_enum_string_option_list('view_state', (int) $row['view_state']); ?> </select> </span> <span class="label-style"></span> </div> <?php $g_project_override = $f_project_id; if (file_is_uploading_enabled() && DATABASE !== config_get('file_upload_method')) { $t_file_path = $row['file_path']; # Don't reveal the absolute path to non-administrators for security reasons if (is_blank($t_file_path) && current_user_is_administrator()) { $t_file_path = config_get('absolute_path_default_upload_folder'); } ?> <div class="field-container"> <label for="project-file-path"><span><?php echo lang_get('upload_file_path'); ?> </span></label> <span class="input"><input type="text" id="project-file-path" name="file_path" size="60" maxlength="250" value="<?php echo string_attribute($t_file_path); ?> " /></span> <span class="label-style"></span> </div><?php }
# GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with MantisBT. If not, see <http://www.gnu.org/licenses/>. /** * Check to see if cookies are working * * @package MantisBT * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org * @copyright Copyright (C) 2002 - 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net * @link http://www.mantisbt.org */ /** * MantisBT Core API's */ require_once 'core.php'; if (auth_is_user_authenticated()) { $f_return = gpc_get_string('return'); $c_return = string_prepare_header($f_return); # If this is the first login for an instance, then redirect to create project page. # Use lack of projects as a hint for such scenario. if (is_blank($f_return) || $f_return == 'index.php') { if (current_user_is_administrator() && project_table_empty()) { $c_return = 'manage_proj_create_page.php'; } } $t_redirect_url = $c_return; } else { $t_redirect_url = 'login_page.php?cookie_error=1'; } print_header_redirect($t_redirect_url, true, true);
</tr> <tr> <th class="category"><?php echo lang_get('schema_version'); ?> </th> <td><?php echo config_get('database_version'); ?> </td> </tr> <tr class="spacer"> <td colspan="2"></td> </tr> <?php $t_is_admin = current_user_is_administrator(); if ($t_is_admin) { ?> <tr> <th class="category"><?php echo lang_get('site_path'); ?> </th> <td><?php echo config_get('absolute_path'); ?> </td> </tr> <tr> <th class="category"><?php echo lang_get('core_path');
# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with agileMantis. If not, see <http://www.gnu.org/licenses/>. $commonlib = new gadiv_commonlib(); $user = $commonlib->getAdditionalUserFields(auth_get_current_user_id()); $getPage = explode('/', $_SERVER['REQUEST_URI']); $lai = count($getPage) - 1; if ($user[0]['administrator'] == 1 || current_user_is_administrator()) { # create hover / active effects by requested uri switch ($getPage[$lai]) { case 'config.php': $style_config = 'style="font-weight:bold;"'; break; case 'agileuser.php': $style_user = '******'; break; case 'agileuser.php&filter=' . $_GET['filter']: $style_user = '******'; break; case 'agileuser.php&sort_by=' . $_GET['sort_by']: $style_user = '******'; break; case 'config.php':
private function get_navbar() { $t_protected = current_user_get_field('protected'); $t_current_project = helper_get_current_project(); $t_menu_options = array(); # Plugin / Event added options $t_event_menu_options = event_signal('EVENT_MENU_MAIN_FRONT'); 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; } } } } # Home $page = 'main_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('main_link') . '</a></li>'; # My View $page = 'my_view_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('my_view_link') . '</a></li>'; # View Bugs $page = 'view_all_bug_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('view_bugs_link') . '</a></li>'; # Report Bugs if (access_has_project_level(config_get('report_bug_threshold'))) { $page = 'bug_report_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('report_issue') . '</a></li>'; } # Project Documentation Page if (ON == config_get('enable_project_documentation')) { $page = 'proj_doc_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('docs_link') . '</a></li>'; } # Project Wiki if (config_get_global('wiki_enable') == ON) { $page = 'wiki.php?type=project&id='; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . $t_current_project . '">' . lang_get('wiki') . '</a></li>'; } # Changelog Page if (access_has_project_level(config_get('view_changelog_threshold'))) { $page = 'changelog_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('changelog_link') . '</a></li>'; } # Roadmap Page if (access_has_project_level(config_get('roadmap_view_threshold'))) { $page = 'roadmap_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('roadmap_link') . '</a></li>'; } # Summary Page if (access_has_project_level(config_get('view_summary_threshold'))) { $page = 'summary_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('summary_link') . '</a></li>'; } # News Page if (news_is_enabled() && access_has_project_level(config_get('manage_news_threshold'))) { # Admin can edit news for All Projects (site-wide) if (ALL_PROJECTS != helper_get_current_project() || current_user_is_administrator()) { $page = 'news_menu_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('edit_news_link') . '</a></li>'; } else { $page = 'login_select_proj_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('edit_news_link') . '</a></li>'; } } # Add custom options $t_custom_options = prepare_custom_menu_options('main_menu_custom_options'); $t_menu_options = array_merge($t_menu_options, $t_custom_options); # Time Tracking / Billing if (config_get('time_tracking_enabled') && access_has_global_level(config_get('time_tracking_reporting_threshold'))) { $page = 'billing_page.php'; $class = preg_match('/' . str_replace('.php', '', $page) . '/', $_SERVER['REQUEST_URI']) ? 'class="active"' : NULL; $t_menu_options[] = '<li ' . $class . '><a href="' . helper_mantis_url($page) . '">' . lang_get('time_tracking_billing_link') . '</a></li>'; } # echo '<li>'.implode( $t_menu_options, ' </li> <li> ' ). '</li>'; echo implode($t_menu_options, ''); }
require_api('lang_api.php'); require_api('print_api.php'); require_api('project_api.php'); form_security_validate('manage_config_columns_set'); # @@@ access_ensure_project_level( config_get( 'manage_project_threshold' ) ); $f_project_id = gpc_get_int('project_id'); $f_view_issues_columns = gpc_get_string('view_issues_columns'); $f_print_issues_columns = gpc_get_string('print_issues_columns'); $f_csv_columns = gpc_get_string('csv_columns'); $f_excel_columns = gpc_get_string('excel_columns'); $f_update_columns_for_current_project = gpc_get_bool('update_columns_for_current_project'); $f_update_columns_as_my_default = gpc_get_bool('update_columns_as_my_default'); $f_update_columns_as_global_default = gpc_get_bool('update_columns_as_global_default'); $f_form_page = gpc_get_string('form_page'); # only admins can set global defaults.for ALL_PROJECT if ($f_update_columns_as_global_default && $f_project_id == ALL_PROJECTS && !current_user_is_administrator()) { access_denied(); } # only MANAGERS can set global defaults.for a project if ($f_update_columns_as_global_default && $f_project_id != ALL_PROJECTS) { access_ensure_project_level(MANAGER, $f_project_id); } # user should only be able to set columns for a project that is accessible. if ($f_update_columns_for_current_project && $f_project_id != ALL_PROJECTS) { access_ensure_project_level(VIEWER, $f_project_id); } if ($f_update_columns_as_my_default || $f_update_columns_as_global_default) { $t_project_id = ALL_PROJECTS; } else { $t_project_id = $f_project_id; project_ensure_exists($t_project_id);
</span> </td> <td class="center"> <input type="submit" class="button" value="<?php echo lang_get('post_news_button'); ?> " /> </td> </tr> </table> </form> </div> <?php # Add News Form END # Edit/Delete News Form BEGIN if (news_get_count(helper_get_current_project(), current_user_is_administrator()) > 0) { ?> <br /> <div align="center"> <form method="post" action="news_edit_page.php"> <?php echo form_security_field('news_delete'); ?> <table class="width75" cellspacing="1"> <tr> <td class="form-title" colspan="2"> <?php echo lang_get('edit_or_delete_news_title'); ?> </td> </tr>
/** * check to see that the format is valid and that the mx record exists * @param string $p_email An email address. * @return boolean */ function email_is_valid($p_email) { $t_validate_email = config_get('validate_email'); # if we don't validate then just accept # If blank email is allowed or current user is admin, then accept blank emails which are useful for # accounts that should never receive email notifications (e.g. anonymous account) if (OFF == $t_validate_email || ON == config_get('use_ldap_email') || is_blank($p_email) && (ON == config_get('allow_blank_email') || current_user_is_administrator())) { return true; } # E-mail validation method # Note: PHPMailer offers alternative validation methods. # It was decided in PR 172 (https://github.com/mantisbt/mantisbt/pull/172) # to just default to HTML5 without over-complicating things for end users # by offering a potentially confusing choice between the different methods. # Refer to PHPMailer documentation for ValidateAddress method for details. # @link https://github.com/PHPMailer/PHPMailer/blob/v5.2.9/class.phpmailer.php#L863 $t_method = 'html5'; # check email address is a valid format log_event(LOG_EMAIL_VERBOSE, "Validating address '{$p_email}' with method '{$t_method}'"); if (PHPMailer::ValidateAddress($p_email, $t_method)) { $t_domain = substr($p_email, strpos($p_email, '@') + 1); # see if we're limited to a set of known domains $t_limit_email_domains = config_get('limit_email_domains'); if (!empty($t_limit_email_domains)) { foreach ($t_limit_email_domains as $t_email_domain) { if (0 == strcasecmp($t_email_domain, $t_domain)) { return true; # no need to check mx record details (below) if we've explicity allowed the domain } } log_event(LOG_EMAIL, "failed - not in limited domains list '{$t_limit_email_domains}'"); return false; } if (ON == config_get('check_mx_record')) { $t_mx = ''; # Check for valid mx records if (getmxrr($t_domain, $t_mx)) { return true; } else { $t_host = $t_domain . '.'; # for no mx record... try dns check if (checkdnsrr($t_host, 'ANY')) { return true; } log_event(LOG_EMAIL, "failed - mx/dns record check"); } } else { # Email format was valid but didn't check for valid mx records return true; } } else { log_event(LOG_EMAIL, "failed - invalid address"); } # Everything failed. The email is invalid return false; }
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with agileMantis. If not, see <http://www.gnu.org/licenses/>. html_page_top(plugin_lang_get('info_title')); if (!config_is_set('plugin_agileMantis_gadiv_agilemantis_version')) { config_set('plugin_agileMantis_gadiv_agilemantis_version', 0); } ?> <?php $t_user_right = $agilemantis_au->authUser(); if ($t_user_right == 2 || $t_user_right == 3 || current_user_is_administrator()) { ?> <br> <?php include AGILEMANTIS_PLUGIN_URI . '/pages/footer_menu.php'; ?> <br> <?php echo $system; ?> <div class="table-container"> <table align="center" class="width75" cellspacing="1"> <tr> <td colspan="2"><b><?php echo plugin_lang_get('info_title'); ?>
echo $v_body; ?> </textarea> </td> </tr> <tr class="row-1"> <td class="category"> <?php echo lang_get('post_to'); ?> </td> <td> <select name="project_id"> <?php $t_sitewide = false; if (current_user_is_administrator()) { $t_sitewide = true; } print_project_option_list($v_project_id, $t_sitewide); ?> </select> </td> </tr> <tr class="row-2"> <td class="category"> <?php echo lang_get('announcement'); ?> <br /> <span class="small"><?php echo lang_get('stays_on_top');
/** * Print the main menu * @return null */ function print_menu() { if (auth_is_user_authenticated()) { $t_protected = current_user_get_field('protected'); $t_current_project = helper_get_current_project(); $t_menu_options = array(); # Main Page $t_menu_options[] = '<a href="' . helper_mantis_url('main_page.php') . '">' . lang_get('main_link') . '</a>'; # Plugin / Event added options $t_event_menu_options = event_signal('EVENT_MENU_MAIN_FRONT'); 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; } } } } # My View $t_menu_options[] = '<a href="' . helper_mantis_url('my_view_page.php">') . lang_get('my_view_link') . '</a>'; # View Bugs $t_menu_options[] = '<a href="' . helper_mantis_url('view_all_bug_page.php">') . lang_get('view_bugs_link') . '</a>'; # Report Bugs if (access_has_project_level(config_get('report_bug_threshold'))) { $t_menu_options[] = string_get_bug_report_link(); } # Changelog Page if (access_has_project_level(config_get('view_changelog_threshold'))) { $t_menu_options[] = '<a href="' . helper_mantis_url('changelog_page.php">') . lang_get('changelog_link') . '</a>'; } # Roadmap Page if (access_has_project_level(config_get('roadmap_view_threshold'))) { $t_menu_options[] = '<a href="' . helper_mantis_url('roadmap_page.php">') . lang_get('roadmap_link') . '</a>'; } # Summary Page if (access_has_project_level(config_get('view_summary_threshold'))) { $t_menu_options[] = '<a href="' . helper_mantis_url('summary_page.php">') . lang_get('summary_link') . '</a>'; } # Project Documentation Page if (ON == config_get('enable_project_documentation')) { $t_menu_options[] = '<a href="' . helper_mantis_url('proj_doc_page.php">') . lang_get('docs_link') . '</a>'; } # Project Wiki if (config_get_global('wiki_enable') == ON) { $t_menu_options[] = '<a href="' . helper_mantis_url('wiki.php?type=project&id=') . $t_current_project . '">' . lang_get('wiki') . '</a>'; } # Plugin / Event added options $t_event_menu_options = event_signal('EVENT_MENU_MAIN'); 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; } } } } # Manage Users (admins) or Manage Project (managers) or Manage Custom Fields if (access_has_global_level(config_get('manage_site_threshold'))) { $t_link = helper_mantis_url('manage_overview_page.php'); $t_menu_options[] = '<a class="manage-menu-link" href="' . $t_link . '">' . lang_get('manage_link') . '</a>'; } else { $t_show_access = min(config_get('manage_user_threshold'), config_get('manage_project_threshold'), config_get('manage_custom_fields_threshold')); if (access_has_global_level($t_show_access) || access_has_any_project($t_show_access)) { $t_current_project = helper_get_current_project(); if (access_has_global_level(config_get('manage_user_threshold'))) { $t_link = helper_mantis_url('manage_user_page.php'); } else { if (access_has_project_level(config_get('manage_project_threshold'), $t_current_project) && $t_current_project != ALL_PROJECTS) { $t_link = helper_mantis_url('manage_proj_edit_page.php?project_id=') . $t_current_project; } else { $t_link = helper_mantis_url('manage_proj_page.php'); } } $t_menu_options[] = "<a href=\"{$t_link}\">" . lang_get('manage_link') . '</a>'; } } # News Page if (news_is_enabled() && access_has_project_level(config_get('manage_news_threshold'))) { # Admin can edit news for All Projects (site-wide) if (ALL_PROJECTS != helper_get_current_project() || current_user_is_administrator()) { $t_menu_options[] = '<a href="' . helper_mantis_url('news_menu_page.php">') . lang_get('edit_news_link') . '</a>'; } else { $t_menu_options[] = '<a href="' . helper_mantis_url('login_select_proj_page.php">') . lang_get('edit_news_link') . '</a>'; } } # Account Page (only show accounts that are NOT protected) if (OFF == $t_protected) { $t_menu_options[] = '<a class="account-menu-link" href="' . helper_mantis_url('account_page.php">') . lang_get('account_link') . '</a>'; } # Add custom options $t_custom_options = prepare_custom_menu_options('main_menu_custom_options'); $t_menu_options = array_merge($t_menu_options, $t_custom_options); # Time Tracking / Billing if (config_get('time_tracking_enabled') && access_has_global_level(config_get('time_tracking_reporting_threshold'))) { $t_menu_options[] = '<a href="' . helper_mantis_url('billing_page.php">') . lang_get('time_tracking_billing_link') . '</a>'; } # Logout (no if anonymously logged in) if (!current_user_is_anonymous()) { $t_menu_options[] = '<a id="logout-link" href="' . helper_mantis_url('logout_page.php">') . lang_get('logout_link') . '</a>'; } echo '<form method="post" action="' . helper_mantis_url('jump_to_bug.php" class="bug-jump-form">'); echo '<fieldset class="bug-jump">'; # CSRF protection not required here - form does not result in modifications $t_bug_label = lang_get('issue_id'); echo '<input type="hidden" name="bug_label" value="', $t_bug_label, '" />'; echo '<input type="text" name="bug_id" size="10" class="small" /> '; echo '<input type="submit" class="button-small" value="' . lang_get('jump') . '" /> '; echo '</fieldset>'; echo '</form>'; echo '<div class="main-menu">'; echo '<div>'; echo '<ul class="menu">'; echo '<li>'; echo implode($t_menu_options, "</li>\n<li>"); echo '</li>'; echo '</ul>'; echo '</div>'; echo '</div>'; } }
$f_copy_from = gpc_get_bool('copy_from'); $f_copy_to = gpc_get_bool('copy_to'); $f_manage_page = gpc_get_bool('manage_page'); if ($f_copy_from) { $t_src_project_id = $f_other_project_id; $t_dst_project_id = $f_project_id; } else { if ($f_copy_to) { $t_src_project_id = $f_project_id; $t_dst_project_id = $f_other_project_id; } else { trigger_error(ERROR_GENERIC, ERROR); } } # only admins can set global defaults.for ALL_PROJECT if ($f_manage_page && $t_dst_project_id == ALL_PROJECTS && !current_user_is_administrator()) { access_denied(); } # only MANAGERS can set global defaults.for a project if ($f_manage_page && $t_dst_project_id != ALL_PROJECTS) { access_ensure_project_level(MANAGER, $t_dst_project_id); } # user should only be able to set columns for a project that is accessible. if ($t_dst_project_id != ALL_PROJECTS) { access_ensure_project_level(VIEWER, $t_dst_project_id); } # Calculate the user id to set the configuration for. if ($f_manage_page) { $t_user_id = NO_USER; } else { $t_user_id = auth_get_current_user_id();
function event_add_structure() { global $agilemantis_commonlib; $user = $agilemantis_commonlib->getAdditionalUserFields(auth_get_current_user_id()); $menu = array(); # add product backlog menu item if ($user[0]['participant'] == 1 || $user[0]['developer'] == 1 || $user[0]['administrator'] == 1) { $menu[2] = '<a href="' . plugin_page("product_backlog.php") . '" class="agile_menu">Product Backlog</a>'; } # add sprint backlog or taskboard menu item if ($user[0]['participant'] == 1 || $user[0]['developer'] == 1 || $user[0]['administrator'] == 1) { if (plugin_config_get('gadiv_taskboard') == 0) { $menu[0] = '<a href="' . plugin_page("sprint_backlog.php") . '" class="agile_menu">Sprint Backlog</a>'; } else { $menu[0] = '<a href="' . plugin_page("taskboard.php") . '" class="agile_menu">Sprint Backlog</a>'; } } # add daily scrum board if (($user[0]['participant'] == 1 || $user[0]['developer'] == 1 || $user[0]['administrator'] == 1) && plugin_config_get('gadiv_daily_scrum') == 1) { $menu[1] = '<a href="' . plugin_page("daily_scrum_meeting.php") . '" class="agile_menu">Daily Scrum Meeting</a>'; } # add agileMantis menu item if (current_user_is_administrator() || $user[0]['administrator'] == 1) { $menu[3] = '<a href="' . plugin_page("info.php") . '" class="agile_menu">agileMantis</a>'; } return $menu; }