*/
/**
 * MantisBT Core API's
 */
require_once 'core.php';
access_ensure_project_level(config_get('view_summary_threshold'));
html_page_top();
?>
<br />
<?php 
print_summary_menu('summary_jpgraph_page.php');
$t_graphs = array('summary_graph_cumulative_bydate', 'summary_graph_bydeveloper', 'summary_graph_byreporter', 'summary_graph_byseverity', 'summary_graph_bystatus', 'summary_graph_byresolution', 'summary_graph_bycategory', 'summary_graph_bypriority');
$t_wide = plugin_config_get('summary_graphs_per_row');
$t_width = plugin_config_get('window_width');
$t_graph_width = (int) (($t_width - 50) / $t_wide);
token_delete(TOKEN_GRAPH);
?>

<br />
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		<?php 
echo lang_get('summary_title');
?>
	</td>
</tr>
<?php 
$t_graph_count = count($t_graphs);
for ($t_pos = 0; $t_pos < $t_graph_count; $t_pos++) {
    if (0 == $t_pos % $t_wide) {
Ejemplo n.º 2
0
function redirect($location, $message = null)
{
    if (isset($message)) {
        $_SESSION["messages"][] = $message;
    }
    token_delete();
    if (strlen(SID)) {
        $location .= (strpos($location, "?") === false ? "?" : "&") . SID;
    }
    header("Location: " . (strlen($location) ? $location : "."));
    exit;
}
Ejemplo n.º 3
0
    if ($f_password != $f_password_confirm) {
        trigger_error(ERROR_USER_CREATE_PASSWORD_MISMATCH, ERROR);
    } else {
        if (!$t_account_verification && !auth_does_password_match($t_user_id, $f_password_current)) {
            trigger_error(ERROR_USER_CURRENT_PASSWORD_MISMATCH, ERROR);
        }
        if (!auth_does_password_match($t_user_id, $f_password)) {
            user_set_password($t_user_id, $f_password);
            $t_password_updated = true;
        }
    }
}
form_security_purge('account_update');
# Clear the verification token
if ($t_account_verification) {
    token_delete(TOKEN_ACCOUNT_VERIFY, $t_user_id);
}
html_page_top(null, $t_redirect_url);
$t_message = '';
if ($t_email_updated) {
    $t_message .= lang_get('email_updated');
}
if ($t_password_updated) {
    $t_message = is_blank($t_message) ? '' : $t_message . '<br />';
    $t_message .= lang_get('password_updated');
}
if ($t_realname_updated) {
    $t_message = is_blank($t_message) ? '' : $t_message . '<br />';
    $t_message .= lang_get('realname_updated');
}
html_operation_successful($t_redirect_url, $t_message);
Ejemplo n.º 4
0
/**
 * Set the user's password to the given string, encoded as appropriate
 *
 * @param integer $p_user_id         A valid user identifier.
 * @param string  $p_password        A password to set.
 * @param boolean $p_allow_protected Whether Allow password change to a protected account. This defaults to false.
 * @return boolean always true
 */
function user_set_password($p_user_id, $p_password, $p_allow_protected = false)
{
    if (!$p_allow_protected) {
        user_ensure_unprotected($p_user_id);
    }
    # When the password is changed, invalidate the cookie to expire sessions that
    # may be active on all browsers.
    $c_cookie_string = auth_generate_unique_cookie_string();
    # Delete token for password activation if there is any
    token_delete(TOKEN_ACCOUNT_ACTIVATION, $p_user_id);
    $c_password = auth_process_plain_password($p_password);
    db_param_push();
    $t_query = 'UPDATE {user}
				  SET password='******', cookie_string=' . db_param() . '
				  WHERE id=' . db_param();
    db_query($t_query, array($c_password, $c_cookie_string, (int) $p_user_id));
    return true;
}