Skip to content

Commit

Permalink
for manage user
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@51 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Dec 9, 2000
1 parent c3a43a7 commit 3c0a32c
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
63 changes: 63 additions & 0 deletions manage_user_delete.php3
@@ -0,0 +1,63 @@
<?
# Mantis - a php based bugtracking system
# Copyright (C) 2000 Kenzaburo Ito - kenito@300baud.org
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
?>
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !access_level_check_greater( "administrator" ) ) {
### need to replace with access error page
header( "Location: $g_logout_page" );
exit;
}

### delete account
if ( $f_protected!="on" ) {
$query = "DELETE
FROM $g_mantis_user_table
WHERE id='$f_id'";
}
$result = mysql_query( $query );
?>
<? print_html_top() ?>
<? print_head_top() ?>
<? print_title( $g_window_title ) ?>
<? print_css( $g_css_include_file ) ?>
<?
if ( $result ) {
print_meta_redirect( $g_manage_page, $g_wait_time );
}
?>
<? include( $g_meta_include_file ) ?>
<? print_head_bottom() ?>
<? print_body_top() ?>
<? print_header( $g_page_title ) ?>

<p>
<? print_menu( $g_menu_include_file ) ?>

<p>
<div align=center>
<?
if ( $f_protected=="on" ) {
PRINT "Account protected. Cannot delete.<p>";
}
else if ( $result ) {
PRINT "Account deleted...<p>";
}
else {
PRINT "ERROR DETECTED: Report this sql statement to <a href=\"<? echo $g_administrator_email ?>\">administrator</a><p>";
echo $query;
}
?>
<p>
<a href="<? echo $g_manage_page ?>">Click here to proceed</a>
</div>

<? print_footer() ?>
<? print_body_bottom() ?>
<? print_html_bottom() ?>
58 changes: 58 additions & 0 deletions manage_user_reset.php3
@@ -0,0 +1,58 @@
<?
# Mantis - a php based bugtracking system
# Copyright (C) 2000 Kenzaburo Ito - kenito@300baud.org
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
?>
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !access_level_check_greater( "administrator" ) ) {
### need to replace with access error page
header( "Location: $g_logout_page" );
exit;
}

### password is blank password
$query = "UPDATE $g_mantis_user_table
SET password='4nPtPLdAFdoxA'
WHERE id='$f_id'";
$result = mysql_query( $query );
?>
<? print_html_top() ?>
<? print_head_top() ?>
<? print_title( $g_window_title ) ?>
<? print_css( $g_css_include_file ) ?>
<?
if ( $result ) {
print_meta_redirect( $g_manage_page, $g_wait_time );
}
?>
<? include( $g_meta_include_file ) ?>
<? print_head_bottom() ?>
<? print_body_top() ?>
<? print_header( $g_page_title ) ?>

<p>
<? print_menu( $g_menu_include_file ) ?>

<p>
<div align=center>
<?
if ( $result ) {
PRINT "Account password reset...<p>";
}
else {
PRINT "ERROR DETECTED: Report this sql statement to <a href=\"<? echo $g_administrator_email ?>\">administrator</a><p>";
echo $query;
}
?>
<p>
<a href="<? echo $g_manage_page ?>">Click here to proceed</a>
</div>

<? print_footer() ?>
<? print_body_bottom() ?>
<? print_html_bottom() ?>

0 comments on commit 3c0a32c

Please sign in to comment.