Skip to content

Commit

Permalink
Made advanced report and update toggles
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@14 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Dec 5, 2000
1 parent 672da2e commit ea3657c
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 25 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -11,6 +11,7 @@ To Do:
* Add postgreSQL support and a Database abstraction layer
* Refine viewing preferences
* Add profiles for each user
* Refine viewing news archives

XX.XX.2000 - 0.10.2

Expand Down
53 changes: 29 additions & 24 deletions account_update.php3
Expand Up @@ -9,32 +9,34 @@
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( $f_action=="update" ) {
$query = "UPDATE $g_mantis_user_table
SET username='$f_username', email='$f_email'
WHERE id='$f_id'";
$result = mysql_query( $query );
if ( $f_protected!="on" ) { ### only if not protected
if ( $f_action=="update" ) {
$query = "UPDATE $g_mantis_user_table
SET username='$f_username', email='$f_email'
WHERE id='$f_id'";
$result = mysql_query( $query );

### lets change the password
if ( !empty( $f_password ) ) {
if ( $f_password==$f_password_confirm ) {
$t_password = crypt( $f_password );
$query = "UPDATE $g_mantis_user_table
SET password='$t_password'
WHERE id='$f_id'";
$result = mysql_query( $query );
}
### lets change the password
if ( !empty( $f_password ) ) {
if ( $f_password==$f_password_confirm ) {
$t_password = crypt( $f_password );
$query = "UPDATE $g_mantis_user_table
SET password='$t_password'
WHERE id='$f_id'";
$result = mysql_query( $query );
}
}
}
else if ( $f_action=="delete" ) {
$query = "DELETE
FROM $g_mantis_user_table
WHERE id='$f_id'";
$result = mysql_query( $query );
header( "Location: $g_logout_page" );
}
else {
echo "ERROR: INVALID ACTION";
}
}
else if ( $f_action=="delete" ) {
$query = "DELETE
FROM $g_mantis_user_table
WHERE id='$f_id'";
$result = mysql_query( $query );
header( "Location: $g_logout_page" );
}
else {
echo "ERROR: INVALID ACTION";
}
?>
<? print_html_top() ?>
Expand All @@ -59,6 +61,9 @@
### SUCCESS
if ( $result ) {
PRINT "Your account has been successfully updated...<p>";
if ( $f_protected=="on" ) {
PRINT "Account protected. Cannot change some settings.<p>";
}
}
### FAILURE
else {
Expand Down
6 changes: 6 additions & 0 deletions bug_update_page.php3
Expand Up @@ -21,10 +21,16 @@
<p>
<? print_menu( $g_menu_include_file ) ?>

<?
if ( $g_show_advanced_update==1 ) {
?>
<p>
<div align=center>
[ <a href="<? echo $g_bug_view_page ?>?f_id=<? echo $f_id ?>">Back</a> ]
</div>
<?
}
?>

<?
$query = "SELECT *
Expand Down
8 changes: 7 additions & 1 deletion config_inc.php
Expand Up @@ -38,6 +38,12 @@
$g_window_title = "Mantis"; # browser window title
$g_page_title = "Mantis"; # title in html page

#--------------------
# toggling advanced interfaces
$g_show_advanced_report = 1; # 1 to enable - 0 to disable
$g_show_advanced_update = 1; # 1 to enable - 0 to disable
#--------------------

# core file variables
$g_core_API_file = "core_API.php";
$g_meta_include_file = "meta_inc.php";
Expand Down Expand Up @@ -166,4 +172,4 @@

#version
$g_mantis_version = "0.10.0";
?>
?>
6 changes: 6 additions & 0 deletions report_bug_page.php3
Expand Up @@ -21,10 +21,16 @@
<p>
<? print_menu( $g_menu_include_file ) ?>

<?
if ( $g_show_advanced_report==1 ) {
?>
<p>
<div align=center>
[ <a href="<? echo $g_report_bug_advanced_page ?>">Advanced Report</a> ]
</div>
<?
}
?>

<p>
<div align=center>
Expand Down

0 comments on commit ea3657c

Please sign in to comment.