/**
  * Prints head elements of a page
  * @param $string
  */
 public function print_page_head($string)
 {
     echo '<link rel="stylesheet" href="' . STORYBOARD_FILES_URI . 'storyboard.css">';
     html_page_top1($string);
     html_page_top2();
     if (plugin_is_installed('WhiteboardMenu')) {
         require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
         $whiteboard_print_api = new whiteboard_print_api();
         $whiteboard_print_api->printWhiteboardMenu();
     }
     $this->print_plugin_menu();
 }
 /**
  * Prints head elements of a page
  * @param $string
  */
 public function print_page_head($string)
 {
     html_page_top1($string);
     echo '<script language="javascript" type="text/javascript" src="' . SPECMANAGEMENT_PLUGIN_URL . 'files/checkbox.js"></script>';
     echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
     html_page_top2();
     if (plugin_is_installed('WhiteboardMenu') && file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) {
         require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
         $whiteboard_print_api = new whiteboard_print_api();
         $whiteboard_print_api->printWhiteboardMenu();
     }
     $this->print_plugin_menu();
 }
Beispiel #3
0
function print_successful_redirect($p_redirect_to)
{
    if (helper_show_queries()) {
        html_meta_redirect($p_redirect_to);
        html_page_top1();
        html_page_top2();
        print '<br /><div class="center">';
        print lang_get('operation_successful') . '<br />';
        print_bracket_link($p_redirect_to, lang_get('proceed'));
        print '</div>';
        html_page_bottom1();
    } else {
        print_header_redirect($p_redirect_to);
    }
}
/**
 * @param $print_flag
 */
