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 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
21 * @link http://www.mantisbt.org
24 * @uses config_api.php
25 * @uses constant_inc.php
26 * @uses crypto_api.php
28 * @uses helper_api.php
32 * @uses utility_api.php
38 require_once( 'core.php' );
39 require_api( 'config_api.php' );
40 require_api( 'constant_inc.php' );
41 require_api( 'crypto_api.php' );
42 require_api( 'form_api.php' );
43 require_api( 'helper_api.php' );
44 require_api( 'html_api.php' );
45 require_api( 'lang_api.php' );
46 require_api( 'print_api.php' );
47 require_api( 'utility_api.php' );
48 require_css( 'login.css' );
50 # Check for invalid access to signup page
51 if ( OFF
== config_get_global( 'allow_signup' ) || LDAP
== config_get_global( 'login_method' ) ) {
52 print_header_redirect( 'login_page.php' );
55 # signup page shouldn't be indexed by search engines
56 html_robots_noindex();
61 $t_public_key = crypto_generate_uri_safe_nonce( 64 );
64 <div id
="signup-div" class="form-container">
65 <form id
="signup-form" method
="post" action
="signup.php">
67 <legend
><span
><?php
echo lang_get( 'signup_title' ) ?
></span
></legend
>
68 <?php
echo form_security_field( 'signup' ); ?
>
70 <li
><a href
="login_page.php"><?php
echo lang_get( 'login_link' ); ?
></a
></li
>
72 # lost password feature disabled or reset password via email disabled
73 if ( ( LDAP
!= config_get_global( 'login_method' ) ) &&
74 ( ON
== config_get( 'lost_password_feature' ) ) &&
75 ( ON
== config_get( 'send_reset_password' ) ) &&
76 ( ON
== config_get( 'enable_email_notification' ) ) ) {
77 echo '<li><a href="lost_pwd_page.php">', lang_get( 'lost_password_link' ), '</a></li>';
81 <div
class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
82 <label
for="username"><span
><?php
echo lang_get( 'username' ) ?
></span
></label
>
83 <span
class="input"><input id
="username" type
="text" name
="username" size
="32" maxlength
="<?php echo USERLEN;?>" class="autofocus" /></span
>
84 <span
class="label-style"></span
>
86 <div
class="field-container <?php echo helper_alternate_class_no_attribute(); ?>">
87 <label
for="email-field"><span
><?php
echo lang_get( 'email_label' ) ?
></span
></label
>
88 <span
class="input"><?php
print_email_input( 'email', '' ) ?
></span
>
89 <span
class="label-style"></span
>
93 $t_allow_passwd = helper_call_custom_function( 'auth_can_change_password', array() );
94 if( ON
== config_get( 'signup_use_captcha' ) && get_gd_version() > 0 && ( true == $t_allow_passwd ) ) {
95 # captcha image requires GD library and related option to ON
97 echo '<div class="field-container ', helper_alternate_class_no_attribute(), '">';
98 echo '<label for="captcha-field"><span>' . lang_get( 'signup_captcha_request_label' ) . '</span></label>';
99 echo '<span id="captcha-input" class="input">';
100 print_captcha_input( 'captcha', '' );
101 echo '<span class="captcha-image"><img src="make_captcha_img.php?public_key=' . $t_public_key . '" alt="visual captcha" /></span>';
103 echo '<input type="hidden" name="public_key" value="' . $t_public_key . '" />';
104 echo '<span class="label-style"></span>';
107 if( false == $t_allow_passwd ) {
108 echo '<span id="no-password-msg">';
109 echo lang_get( 'no_password_request' );
113 <span id
="signup-info"><?php
echo lang_get( 'signup_info' ); ?
></span
>
114 <span
class="submit-button"><input type
="submit" class="button" value
="<?php echo lang_get( 'signup_button' ) ?>" /></span
>
119 <?php
html_page_bottom1a( __FILE__
);