2 # MantisBT - A PHP based bugtracking system
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.
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.
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/>.
19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
20 * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
21 * @link http://www.mantisbt.org
24 * @uses config_api.php
25 * @uses constant_inc.php
27 * @uses helper_api.php
31 * @uses utility_api.php
34 require_once( 'core.php' );
35 require_api( 'config_api.php' );
36 require_api( 'constant_inc.php' );
37 require_api( 'form_api.php' );
38 require_api( 'helper_api.php' );
39 require_api( 'html_api.php' );
40 require_api( 'lang_api.php' );
41 require_api( 'print_api.php' );
42 require_api( 'utility_api.php' );
44 # Check for invalid access to signup page
45 if ( OFF
== config_get_global( 'allow_signup' ) || LDAP
== config_get_global( 'login_method' ) ) {
46 print_header_redirect( 'login_page.php' );
49 # signup page shouldn't be indexed by search engines
50 html_robots_noindex();
55 $t_key = mt_rand( 0,99999 );
60 <form name
="signup_form" method
="post" action
="signup.php">
61 <?php
echo form_security_field( 'signup' ); ?
>
62 <table
class="width50" cellspacing
="1">
64 <td
class="form-title" colspan
="3">
65 <?php
echo lang_get( 'signup_title' ) ?
>
69 <td
class="category" width
="30%">
70 <?php
echo lang_get( 'username_label' ) ?
>
72 <td width
="70%" colspan
="2">
73 <input type
="text" name
="username" size
="32" maxlength
="<?php echo USERLEN;?>" />
78 <?php
echo lang_get( 'email_label' ) ?
>
81 <?php
print_email_input( 'email', '' ) ?
>
85 $t_allow_passwd = helper_call_custom_function( 'auth_can_change_password', array() );
86 if( ON
== config_get( 'signup_use_captcha' ) && get_gd_version() > 0 && ( true == $t_allow_passwd ) ) {
87 # captcha image requires GD library and related option to ON
91 <?php
echo lang_get( 'signup_captcha_request_label' ) ?
>
94 <?php
print_captcha_input( 'captcha', '' ) ?
>
97 <img src
="make_captcha_img.php?public_key=<?php echo $t_key ?>" alt
="visual captcha" />
98 <input type
="hidden" name
="public_key" value
="<?php echo $t_key ?>" />
103 if( false == $t_allow_passwd ) {
106 <td
class="category">
109 <?php
echo lang_get( 'no_password_request' ) ?
>
118 <?php
echo lang_get( 'signup_info' ) ?
>
123 <td
class="center" colspan
="3">
124 <input type
="submit" class="button" value
="<?php echo lang_get( 'signup_button' ) ?>" />
132 echo '<br /><div align="center">';
135 print_lost_password_link();
138 if ( ON
== config_get( 'use_javascript' ) ) {
140 <!-- Autofocus JS
-->
141 <?php
if ( ON
== config_get( 'use_javascript' ) ) { ?
>
142 <script type
="text/javascript" language
="JavaScript">
144 window
.document
.signup_form
.username
.focus();
151 html_page_bottom1a( __FILE__
);