function calculate_page_content($print_flag)
{
    $specmanagement_print_api = new specmanagement_print_api();
    html_page_top1(plugin_lang_get('menu_versgraph'));
    echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
    if (!$print_flag) {
        html_page_top2();
        if (plugin_is_installed('WhiteboardMenu') && file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) {
            require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
            $whiteboard_print_api = new whiteboard_print_api();
            $whiteboard_print_api->printWhiteboardMenu();
        }
        $specmanagement_print_api->print_plugin_menu();
        echo '<div align="center">';
        echo '<hr size="1" width="100%" />';
    }
    print_table($print_flag);
    if (!$print_flag) {
        html_page_bottom1();
    }
}
function calculate_page_content()
{
    $specmanagement_database_api = new specmanagement_database_api();
    $specmanagement_print_api = new specmanagement_print_api();
    $types = array();
    $types_rows = $specmanagement_database_api->get_full_types();
    foreach ($types_rows as $types_row) {
        $types[] = $types_row[1];
    }
    html_page_top1(plugin_lang_get('select_doc_title'));
    echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
    html_page_top2();
    //   if ( plugin_is_installed( 'WhiteboardMenu' ) && file_exists ( config_get_global ( 'plugin_path' ) . 'WhiteboardMenu' ) )
    //   {
    //      require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
    //      $whiteboard_print_api = new whiteboard_print_api();
    //      $whiteboard_print_api->printWhiteboardMenu();
    //   }
    if (project_includes_user(helper_get_current_project(), auth_get_current_user_id()) || helper_get_current_project() == 0 || user_is_administrator(auth_get_current_user_id())) {
        echo '<div align="center">';
        echo '<hr size="1" width="50%" />';
        $specmanagement_print_api->printTableTop('50');
        $specmanagement_print_api->printFormTitle(2, 'menu_title');
        $specmanagement_print_api->printCategoryField(1, 1, 'select_type');
        echo '<td>';
        echo '<form method="post" name="form_set_source" action="' . plugin_page('editor') . '">';
        print_document_selection($types);
        $specmanagement_print_api->printRow();
        echo '<td class="center" colspan="2">';
        echo '<input type="submit" name="formSubmit" class="button" value="' . plugin_lang_get('select_confirm') . '"/>';
        echo '</td>';
        echo '</tr>';
        echo '</form>';
        echo '</td>';
        $specmanagement_print_api->printTableFoot();
    } else {
        echo '<table class="width60"><tr><td class="center">' . lang_get('access_denied') . '</td></tr></table>';
    }
    html_page_bottom1();
}
Beispiel #6
0
function error_handler($p_type, $p_error, $p_file, $p_line, $p_context)
{
    global $g_error_parameters, $g_error_handled, $g_error_proceed_url;
    global $g_lang_overrides;
    global $g_error_send_page_header;
    # check if errors were disabled with @ somewhere in this call chain
    # also suppress php 5 strict warnings
    if (0 == error_reporting() || 2048 == $p_type) {
        return;
    }
    $t_lang_pushed = false;
    # flush any language overrides to return to user's natural default
    if (function_exists('db_is_connected')) {
        if (db_is_connected()) {
            lang_push(lang_get_default());
            $t_lang_pushed = true;
        }
    }
    $t_short_file = basename($p_file);
    $t_method_array = config_get('display_errors');
    if (isset($t_method_array[$p_type])) {
        $t_method = $t_method_array[$p_type];
    } else {
        $t_method = 'none';
    }
    # build an appropriate error string
    switch ($p_type) {
        case E_WARNING:
            $t_error_type = 'SYSTEM WARNING';
            $t_error_description = $p_error;
            break;
        case E_NOTICE:
            $t_error_type = 'SYSTEM NOTICE';
            $t_error_description = $p_error;
            break;
        case E_USER_ERROR:
            $t_error_type = "APPLICATION ERROR #{$p_error}";
            $t_error_description = error_string($p_error);
            break;
        case E_USER_WARNING:
            $t_error_type = "APPLICATION WARNING #{$p_error}";
            $t_error_description = error_string($p_error);
            break;
        case E_USER_NOTICE:
            # used for debugging
            $t_error_type = 'DEBUG';
            $t_error_description = $p_error;
            break;
        default:
            #shouldn't happen, just display the error just in case
            $t_error_type = '';
            $t_error_description = $p_error;
    }
    $t_error_description = nl2br($t_error_description);
    if ('halt' == $t_method) {
        $t_old_contents = ob_get_contents();
        # ob_end_clean() still seems to call the output handler which
        #  outputs the headers indicating compression. If we had
        #  PHP > 4.2.0 we could use ob_clean() instead but as it is
        #  we need to disable compression.
        compress_disable();
        if (ob_get_length()) {
            ob_end_clean();
        }
        # don't send the page header information if it has already been sent
        if ($g_error_send_page_header) {
            html_page_top1();
            if ($p_error != ERROR_DB_QUERY_FAILED) {
                html_page_top2();
            } else {
                html_page_top2a();
            }
        }
        print '<br /><div align="center"><table class="width50" cellspacing="1">';
        print "<tr><td class=\"form-title\">{$t_error_type}</td></tr>";
        print "<tr><td><p class=\"center\" style=\"color:red\">{$t_error_description}</p></td></tr>";
        print '<tr><td><p class="center">';
        if (null === $g_error_proceed_url) {
            print lang_get('error_no_proceed');
        } else {
            print "<a href=\"{$g_error_proceed_url}\">" . lang_get('proceed') . '</a>';
        }
        print '</p></td></tr>';
        if (ON == config_get('show_detailed_errors')) {
            print '<tr><td>';
            error_print_details($p_file, $p_line, $p_context);
            print '</td></tr>';
            print '<tr><td>';
            error_print_stack_trace();
            print '</td></tr>';
        }
        print '</table></div>';
        if ($g_error_handled && !is_blank($t_old_contents)) {
            print '<p>Previous non-fatal errors occurred.  Page contents follow.</p>';
            print '<div style="border: solid 1px black;padding: 4px">';
            print $t_old_contents;
            print '</div>';
        }
        if ($p_error != ERROR_DB_QUERY_FAILED) {
            html_page_bottom1();
        } else {
            html_body_end();
            html_end();
        }
        exit;
    } else {
        if ('inline' == $t_method) {
            print "<p style=\"color:red\">{$t_error_type}: {$t_error_description}</p>";
        } else {
            # do nothing
        }
    }
    if ($t_lang_pushed) {
        lang_pop();
    }
    $g_error_parameters = array();
    $g_error_handled = true;
    $g_error_proceed_url = null;
}
} else {
    access_ensure_project_level(config_get('report_bug_threshold'));
    $f_product_version = gpc_get_string('product_version', '');
    $f_category = gpc_get_string('category', config_get('default_bug_category'));
    $f_reproducibility = gpc_get_int('reproducibility', config_get('default_bug_reproducibility'));
    $f_severity = gpc_get_int('severity', config_get('default_bug_severity'));
    $f_priority = gpc_get_int('priority', config_get('default_bug_priority'));
    $f_summary = gpc_get_string('summary', '');
    $f_description = gpc_get_string('description', '');
    $f_additional_info = gpc_get_string('additional_info', config_get('default_bug_additional_info'));
    $f_view_state = gpc_get_int('view_state', config_get('default_bug_view_status'));
    $t_project_id = helper_get_current_project();
    $t_changed_project = false;
}
$f_report_stay = gpc_get_bool('report_stay', false);
html_page_top1(lang_get('report_bug_link'));
html_page_top2();
print_recently_visited();
?>

