Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@886 f5dc347c-c33d-0410-90a0-b07cc1902cb9
- Loading branch information
Kenzaburo Ito
committed
Apr 4, 2002
1 parent
ecdd9f2
commit 8d11a80
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
# Mantis - a php based bugtracking system | ||
# Copyright (C) 2000 - 2002 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 | ||
?> | ||
<?php include( "core_API.php" ) ?> | ||
<?php login_cookie_check() ?> | ||
<?php | ||
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name ); | ||
check_access( MANAGER ); | ||
|
||
# check for no projects | ||
if ( !isset( $f_project_id ) ) { | ||
$f_project_id = ""; | ||
} | ||
|
||
# Add user to project(s) | ||
$result = 0; | ||
$count = count( $f_project_id ); | ||
for ($i=0;$i<$count;$i++) { | ||
$t_project_id = $f_project_id[$i]; | ||
$query = "INSERT | ||
INTO $g_mantis_project_user_list_table | ||
(project_id, user_id, access_level) | ||
VALUES | ||
('$t_project_id', '$f_user_id', '$f_access_level')"; | ||
$result = db_query( $query ); | ||
} | ||
|
||
$t_redirect_url = $g_manage_user_page."?f_id=".$f_user_id; | ||
if ( $result ) { | ||
print_header_redirect( $t_redirect_url ); | ||
} else { | ||
print_mantis_error( ERROR_GENERIC ); | ||
} | ||
?> |