Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 437 lines (364 sloc) 21.681 kb
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
1 <?php
2
e5f7b2a @reines Updating copyright notices in all files
reines authored
3 /**
7c5edc2 @reines Updating copyright notices for 2012
reines authored
4 * Copyright (C) 2008-2012 FluxBB
e5f7b2a @reines Updating copyright notices in all files
reines authored
5 * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB
6 * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 */
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
8
f5ee836 @reines Changing PUN_ROOT to use absolute paths, this solves some issues with AP...
reines authored
9 define('PUN_ROOT', dirname(__FILE__).'/');
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
10 require PUN_ROOT.'include/common.php';
11
12
13 // If we are logged in, we shouldn't be here
14 if (!$pun_user['is_guest'])
15 {
16 header('Location: index.php');
17 exit;
18 }
19
20 // Load the register.php language file
21 require PUN_ROOT.'lang/'.$pun_user['language'].'/register.php';
22
23 // Load the register.php/profile.php language file
24 require PUN_ROOT.'lang/'.$pun_user['language'].'/prof_reg.php';
25
26 if ($pun_config['o_regs_allow'] == '0')
27 message($lang_register['No new regs']);
28
29
30 // User pressed the cancel button
31 if (isset($_GET['cancel']))
32 redirect('index.php', $lang_register['Reg cancel redirect']);
33
34
35 else if ($pun_config['o_rules'] == '1' && !isset($_GET['agree']) && !isset($_POST['form_sent']))
36 {
8b59f34 @Quy Removed pun_htmlspecialchars from the generate_page_title function.
Quy authored
37 $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_register['Register'], $lang_register['Forum rules']);
a43f248 @Quy Changed prefix to PUN for consistency.
Quy authored
38 define('PUN_ACTIVE_PAGE', 'register');
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
39 require PUN_ROOT.'header.php';
40
41 ?>
1417352 Added some id's to scripts that generate more than one type of page. Ad...
Paul Sullivan authored
42 <div id="rules" class="blockform">
31a332a 1. Cutting down the very verbose and somewhat ugly label for style selec...
Paul Sullivan authored
43 <div class="hd"><h2><span><?php echo $lang_register['Forum rules'] ?></span></h2></div>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
44 <div class="box">
45 <form method="get" action="register.php">
46 <div class="inform">
47 <fieldset>
48 <legend><?php echo $lang_register['Rules legend'] ?></legend>
49 <div class="infldset">
cb7b187 1. Fixed various spacing and other issues with display of posts.
Paul Sullivan authored
50 <div class="usercontent"><?php echo $pun_config['o_rules_message'] ?></div>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
51 </div>
52 </fieldset>
53 </div>
57eb86e Correcting an assortment of issues and inconsistencies discovered whilst...
Paul Sullivan authored
54 <p class="buttons"><input type="submit" name="agree" value="<?php echo $lang_register['Agree'] ?>" /> <input type="submit" name="cancel" value="<?php echo $lang_register['Cancel'] ?>" /></p>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
55 </form>
56 </div>
57 </div>
58 <?php
59
60 require PUN_ROOT.'footer.php';
61 }
62
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
63 // Start with a clean slate
64 $errors = array();
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
65
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
66 if (isset($_POST['form_sent']))
56ab252 Updated copyright texts.
Frank Smit authored
67 {
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
68 // Check that someone from this IP didn't register a user within the last hour (DoS prevention)
69 $result = $db->query('SELECT 1 FROM '.$db->prefix.'users WHERE registration_ip=\''.get_remote_address().'\' AND registered>'.(time() - 3600)) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
70
71 if ($db->num_rows($result))
17cc990 @Quy Moved email notification strings to language file.
Quy authored
72 message($lang_register['Registration flood']);
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
73
74
145469a @reines Renaming the username field on the register form in an attempt to confus...
reines authored
75 $username = pun_trim($_POST['req_user']);
65f318b @Etana commit for http://fluxbb.org/development/core/tickets/633/
Etana authored
76 $email1 = strtolower(pun_trim($_POST['req_email1']));
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
77
78 if ($pun_config['o_regs_verify'] == '1')
79 {
65f318b @Etana commit for http://fluxbb.org/development/core/tickets/633/
Etana authored
80 $email2 = strtolower(pun_trim($_POST['req_email2']));
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
81
82 $password1 = random_pass(8);
83 $password2 = $password1;
84 }
85 else
86 {
8050cac @reines Replaced a few trims with pun_trim and strlen with pun_strlen
reines authored
87 $password1 = pun_trim($_POST['req_password1']);
88 $password2 = pun_trim($_POST['req_password2']);
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
89 }
90
91 // Validate username and passwords
3f1671c @Quy Moved username check code into a function. Suggested by Mpok.
Quy authored
92 check_username($username);
56ab252 Updated copyright texts.
Frank Smit authored
93
50edd72 @reines Replacing a few strlen's with pun_strlen (utf8 compatible), noticed by e...
reines authored
94 if (pun_strlen($password1) < 4)
26057cc @Quy Added check for banned usernames in register.php.
Quy authored
95 $errors[] = $lang_prof_reg['Pass too short'];
96 else if ($password1 != $password2)
56ab252 Updated copyright texts.
Frank Smit authored
97 $errors[] = $lang_prof_reg['Pass not match'];
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
98
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
99 // Validate email
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
100 require PUN_ROOT.'include/email.php';
101
102 if (!is_valid_email($email1))
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
103 $errors[] = $lang_common['Invalid email'];
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
104 else if ($pun_config['o_regs_verify'] == '1' && $email1 != $email2)
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
105 $errors[] = $lang_register['Email not match'];
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
106
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
107 // Check if it's a banned email address
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
108 if (is_banned_email($email1))
109 {
110 if ($pun_config['p_allow_banned_email'] == '0')
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
111 $errors[] = $lang_prof_reg['Banned email'];
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
112
5cd7d63 @reines A bunch of consistency changes (mainly in comments). Submitted by Darren...
reines authored
113 $banned_email = true; // Used later when we send an alert email
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
114 }
115 else
116 $banned_email = false;
117
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
118 // Check if someone else already has registered with that email address
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
119 $dupe_list = array();
120
93ed403 @reines Updating the email regex in 1.4 to that in 1.3. Also closing a (related)...
reines authored
121 $result = $db->query('SELECT username FROM '.$db->prefix.'users WHERE email=\''.$db->escape($email1).'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
122 if ($db->num_rows($result))
123 {
124 if ($pun_config['p_allow_dupe_email'] == '0')
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
125 $errors[] = $lang_prof_reg['Dupe email'];
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
126
127 while ($cur_dupe = $db->fetch_assoc($result))
128 $dupe_list[] = $cur_dupe['username'];
129 }
130
131 // Make sure we got a valid language string
132 if (isset($_POST['language']))
133 {
b1deb69 @reines Updating all the regular expressions to use % as a delimiter. Before we ...
reines authored
134 $language = preg_replace('%[\.\\\/]%', '', $_POST['language']);
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
135 if (!file_exists(PUN_ROOT.'lang/'.$language.'/common.php'))
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
136 message($lang_common['Bad request']);
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
137 }
138 else
139 $language = $pun_config['o_default_lang'];
140
141 $timezone = round($_POST['timezone'], 1);
5ca8498 @reines Updating trunk to version 1.4. These changes have all kindly been done b...
reines authored
142
36aef93 @Quy Made some code consistent.
Quy authored
143 $dst = isset($_POST['dst']) ? '1' : '0';
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
144
145 $email_setting = intval($_POST['email_setting']);
56f1864 @reines Quick tidy to register.php.
reines authored
146 if ($email_setting < 0 || $email_setting > 2)
147 $email_setting = $pun_config['o_default_email_setting'];
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
148
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
149 // Did everything go according to plan?
150 if (empty($errors))
151 {
ccb8295 @franzliedke Fixed a whole bunch of mainly comment typos, reported by Darren.
franzliedke authored
152 // Insert the new user into the database. We do this now to get the last inserted ID for later use
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
153 $now = time();
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
154
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
155 $intial_group_id = ($pun_config['o_regs_verify'] == '0') ? $pun_config['o_default_user_group'] : PUN_UNVERIFIED;
156 $password_hash = pun_hash($password1);
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
157
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
158 // Add the user
93ed403 @reines Updating the email regex in 1.4 to that in 1.3. Also closing a (related)...
reines authored
159 $db->query('INSERT INTO '.$db->prefix.'users (username, group_id, password, email, email_setting, timezone, dst, language, style, registered, registration_ip, last_visit) VALUES(\''.$db->escape($username).'\', '.$intial_group_id.', \''.$password_hash.'\', \''.$db->escape($email1).'\', '.$email_setting.', '.$timezone.' , '.$dst.', \''.$db->escape($language).'\', \''.$pun_config['o_default_style'].'\', '.$now.', \''.get_remote_address().'\', '.$now.')') or error('Unable to create user', __FILE__, __LINE__, $db->error());
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
160 $new_uid = $db->insert_id();
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
161
56f1864 @reines Quick tidy to register.php.
reines authored
162 // If the mailing list isn't empty, we may need to send out some alerts
163 if ($pun_config['o_mailing_list'] != '')
56ab252 Updated copyright texts.
Frank Smit authored
164 {
56f1864 @reines Quick tidy to register.php.
reines authored
165 // If we previously found out that the email was banned
166 if ($banned_email)
167 {
c247d6c @franzliedke #422: Use templates for all emails. Thanks to Daris for the patch!
franzliedke authored
168 // Load the "banned email register" template
169 $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/banned_email_register.tpl'));
170
171 // The first row contains the subject
172 $first_crlf = strpos($mail_tpl, "\n");
173 $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8));
174 $mail_message = trim(substr($mail_tpl, $first_crlf));
175
176 $mail_message = str_replace('<username>', $username, $mail_message);
177 $mail_message = str_replace('<email>', $email1, $mail_message);
178 $mail_message = str_replace('<profile_url>', get_base_url().'/profile.php?id='.$new_uid, $mail_message);
9bb1cf1 @franzliedke #476: Make "forum mailer" properly translateable.
franzliedke authored
179 $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);
ccf65ea @ridgerunner Cleaned all lines having trailing whitespace
ridgerunner authored
180
56f1864 @reines Quick tidy to register.php.
reines authored
181 pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message);
182 }
183
184 // If we previously found out that the email was a dupe
185 if (!empty($dupe_list))
186 {
c247d6c @franzliedke #422: Use templates for all emails. Thanks to Daris for the patch!
franzliedke authored
187 // Load the "dupe email register" template
188 $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/dupe_email_register.tpl'));
189
190 // The first row contains the subject
191 $first_crlf = strpos($mail_tpl, "\n");
192 $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8));
193 $mail_message = trim(substr($mail_tpl, $first_crlf));
194
195 $mail_message = str_replace('<username>', $username, $mail_message);
196 $mail_message = str_replace('<dupe_list>', implode(', ', $dupe_list), $mail_message);
197 $mail_message = str_replace('<profile_url>', get_base_url().'/profile.php?id='.$new_uid, $mail_message);
9bb1cf1 @franzliedke #476: Make "forum mailer" properly translateable.
franzliedke authored
198 $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);
ccf65ea @ridgerunner Cleaned all lines having trailing whitespace
ridgerunner authored
199
56f1864 @reines Quick tidy to register.php.
reines authored
200 pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message);
201 }
202
203 // Should we alert people on the admin mailing list that a new user has registered?
204 if ($pun_config['o_regs_report'] == '1')
205 {
c247d6c @franzliedke #422: Use templates for all emails. Thanks to Daris for the patch!
franzliedke authored
206 // Load the "new user" template
207 $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/new_user.tpl'));
208
209 // The first row contains the subject
210 $first_crlf = strpos($mail_tpl, "\n");
211 $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8));
212 $mail_message = trim(substr($mail_tpl, $first_crlf));
213
214 $mail_message = str_replace('<username>', $username, $mail_message);
215 $mail_message = str_replace('<base_url>', get_base_url().'/', $mail_message);
216 $mail_message = str_replace('<profile_url>', get_base_url().'/profile.php?id='.$new_uid, $mail_message);
9bb1cf1 @franzliedke #476: Make "forum mailer" properly translateable.
franzliedke authored
217 $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);
ccf65ea @ridgerunner Cleaned all lines having trailing whitespace
ridgerunner authored
218
56f1864 @reines Quick tidy to register.php.
reines authored
219 pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message);
220 }
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
221 }
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
222
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
223 // Must the user verify the registration or do we log him/her in right now?
224 if ($pun_config['o_regs_verify'] == '1')
225 {
226 // Load the "welcome" template
227 $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/welcome.tpl'));
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
228
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
229 // The first row contains the subject
230 $first_crlf = strpos($mail_tpl, "\n");
231 $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8));
232 $mail_message = trim(substr($mail_tpl, $first_crlf));
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
233
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
234 $mail_subject = str_replace('<board_title>', $pun_config['o_board_title'], $mail_subject);
c7be20e @reines Replacing more references to o_base_url. This shouldnt have any effect, ...
reines authored
235 $mail_message = str_replace('<base_url>', get_base_url().'/', $mail_message);
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
236 $mail_message = str_replace('<username>', $username, $mail_message);
237 $mail_message = str_replace('<password>', $password1, $mail_message);
c7be20e @reines Replacing more references to o_base_url. This shouldnt have any effect, ...
reines authored
238 $mail_message = str_replace('<login_url>', get_base_url().'/login.php', $mail_message);
9bb1cf1 @franzliedke #476: Make "forum mailer" properly translateable.
franzliedke authored
239 $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
240
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
241 pun_mail($email1, $mail_subject, $mail_message);
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
242
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
243 message($lang_register['Reg email'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
244 }
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
245
bd550ae @reines Moving regeneration of users info cache to after checking for o_regs_ver...
reines authored
246 // Regenerate the users info cache
247 if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
248 require PUN_ROOT.'include/cache.php';
249
250 generate_users_info_cache();
251
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
252 pun_setcookie($new_uid, $password_hash, time() + $pun_config['o_timeout_visit']);
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
253
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
254 redirect('index.php', $lang_register['Reg complete']);
255 }
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
256 }
257
258
8b59f34 @Quy Removed pun_htmlspecialchars from the generate_page_title function.
Quy authored
259 $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_register['Register']);
145469a @reines Renaming the username field on the register form in an attempt to confus...
reines authored
260 $required_fields = array('req_user' => $lang_common['Username'], 'req_password1' => $lang_common['Password'], 'req_password2' => $lang_prof_reg['Confirm pass'], 'req_email1' => $lang_common['Email'], 'req_email2' => $lang_common['Email'].' 2');
261 $focus_element = array('register', 'req_user');
a43f248 @Quy Changed prefix to PUN for consistency.
Quy authored
262 define('PUN_ACTIVE_PAGE', 'register');
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
263 require PUN_ROOT.'header.php';
264
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
265 $timezone = isset($timezone) ? $timezone : $pun_config['o_default_timezone'];
266 $dst = isset($dst) ? $dst : $pun_config['o_default_dst'];
267 $email_setting = isset($email_setting) ? $email_setting : $pun_config['o_default_email_setting'];
268
269 // If there are errors, we display them
270 if (!empty($errors))
271 {
272
273 ?>
274 <div id="posterror" class="block">
275 <h2><span><?php echo $lang_register['Registration errors'] ?></span></h2>
276 <div class="box">
5ff3343 Tidying up a little markup.
Paul Sullivan authored
277 <div class="inbox error-info">
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
278 <p><?php echo $lang_register['Registration errors info'] ?></p>
5ff3343 Tidying up a little markup.
Paul Sullivan authored
279 <ul class="error-list">
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
280 <?php
281
eba5e82 Tidied up some code.
Frank Smit authored
282 foreach ($errors as $cur_error)
18408d3 @Quy Handle registration errors differently to address the Register button be...
Quy authored
283 echo "\t\t\t\t".'<li><strong>'.$cur_error.'</strong></li>'."\n";
284 ?>
285 </ul>
286 </div>
287 </div>
288 </div>
289
290 <?php
291
292 }
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
293 ?>
1417352 Added some id's to scripts that generate more than one type of page. Ad...
Paul Sullivan authored
294 <div id="regform" class="blockform">
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
295 <h2><span><?php echo $lang_register['Register'] ?></span></h2>
296 <div class="box">
297 <form id="register" method="post" action="register.php?action=register" onsubmit="this.register.disabled=true;if(process_form(this)){return true;}else{this.register.disabled=false;return false;}">
298 <div class="inform">
299 <div class="forminfo">
300 <h3><?php echo $lang_common['Important information'] ?></h3>
301 <p><?php echo $lang_register['Desc 1'] ?></p>
302 <p><?php echo $lang_register['Desc 2'] ?></p>
303 </div>
304 <fieldset>
305 <legend><?php echo $lang_register['Username legend'] ?></legend>
306 <div class="infldset">
307 <input type="hidden" name="form_sent" value="1" />
145469a @reines Renaming the username field on the register form in an attempt to confus...
reines authored
308 <label class="required"><strong><?php echo $lang_common['Username'] ?> <span><?php echo $lang_common['Required'] ?></span></strong><br /><input type="text" name="req_user" value="<?php if (isset($_POST['req_user'])) echo pun_htmlspecialchars($_POST['req_user']); ?>" size="25" maxlength="25" /><br /></label>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
309 </div>
310 </fieldset>
311 </div>
312 <?php if ($pun_config['o_regs_verify'] == '0'): ?> <div class="inform">
313 <fieldset>
e0aea8c @franzliedke Fixing a few language entries, thanks to Darren for discovering these.
franzliedke authored
314 <legend><?php echo $lang_register['Pass legend'] ?></legend>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
315 <div class="infldset">
ef91b66 Adding hidden required text to required fields with minimum alterations ...
Paul Sullivan authored
316 <label class="conl required"><strong><?php echo $lang_common['Password'] ?> <span><?php echo $lang_common['Required'] ?></span></strong><br /><input type="password" name="req_password1" value="<?php if (isset($_POST['req_password1'])) echo pun_htmlspecialchars($_POST['req_password1']); ?>" size="16" /><br /></label>
317 <label class="conl required"><strong><?php echo $lang_prof_reg['Confirm pass'] ?> <span><?php echo $lang_common['Required'] ?></span></strong><br /><input type="password" name="req_password2" value="<?php if (isset($_POST['req_password2'])) echo pun_htmlspecialchars($_POST['req_password2']); ?>" size="16" /><br /></label>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
318 <p class="clearb"><?php echo $lang_register['Pass info'] ?></p>
319 </div>
320 </fieldset>
321 </div>
322 <?php endif; ?> <div class="inform">
323 <fieldset>
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
324 <legend><?php echo ($pun_config['o_regs_verify'] == '1') ? $lang_prof_reg['Email legend 2'] : $lang_prof_reg['Email legend'] ?></legend>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
325 <div class="infldset">
e65b9a0 @Quy Tidied up some markup.
Quy authored
326 <?php if ($pun_config['o_regs_verify'] == '1'): ?> <p><?php echo $lang_register['Email info'] ?></p>
ef91b66 Adding hidden required text to required fields with minimum alterations ...
Paul Sullivan authored
327 <?php endif; ?> <label class="required"><strong><?php echo $lang_common['Email'] ?> <span><?php echo $lang_common['Required'] ?></span></strong><br />
71711e5 @Quy Increased maxlength of email field to 80.
Quy authored
328 <input type="text" name="req_email1" value="<?php if (isset($_POST['req_email1'])) echo pun_htmlspecialchars($_POST['req_email1']); ?>" size="50" maxlength="80" /><br /></label>
ef91b66 Adding hidden required text to required fields with minimum alterations ...
Paul Sullivan authored
329 <?php if ($pun_config['o_regs_verify'] == '1'): ?> <label class="required"><strong><?php echo $lang_register['Confirm email'] ?> <span><?php echo $lang_common['Required'] ?></span></strong><br />
71711e5 @Quy Increased maxlength of email field to 80.
Quy authored
330 <input type="text" name="req_email2" value="<?php if (isset($_POST['req_email2'])) echo pun_htmlspecialchars($_POST['req_email2']); ?>" size="50" maxlength="80" /><br /></label>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
331 <?php endif; ?> </div>
332 </fieldset>
333 </div>
334 <div class="inform">
335 <fieldset>
336 <legend><?php echo $lang_prof_reg['Localisation legend'] ?></legend>
337 <div class="infldset">
a8a4de3 Tidying up a couple of form items and their accompanying language file e...
Paul Sullivan authored
338 <p><?php echo $lang_prof_reg['Time zone info'] ?></p>
f060a02 @Quy Removed trailing whitespace. Reported by Darren.
Quy authored
339 <label><?php echo $lang_prof_reg['Time zone']."\n" ?>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
340 <br /><select id="time_zone" name="timezone">
9a4d985 @Quy Converted time zone strings into language entries.
Quy authored
341 <option value="-12"<?php if ($timezone == -12) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-12:00'] ?></option>
342 <option value="-11"<?php if ($timezone == -11) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-11:00'] ?></option>
343 <option value="-10"<?php if ($timezone == -10) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-10:00'] ?></option>
344 <option value="-9.5"<?php if ($timezone == -9.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-09:30'] ?></option>
345 <option value="-9"<?php if ($timezone == -9) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-09:00'] ?></option>
346 <option value="-8.5"<?php if ($timezone == -8.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-08:30'] ?></option>
347 <option value="-8"<?php if ($timezone == -8) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-08:00'] ?></option>
348 <option value="-7"<?php if ($timezone == -7) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-07:00'] ?></option>
349 <option value="-6"<?php if ($timezone == -6) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-06:00'] ?></option>
350 <option value="-5"<?php if ($timezone == -5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-05:00'] ?></option>
351 <option value="-4"<?php if ($timezone == -4) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-04:00'] ?></option>
352 <option value="-3.5"<?php if ($timezone == -3.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-03:30'] ?></option>
353 <option value="-3"<?php if ($timezone == -3) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-03:00'] ?></option>
354 <option value="-2"<?php if ($timezone == -2) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-02:00'] ?></option>
355 <option value="-1"<?php if ($timezone == -1) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC-01:00'] ?></option>
356 <option value="0"<?php if ($timezone == 0) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC'] ?></option>
357 <option value="1"<?php if ($timezone == 1) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+01:00'] ?></option>
358 <option value="2"<?php if ($timezone == 2) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+02:00'] ?></option>
359 <option value="3"<?php if ($timezone == 3) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+03:00'] ?></option>
360 <option value="3.5"<?php if ($timezone == 3.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+03:30'] ?></option>
361 <option value="4"<?php if ($timezone == 4) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+04:00'] ?></option>
362 <option value="4.5"<?php if ($timezone == 4.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+04:30'] ?></option>
363 <option value="5"<?php if ($timezone == 5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+05:00'] ?></option>
364 <option value="5.5"<?php if ($timezone == 5.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+05:30'] ?></option>
365 <option value="5.75"<?php if ($timezone == 5.75) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+05:45'] ?></option>
366 <option value="6"<?php if ($timezone == 6) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+06:00'] ?></option>
367 <option value="6.5"<?php if ($timezone == 6.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+06:30'] ?></option>
368 <option value="7"<?php if ($timezone == 7) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+07:00'] ?></option>
369 <option value="8"<?php if ($timezone == 8) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+08:00'] ?></option>
370 <option value="8.75"<?php if ($timezone == 8.75) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+08:45'] ?></option>
371 <option value="9"<?php if ($timezone == 9) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+09:00'] ?></option>
372 <option value="9.5"<?php if ($timezone == 9.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+09:30'] ?></option>
373 <option value="10"<?php if ($timezone == 10) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+10:00'] ?></option>
374 <option value="10.5"<?php if ($timezone == 10.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+10:30'] ?></option>
375 <option value="11"<?php if ($timezone == 11) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+11:00'] ?></option>
376 <option value="11.5"<?php if ($timezone == 11.5) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+11:30'] ?></option>
377 <option value="12"<?php if ($timezone == 12) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+12:00'] ?></option>
378 <option value="12.75"<?php if ($timezone == 12.75) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+12:45'] ?></option>
379 <option value="13"<?php if ($timezone == 13) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+13:00'] ?></option>
380 <option value="14"<?php if ($timezone == 14) echo ' selected="selected"' ?>><?php echo $lang_prof_reg['UTC+14:00'] ?></option>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
381 </select>
382 <br /></label>
5ca8498 @reines Updating trunk to version 1.4. These changes have all kindly been done b...
reines authored
383 <div class="rbox">
a8a4de3 Tidying up a couple of form items and their accompanying language file e...
Paul Sullivan authored
384 <label><input type="checkbox" name="dst" value="1"<?php if ($dst == '1') echo ' checked="checked"' ?> /><?php echo $lang_prof_reg['DST'] ?><br /></label>
5ca8498 @reines Updating trunk to version 1.4. These changes have all kindly been done b...
reines authored
385 </div>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
386 <?php
387
cc493d3 @franzliedke Change prefix of new functions. No need to use the old one anymore.
franzliedke authored
388 $languages = forum_list_langs();
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
389
390 // Only display the language selection box if there's more than one language available
391 if (count($languages) > 1)
392 {
393
394 ?>
f7ac290 More blasted colons spotted by que.
Paul Sullivan authored
395 <label><?php echo $lang_prof_reg['Language'] ?>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
396 <br /><select name="language">
397 <?php
398
eba5e82 Tidied up some code.
Frank Smit authored
399 foreach ($languages as $temp)
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
400 {
401 if ($pun_config['o_default_lang'] == $temp)
402 echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>'."\n";
403 else
404 echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.$temp.'</option>'."\n";
405 }
406
407 ?>
408 </select>
409 <br /></label>
410 <?php
411
412 }
413 ?>
414 </div>
415 </fieldset>
416 </div>
417 <div class="inform">
418 <fieldset>
419 <legend><?php echo $lang_prof_reg['Privacy options legend'] ?></legend>
420 <div class="infldset">
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
421 <p><?php echo $lang_prof_reg['Email setting info'] ?></p>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
422 <div class="rbox">
fde0054 @franzliedke Changed e-mail to email throughout the code. Be over with it!
franzliedke authored
423 <label><input type="radio" name="email_setting" value="0"<?php if ($email_setting == '0') echo ' checked="checked"' ?> /><?php echo $lang_prof_reg['Email setting 1'] ?><br /></label>
424 <label><input type="radio" name="email_setting" value="1"<?php if ($email_setting == '1') echo ' checked="checked"' ?> /><?php echo $lang_prof_reg['Email setting 2'] ?><br /></label>
425 <label><input type="radio" name="email_setting" value="2"<?php if ($email_setting == '2') echo ' checked="checked"' ?> /><?php echo $lang_prof_reg['Email setting 3'] ?><br /></label>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
426 </div>
427 </div>
428 </fieldset>
429 </div>
57eb86e Correcting an assortment of issues and inconsistencies discovered whilst...
Paul Sullivan authored
430 <p class="buttons"><input type="submit" name="register" value="<?php echo $lang_register['Register'] ?>" /></p>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
431 </form>
432 </div>
433 </div>
434 <?php
435
436 require PUN_ROOT.'footer.php';
Something went wrong with that request. Please try again.