Fix #11417: Allow EVENT_MENU_MAIN plugin events to return null
[mantis/radio.git] / signup_page.php
blob624de6564e2f42582c9b0c7a35683afa55059852
1 <?php
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/>.
17 /**
18 * @package MantisBT
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
23 * @uses core.php
24 * @uses config_api.php
25 * @uses constant_inc.php
26 * @uses form_api.php
27 * @uses helper_api.php
28 * @uses html_api.php
29 * @uses lang_api.php
30 * @uses print_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();
52 html_page_top1();
53 html_page_top2a();
55 $t_key = mt_rand( 0,99999 );
58 <br />
59 <div align="center">
60 <form name="signup_form" method="post" action="signup.php">
61 <?php echo form_security_field( 'signup' ); ?>
62 <table class="width50" cellspacing="1">
63 <tr>
64 <td class="form-title" colspan="3">
65 <?php echo lang_get( 'signup_title' ) ?>
66 </td>
67 </tr>
68 <tr class="row-1">
69 <td class="category" width="30%">
70 <?php echo lang_get( 'username_label' ) ?>
71 </td>
72 <td width="70%" colspan="2">
73 <input type="text" name="username" size="32" maxlength="<?php echo USERLEN;?>" />
74 </td>
75 </tr>
76 <tr class="row-2">
77 <td class="category">
78 <?php echo lang_get( 'email_label' ) ?>
79 </td>
80 <td colspan="2">
81 <?php print_email_input( 'email', '' ) ?>
82 </td>
83 </tr>
84 <?php
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
89 <tr class="row-1">
90 <td class="category">
91 <?php echo lang_get( 'signup_captcha_request_label' ) ?>
92 </td>
93 <td>
94 <?php print_captcha_input( 'captcha', '' ) ?>
95 </td>
96 <td>
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 ?>" />
99 </td>
100 </tr>
101 <?php
103 if( false == $t_allow_passwd ) {
105 <tr class="row-1">
106 <td class="category">
107 </td>
108 <td colspan="2">
109 <?php echo lang_get( 'no_password_request' ) ?>
110 </td>
111 </tr>
112 <?php
115 <tr>
116 <td colspan="3">
117 <br/>
118 <?php echo lang_get( 'signup_info' ) ?>
119 <br/><br/>
120 </td>
121 </tr>
122 <tr>
123 <td class="center" colspan="3">
124 <input type="submit" class="button" value="<?php echo lang_get( 'signup_button' ) ?>" />
125 </td>
126 </tr>
127 </table>
128 </form>
129 </div>
131 <?php
132 echo '<br /><div align="center">';
133 print_login_link();
134 echo '&nbsp;';
135 print_lost_password_link();
136 echo '</div>';
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">
143 <!--
144 window.document.signup_form.username.focus();
145 // -->
146 </script>
147 <?php
151 html_page_bottom1a( __FILE__ );