|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Simple Machines Forum (SMF) |
|
4
|
|
|
* |
|
5
|
|
|
* @package SMF |
|
6
|
|
|
* @author Simple Machines https://www.simplemachines.org |
|
7
|
|
|
* @copyright 2020 Simple Machines and individual contributors |
|
8
|
|
|
* @license https://www.simplemachines.org/about/smf/license.php BSD |
|
9
|
|
|
* |
|
10
|
|
|
* @version 2.1 RC3 |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* This is just the basic "login" form. |
|
15
|
|
|
*/ |
|
16
|
|
|
function template_login() |
|
17
|
|
|
{ |
|
18
|
|
|
global $context, $settings, $scripturl, $modSettings, $txt; |
|
19
|
|
|
|
|
20
|
|
|
echo ' |
|
21
|
|
|
<div class="login"> |
|
22
|
|
|
<div class="cat_bar"> |
|
23
|
|
|
<h3 class="catbg"> |
|
24
|
|
|
<img src="', $settings['images_url'], '/icons/login_hd.png" alt="" class="icon"> ', $txt['login'], ' |
|
25
|
|
|
</h3> |
|
26
|
|
|
</div> |
|
27
|
|
|
<div class="roundframe"> |
|
28
|
|
|
<form class="login" action="', $context['login_url'], '" name="frmLogin" id="frmLogin" method="post" accept-charset="', $context['character_set'], '">'; |
|
29
|
|
|
|
|
30
|
|
|
// Did they make a mistake last time? |
|
31
|
|
|
if (!empty($context['login_errors'])) |
|
32
|
|
|
echo ' |
|
33
|
|
|
<div class="errorbox">', implode('<br>', $context['login_errors']), '</div> |
|
34
|
|
|
<br>'; |
|
35
|
|
|
|
|
36
|
|
|
// Or perhaps there's some special description for this time? |
|
37
|
|
|
if (isset($context['description'])) |
|
38
|
|
|
echo ' |
|
39
|
|
|
<div class="information">', $context['description'], '</div>'; |
|
40
|
|
|
|
|
41
|
|
|
// Now just get the basic information - username, password, etc. |
|
42
|
|
|
echo ' |
|
43
|
|
|
<dl> |
|
44
|
|
|
<dt>', $txt['username'], ':</dt> |
|
45
|
|
|
<dd> |
|
46
|
|
|
<input type="text" id="', !empty($context['from_ajax']) ? 'ajax_' : '', 'loginuser" name="user" size="20" value="', $context['default_username'], '" required> |
|
47
|
|
|
</dd> |
|
48
|
|
|
<dt>', $txt['password'], ':</dt> |
|
49
|
|
|
<dd> |
|
50
|
|
|
<input type="password" id="', !empty($context['from_ajax']) ? 'ajax_' : '', 'loginpass" name="passwrd" value="', $context['default_password'], '" size="20" required> |
|
51
|
|
|
</dd> |
|
52
|
|
|
</dl> |
|
53
|
|
|
<dl> |
|
54
|
|
|
<dt>', $txt['time_logged_in'], ':</dt> |
|
55
|
|
|
<dd> |
|
56
|
|
|
<select name="cookielength" id="cookielength">'; |
|
57
|
|
|
|
|
58
|
|
|
foreach ($context['login_cookie_times'] as $cookie_time => $cookie_txt) |
|
59
|
|
|
echo ' |
|
60
|
|
|
<option value="', $cookie_time, '"', $modSettings['cookieTime'] == $cookie_time ? ' selected' : '', '>', $txt[$cookie_txt], '</option>'; |
|
61
|
|
|
|
|
62
|
|
|
echo ' |
|
63
|
|
|
</select> |
|
64
|
|
|
</dd>'; |
|
65
|
|
|
|
|
66
|
|
|
// If they have deleted their account, give them a chance to change their mind. |
|
67
|
|
|
if (isset($context['login_show_undelete'])) |
|
68
|
|
|
echo ' |
|
69
|
|
|
<dt class="alert">', $txt['undelete_account'], ':</dt> |
|
70
|
|
|
<dd><input type="checkbox" name="undelete"></dd>'; |
|
71
|
|
|
|
|
72
|
|
|
echo ' |
|
73
|
|
|
</dl> |
|
74
|
|
|
<p> |
|
75
|
|
|
<input type="submit" value="', $txt['login'], '" class="button"> |
|
76
|
|
|
</p> |
|
77
|
|
|
<p class="smalltext"> |
|
78
|
|
|
<a href="', $scripturl, '?action=reminder">', $txt['forgot_your_password'], '</a> |
|
79
|
|
|
</p> |
|
80
|
|
|
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
|
81
|
|
|
<input type="hidden" name="', $context['login_token_var'], '" value="', $context['login_token'], '"> |
|
82
|
|
|
<script> |
|
83
|
|
|
setTimeout(function() { |
|
84
|
|
|
document.getElementById("', !empty($context['from_ajax']) ? 'ajax_' : '', isset($context['default_username']) && $context['default_username'] != '' ? 'loginpass' : 'loginuser', '").focus(); |
|
85
|
|
|
}, 150);'; |
|
86
|
|
|
|
|
87
|
|
|
if (!empty($context['from_ajax'])) |
|
88
|
|
|
echo ' |
|
89
|
|
|
form = $("#frmLogin"); |
|
90
|
|
|
form.submit(function(e) { |
|
91
|
|
|
e.preventDefault(); |
|
92
|
|
|
e.stopPropagation(); |
|
93
|
|
|
|
|
94
|
|
|
$.ajax({ |
|
95
|
|
|
url: form.prop("action"), |
|
96
|
|
|
method: "POST", |
|
97
|
|
|
data: form.serialize(), |
|
98
|
|
|
success: function(data) { |
|
99
|
|
|
if (data.indexOf("<bo" + "dy") > -1) { |
|
100
|
|
|
document.open(); |
|
101
|
|
|
document.write(data); |
|
102
|
|
|
document.close(); |
|
103
|
|
|
} |
|
104
|
|
|
else |
|
105
|
|
|
form.parent().html($(data).find(".roundframe").html()); |
|
106
|
|
|
}, |
|
107
|
|
|
error: function(xhr) { |
|
108
|
|
|
var data = xhr.responseText; |
|
109
|
|
|
if (data.indexOf("<bo" + "dy") > -1) { |
|
110
|
|
|
document.open(); |
|
111
|
|
|
document.write(data); |
|
112
|
|
|
document.close(); |
|
113
|
|
|
} |
|
114
|
|
|
else |
|
115
|
|
|
form.parent().html($(data).filter("#fatal_error").html()); |
|
116
|
|
|
} |
|
117
|
|
|
}); |
|
118
|
|
|
|
|
119
|
|
|
return false; |
|
120
|
|
|
});'; |
|
121
|
|
|
|
|
122
|
|
|
echo ' |
|
123
|
|
|
</script> |
|
124
|
|
|
</form>'; |
|
125
|
|
|
|
|
126
|
|
|
// It is a long story as to why we have this when we're clearly not going to use it. |
|
127
|
|
|
if (!empty($context['from_ajax'])) |
|
128
|
|
|
echo ' |
|
129
|
|
|
<br> |
|
130
|
|
|
<a href="javascript:self.close();"></a>'; |
|
131
|
|
|
|
|
132
|
|
|
echo ' |
|
133
|
|
|
</div><!-- .roundframe --> |
|
134
|
|
|
</div><!-- .login -->'; |
|
135
|
|
|
} |
|
136
|
|
|
|
|
137
|
|
|
/** |
|
138
|
|
|
* TFA authentication form |
|
139
|
|
|
*/ |
|
140
|
|
|
function template_login_tfa() |
|
141
|
|
|
{ |
|
142
|
|
|
global $context, $scripturl, $txt; |
|
143
|
|
|
|
|
144
|
|
|
echo ' |
|
145
|
|
|
<div class="login"> |
|
146
|
|
|
<div class="cat_bar"> |
|
147
|
|
|
<h3 class="catbg"> |
|
148
|
|
|
', $txt['tfa_profile_label'], ' |
|
149
|
|
|
</h3> |
|
150
|
|
|
</div> |
|
151
|
|
|
<div class="roundframe">'; |
|
152
|
|
|
|
|
153
|
|
|
if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) |
|
154
|
|
|
echo ' |
|
155
|
|
|
<div class="error"> |
|
156
|
|
|
', $txt['tfa_' . (!empty($context['tfa_error']) ? 'code_' : 'backup_') . 'invalid'], ' |
|
157
|
|
|
</div>'; |
|
158
|
|
|
|
|
159
|
|
|
echo ' |
|
160
|
|
|
<form action="', $context['tfa_url'], '" method="post" id="frmTfa"> |
|
161
|
|
|
<div id="tfaCode"> |
|
162
|
|
|
<p style="margin-bottom: 0.5em">', $txt['tfa_login_desc'], '</p> |
|
163
|
|
|
<div class="centertext"> |
|
164
|
|
|
<strong>', $txt['tfa_code'], ':</strong> |
|
165
|
|
|
<input type="text" name="tfa_code" value="', !empty($context['tfa_value']) ? $context['tfa_value'] : '', '"> |
|
166
|
|
|
<input type="submit" class="button" name="submit" value="', $txt['login'], '"> |
|
167
|
|
|
</div> |
|
168
|
|
|
<hr> |
|
169
|
|
|
<div class="centertext"> |
|
170
|
|
|
<input type="button" class="button" name="backup" value="', $txt['tfa_backup'], '"> |
|
171
|
|
|
</div> |
|
172
|
|
|
</div> |
|
173
|
|
|
<div id="tfaBackup" style="display: none;"> |
|
174
|
|
|
<p style="margin-bottom: 0.5em">', $txt['tfa_backup_desc'], '</p> |
|
175
|
|
|
<div class="centertext"> |
|
176
|
|
|
<strong>', $txt['tfa_backup_code'], ': </strong> |
|
177
|
|
|
<input type="text" name="tfa_backup" value="', !empty($context['tfa_backup']) ? $context['tfa_backup'] : '', '"> |
|
178
|
|
|
<input type="submit" class="button" name="submit" value="', $txt['login'], '"> |
|
179
|
|
|
</div> |
|
180
|
|
|
</div> |
|
181
|
|
|
</form> |
|
182
|
|
|
<script> |
|
183
|
|
|
form = $("#frmTfa");'; |
|
184
|
|
|
|
|
185
|
|
|
if (!empty($context['from_ajax'])) |
|
186
|
|
|
echo ' |
|
187
|
|
|
form.submit(function(e) { |
|
188
|
|
|
// If we are submitting backup code, let normal workflow follow since it redirects a couple times into a different page |
|
189
|
|
|
if (form.find("input[name=tfa_backup]:first").val().length > 0) |
|
190
|
|
|
return true; |
|
191
|
|
|
|
|
192
|
|
|
e.preventDefault(); |
|
193
|
|
|
e.stopPropagation(); |
|
194
|
|
|
|
|
195
|
|
|
$.post(form.prop("action"), form.serialize(), function(data) { |
|
196
|
|
|
if (data.indexOf("<bo" + "dy") > -1) |
|
197
|
|
|
document.location = ', JavaScriptEscape(!empty($_SESSION['login_url']) ? $_SESSION['login_url'] : $scripturl), '; |
|
198
|
|
|
else { |
|
199
|
|
|
form.parent().html($(data).find(".roundframe").html()); |
|
200
|
|
|
} |
|
201
|
|
|
}); |
|
202
|
|
|
|
|
203
|
|
|
return false; |
|
204
|
|
|
});'; |
|
205
|
|
|
|
|
206
|
|
|
echo ' |
|
207
|
|
|
form.find("input[name=backup]").click(function(e) { |
|
208
|
|
|
$("#tfaBackup").show(); |
|
209
|
|
|
$("#tfaCode").hide(); |
|
210
|
|
|
}); |
|
211
|
|
|
</script> |
|
212
|
|
|
</div><!-- .roundframe --> |
|
213
|
|
|
</div><!-- .login -->'; |
|
214
|
|
|
} |
|
215
|
|
|
|
|
216
|
|
|
/** |
|
217
|
|
|
* Tell a guest to get lost or login! |
|
218
|
|
|
*/ |
|
219
|
|
|
function template_kick_guest() |
|
220
|
|
|
{ |
|
221
|
|
|
global $context, $settings, $scripturl, $modSettings, $txt; |
|
222
|
|
|
|
|
223
|
|
|
// This isn't that much... just like normal login but with a message at the top. |
|
224
|
|
|
echo ' |
|
225
|
|
|
<form action="', $context['login_url'], '" method="post" accept-charset="', $context['character_set'], '" name="frmLogin" id="frmLogin"> |
|
226
|
|
|
<div class="login"> |
|
227
|
|
|
<div class="cat_bar"> |
|
228
|
|
|
<h3 class="catbg">', $txt['warning'], '</h3> |
|
229
|
|
|
</div>'; |
|
230
|
|
|
|
|
231
|
|
|
// Show the message or default message. |
|
232
|
|
|
echo ' |
|
233
|
|
|
<p class="information centertext"> |
|
234
|
|
|
', empty($context['kick_message']) ? $txt['only_members_can_access'] : $context['kick_message'], '<br>'; |
|
235
|
|
|
|
|
236
|
|
|
if ($context['can_register']) |
|
237
|
|
|
echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']); |
|
238
|
|
|
else |
|
239
|
|
|
echo $txt['login_below']; |
|
240
|
|
|
|
|
241
|
|
|
// And now the login information. |
|
242
|
|
|
echo ' |
|
243
|
|
|
<div class="cat_bar"> |
|
244
|
|
|
<h3 class="catbg"> |
|
245
|
|
|
<img src="', $settings['images_url'], '/icons/login_hd.png" alt="" class="icon"> ', $txt['login'], ' |
|
246
|
|
|
</h3> |
|
247
|
|
|
</div> |
|
248
|
|
|
<div class="roundframe"> |
|
249
|
|
|
<dl> |
|
250
|
|
|
<dt>', $txt['username'], ':</dt> |
|
251
|
|
|
<dd><input type="text" name="user" size="20"></dd> |
|
252
|
|
|
<dt>', $txt['password'], ':</dt> |
|
253
|
|
|
<dd><input type="password" name="passwrd" size="20"></dd> |
|
254
|
|
|
<dt>', $txt['time_logged_in'], ':</dt> |
|
255
|
|
|
<dd> |
|
256
|
|
|
<select name="cookielength" id="cookielength">'; |
|
257
|
|
|
|
|
258
|
|
|
foreach ($context['login_cookie_times'] as $cookie_time => $cookie_txt) |
|
259
|
|
|
echo ' |
|
260
|
|
|
<option value="', $cookie_time, '"', $modSettings['cookieTime'] == $cookie_time ? ' selected' : '', '>', $txt[$cookie_txt], '</option>'; |
|
261
|
|
|
|
|
262
|
|
|
echo ' |
|
263
|
|
|
</select> |
|
264
|
|
|
</dd> |
|
265
|
|
|
</dl> |
|
266
|
|
|
<p class="centertext"> |
|
267
|
|
|
<input type="submit" value="', $txt['login'], '" class="button"> |
|
268
|
|
|
</p> |
|
269
|
|
|
<p class="centertext smalltext"> |
|
270
|
|
|
<a href="', $scripturl, '?action=reminder">', $txt['forgot_your_password'], '</a> |
|
271
|
|
|
</p> |
|
272
|
|
|
</div> |
|
273
|
|
|
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
|
274
|
|
|
<input type="hidden" name="', $context['login_token_var'], '" value="', $context['login_token'], '"> |
|
275
|
|
|
</div><!-- .login --> |
|
276
|
|
|
</form>'; |
|
277
|
|
|
|
|
278
|
|
|
// Do the focus thing... |
|
279
|
|
|
echo ' |
|
280
|
|
|
<script> |
|
281
|
|
|
document.forms.frmLogin.user.focus(); |
|
282
|
|
|
</script>'; |
|
283
|
|
|
} |
|
284
|
|
|
|
|
285
|
|
|
/** |
|
286
|
|
|
* This is for maintenance mode. |
|
287
|
|
|
*/ |
|
288
|
|
|
function template_maintenance() |
|
289
|
|
|
{ |
|
290
|
|
|
global $context, $settings, $txt, $modSettings; |
|
291
|
|
|
|
|
292
|
|
|
// Display the administrator's message at the top. |
|
293
|
|
|
echo ' |
|
294
|
|
|
<form action="', $context['login_url'], '" method="post" accept-charset="', $context['character_set'], '"> |
|
295
|
|
|
<div class="login" id="maintenance_mode"> |
|
296
|
|
|
<div class="cat_bar"> |
|
297
|
|
|
<h3 class="catbg">', $context['title'], '</h3> |
|
298
|
|
|
</div> |
|
299
|
|
|
<div class="information"> |
|
300
|
|
|
<img class="floatleft" src="', $settings['images_url'], '/construction.png" width="40" height="40" alt="', $txt['in_maintain_mode'], '"> |
|
301
|
|
|
', $context['description'], '<br class="clear"> |
|
302
|
|
|
</div> |
|
303
|
|
|
<div class="title_bar"> |
|
304
|
|
|
<h4 class="titlebg">', $txt['admin_login'], '</h4> |
|
305
|
|
|
</div> |
|
306
|
|
|
<div class="roundframe"> |
|
307
|
|
|
<dl> |
|
308
|
|
|
<dt>', $txt['username'], ':</dt> |
|
309
|
|
|
<dd><input type="text" name="user" size="20"></dd> |
|
310
|
|
|
<dt>', $txt['password'], ':</dt> |
|
311
|
|
|
<dd><input type="password" name="passwrd" size="20"></dd> |
|
312
|
|
|
<dt>', $txt['time_logged_in'], ':</dt> |
|
313
|
|
|
<dd> |
|
314
|
|
|
<select name="cookielength" id="cookielength">'; |
|
315
|
|
|
|
|
316
|
|
|
foreach ($context['login_cookie_times'] as $cookie_time => $cookie_txt) |
|
317
|
|
|
echo ' |
|
318
|
|
|
<option value="', $cookie_time, '"', $modSettings['cookieTime'] == $cookie_time ? ' selected' : '', '>', $txt[$cookie_txt], '</option>'; |
|
319
|
|
|
|
|
320
|
|
|
echo ' |
|
321
|
|
|
</select> |
|
322
|
|
|
</dd> |
|
323
|
|
|
</dl> |
|
324
|
|
|
<input type="submit" value="', $txt['login'], '" class="button"> |
|
325
|
|
|
<br class="clear"> |
|
326
|
|
|
</div> |
|
327
|
|
|
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
|
328
|
|
|
<input type="hidden" name="', $context['login_token_var'], '" value="', $context['login_token'], '"> |
|
329
|
|
|
</div><!-- #maintenance_mode --> |
|
330
|
|
|
</form>'; |
|
331
|
|
|
} |
|
332
|
|
|
|
|
333
|
|
|
/** |
|
334
|
|
|
* This is for the security stuff - makes administrators login every so often. |
|
335
|
|
|
*/ |
|
336
|
|
|
function template_admin_login() |
|
337
|
|
|
{ |
|
338
|
|
|
global $context, $settings, $scripturl, $txt, $modSettings; |
|
339
|
|
|
|
|
340
|
|
|
// Since this should redirect to whatever they were doing, send all the get data. |
|
341
|
|
|
echo ' |
|
342
|
|
|
<form action="', !empty($modSettings['force_ssl']) ? strtr($scripturl, array('http://' => 'https://')) : $scripturl, $context['get_data'], '" method="post" accept-charset="', $context['character_set'], '" name="frmLogin" id="frmLogin"> |
|
343
|
|
|
<div class="login" id="admin_login"> |
|
344
|
|
|
<div class="cat_bar"> |
|
345
|
|
|
<h3 class="catbg"> |
|
346
|
|
|
<img src="', $settings['images_url'], '/icons/login_hd.png" alt="" class="icon"> ', $txt['login'], ' |
|
347
|
|
|
</h3> |
|
348
|
|
|
</div> |
|
349
|
|
|
<div class="roundframe centertext">'; |
|
350
|
|
|
|
|
351
|
|
|
if (!empty($context['incorrect_password'])) |
|
352
|
|
|
echo ' |
|
353
|
|
|
<div class="error">', $txt['admin_incorrect_password'], '</div>'; |
|
354
|
|
|
|
|
355
|
|
|
echo ' |
|
356
|
|
|
<strong>', $txt['password'], ':</strong> |
|
357
|
|
|
<input type="password" name="', $context['sessionCheckType'], '_pass" size="24"> |
|
358
|
|
|
<a href="', $scripturl, '?action=helpadmin;help=securityDisable_why" onclick="return reqOverlayDiv(this.href);" class="help"><span class="main_icons help" title="', $txt['help'], '"></span></a><br> |
|
359
|
|
|
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
|
360
|
|
|
<input type="hidden" name="', $context['admin-login_token_var'], '" value="', $context['admin-login_token'], '"> |
|
361
|
|
|
<input type="submit" value="', $txt['login'], '" class="button">'; |
|
362
|
|
|
|
|
363
|
|
|
// Make sure to output all the old post data. |
|
364
|
|
|
echo $context['post_data'], ' |
|
365
|
|
|
</div><!-- .roundframe --> |
|
366
|
|
|
</div><!-- #admin_login --> |
|
367
|
|
|
<input type="hidden" name="', $context['sessionCheckType'], '_hash_pass" value=""> |
|
368
|
|
|
</form>'; |
|
369
|
|
|
|
|
370
|
|
|
// Focus on the password box. |
|
371
|
|
|
echo ' |
|
372
|
|
|
<script> |
|
373
|
|
|
document.forms.frmLogin.', $context['sessionCheckType'], '_pass.focus(); |
|
374
|
|
|
</script>'; |
|
375
|
|
|
} |
|
376
|
|
|
|
|
377
|
|
|
/** |
|
378
|
|
|
* Activate your account manually? |
|
379
|
|
|
*/ |
|
380
|
|
|
function template_retry_activate() |
|
381
|
|
|
{ |
|
382
|
|
|
global $context, $txt, $scripturl; |
|
383
|
|
|
|
|
384
|
|
|
// Just ask them for their code so they can try it again... |
|
385
|
|
|
echo ' |
|
386
|
|
|
<form action="', $scripturl, '?action=activate;u=', $context['member_id'], '" method="post" accept-charset="', $context['character_set'], '"> |
|
387
|
|
|
<div class="title_bar"> |
|
388
|
|
|
<h3 class="titlebg">', $context['page_title'], '</h3> |
|
389
|
|
|
</div> |
|
390
|
|
|
<div class="roundframe"> |
|
391
|
|
|
<dl>'; |
|
392
|
|
|
|
|
393
|
|
|
// You didn't even have an ID? |
|
394
|
|
|
if (empty($context['member_id'])) |
|
395
|
|
|
echo ' |
|
396
|
|
|
<dt>', $txt['invalid_activation_username'], ':</dt> |
|
397
|
|
|
<dd><input type="text" name="user" size="30"></dd>'; |
|
398
|
|
|
|
|
399
|
|
|
echo ' |
|
400
|
|
|
<dt>', $txt['invalid_activation_retry'], ':</dt> |
|
401
|
|
|
<dd><input type="text" name="code" size="30"></dd> |
|
402
|
|
|
</dl> |
|
403
|
|
|
<p><input type="submit" value="', $txt['invalid_activation_submit'], '" class="button"></p> |
|
404
|
|
|
</div> |
|
405
|
|
|
</form>'; |
|
406
|
|
|
} |
|
407
|
|
|
|
|
408
|
|
|
/** |
|
409
|
|
|
* The form for resending the activation code. |
|
410
|
|
|
*/ |
|
411
|
|
|
function template_resend() |
|
412
|
|
|
{ |
|
413
|
|
|
global $context, $txt, $scripturl; |
|
414
|
|
|
|
|
415
|
|
|
// Just ask them for their code so they can try it again... |
|
416
|
|
|
echo ' |
|
417
|
|
|
<form action="', $scripturl, '?action=activate;sa=resend" method="post" accept-charset="', $context['character_set'], '"> |
|
418
|
|
|
<div class="title_bar"> |
|
419
|
|
|
<h3 class="titlebg">', $context['page_title'], '</h3> |
|
420
|
|
|
</div> |
|
421
|
|
|
<div class="roundframe"> |
|
422
|
|
|
<dl> |
|
423
|
|
|
<dt>', $txt['invalid_activation_username'], ':</dt> |
|
424
|
|
|
<dd><input type="text" name="user" size="40" value="', $context['default_username'], '"></dd> |
|
425
|
|
|
</dl> |
|
426
|
|
|
<p>', $txt['invalid_activation_new'], '</p> |
|
427
|
|
|
<dl> |
|
428
|
|
|
<dt>', $txt['invalid_activation_new_email'], ':</dt> |
|
429
|
|
|
<dd><input type="text" name="new_email" size="40"></dd> |
|
430
|
|
|
<dt>', $txt['invalid_activation_password'], ':</dt> |
|
431
|
|
|
<dd><input type="password" name="passwd" size="30"></dd> |
|
432
|
|
|
</dl>'; |
|
433
|
|
|
|
|
434
|
|
|
if ($context['can_activate']) |
|
435
|
|
|
echo ' |
|
436
|
|
|
<p>', $txt['invalid_activation_known'], '</p> |
|
437
|
|
|
<dl> |
|
438
|
|
|
<dt>', $txt['invalid_activation_retry'], ':</dt> |
|
439
|
|
|
<dd><input type="text" name="code" size="30"></dd> |
|
440
|
|
|
</dl>'; |
|
441
|
|
|
|
|
442
|
|
|
echo ' |
|
443
|
|
|
<p><input type="submit" value="', $txt['invalid_activation_resend'], '" class="button"></p> |
|
444
|
|
|
</div><!-- .roundframe --> |
|
445
|
|
|
</form>'; |
|
446
|
|
|
} |
|
447
|
|
|
|
|
448
|
|
|
/** |
|
449
|
|
|
* Confirm a logout. |
|
450
|
|
|
*/ |
|
451
|
|
|
function template_logout() |
|
452
|
|
|
{ |
|
453
|
|
|
global $context, $settings, $scripturl, $modSettings, $txt; |
|
454
|
|
|
|
|
455
|
|
|
// This isn't that much... just like normal login but with a message at the top. |
|
456
|
|
|
echo ' |
|
457
|
|
|
<form action="', $scripturl . '?action=logout;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '" name="frmLogout" id="frmLogout"> |
|
458
|
|
|
<div class="logout"> |
|
459
|
|
|
<div class="cat_bar"> |
|
460
|
|
|
<h3 class="catbg">', $txt['logout_confirm'], '</h3> |
|
461
|
|
|
</div> |
|
462
|
|
|
<div class="roundframe"> |
|
463
|
|
|
<p class="information centertext"> |
|
464
|
|
|
', $txt['logout_notice'], ' |
|
465
|
|
|
</p> |
|
466
|
|
|
|
|
467
|
|
|
<p class="centertext"> |
|
468
|
|
|
<input type="submit" value="', $txt['logout'], '" class="button"> |
|
469
|
|
|
<input type="submit" name="cancel" value="', $txt['logout_return'], '" class="button"> |
|
470
|
|
|
</p> |
|
471
|
|
|
</div> |
|
472
|
|
|
</div><!-- .logout --> |
|
473
|
|
|
</form>'; |
|
474
|
|
|
} |
|
475
|
|
|
|
|
476
|
|
|
?> |