Ejemplo n.º 1
0
#============ Parameters ============
# (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');
# Only show the update button if there is something to update.
$t_show_update_button = false;
html_page_top(lang_get('account_link'));
?>

<!-- # 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');
Ejemplo n.º 2
0
function html_footer($p_file)
{
    global $g_timer, $g_queries_array, $g_request_time;
    # If a user is logged in, update their last visit time.
    # We do this at the end of the page so that:
    #  1) we can display the user's last visit time on a page before updating it
    #  2) we don't invalidate the user cache immediately after fetching it
    #  3) don't do this on the password verification or update page, as it causes the
    #    verification comparison to fail
    if (auth_is_user_authenticated() && !(is_page_name('verify.php') || is_page_name('account_update.php'))) {
        $t_user_id = auth_get_current_user_id();
        user_update_last_visit($t_user_id);
    }
    echo "\t", '<br />', "\n";
    echo "\t", '<hr size="1" />', "\n";
    echo '<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr valign="top"><td>';
    if (ON == config_get('show_version')) {
        echo "\t", '<span class="timer"><a href="http://www.mantisbt.org/" title="Free Web Based Bug Tracker">Mantis ', MANTIS_VERSION, '</a>', '[<a href="http://www.mantisbt.org/"  title="Free Web Based Bug Tracker" target="_blank">^</a>]</span>', "\n";
    }
    echo "\t", '<address>Copyright &copy; 2000 - 2008 Mantis Group</address>', "\n";
    # only display webmaster email is current user is not the anonymous user
    if (!is_page_name('login_page.php') && !current_user_is_anonymous()) {
        echo "\t", '<address><a href="mailto:', config_get('webmaster_email'), '">', config_get('webmaster_email'), '</a></address>', "\n";
    }
    # print timings
    if (ON == config_get('show_timer')) {
        $g_timer->print_times();
    }
    # print db queries that were run
    if (helper_show_queries()) {
        $t_count = count($g_queries_array);
        echo "\t", $t_count, ' total queries executed.<br />', "\n";
        $t_unique_queries = 0;
        $t_shown_queries = array();
        for ($i = 0; $i < $t_count; $i++) {
            if (!in_array($g_queries_array[$i][0], $t_shown_queries)) {
                $t_unique_queries++;
                $g_queries_array[$i][3] = false;
                array_push($t_shown_queries, $g_queries_array[$i][0]);
            } else {
                $g_queries_array[$i][3] = true;
            }
        }
        echo "\t", $t_unique_queries . ' unique queries executed.<br />', "\n";
        if (ON == config_get('show_queries_list')) {
            echo "\t", '<table>', "\n";
            $t_total = 0;
            for ($i = 0; $i < $t_count; $i++) {
                $t_time = $g_queries_array[$i][1];
                $t_caller = $g_queries_array[$i][2];
                $t_total += $t_time;
                $t_style_tag = '';
                if (true == $g_queries_array[$i][3]) {
                    $t_style_tag = ' style="color: red;"';
                }
                echo "\t", '<tr valign="top"><td', $t_style_tag, '>', $i + 1, '</td>';
                echo '<td', $t_style_tag, '>', $t_time, '</td>';
                echo '<td', $t_style_tag, '><span style="color: gray;">', $t_caller, '</span><br />', string_html_specialchars($g_queries_array[$i][0]), '</td></tr>', "\n";
            }
            # @@@ Note sure if we should localize them given that they are debug info.  Will add if requested by users.
            echo "\t", '<tr><td></td><td>', $t_total, '</td><td>SQL Queries Total Time</td></tr>', "\n";
            echo "\t", '<tr><td></td><td>', round(microtime_float() - $g_request_time, 4), '</td><td>Page Request Total Time</td></tr>', "\n";
            echo "\t", '</table>', "\n";
        }
    }
    echo '</td><td><div align="right">';
    echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img src="images/mantis_logo_button.gif" width="88" height="35" alt="Powered by Mantis Bugtracker" border="0" /></a>';
    echo '</div></td></tr></table>';
}
Ejemplo n.º 3
0
/**
 * (13) Print the page footer information
 * @param string $p_file
 * @return null
 */