<br />
<div align="center">
<form name="report_bug_form" method="post" <?php 
if (file_allow_bug_upload()) {
    echo 'enctype="multipart/form-data"';
}
?>
 action="bug_report.php">
<table class="width75" cellspacing="1">

Beispiel #8
0
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
html_page_top1(plugin_lang_get('title'));
html_page_top2();
print_manage_menu();
?>

<br/>
<table align="center" class="width50" cellspacing="1" style="border:none">
	<tr >
		<td style="text-align:right;">
			[  <?php 
echo plugin_lang_get('main_plugin_config');
?>
 ]
			[ <a href=" <?php 
echo plugin_page('config_xmpp_login', true);
?>
plugin_require_api('core/Period.php');
require_api('access_api.php');
require_api('config_api.php');
require_api('gpc_api.php');
require_api('html_api.php');
require_api('plugin_api.php');
require_js('jscalendar/calendar.js');
require_js('jscalendar/lang/calendar-en.js');
require_js('jscalendar/calendar-setup.js');
require_css('calendar-blue.css');
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');
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">

				<tr>
					<td>
$f_news_id = gpc_get_int('news_id');
$f_action = gpc_get_string('action', '');
# If deleting item redirect to delete script
if ('delete' == $f_action) {
    require_once 'news_delete.php';
    exit;
}
# Retrieve news item data and prefix with v_
$row = news_get_row($f_news_id);
if ($row) {
    extract($row, EXTR_PREFIX_ALL, 'v');
}
access_ensure_project_level(config_get('manage_news_threshold'), $v_project_id);
$v_headline = string_attribute($v_headline);
$v_body = string_textarea($v_body);
html_page_top1(lang_get('edit_news_title'));
html_page_top2();
?>

<?php 
# Edit News Form BEGIN
?>
<br />
<div align="center">
<form method="post" action="news_update.php">
<?php 
echo form_security_field('news_update');
?>
<table class="width75" cellspacing="1">
<tr>
	<td class="form-title">
    if (!is_blank(gpc_get_cookie($t_cookie_name, ''))) {
        $t_manage_arr = explode(':', gpc_get_cookie($t_cookie_name));
        $f_hide = $t_manage_arr[0];
        if (isset($t_manage_arr[1])) {
            $f_sort = $t_manage_arr[1];
        } else {
            $f_sort = 'username';
        }
        if (isset($t_manage_arr[2])) {
            $f_dir = $t_manage_arr[2];
        } else {
            $f_dir = 'DESC';
        }
    }
}
html_page_top1(lang_get('manage_users_link'));
html_page_top2();
?>

<?php 
print_manage_menu('manage_user_page.php');
?>

<?php 
# New Accounts Form BEGIN
$days_old = 7;
$query = "SELECT *\n\t\tFROM {$t_user_table}\n\t\tWHERE " . db_helper_compare_days(db_now(), "date_created", "<= '{$days_old}'") . "\n\t\tORDER BY date_created DESC";
$result = db_query($query);
$new_user_count = db_num_rows($result);
if ($new_user_count > 0) {
    ?>
Beispiel #12
0
$t_page_count = null;
$rows = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true);
if ($rows === false) {
    print_header_redirect('view_all_set.php?type=0');
}
$t_bugslist = array();
$t_users_handlers = array();
$t_project_ids = array();
$t_row_count = count($rows);
for ($i = 0; $i < $t_row_count; $i++) {
    array_push($t_bugslist, $rows[$i]->id);
    $t_users_handlers[] = $rows[$i]->handler_id;
    $t_project_ids[] = $rows[$i]->project_id;
}
$t_unique_users_handlers = array_unique($t_users_handlers);
$t_unique_project_ids = array_unique($t_project_ids);
user_cache_array_rows($t_unique_users_handlers);
project_cache_array_rows($t_unique_project_ids);
gpc_set_cookie(config_get('bug_list_cookie'), implode(',', $t_bugslist));
compress_enable();
# don't index view issues pages
html_robots_noindex();
html_page_top1(lang_get('view_bugs_link'));
if (current_user_get_pref('refresh_delay') > 0) {
    html_meta_redirect('view_all_bug_page.php?page_number=' . $f_page_number, current_user_get_pref('refresh_delay') * 60);
}
html_page_top2();
print_recently_visited();
define('VIEW_ALL_INC_ALLOW', true);
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'view_all_inc.php';
html_page_bottom();
Beispiel #13
0
/**
 * Default error handler
 *
 * This handler will not receive E_ERROR, E_PARSE, E_CORE_*, or E_COMPILE_*
 *  errors.
 *
 * E_USER_* are triggered by us and will contain an error constant in $p_error
 * The others, being system errors, will come with a string in $p_error
 *
 * @access private
 * @param integer $p_type    Contains the level of the error raised, as an integer.
 * @param string  $p_error   Contains the error message, as a string.
 * @param string  $p_file    Contains the filename that the error was raised in, as a string.
 * @param integer $p_line    Contains the line number the error was raised at, as an integer.
 * @param array   $p_context To the active symbol table at the point the error occurred (optional).
 * @return void
 * @uses lang_api.php
 * @uses config_api.php
 * @uses compress_api.php
 * @uses database_api.php (optional)
 * @uses html_api.php (optional)
 */
