| [ Index ] |
PHP Cross Reference of MantisBT |
[Summary view] [Print] [Text view]
1 <?php 2 # MantisBT - A PHP based bugtracking system 3 4 # MantisBT is free software: you can redistribute it and/or modify 5 # it under the terms of the GNU General Public License as published by 6 # the Free Software Foundation, either version 2 of the License, or 7 # (at your option) any later version. 8 # 9 # MantisBT is distributed in the hope that it will be useful, 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # GNU General Public License for more details. 13 # 14 # You should have received a copy of the GNU General Public License 15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * @package MantisBT 19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 20 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net 21 * @link http://www.mantisbt.org 22 * 23 * @uses core.php 24 * @uses authentication_api.php 25 * @uses config_api.php 26 * @uses constant_inc.php 27 * @uses crypto_api.php 28 * @uses email_api.php 29 * @uses form_api.php 30 * @uses gpc_api.php 31 * @uses helper_api.php 32 * @uses lang_api.php 33 * @uses print_api.php 34 * @uses user_api.php 35 * @uses utility_api.php 36 */ 37 38 /** 39 * MantisBT Core API's 40 */ 41 require_once ( 'core.php' ); 42 require_api( 'authentication_api.php' ); 43 require_api( 'config_api.php' ); 44 require_api( 'constant_inc.php' ); 45 require_api( 'crypto_api.php' ); 46 require_api( 'email_api.php' ); 47 require_api( 'form_api.php' ); 48 require_api( 'gpc_api.php' ); 49 require_api( 'helper_api.php' ); 50 require_api( 'lang_api.php' ); 51 require_api( 'print_api.php' ); 52 require_api( 'user_api.php' ); 53 require_api( 'utility_api.php' ); 54 55 form_security_validate( 'signup' ); 56 57 $f_username = strip_tags( gpc_get_string( 'username' ) ); 58 $f_email = strip_tags( gpc_get_string( 'email' ) ); 59 $f_captcha = gpc_get_string( 'captcha', '' ); 60 $f_public_key = gpc_get_string( 'public_key', '' ); 61 62 $f_username = trim( $f_username ); 63 $f_email = email_append_domain( trim( $f_email ) ); 64 $f_captcha = utf8_strtolower( trim( $f_captcha ) ); 65 66 # force logout on the current user if already authenticated 67 if( auth_is_user_authenticated() ) { 68 auth_logout(); 69 } 70 71 # Check to see if signup is allowed 72 if ( OFF == config_get_global( 'allow_signup' ) ) { 73 print_header_redirect( 'login_page.php' ); 74 exit; 75 } 76 77 if( ON == config_get( 'signup_use_captcha' ) && get_gd_version() > 0 && 78 helper_call_custom_function( 'auth_can_change_password', array() ) ) { 79 # captcha image requires GD library and related option to ON 80 $t_private_key = substr( hash( 'whirlpool', 'captcha' . config_get_global( 'crypto_master_salt' ) . $f_public_key, false ), 0, 5 ); 81 82 if ( $t_private_key != $f_captcha ) { 83 trigger_error( ERROR_SIGNUP_NOT_MATCHING_CAPTCHA, ERROR ); 84 } 85 } 86 87 email_ensure_not_disposable( $f_email ); 88 89 # notify the selected group a new user has signed-up 90 if( user_signup( $f_username, $f_email ) ) { 91 email_notify_new_account( $f_username, $f_email ); 92 } 93 94 form_security_purge( 'signup' ); 95 96 html_page_top1(); 97 html_page_top2a(); 98 ?> 99 100 <br /> 101 <div> 102 <table class="width50" cellspacing="1"> 103 <tr> 104 <td class="center"> 105 <strong><?php echo lang_get( 'signup_done_title' ) ?></strong><br/> 106 <?php echo "[$f_username - $f_email] " ?> 107 </td> 108 </tr> 109 <tr> 110 <td> 111 <br/> 112 <?php echo lang_get( 'password_emailed_msg' ) ?> 113 <br /><br/> 114 <?php echo lang_get( 'no_reponse_msg') ?> 115 <br/><br/> 116 </td> 117 </tr> 118 </table> 119 <br /> 120 <?php print_bracket_link( 'login_page.php', lang_get( 'proceed' ) ); ?> 121 </div> 122 123 <?php 124 html_page_bottom1a( __FILE__ );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |