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 * @author Marcello Scata' <marcelloscata at users.sourceforge.net> ITALY
20 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
21 * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
22 * @link http://www.mantisbt.org
25 * @uses config_api.php
26 * @uses constant_inc.php
28 * @uses helper_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' );
43 # lost password feature disabled or reset password via email disabled -> stop here!
44 if ( LDAP
== config_get_global( 'login_method' ) ||
45 OFF
== config_get( 'lost_password_feature' ) ||
46 OFF
== config_get( 'send_reset_password' ) ||
47 OFF
== config_get( 'enable_email_notification' ) ) {
48 trigger_error( ERROR_LOST_PASSWORD_NOT_ENABLED
, ERROR
);
51 # don't index lost password page
52 html_robots_noindex();
61 <form name
="lost_password_form" method
="post" action
="lost_pwd.php">
62 <?php
echo form_security_field( 'lost_pwd' ) ?
>
63 <table
class="width50" cellspacing
="1">
65 <td
class="form-title" colspan
="2">
66 <?php
echo lang_get( 'lost_password_title' ) ?
>
70 $t_allow_passwd = helper_call_custom_function( 'auth_can_change_password', array() );
71 if ( $t_allow_passwd ) {
74 <td
class="category" width
="25%">
75 <?php
echo lang_get( 'username' ) ?
>
78 <input type
="text" name
="username" size
="32" maxlength
="<?php echo USERLEN;?>" />
82 <td
class="category" width
="25%">
83 <?php
echo lang_get( 'email' ) ?
>
86 <?php
print_email_input( 'email', '' ) ?
>
92 <?php
echo lang_get( 'lost_password_info' ) ?
>
97 <td
class="center" colspan
="2">
98 <input type
="submit" class="button" value
="<?php echo lang_get( 'submit_button' ) ?>" />
107 <?php
echo lang_get( 'no_password_request' ) ?
>
120 echo '<br /><div align="center">';
126 if ( ON
== config_get( 'use_javascript' ) ) {
128 <!-- Autofocus JS
-->
129 <?php
if ( ON
== config_get( 'use_javascript' ) ) { ?
>
130 <script type
="text/javascript" language
="JavaScript">
132 window
.document
.lost_password_form
.username
.focus();
139 html_page_bottom1a( __FILE__
);