function html_footer($p_file = null)
{
    global $g_queries_array, $g_request_time;
    # If a user is logged in, update their last visit time.
    # We do this at the end of the page so that:
    #  1) we can display the user's last visit time on a page before updating it
    #  2) we don't invalidate the user cache immediately after fetching it
    #  3) don't do this on the password verification or update page, as it causes the
    #    verification comparison to fail
    if (auth_is_user_authenticated() && !current_user_is_anonymous() && !(is_page_name('verify.php') || is_page_name('account_update.php'))) {
        $t_user_id = auth_get_current_user_id();
        user_update_last_visit($t_user_id);
    }
    echo "<div id=\"footer\">\n";
    echo "\t<hr />\n";
    # We don't have a button anymore, so for now we will only show the resized
    # version of the logo when not on login page.
    if (!is_page_name('login_page')) {
        echo "\t<div id=\"powered-by-mantisbt-logo\">\n";
        $t_mantisbt_logo_url = helper_mantis_url('images/mantis_logo.png');
        echo "\t\t<a href=\"http://www.mantisbt.org\" " . "title=\"Mantis Bug Tracker: a free and open source web based bug tracking system.\">" . "<img src=\"{$t_mantisbt_logo_url}\" width=\"102\" height=\"35\" " . "alt=\"Powered by Mantis Bug Tracker: a free and open source web based bug tracking system.\" />" . "</a>\n";
        echo "\t</div>\n";
    }
    # Show optional user-specificed custom copyright statement
    $t_copyright_statement = config_get('copyright_statement');
    if ($t_copyright_statement) {
        echo "\t<address id=\"user-copyright\">{$t_copyright_statement}</address>\n";
    }
    # Show MantisBT version and copyright statement
    $t_version_suffix = '';
    $t_copyright_years = '';
    if (config_get('show_version')) {
        $t_version_suffix = htmlentities(' ' . MANTIS_VERSION . config_get_global('version_suffix'));
        $t_copyright_years = ' 2000 - 2012';
    }
    echo "\t<address id=\"mantisbt-copyright\">Powered by <a href=\"http://www.mantisbt.org\" title=\"Mantis Bug Tracker: a free and open source web based bug tracking system.\">Mantis Bug Tracker</a> (MantisBT){$t_version_suffix}. Copyright &copy;{$t_copyright_years} MantisBT contributors. Licensed under the terms of the <a href=\"http://www.gnu.org/licenses/old-licenses/gpl-2.0.html\" title=\"GNU General Public License (GPL) version 2\">GNU General Public License (GPL) version 2</a> or a later version.</address>\n";
    # Show contact information
    $t_webmaster_contact_information = sprintf(lang_get('webmaster_contact_information'), string_html_specialchars(config_get('webmaster_email')));
    echo "\t<address id=\"webmaster-contact-information\">{$t_webmaster_contact_information}</address>\n";
    event_signal('EVENT_LAYOUT_PAGE_FOOTER');
    # Print horizontal rule if any debugging stats follow
    if (config_get('show_timer') || config_get('show_memory_usage') || config_get('show_queries_count')) {
        echo "\t<hr />\n";
    }
    # Print the page execution time
    if (config_get('show_timer')) {
        $t_page_execution_time = sprintf(lang_get('page_execution_time'), number_format(microtime(true) - $g_request_time, 4));
        echo "\t<p id=\"page-execution-time\">{$t_page_execution_time}</p>\n";
    }
    # Print the page memory usage
    if (config_get('show_memory_usage')) {
        $t_page_memory_usage = sprintf(lang_get('memory_usage_in_kb'), number_format(memory_get_peak_usage() / 1024));
        echo "\t<p id=\"page-memory-usage\">{$t_page_memory_usage}</p>\n";
    }
    # Determine number of unique queries executed
    if (config_get('show_queries_count')) {
        $t_total_queries_count = count($g_queries_array);
        $t_unique_queries_count = 0;
        $t_total_query_execution_time = 0;
        $t_unique_queries = array();
        for ($i = 0; $i < $t_total_queries_count; $i++) {
            if (!in_array($g_queries_array[$i][0], $t_unique_queries)) {
                $t_unique_queries_count++;
                $g_queries_array[$i][3] = false;
                array_push($t_unique_queries, $g_queries_array[$i][0]);
            } else {
                $g_queries_array[$i][3] = true;
            }
            $t_total_query_execution_time += $g_queries_array[$i][1];
        }
        $t_total_queries_executed = sprintf(lang_get('total_queries_executed'), $t_total_queries_count);
        echo "\t<p id=\"total-queries-count\">{$t_total_queries_executed}</p>\n";
        if (config_get_global('db_log_queries')) {
            $t_unique_queries_executed = sprintf(lang_get('unique_queries_executed'), $t_unique_queries_count);
            echo "\t<p id=\"unique-queries-count\">{$t_unique_queries_executed}</p>\n";
        }
        $t_total_query_time = sprintf(lang_get('total_query_execution_time'), $t_total_query_execution_time);
        echo "\t<p id=\"total-query-execution-time\">{$t_total_query_time}</p>\n";
    }
    # Print table of log events
    log_print_to_page();
    echo "</div>\n";
}
Ejemplo n.º 4
0
/**
 * A function that determines whether the logo should be centered or left aligned based on the page.
 * @return bool true: centered, false: otherwise.
 * @access public
 */
