Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 436 lines (364 sloc) 21.681 kb
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
1 <?php
2
e5f7b2ab » reines
2010-02-20 Updating copyright notices in all files
3 /**
7c5edc26 » reines
2012-01-04 Updating copyright notices for 2012
4 * Copyright (C) 2008-2012 FluxBB
e5f7b2ab » reines
2010-02-20 Updating copyright notices in all files
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 */
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
8
f5ee8363 » reines
2010-12-07 Changing PUN_ROOT to use absolute paths, this solves some issues with…
9 define('PUN_ROOT', dirname(__FILE__).'/');
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
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 {
8b59f340 » Quy
2010-01-30 Removed pun_htmlspecialchars from the generate_page_title function.
37 $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_register['Register'], $lang_register['Forum rules']);
a43f248a » Quy
2010-02-07 Changed prefix to PUN for consistency.
38 define('PUN_ACTIVE_PAGE', 'register');
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
39 require PUN_ROOT.'header.php';
40
41 ?>
14173523 » Paul Sullivan
2010-01-30 Added some id's to scripts that generate more than one type of page. …
42 <div id="rules" class="blockform">
31a332a1 » Paul Sullivan
2010-01-22 1. Cutting down the very verbose and somewhat ugly label for style se…
43 <div class="hd"><h2><span><?php echo $lang_register['Forum rules'] ?></span></h2></div>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
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">
cb7b1876 » Paul Sullivan
2009-12-19 1. Fixed various spacing and other issues with display of posts.
50 <div class="usercontent"><?php echo $pun_config['o_rules_message'] ?></div>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
51 </div>
52 </fieldset>
53 </div>
57eb86e6 » Paul Sullivan
2010-01-01 Correcting an assortment of issues and inconsistencies discovered whi…
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>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
55 </form>
56 </div>
57 </div>
58 <?php
59
60 require PUN_ROOT.'footer.php';
61 }
62
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
63 // Start with a clean slate
64 $errors = array();
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
65
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
66 if (isset($_POST['form_sent']))
56ab252f » Frank Smit
2009-10-17 Updated copyright texts.
67 {
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
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))
17cc990b » Quy
2009-03-28 Moved email notification strings to language file.
72 message($lang_register['Registration flood']);
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
73
74
145469ab » reines
2010-05-26 Renaming the username field on the register form in an attempt to con…
75 $username = pun_trim($_POST['req_user']);
65f318be » Etana
2012-04-02 commit for http://fluxbb.org/development/core/tickets/633/
76 $email1 = strtolower(pun_trim($_POST['req_email1']));
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
77
78 if ($pun_config['o_regs_verify'] == '1')
79 {
65f318be » Etana
2012-04-02 commit for http://fluxbb.org/development/core/tickets/633/
80 $email2 = strtolower(pun_trim($_POST['req_email2']));
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
81
82 $password1 = random_pass(8);
83 $password2 = $password1;
84 }
85 else
86 {
8050cac2 » reines
2010-02-18 Replaced a few trims with pun_trim and strlen with pun_strlen
87 $password1 = pun_trim($_POST['req_password1']);
88 $password2 = pun_trim($_POST['req_password2']);
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
89 }
90
91 // Validate username and passwords
3f1671c3 » Quy
2010-03-29 Moved username check code into a function. Suggested by Mpok.
92 check_username($username);
56ab252f » Frank Smit
2009-10-17 Updated copyright texts.
93
50edd72f » reines
2010-02-17 Replacing a few strlen's with pun_strlen (utf8 compatible), noticed b…
94 if (pun_strlen($password1) < 4)
26057ccf » Quy
2009-06-28 Added check for banned usernames in register.php.
95 $errors[] = $lang_prof_reg['Pass too short'];
96 else if ($password1 != $password2)
56ab252f » Frank Smit
2009-10-17 Updated copyright texts.
97 $errors[] = $lang_prof_reg['Pass not match'];
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
98
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
99 // Validate email
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
100 require PUN_ROOT.'include/email.php';
101
102 if (!is_valid_email($email1))
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
103 $errors[] = $lang_common['Invalid email'];
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
104 else if ($pun_config['o_regs_verify'] == '1' && $email1 != $email2)
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
105 $errors[] = $lang_register['Email not match'];
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
106
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
107 // Check if it's a banned email address
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
108 if (is_banned_email($email1))
109 {
110 if ($pun_config['p_allow_banned_email'] == '0')
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
111 $errors[] = $lang_prof_reg['Banned email'];
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
112
5cd7d633 » reines
2009-11-26 A bunch of consistency changes (mainly in comments). Submitted by Dar…
113 $banned_email = true; // Used later when we send an alert email
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
114 }
115 else
116 $banned_email = false;
117
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
118 // Check if someone else already has registered with that email address
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
119 $dupe_list = array();
120
93ed403a » reines
2009-09-07 Updating the email regex in 1.4 to that in 1.3. Also closing a (relat…
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());
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
122 if ($db->num_rows($result))
123 {
124 if ($pun_config['p_allow_dupe_email'] == '0')
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
125 $errors[] = $lang_prof_reg['Dupe email'];
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
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 {
b1deb69b » reines
2011-06-05 Updating all the regular expressions to use % as a delimiter. Before …
134 $language = preg_replace('%[\.\\\/]%', '', $_POST['language']);
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
135 if (!file_exists(PUN_ROOT.'lang/'.$language.'/common.php'))
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
136 message($lang_common['Bad request']);
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
137 }
138 else
139 $language = $pun_config['o_default_lang'];
140
141 $timezone = round($_POST['timezone'], 1);
5ca84986 » reines
2009-01-30 Updating trunk to version 1.4. These changes have all kindly been don…
142
36aef935 » Quy
2009-06-17 Made some code consistent.
143 $dst = isset($_POST['dst']) ? '1' : '0';
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
144
145 $email_setting = intval($_POST['email_setting']);
56f18649 » reines
2010-03-07 Quick tidy to register.php.
146 if ($email_setting < 0 || $email_setting > 2)
147 $email_setting = $pun_config['o_default_email_setting'];
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
148
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
149 // Did everything go according to plan?
150 if (empty($errors))
151 {
ccb82952 » franzliedke
2009-10-14 Fixed a whole bunch of mainly comment typos, reported by Darren.
152 // Insert the new user into the database. We do this now to get the last inserted ID for later use
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
153 $now = time();
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
154
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
155 $intial_group_id = ($pun_config['o_regs_verify'] == '0') ? $pun_config['o_default_user_group'] : PUN_UNVERIFIED;
156 $password_hash = pun_hash($password1);
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
157
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
158 // Add the user
93ed403a » reines
2009-09-07 Updating the email regex in 1.4 to that in 1.3. Also closing a (relat…
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());
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
160 $new_uid = $db->insert_id();
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
161
56f18649 » reines
2010-03-07 Quick tidy to register.php.
162 // If the mailing list isn't empty, we may need to send out some alerts
163 if ($pun_config['o_mailing_list'] != '')
56ab252f » Frank Smit
2009-10-17 Updated copyright texts.
164 {
56f18649 » reines
2010-03-07 Quick tidy to register.php.
165 // If we previously found out that the email was banned
166 if ($banned_email)
167 {
c247d6c2 » franzliedke
2011-06-09 #422: Use templates for all emails. Thanks to Daris for the patch!
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);
9bb1cf17 » franzliedke
2011-08-12 #476: Make "forum mailer" properly translateable.
179 $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);
ccf65ea6 » ridgerunner
2010-03-12 Cleaned all lines having trailing whitespace
180
56f18649 » reines
2010-03-07 Quick tidy to register.php.
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 {
c247d6c2 » franzliedke
2011-06-09 #422: Use templates for all emails. Thanks to Daris for the patch!
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);
9bb1cf17 » franzliedke
2011-08-12 #476: Make "forum mailer" properly translateable.
198 $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);
ccf65ea6 » ridgerunner
2010-03-12 Cleaned all lines having trailing whitespace
199
56f18649 » reines
2010-03-07 Quick tidy to register.php.
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 {
c247d6c2 » franzliedke
2011-06-09 #422: Use templates for all emails. Thanks to Daris for the patch!
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);
9bb1cf17 » franzliedke
2011-08-12 #476: Make "forum mailer" properly translateable.
217 $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);
ccf65ea6 » ridgerunner
2010-03-12 Cleaned all lines having trailing whitespace
218
56f18649 » reines
2010-03-07 Quick tidy to register.php.
219 pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message);
220 }
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
221 }
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
222
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
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'));
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
228
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
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));
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
233
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
234 $mail_subject = str_replace('<board_title>', $pun_config['o_board_title'], $mail_subject);
c7be20ec » reines
2010-10-23 Replacing more references to o_base_url. This shouldnt have any effec…
235 $mail_message = str_replace('<base_url>', get_base_url().'/', $mail_message);
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
236 $mail_message = str_replace('<username>', $username, $mail_message);
237 $mail_message = str_replace('<password>', $password1, $mail_message);
c7be20ec » reines
2010-10-23 Replacing more references to o_base_url. This shouldnt have any effec…
238 $mail_message = str_replace('<login_url>', get_base_url().'/login.php', $mail_message);
9bb1cf17 » franzliedke
2011-08-12 #476: Make "forum mailer" properly translateable.
239 $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'], $mail_message);
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
240
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
241 pun_mail($email1, $mail_subject, $mail_message);
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
242
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
243 message($lang_register['Reg email'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
244 }
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
245
bd550aef » reines
2011-02-20 Moving regeneration of users info cache to after checking for o_regs_…
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
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
252 pun_setcookie($new_uid, $password_hash, time() + $pun_config['o_timeout_visit']);
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
253
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
254 redirect('index.php', $lang_register['Reg complete']);
255 }
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
256 }
257
258
8b59f340 » Quy
2010-01-30 Removed pun_htmlspecialchars from the generate_page_title function.
259 $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_register['Register']);
145469ab » reines
2010-05-26 Renaming the username field on the register form in an attempt to con…
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');
a43f248a » Quy
2010-02-07 Changed prefix to PUN for consistency.
262 define('PUN_ACTIVE_PAGE', 'register');
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
263 require PUN_ROOT.'header.php';
264
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
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">
5ff33435 » Paul Sullivan
2010-02-13 Tidying up a little markup.
277 <div class="inbox error-info">
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
278 <p><?php echo $lang_register['Registration errors info'] ?></p>
5ff33435 » Paul Sullivan
2010-02-13 Tidying up a little markup.
279 <ul class="error-list">
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
280 <?php
281
eba5e821 » Frank Smit
2010-02-01 Tidied up some code.
282 foreach ($errors as $cur_error)
18408d30 » Quy
2009-06-26 Handle registration errors differently to address the Register button…
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 }
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
293 ?>
14173523 » Paul Sullivan
2010-01-30 Added some id's to scripts that generate more than one type of page. …
294 <div id="regform" class="blockform">
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
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" />
145469ab » reines
2010-05-26 Renaming the username field on the register form in an attempt to con…
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>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
309 </div>
310 </fieldset>
311 </div>
312 <?php if ($pun_config['o_regs_verify'] == '0'): ?> <div class="inform">
313 <fieldset>
e0aea8cb » franzliedke
2009-10-19 Fixing a few language entries, thanks to Darren for discovering these.
314 <legend><?php echo $lang_register['Pass legend'] ?></legend>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
315 <div class="infldset">
ef91b667 » Paul Sullivan
2010-02-17 Adding hidden required text to required fields with minimum alteratio…
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>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
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>
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
324 <legend><?php echo ($pun_config['o_regs_verify'] == '1') ? $lang_prof_reg['Email legend 2'] : $lang_prof_reg['Email legend'] ?></legend>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
325 <div class="infldset">
e65b9a0a » Quy
2009-12-21 Tidied up some markup.
326 <?php if ($pun_config['o_regs_verify'] == '1'): ?> <p><?php echo $lang_register['Email info'] ?></p>
ef91b667 » Paul Sullivan
2010-02-17 Adding hidden required text to required fields with minimum alteratio…
327 <?php endif; ?> <label class="required"><strong><?php echo $lang_common['Email'] ?> <span><?php echo $lang_common['Required'] ?></span></strong><br />
71711e50 » Quy
2010-01-27 Increased maxlength of email field to 80.
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>
ef91b667 » Paul Sullivan
2010-02-17 Adding hidden required text to required fields with minimum alteratio…
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 />
71711e50 » Quy
2010-01-27 Increased maxlength of email field to 80.
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>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
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">
a8a4de38 » Paul Sullivan
2009-12-31 Tidying up a couple of form items and their accompanying language fil…
338 <p><?php echo $lang_prof_reg['Time zone info'] ?></p>
f060a028 » Quy
2010-02-07 Removed trailing whitespace. Reported by Darren.
339 <label><?php echo $lang_prof_reg['Time zone']."\n" ?>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
340 <br /><select id="time_zone" name="timezone">
9a4d985c » Quy
2010-02-05 Converted time zone strings into language entries.
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>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
381 </select>
382 <br /></label>
5ca84986 » reines
2009-01-30 Updating trunk to version 1.4. These changes have all kindly been don…
383 <div class="rbox">
a8a4de38 » Paul Sullivan
2009-12-31 Tidying up a couple of form items and their accompanying language fil…
384 <label><input type="checkbox" name="dst" value="1"<?php if ($dst == '1') echo ' checked="checked"' ?> /><?php echo $lang_prof_reg['DST'] ?><br /></label>
5ca84986 » reines
2009-01-30 Updating trunk to version 1.4. These changes have all kindly been don…
385 </div>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
386 <?php
387
cc493d38 » franzliedke
2010-06-15 Change prefix of new functions. No need to use the old one anymore.
388 $languages = forum_list_langs();
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
389
390 // Only display the language selection box if there's more than one language available
391 if (count($languages) > 1)
392 {
393
394 ?>
f7ac290f » Paul Sullivan
2010-04-20 More blasted colons spotted by que.
395 <label><?php echo $lang_prof_reg['Language'] ?>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
396 <br /><select name="language">
397 <?php
398
eba5e821 » Frank Smit
2010-02-01 Tidied up some code.
399 foreach ($languages as $temp)
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
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">
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
421 <p><?php echo $lang_prof_reg['Email setting info'] ?></p>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
422 <div class="rbox">
fde00544 » franzliedke
2009-10-19 Changed e-mail to email throughout the code. Be over with it!
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>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
426 </div>
427 </div>
428 </fieldset>
429 </div>
57eb86e6 » Paul Sullivan
2010-01-01 Correcting an assortment of issues and inconsistencies discovered whi…
430 <p class="buttons"><input type="submit" name="register" value="<?php echo $lang_register['Register'] ?>" /></p>
9d653368 » Connor Dunn
2008-04-27 Initial import based on revision 1613 of PunBB.
431 </form>
432 </div>
433 </div>
434 <?php
435
436 require PUN_ROOT.'footer.php';
Something went wrong with that request. Please try again.