diff --git a/signup.php3 b/signup.php3 new file mode 100644 index 0000000000..3bcd728f2d --- /dev/null +++ b/signup.php3 @@ -0,0 +1,99 @@ + + + 0 ) { + echo "DUPLICATE ID. CHOOSE ANOTHER USERNAME"; + exit; + } + + ### Passed our checks. Insert into DB then send email. + $t_password = create_random_password( $p_email ); + $result = send_new_user_password( $f_username, $f_email, $t_password ); + if ( !$result ) { + echo "PROBLEMS SENDING EMAIL"; + exit; + } + + ### create the almost unique string for each user then insert into the table + $t_cookie_string = create_cookie_string( $f_email ); + $t_password = crypt( $t_password ); + $query = "INSERT + INTO $g_mantis_user_table + ( id, username, email, password, date_created, last_visit, + access_level, enabled, protected, cookie_string ) + VALUES + ( null, '$f_username', '$f_email', '$t_password', NOW(), NOW(), + 'reporter', 'on', '', '$t_cookie_string')"; + $result = db_query( $query ); + if ( !$result ) { + echo "Failed to create user account"; + exit; + } + + ### Use this for MS SQL: SELECT @@IDENTITY AS 'id' + $query = "select LAST_INSERT_ID()"; + $result = db_query( $query ); + if ( $result ) { + $t_user_id = db_result( $result, 0, 0 ); + } + + ### Add profile + $query = "INSERT + INTO $g_mantis_user_profile_table + ( id, user_id, platform, os, os_build, description, default_profile ) + VALUES + ( null, '$f_user_id', '$f_platform', '$f_os', '$f_os_build', '$f_description', '' )"; + $result = db_query( $query ); +?> + + + + + + + + + +

+

+Wait a few minutes and check your email for your password. If you do not respond within a week your account may be deleted."; + } + ### FAILURE + else { + PRINT "$s_sql_error_detected \">administrator

"; + } +?> +

+ +

+ + + + \ No newline at end of file diff --git a/signup_page.php3 b/signup_page.php3 new file mode 100644 index 0000000000..f33c9242b9 --- /dev/null +++ b/signup_page.php3 @@ -0,0 +1,60 @@ + + + + + + + + + + +

+

+ +

+> + + + +
> + + + + + + > + + + + > + + + + + + + +
> + +
+ : + + +
+ : + + +
+ +
+
+

+ + + + \ No newline at end of file