Project

General

Profile

« Previous | Next » 

Revision 1782

Added by Dietmar over 11 years ago

+ add maintance modus in backend

View differences:

index.php
3 3
 *
4 4
 * @category        admin
5 5
 * @package         login
6
 * @author          Ryan Djurovich, WebsiteBaker Project
6
 * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
7 7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 8
 * @link			http://www.websitebaker2.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
......
21 21
}
22 22
// Include the language file
23 23
require(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php');
24

  
24 25
// Include the database class file and initiate an object
25
require(WB_PATH.'/framework/class.admin.php');
26
//if(!class_exists('frontend', false)){ require_once(WB_PATH.'/framework/class.frontend.php'); }
27
//$admin = new frontend();
28
if(!class_exists('admin', false)){ require_once(WB_PATH.'/framework/class.admin.php'); }
26 29
$admin = new admin('Start', 'start', false, false);
27 30

  
28 31
// Get the website title
......
50 53
		if($time_diff < 2) {
51 54

  
52 55
			// Tell the user that their password cannot be reset more than once per hour
53
			$message = $MESSAGE['FORGOT_PASS']['ALREADY_RESET'];
56
			$message = $MESSAGE['FORGOT_PASS_ALREADY_RESET'];
54 57

  
55 58
		} else {
56 59

  
......
76 79
			} else {
77 80
				// Setup email to send
78 81
				$mail_to = $email;
79
				$mail_subject = $MESSAGE['SIGNUP2']['SUBJECT_LOGIN_INFO'];
82
				$mail_subject = $MESSAGE['SIGNUP2_SUBJECT_LOGIN_INFO'];
80 83

  
81 84
				// Replace placeholders from language variable with values
82 85
				$search = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LOGIN_PASSWORD}');
83 86
				$replace = array($results_array['display_name'], WEBSITE_TITLE, $results_array['username'], $new_pass);
84
				$mail_message = str_replace($search, $replace, $MESSAGE['SIGNUP2']['BODY_LOGIN_FORGOT']);
87
				$mail_message = str_replace($search, $replace, $MESSAGE['SIGNUP2_BODY_LOGIN_FORGOT']);
85 88

  
86 89
				// Try sending the email
87 90
				if($admin->mail(SERVER_EMAIL,$mail_to,$mail_subject,$mail_message)) {
88
					$message = $MESSAGE['FORGOT_PASS']['PASSWORD_RESET'];
91
					$message = $MESSAGE['FORGOT_PASS_PASSWORD_RESET'];
89 92
					$display_form = false;
90 93
				} else {
91 94
					$database->query("UPDATE ".TABLE_PREFIX."users SET password = '".$old_pass."' WHERE user_id = '".$results_array['user_id']."'");
92
					$message = $MESSAGE['FORGOT_PASS']['CANNOT_EMAIL'];
95
					$message = $MESSAGE['FORGOT_PASS_CANNOT_EMAIL'];
93 96
				}
94 97
			}
95 98

  
......
97 100

  
98 101
	} else {
99 102
		// Email doesn't exist, so tell the user
100
		$message = $MESSAGE['FORGOT_PASS']['EMAIL_NOT_FOUND'];
103
		$message = $MESSAGE['FORGOT_PASS_EMAIL_NOT_FOUND'];
101 104
		// and delete the wrong Email
102 105
		$email = '';
103 106
	}
......
107 110
}
108 111

  
109 112
if(!isset($message)) {
110
	$message = $MESSAGE['FORGOT_PASS']['NO_DATA'];
113
	$message = $MESSAGE['FORGOT_PASS_NO_DATA'];
111 114
	$message_color = '000000';
112 115
} else {
113 116
	$message_color = 'FF0000';

Also available in: Unified diff