function should_center_logo()
{
    return is_page_name('login_page') || is_page_name('signup_page') || is_page_name('signup') || is_page_name('lost_pwd_page');
}
Ejemplo n.º 5
0
}
current_user_ensure_unprotected();
html_page_top(lang_get('account_link'));
# extracts the user information for the currently logged in user
# and prefixes it with u_
$t_row = user_get_row(auth_get_current_user_id());
extract($t_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);
# If the password is the default password, then prompt user to change it.
$t_reset_password = $u_username == 'administrator' && auth_does_password_match($u_id, 'root');
# note if we are being included by a script of a different name, if so,
# this is a mandatory password change request
$t_verify = is_page_name('verify.php');
$t_force_pw_reset = false;
if ($t_verify || $t_reset_password) {
    $t_can_change_password = helper_call_custom_function('auth_can_change_password', array());
    echo '<div id="reset-passwd-msg" class="important-msg">';
    echo '<ul>';
    if ($t_verify) {
        echo '<li>' . lang_get('verify_warning') . '</li>';
        if ($t_can_change_password) {
            echo '<li>' . lang_get('verify_change_password') . '</li>';
            $t_force_pw_reset = true;
        }
    } else {
        if ($t_reset_password && $t_can_change_password) {
            echo '<li>' . lang_get('warning_default_administrator_account_present') . '</li>';
            $t_force_pw_reset = true;
Ejemplo n.º 6
0
/**
 * (13) Print the page footer information
 * @param string $p_file
 * @return null
 */
function html_footer($p_file = null)
{
    global $g_queries_array, $g_request_time;
    # If a user is logged in, update their last visit time.
    # We do this at the end of the page so that:
    #  1) we can display the user's last visit time on a page before updating it
    #  2) we don't invalidate the user cache immediately after fetching it
    #  3) don't do this on the password verification or update page, as it causes the
    #    verification comparison to fail
    if (auth_is_user_authenticated() && !current_user_is_anonymous() && !(is_page_name('verify.php') || is_page_name('account_update.php'))) {
        $t_user_id = auth_get_current_user_id();
        user_update_last_visit($t_user_id);
    }
    echo "\t", '<br />', "\n";
    echo "\t", '<hr size="1" />', "\n";
    echo '<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr valign="top"><td>';
    if (ON == config_get('show_version')) {
        $t_version_suffix = config_get_global('version_suffix');
        $t_mantis_version = MANTIS_VERSION . ($t_version_suffix ? " {$t_version_suffix}" : '');
        $t_mantis_href = '<a href="http://www.mantisbt.org/" title="Free Web-Based Bug Tracker"';
        echo "\t", '<span class="timer">', "{$t_mantis_href}>MantisBT {$t_mantis_version}</a> ", "[{$t_mantis_href} ", 'target="_blank">^</a>]', "</span>\n";
    }
    echo "\t<address>Copyright &copy; 2000 - ", date('Y'), " MantisBT Team</address>\n";
    # only display webmaster email is current user is not the anonymous user
    if (!is_page_name('login_page.php') && auth_is_user_authenticated() && !current_user_is_anonymous()) {
        echo "\t", '<address><a href="mailto:', config_get('webmaster_email'), '">', config_get('webmaster_email'), '</a></address>', "\n";
    }
    event_signal('EVENT_LAYOUT_PAGE_FOOTER');
    # print timings
    if (ON == config_get('show_timer')) {
        echo '<span class="italic">Time: ' . number_format(microtime(true) - $g_request_time, 4) . ' seconds.</span><br />';
        echo sprintf(lang_get('memory_usage_in_kb'), number_format(memory_get_peak_usage() / 1024)), '<br />';
    }
    # print db queries that were run
    if (helper_show_queries()) {
        $t_count = count($g_queries_array);
        echo "\t";
        echo sprintf(lang_get('total_queries_executed'), $t_count);
        echo "<br />\n";
        if (ON == config_get('show_queries_list')) {
            $t_unique_queries = 0;
            $t_shown_queries = array();
            for ($i = 0; $i < $t_count; $i++) {
                if (!in_array($g_queries_array[$i][0], $t_shown_queries)) {
                    $t_unique_queries++;
                    $g_queries_array[$i][3] = false;
                    array_push($t_shown_queries, $g_queries_array[$i][0]);
                } else {
                    $g_queries_array[$i][3] = true;
                }
            }
            echo "\t";
            echo sprintf(lang_get('unique_queries_executed'), $t_unique_queries);
            echo "\t", '<table>', "\n";
            $t_total = 0;
            for ($i = 0; $i < $t_count; $i++) {
                $t_time = $g_queries_array[$i][1];
                $t_caller = $g_queries_array[$i][2];
                $t_total += $t_time;
                $t_style_tag = '';
                if (true == $g_queries_array[$i][3]) {
                    $t_style_tag = ' style="color: red;"';
                }
                echo "\t", '<tr valign="top"><td', $t_style_tag, '>', $i + 1, '</td>';
                echo '<td', $t_style_tag, '>', $t_time, '</td>';
                echo '<td', $t_style_tag, '><span style="color: gray;">', $t_caller, '</span><br />', string_html_specialchars($g_queries_array[$i][0]), '</td></tr>', "\n";
            }
            # @@@ Note sure if we should localize them given that they are debug info.  Will add if requested by users.
            echo "\t", '<tr><td></td><td>', $t_total, '</td><td>SQL Queries Total Time</td></tr>', "\n";
            echo "\t", '<tr><td></td><td>', round(microtime(true) - $g_request_time, 4), '</td><td>Page Request Total Time</td></tr>', "\n";
            echo "\t", '</table>', "\n";
        }
    }
    echo '</td><td>', "\n\t";
    # We don't have a button anymore, so for now we will only show the resized version of the logo when not on login page.
    if (!is_page_name('login_page')) {
        echo '<div align="right">';
        echo '<a href="http://www.mantisbt.org" title="Free Web Based Bug Tracker"><img src="' . helper_mantis_url('images/mantis_logo.png') . '" width="145" height="50" alt="Powered by Mantis Bugtracker" border="0" /></a>';
        echo '</div>', "\n";
    }
    echo '</td></tr></table>', "\n";
}
Ejemplo n.º 7
0
/**
 * (13) Print the page footer information
 * @return void
 */
function html_footer()
{
    global $g_queries_array, $g_request_time;
    # If a user is logged in, update their last visit time.
    # We do this at the end of the page so that:
    #  1) we can display the user's last visit time on a page before updating it
    #  2) we don't invalidate the user cache immediately after fetching it
    #  3) don't do this on the password verification or update page, as it causes the
    #    verification comparison to fail
    if (auth_is_user_authenticated() && !current_user_is_anonymous() && !(is_page_name('verify.php') || is_page_name('account_update.php'))) {
        $t_user_id = auth_get_current_user_id();
        user_update_last_visit($t_user_id);
    }
    echo '<div id="footer">' . "\n";
    echo '<hr />' . "\n";
    # We don't have a button anymore, so for now we will only show the resized
    # version of the logo when not on login page.
    if (!is_page_name('login_page')) {
        echo "\t" . '<div id="powered-by-mantisbt-logo">' . "\n";
        $t_mantisbt_logo_url = helper_mantis_url('images/mantis_logo.png');
        echo "\t\t" . '<a href="http://www.mantisbt.org"
			title="Mantis Bug Tracker: a free and open source web based bug tracking system.">
			<img src="' . $t_mantisbt_logo_url . '" width="102" height="35" 
				alt="Powered by Mantis Bug Tracker: a free and open source web based bug tracking system." />
			</a>' . "\n";
        echo "\t" . '</div>' . "\n";
    }
    # Show MantisBT version and copyright statement
    $t_version_suffix = '';
    $t_copyright_years = ' 2000 - ' . date('Y');
    if (config_get('show_version') == ON) {
        $t_version_suffix = ' ' . htmlentities(MANTIS_VERSION . config_get_global('version_suffix'));
    }
    echo '<address id="mantisbt-copyright">' . "\n";
    echo '<address id="version">Powered by <a href="http://www.mantisbt.org" title="bug tracking software">MantisBT ' . $t_version_suffix . "</a></address>\n";
    echo 'Copyright &copy;' . $t_copyright_years . ' MantisBT Team';
    # Show optional user-specified custom copyright statement
    $t_copyright_statement = config_get('copyright_statement');
    if ($t_copyright_statement) {
        echo "\t" . '<address id="user-copyright">' . $t_copyright_statement . '</address>' . "\n";
    }
    echo '</address>' . "\n";
    # Show contact information
    if (!is_page_name('login_page')) {
        $t_webmaster_email = config_get('webmaster_email');
        if (!is_blank($t_webmaster_email)) {
            $t_webmaster_contact_information = sprintf(lang_get('webmaster_contact_information'), string_html_specialchars($t_webmaster_email));
            echo "\t" . '<address id="webmaster-contact-information">' . $t_webmaster_contact_information . '</address>' . "\n";
        }
    }
    event_signal('EVENT_LAYOUT_PAGE_FOOTER');
    # Print horizontal rule if any debugging statistics follow
    if (config_get('show_timer') || config_get('show_memory_usage') || config_get('show_queries_count')) {
        echo "\t" . '<hr />' . "\n";
    }
    # Print the page execution time
    if (config_get('show_timer')) {
        $t_page_execution_time = sprintf(lang_get('page_execution_time'), number_format(microtime(true) - $g_request_time, 4));
        echo "\t" . '<p id="page-execution-time">' . $t_page_execution_time . '</p>' . "\n";
    }
    # Print the page memory usage
    if (config_get('show_memory_usage')) {
        $t_page_memory_usage = sprintf(lang_get('memory_usage_in_kb'), number_format(memory_get_peak_usage() / 1024));
        echo "\t" . '<p id="page-memory-usage">' . $t_page_memory_usage . '</p>' . "\n";
    }
    # Determine number of unique queries executed
    if (config_get('show_queries_count')) {
        $t_total_queries_count = count($g_queries_array);
        $t_unique_queries_count = 0;
        $t_total_query_execution_time = 0;
        $t_unique_queries = array();
        for ($i = 0; $i < $t_total_queries_count; $i++) {
            if (!in_array($g_queries_array[$i][0], $t_unique_queries)) {
                $t_unique_queries_count++;
                $g_queries_array[$i][3] = false;
                array_push($t_unique_queries, $g_queries_array[$i][0]);
            } else {
                $g_queries_array[$i][3] = true;
            }
            $t_total_query_execution_time += $g_queries_array[$i][1];
        }
        $t_total_queries_executed = sprintf(lang_get('total_queries_executed'), $t_total_queries_count);
        echo "\t" . '<p id="total-queries-count">' . $t_total_queries_executed . '</p>' . "\n";
        if (config_get_global('db_log_queries')) {
            $t_unique_queries_executed = sprintf(lang_get('unique_queries_executed'), $t_unique_queries_count);
            echo "\t" . '<p id="unique-queries-count">' . $t_unique_queries_executed . '</p>' . "\n";
        }
        $t_total_query_time = sprintf(lang_get('total_query_execution_time'), $t_total_query_execution_time);
        echo "\t" . '<p id="total-query-execution-time">' . $t_total_query_time . '</p>' . "\n";
    }
    # Print table of log events
    log_print_to_page();
    echo '</div>' . "\n";
}
<?php

if (is_page_name('login_page')) {
    $t_align = 'center';
} else {
    $t_align = 'right';
    /*BFE_DK_von left auf right geändert*/
}
echo '<div align="', $t_align, '">';
if (is_page_name('login_page')) {
    echo '<a href="http://www.bfe.tv" title="BFE Homepage"><img border="0" alt="BFE Homepage" src="images/bfe_logo.jpg" /></a>';
} else {
    echo '<a href="/" title="BFE ITS Homepage"><img border="0" alt="BFE ITS Homepage" src="images/bfe_logo.jpg" /></a>';
}
/*	if ( is_page_name( 'login_page' ) ) {
		echo '<br />';
        	echo '<div class="menu" style="background-color:red;"><p><b>Achtung, dieses System ist nicht im produktiven Einsatz!</b></p>';
		echo '<p><b>Wenn Sie durch &quot;raten&quot; hier gelandet sind, sind Sie hier falsch!</b></p>';
		echo '<p><b>Sie m&ouml;chten wahrscheinlich nach: </b><a href="https://issuetracking.bfe.tv">https://issuetracking.bfe.tv</a></p></div>';
	}*/
echo '</div>';
Ejemplo n.º 9
0
 /**
  * Change xmpp login.
  */
 function change_xmpp_login($p_event)
 {
     $xmpp_login_table = plugin_table('xmpp_login', 'JabberNotifierSystem');
     $logon_user_id = auth_get_current_user_id();
     $query_can_change = "SELECT chng_login FROM {$xmpp_login_table} WHERE user_id = {$logon_user_id};";
     $res_can_change = db_query($query_can_change);
     while ($row = db_fetch_array($res_can_change)) {
         $change = $row['chng_login'];
     }
     if (ON == plugin_config_get('change_xmpp_login') && $change == 0) {
         if (is_page_name('account_page.php')) {
             print_change_xmpp_login();
         }
     }
 }