function error_handler($p_type, $p_error, $p_file, $p_line, array $p_context)
{
    global $g_error_parameters, $g_error_handled, $g_error_proceed_url;
    global $g_error_send_page_header;
    # check if errors were disabled with @ somewhere in this call chain
    if (0 == error_reporting()) {
        return;
    }
    $t_lang_pushed = false;
    $t_db_connected = false;
    if (function_exists('db_is_connected')) {
        if (db_is_connected()) {
            $t_db_connected = true;
        }
    }
    $t_html_api = false;
    if (function_exists('html_end')) {
        $t_html_api = true;
    }
    # flush any language overrides to return to user's natural default
    if ($t_db_connected) {
        lang_push(lang_get_default());
        $t_lang_pushed = true;
    }
    $t_method_array = config_get_global('display_errors');
    if (isset($t_method_array[$p_type])) {
        $t_method = $t_method_array[$p_type];
    } else {
        if (isset($t_method_array[E_ALL])) {
            $t_method = $t_method_array[E_ALL];
        } else {
            $t_method = 'none';
        }
    }
    # build an appropriate error string
    $t_error_location = 'in \'' . $p_file . '\' line ' . $p_line;
    $t_error_description = '\'' . $p_error . '\' ' . $t_error_location;
    switch ($p_type) {
        case E_WARNING:
            $t_error_type = 'SYSTEM WARNING';
            break;
        case E_NOTICE:
            $t_error_type = 'SYSTEM NOTICE';
            break;
        case E_STRICT:
            $t_error_type = 'STRICT NOTICE';
            break;
        case E_RECOVERABLE_ERROR:
            # This should generally be considered fatal (like E_ERROR)
            $t_error_type = 'SYSTEM ERROR';
            break;
        case E_DEPRECATED:
            $t_error_type = 'DEPRECATED';
            break;
        case E_USER_ERROR:
            $t_error_type = 'APPLICATION ERROR #' . $p_error;
            $t_error_description = error_string($p_error);
            if ($t_method == DISPLAY_ERROR_INLINE) {
                $t_error_description .= ' (' . $t_error_location . ")\n" . error_string(ERROR_DISPLAY_USER_ERROR_INLINE);
            }
            break;
        case E_USER_WARNING:
            $t_error_type = 'APPLICATION WARNING #' . $p_error;
            $t_error_description = error_string($p_error) . ' (' . $t_error_location . ')';
            break;
        case E_USER_NOTICE:
            # used for debugging
            $t_error_type = 'DEBUG';
            break;
        case E_USER_DEPRECATED:
            # Get the parent of the call that triggered the error to facilitate
            # debugging with a more useful filename and line number
            $t_stack = debug_backtrace();
            $t_caller = $t_stack[2];
            $t_error_type = 'WARNING';
            $t_error_description = error_string($p_error) . ' (in ' . $t_caller['file'] . ' line ' . $t_caller['line'] . ')';
            if ($t_method == DISPLAY_ERROR_INLINE && php_sapi_name() != 'cli') {
                # Enqueue messages for later display with error_print_delayed()
                global $g_errors_delayed;
                $g_errors_delayed[] = $t_error_description;
                $g_error_handled = true;
                return;
            }
            break;
        default:
            # shouldn't happen, just display the error just in case
            $t_error_type = 'UNHANDLED ERROR TYPE (' . '<a href="http://php.net/errorfunc.constants">' . $p_type . '</a>)';
            $t_error_description = $p_error . ' (' . $t_error_location . ')';
    }
    $t_error_description = nl2br($t_error_description);
    if (php_sapi_name() == 'cli') {
        if (DISPLAY_ERROR_NONE != $t_method) {
            echo $t_error_type . ': ' . $t_error_description . "\n";
            if (ON == config_get_global('show_detailed_errors')) {
                echo "\n";
                debug_print_backtrace();
            }
        }
        if (DISPLAY_ERROR_HALT == $t_method) {
            exit(1);
        }
    } else {
        switch ($t_method) {
            case DISPLAY_ERROR_HALT:
                # disable any further event callbacks
                if (function_exists('event_clear_callbacks')) {
                    event_clear_callbacks();
                }
                $t_oblen = ob_get_length();
                if ($t_oblen > 0) {
                    $t_old_contents = ob_get_contents();
                    if (!error_handled()) {
                        # Retrieve the previously output header
                        if (false !== preg_match_all('|^(.*)(</head>.*$)|is', $t_old_contents, $t_result) && isset($t_result[1]) && isset($t_result[1][0])) {
                            $t_old_headers = $t_result[1][0];
                            unset($t_old_contents);
                        }
                    }
                }
                # We need to ensure compression is off - otherwise the compression headers are output.
                compress_disable();
                # then clean the buffer, leaving output buffering on.
                if ($t_oblen > 0) {
                    ob_clean();
                }
                # If HTML error output was disabled, set an error header and stop
                if (defined('DISABLE_INLINE_ERROR_REPORTING')) {
                    # @TODO Have a mapping for mantis error codes to appropiate HTTP error codes
                    header(' ', true, 400);
                    exit(1);
                }
                # don't send the page header information if it has already been sent
                if ($g_error_send_page_header) {
                    if ($t_html_api) {
                        html_page_top1();
                        if ($p_error != ERROR_DB_QUERY_FAILED && $t_db_connected == true) {
                            html_page_top2();
                        } else {
                            html_page_top2a();
                        }
                    } else {
                        echo '<html><head><title>', $t_error_type, '</title></head><body>';
                    }
                } else {
                    # Output the previously sent headers, if defined
                    if (isset($t_old_headers)) {
                        echo $t_old_headers, "\n";
                        html_page_top2();
                    }
                }
                echo '<div id="error-msg">';
                echo '<div class="error-type">' . $t_error_type . '</div>';
                echo '<div class="error-description">', $t_error_description, '</div>';
                echo '<div class="error-info">';
                if (null === $g_error_proceed_url) {
                    echo lang_get('error_no_proceed');
                } else {
                    echo '<a href="', $g_error_proceed_url, '">', lang_get('proceed'), '</a>';
                }
                echo '</div>';
                if (ON == config_get_global('show_detailed_errors')) {
                    echo '<div class="error-details">';
                    error_print_details($p_file, $p_line, $p_context);
                    echo '</div>';
                    echo '<div class="error-trace">';
                    error_print_stack_trace();
                    echo '</div>';
                }
                echo '</div>';
                if (isset($t_old_contents)) {
                    echo '<div class="warning">Previous non-fatal errors occurred.  Page contents follow.</div>';
                    echo '<div id="old-contents">';
                    echo $t_old_contents;
                    echo '</div>';
                }
                if ($t_html_api) {
                    if ($p_error != ERROR_DB_QUERY_FAILED && $t_db_connected == true) {
                        html_page_bottom();
                    } else {
                        html_body_end();
                        html_end();
                    }
                } else {
                    echo '</body></html>', "\n";
                }
                exit(1);
            case DISPLAY_ERROR_INLINE:
                if (!defined('DISABLE_INLINE_ERROR_REPORTING')) {
                    echo '<div class="error-inline">', $t_error_type, ': ', $t_error_description, '</div>';
                }
                $g_error_handled = true;
                break;
            default:
                # do nothing - note we treat this as we've not handled an error, so any redirects go through.
        }
    }
    if ($t_lang_pushed) {
        lang_pop();
    }
    $g_error_parameters = array();
    $g_error_proceed_url = null;
}
# You should have received a copy of the GNU General Public License
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------
# $Id: manage_proj_edit_page.php,v 1.104.2.2 2007-10-19 07:25:59 vboctor Exp $
# --------------------------------------------------------
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'category_api.php';
require_once $t_core_path . 'version_api.php';
require_once $t_core_path . 'custom_field_api.php';
require_once $t_core_path . 'icon_api.php';
auth_reauthenticate();
$f_project_id = gpc_get_int('project_id');
access_ensure_project_level(config_get('manage_project_threshold'), $f_project_id);
$row = project_get_row($f_project_id);
html_page_top1(project_get_field($f_project_id, 'name'));
html_page_top2();
print_manage_menu('manage_proj_edit_page.php');
?>
<br />


<!-- PROJECT PROPERTIES -->
<div align="center">
<form method="post" action="manage_proj_update.php">
<?php 
echo form_security_field('manage_proj_update');
?>
<table class="width75" cellspacing="1">

<!-- Title -->
# RESTRICTIONS & PERMISSIONS
#	- User must be authenticated, and not anonymous
#   - sponsorship must be enabled
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'current_user_api.php';
if (config_get('enable_sponsorship') == OFF) {
    trigger_error(ERROR_SPONSORSHIP_NOT_ENABLED, ERROR);
}
# anonymous users are not allowed to sponsor issues
if (current_user_is_anonymous()) {
    access_denied();
}
$t_show_all = gpc_get_bool('show_all', false);
# start the page
html_page_top1(lang_get('my_sponsorship'));
html_page_top2();
$t_project = helper_get_current_project();
?>
<br />
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title">
		<?php 
echo lang_get('my_sponsorship');
?>
	</td>
	<td class="right">
		<?php 
print_account_menu('account_sponsor_page.php');
?>
<?php

# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: manage_config_workflow_page.php,v 1.16.6.1 2006/01/01 02:58:50 thraxisp Exp $
# --------------------------------------------------------
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'email_api.php';
html_page_top1(lang_get('manage_workflow_config'));
html_page_top2();
print_manage_menu('adm_permissions_report.php');
print_manage_config_menu('manage_config_workflow_page.php');
$t_access = current_user_get_access_level();
$t_project = helper_get_current_project();
$t_can_change_workflow = $t_access >= config_get_access('status_enum_workflow');
$t_can_change_flags = $t_can_change_workflow;
$t_overrides = array();
function set_overrides($p_config)
{
    global $t_overrides;
    if (!in_array($p_config, $t_overrides)) {
        $t_overrides[] = $p_config;
    }
}
function parse_workflow($p_enum_workflow)
{
#
# Mantis 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------
# $Id: login_select_proj_page.php,v 1.38.4.1 2007-10-13 22:33:20 giallu Exp $
# --------------------------------------------------------
# Allows the user to select a project that is visible to him
require_once 'core.php';
auth_ensure_user_authenticated();
$f_ref = gpc_get_string('ref', '');
html_page_top1(lang_get('select_project_button'));
html_page_top2();
?>

<!-- Project Select Form BEGIN -->
<br />
<div align="center">
<form method="post" action="set_project.php">
<table class="width50" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		<input type="hidden" name="ref" value="<?php 
echo string_html_specialchars($f_ref);
?>
" />
		<?php 
}
if ($bug_count < 1) {
    $bug_count = 1;
}
$t_average_time = $t_total_time / $bug_count;
$t_largest_diff = number_format($t_largest_diff / 86400, 2);
$t_total_time = number_format($t_total_time / 86400, 2);
$t_average_time = number_format($t_average_time / 86400, 2);
$t_orct_arr = preg_split('/[\\)\\/\\(]/', lang_get('orct'), -1, PREG_SPLIT_NO_EMPTY);
$t_orcttab = "";
foreach ($t_orct_arr as $t_orct_s) {
    $t_orcttab .= '<td class="right">';
    $t_orcttab .= $t_orct_s;
    $t_orcttab .= '</td>';
}
html_page_top1(lang_get('summary_link'));
html_page_top2();
?>

<br />
<?php 
print_summary_menu('summary_page.php');
?>

<?php 
print_menu_graph();
?>
<br />
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
<?php

# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: manage_config_work_threshold_set.php,v 1.9 2005/09/03 11:30:03 thraxisp Exp $
# --------------------------------------------------------
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'email_api.php';
$t_redirect_url = 'manage_config_work_threshold_page.php';
$t_project = helper_get_current_project();
html_page_top1(lang_get('manage_threshold_config'));
html_meta_redirect($t_redirect_url);
html_page_top2();
$t_access = current_user_get_access_level();
function set_capability_row($p_threshold, $p_all_projects_only = false)
{
    global $t_access, $t_project;
    if ($t_access >= config_get_access($p_threshold) && (ALL_PROJECTS == $t_project || !$p_all_projects_only)) {
        $f_threshold = gpc_get_int_array('flag_thres_' . $p_threshold, array());
        $f_access = gpc_get_int('access_' . $p_threshold);
        # @@debug @@ echo "<br />for $p_threshold "; var_dump($f_threshold, $f_access); echo '<br />';
        $t_access_levels = get_enum_to_array(config_get('access_levels_enum_string'));
        ksort($t_access_levels);
        reset($t_access_levels);
        $t_lower_threshold = NOBODY;
        $t_array_threshold = array();
Beispiel #20
0
/**
 * Defines the top of a HTML page
 * @param string $p_page_title html page title
 * @param string $p_redirect_url url to redirect to if necessary
 * @return null
 */
function html_page_top($p_page_title = null, $p_redirect_url = null)
{
    html_page_top1($p_page_title);
    if ($p_redirect_url !== null) {
        html_meta_redirect($p_redirect_url);
    }
    html_page_top2();
}
require_once $t_core_path . 'tag_api.php';
$f_bug_id = gpc_get_int('bug_id');
$f_history = gpc_get_bool('history', config_get('history_default_visible'));
bug_ensure_exists($f_bug_id);
access_ensure_bug_level(VIEWER, $f_bug_id);
$t_bug = bug_prepare_display(bug_get($f_bug_id, true));
if ($t_bug->project_id != helper_get_current_project()) {
    # in case the current project is not the same project of the bug we are viewing...
    # ... override the current project. This to avoid problems with categories and handlers lists etc.
    $g_project_override = $t_bug->project_id;
}
if (SIMPLE_ONLY == config_get('show_view')) {
    print_header_redirect('bug_view_page.php?bug_id=' . $f_bug_id);
}
compress_enable();
html_page_top1(bug_format_summary($f_bug_id, SUMMARY_CAPTION));
html_page_top2();
print_recently_visited();
$t_access_level_needed = config_get('view_history_threshold');
$t_can_view_history = access_has_bug_level($t_access_level_needed, $f_bug_id);
$t_bugslist = gpc_get_cookie(config_get('bug_list_cookie'), false);
?>

<br />
<table class="width100" cellspacing="1">


<tr>

	<!-- Title -->
	<td class="form-title" colspan="<?php 
Beispiel #22
0
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------
# $Id: manage_proj_page.php,v 1.21.2.1 2007-10-13 22:33:39 giallu Exp $
# --------------------------------------------------------
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'icon_api.php';
auth_reauthenticate();
$f_sort = gpc_get_string('sort', 'name');
$f_dir = gpc_get_string('dir', 'ASC');
if ('ASC' == $f_dir) {
    $t_direction = ASCENDING;
} else {
    $t_direction = DESCENDING;
}
html_page_top1(lang_get('manage_projects_link'));
html_page_top2();
print_manage_menu('manage_proj_page.php');
# Project Menu Form BEGIN
?>
<br />
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="5">
		<?php 
echo lang_get('projects_title');
?>
		<?php 
# Check the user's global access level before allowing project creation
if (access_has_global_level(config_get('create_project_threshold'))) {
    print_button('manage_proj_create_page.php', lang_get('create_new_project_link'));
if (isset($g_global_profiles)) {
    $g_global_profiles = true;
} else {
    $g_global_profiles = false;
}
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'current_user_api.php';
auth_ensure_user_authenticated();
current_user_ensure_unprotected();
if ($g_global_profiles) {
    access_ensure_global_level(config_get('manage_global_profile_threshold'));
} else {
    access_ensure_global_level(config_get('add_profile_threshold'));
}
html_page_top1(lang_get('manage_profiles_link'));
html_page_top2();
?>

<?php 
if ($g_global_profiles) {
    print_manage_menu('manage_prof_menu_page.php');
}
?>

<?php 
if ($g_global_profiles) {
    $t_user_id = ALL_USERS;
} else {
    $t_user_id = auth_get_current_user_id();
}
Beispiel #24
0
# (none)
#============ Permissions ============
auth_ensure_user_authenticated();
current_user_ensure_unprotected();
# extracts the user information for the currently logged in user
# and prefixes it with u_
$row = user_get_row(auth_get_current_user_id());
extract($row, EXTR_PREFIX_ALL, 'u');
$t_ldap = LDAP == config_get('login_method');
# In case we're using LDAP to get the email address... this will pull out
#  that version instead of the one in the DB
$u_email = user_get_email($u_id, $u_username);
# note if we are being included by a script of a different name, if so,
#  this is a mandatory password change request
$t_force_pw_reset = is_page_name('verify.php');
html_page_top1(lang_get('account_link'));
html_page_top2();
?>

<!-- # Edit Account Form BEGIN -->
<br />
<?php 
if ($t_force_pw_reset) {
    ?>
<center><div style="color:red; width:75%">
		<?php 
    echo lang_get('verify_warning');
    if (helper_call_custom_function('auth_can_change_password', array())) {
        echo '<br />' . lang_get('verify_change_password');
    }
    ?>
# You should have received a copy of the GNU General Public License
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------
# $Id: tag_update_page.php,v 1.1.2.2 2007-10-18 15:33:22 nuclear_eclipse Exp $
# --------------------------------------------------------
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'ajax_api.php';
require_once $t_core_path . 'tag_api.php';
compress_enable();
$f_tag_id = gpc_get_int('tag_id');
$t_tag_row = tag_get($f_tag_id);
if (!(access_has_global_level(config_get('tag_edit_threshold')) || auth_get_current_user_id() == $t_tag_row['user_id'] && access_has_global_level(config_get('tag_edit_own_threshold')))) {
    access_denied();
}
html_page_top1(sprintf(lang_get('tag_update'), $t_tag_row['name']));
html_page_top2();
?>

<br/>
<form method="post" action="tag_update.php">
<?php 
echo form_security_field('tag_update');
?>
<table class="width100" cellspacing="1">

<!-- Title -->
<tr>
	<td class="form-title" colspan="2">
		<?php 
echo sprintf(lang_get('tag_update'), $t_tag_row['name']);
<?php

auth_reauthenticate();
echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_FILES_URI . 'specmanagement.css">';
html_page_top1(plugin_lang_get('config_reset_title'));
html_page_top2();
echo '<div align="center">';
echo '<hr size="1" width="50%" />';
echo plugin_lang_get('config_reset_expl') . '<br/><br/>';
echo '<form action="' . plugin_page('reset_confirm') . '" method="post">';
echo '<table class="width50" cellspacing="1">';
echo '<tr>';
echo '<td class="center">';
echo '<input type="submit" name="con_reset" class="button" value="' . plugin_lang_get('config_reset_conf') . '"/>';
echo '<input type="submit" name="not_reset" class="button" value="' . plugin_lang_get('config_reset_dont') . '"/>';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</form>';
Beispiel #27
0
function helper_ensure_confirmed($p_message, $p_button_label)
{
    if (true == gpc_get_bool('_confirmed')) {
        return true;
    }
    html_page_top1();
    html_page_top2();
    # @@@ we need to improve this formatting.  I'd like the text to only
    #  be about 50% the width of the screen so that it doesn't become to hard
    #  to read.
    print "<br />\n<div align=\"center\">\n";
    print_hr();
    print "\n{$p_message}\n";
    print '<form method="post" action="' . $_SERVER['PHP_SELF'] . "\">\n";
    print_hidden_inputs(gpc_strip_slashes($_POST));
    print_hidden_inputs(gpc_strip_slashes($_GET));
    print "<input type=\"hidden\" name=\"_confirmed\" value=\"1\" />\n";
    print '<br /><br /><input type="submit" class="button" value="' . $p_button_label . '" />';
    print "\n</form>\n";
    print_hr();
    print "</div>\n";
    html_page_bottom1();
    exit;
}
Beispiel #28
0
 * @local array contains all configurable values
 */
$a_configParams = array();
/*
 * @local strings
 */
$s_pluginDirPath = $s_output = $s_miteConnectionStatus = $s_bgUserAccountDataCssClass = '';
/*
 * @local booleans
 */
$b_miteConnectionVerified = $b_visibleBtnUnbindConnection = $b_visibleLinkChangeApiKey = $b_visibleLinkChangeAccountName = false;
############
# ACTION
#######
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);
    $f_sort = $t_filter_cookie_arr[FILTER_PROPERTY_SORT_FIELD_NAME];
    $f_dir = $t_filter_cookie_arr[FILTER_PROPERTY_SORT_DIRECTION];
    $t_project_id = helper_get_current_project();
}
# This replaces the actual search that used to be here
$f_page_number = gpc_get_int('page_number', 1);
$t_per_page = -1;
$t_bug_count = null;
$t_page_count = null;
$result = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count);
$row_count = count($result);
# pre-cache custom column data
columns_plugin_cache_issue_data($result);
# for export
$t_show_flag = gpc_get_int('show_flag', 0);
html_page_top1();
html_head_end();
html_body_begin();
?>

<table class="width100"><tr><td class="form-title">
	<div class="center">
		<?php 
echo string_display(config_get('window_title')) . ' - ' . string_display(project_get_name($t_project_id));
?>
	</div>
</td></tr></table>

<br />

<form method="post" action="view_all_set.php">
/**
 * Print the top part for the bug action group page.
 */
function bug_group_action_print_top()
{
    html_page_top1();
    html_page_top2();
}