author | Dan |
Sun, 06 Apr 2008 00:28:50 -0400 | |
changeset 7 | 98bbc533541c |
permissions | -rw-r--r-- |
7
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
1 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
2 |
/*********************************************************************** |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
3 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
4 |
Copyright (C) 2002-2008 PunBB.org |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
5 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
6 |
This file is part of PunBB. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
7 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
8 |
PunBB is free software; you can redistribute it and/or modify it |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
9 |
under the terms of the GNU General Public License as published |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
10 |
by the Free Software Foundation; either version 2 of the License, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
11 |
or (at your option) any later version. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
12 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
13 |
PunBB is distributed in the hope that it will be useful, but |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
14 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
16 |
GNU General Public License for more details. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
17 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
18 |
You should have received a copy of the GNU General Public License |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
19 |
along with this program; if not, write to the Free Software |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
20 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
21 |
MA 02111-1307 USA |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
22 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
23 |
************************************************************************/ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
24 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
25 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
26 |
// if (!defined('PUN_ROOT')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
27 |
// define('PUN_ROOT', './'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
28 |
// require PUN_ROOT.'include/common.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
29 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
30 |
// import globals (I really hope this isn't dangerous) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
31 |
foreach ( $GLOBALS as $key => $_ ) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
32 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
33 |
$$key =& $GLOBALS[$key]; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
34 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
35 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
36 |
($hook = get_hook('rg_start')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
37 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
38 |
// If we are logged in, we shouldn't be here |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
39 |
if (!$pun_user['is_guest']) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
40 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
41 |
header('Location: '.pun_link($pun_url['index'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
42 |
exit; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
43 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
44 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
45 |
// Load the register.php language file |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
46 |
require PUN_ROOT.'lang/'.$pun_user['language'].'/profile.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
47 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
48 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
49 |
if ($pun_config['o_regs_allow'] == '0') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
50 |
message($lang_profile['No new regs']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
51 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
52 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
53 |
// User pressed the cancel button |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
54 |
if (isset($_GET['cancel'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
55 |
pun_redirect(pun_link($pun_url['index']), $lang_profile['Reg cancel redirect']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
56 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
57 |
// User pressed agree but failed to tick checkbox |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
58 |
else if (isset($_GET['agree']) && !isset($_GET['req_agreement'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
59 |
pun_redirect(pun_link($pun_url['index']), $lang_profile['Reg cancel redirect']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
60 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
61 |
// Show the rules |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
62 |
else if ($pun_config['o_rules'] == '1' && !isset($_GET['agree']) && !isset($_POST['form_sent'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
63 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
64 |
// Setup breadcrumbs |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
65 |
$pun_page['crumbs'] = array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
66 |
array($pun_config['o_board_title'], pun_link($pun_url['index'])), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
67 |
array($lang_common['Register'], pun_link($pun_url['register'])), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
68 |
$lang_common['Rules'] |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
69 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
70 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
71 |
($hook = get_hook('rg_rules_pre_header_load')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
72 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
73 |
define('PUN_PAGE', 'rules'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
74 |
require PUN_ROOT.'header.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
75 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
76 |
$pun_page['set_count'] = $pun_page['fld_count'] = 0; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
77 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
78 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
79 |
<div id="pun-main" class="main"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
80 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
81 |
<h1><span><?php echo end($pun_page['crumbs']) ?></span></h1> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
82 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
83 |
<div class="main-head"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
84 |
<h2><span><?php echo $lang_common['Forum rules'].' '.$lang_profile['Agree to rules'] ?></span></h2> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
85 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
86 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
87 |
<div class="main-content frm"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
88 |
<div class="userbox"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
89 |
<?php echo $pun_config['o_rules_message'] ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
90 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
91 |
<form class="frm-form" method="get" accept-charset="utf-8" action="<?php echo $base_url ?>/register.php"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
92 |
<fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
93 |
<legend class="frm-legend"><strong><?php echo $lang_common['Required information'] ?></strong></legend> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
94 |
<div class="checkbox radbox"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
95 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_profile['Agreement'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="req_agreement" value="1" /> <?php echo $lang_profile['Agreement label'] ?></label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
96 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
97 |
</fieldset> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
98 |
<div class="frm-buttons"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
99 |
<span class="submit"><input type="submit" name="agree" value="<?php echo $lang_profile['Agree'] ?>" /></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
100 |
<span class="cancel"><input type="submit" name="cancel" value="<?php echo $lang_common['Cancel'] ?>" /></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
101 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
102 |
</form> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
103 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
104 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
105 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
106 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
107 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
108 |
require PUN_ROOT.'footer.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
109 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
110 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
111 |
else if (isset($_POST['form_sent'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
112 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
113 |
($hook = get_hook('rg_register_form_submitted')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
114 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
115 |
// Check that someone from this IP didn't register a user within the last hour (DoS prevention) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
116 |
$query = array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
117 |
'SELECT' => '1', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
118 |
'FROM' => 'users AS u', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
119 |
'WHERE' => 'u.registration_ip=\''.get_remote_address().'\' AND u.registered>'.(time() - 3600) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
120 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
121 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
122 |
($hook = get_hook('rg_qr_check_register_flood')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
123 |
$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
124 |
if ($pun_db->num_rows($result)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
125 |
message($lang_profile['Registration flood']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
126 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
127 |
$username = trim($_POST['req_username']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
128 |
$email1 = strtolower(trim($_POST['req_email1'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
129 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
130 |
if ($pun_config['o_regs_verify'] == '1') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
131 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
132 |
$email2 = strtolower(trim($_POST['req_email2'])); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
133 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
134 |
$password1 = random_key(8, true); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
135 |
$password2 = $password1; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
136 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
137 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
138 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
139 |
$password1 = trim($_POST['req_password1']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
140 |
$password2 = trim($_POST['req_password2']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
141 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
142 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
143 |
// Validate the username |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
144 |
$errors = validate_username($username); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
145 |
if (!empty($errors)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
146 |
message(current($errors)); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
147 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
148 |
// ... and the password |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
149 |
if (pun_strlen($password1) < 4) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
150 |
message($lang_profile['Pass too short']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
151 |
else if ($password1 != $password2) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
152 |
message($lang_profile['Pass not match']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
153 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
154 |
// ... and the e-mail address |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
155 |
require PUN_ROOT.'include/email.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
156 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
157 |
if (!is_valid_email($email1)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
158 |
message($lang_common['Invalid e-mail']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
159 |
else if ($pun_config['o_regs_verify'] == '1' && $email1 != $email2) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
160 |
message($lang_profile['E-mail not match']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
161 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
162 |
// Check if it's a banned e-mail address |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
163 |
$banned_email = is_banned_email($email1); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
164 |
if ($banned_email && $pun_config['p_allow_banned_email'] == '0') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
165 |
message($lang_profile['Banned e-mail']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
166 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
167 |
// Check if someone else already has registered with that e-mail address |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
168 |
$dupe_list = array(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
169 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
170 |
$query = array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
171 |
'SELECT' => 'u.username', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
172 |
'FROM' => 'users AS u', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
173 |
'WHERE' => 'u.email=\''.$email1.'\'' |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
174 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
175 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
176 |
($hook = get_hook('rg_qr_check_email_dupe')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
177 |
$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
178 |
if ($pun_db->num_rows($result)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
179 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
180 |
if ($pun_config['p_allow_dupe_email'] == '0') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
181 |
message($lang_profile['Dupe e-mail']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
182 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
183 |
while ($cur_dupe = $pun_db->fetch_assoc($result)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
184 |
$dupe_list[] = $cur_dupe['username']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
185 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
186 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
187 |
// Make sure we got a valid language string |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
188 |
if (isset($_POST['language'])) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
189 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
190 |
$language = preg_replace('#[\.\\\/]#', '', $_POST['language']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
191 |
if (!file_exists(PUN_ROOT.'lang/'.$language.'/common.php')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
192 |
message($lang_common['Bad request']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
193 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
194 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
195 |
$language = $pun_config['o_default_lang']; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
196 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
197 |
$save_pass = (!isset($_POST['save_pass']) || $_POST['save_pass'] != '1') ? 0 : 1; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
198 |
$email_setting = intval($_POST['email_setting']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
199 |
if ($email_setting < 0 || $email_setting > 2) $email_setting = 1; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
200 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
201 |
$initial_group_id = ($pun_config['o_regs_verify'] == '0') ? $pun_config['o_default_user_group'] : PUN_UNVERIFIED; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
202 |
$salt = random_key(12); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
203 |
$password_hash = sha1($salt.sha1($password1)); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
204 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
205 |
($hook = get_hook('rg_register_pre_add_user')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
206 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
207 |
// Insert the new user into the database. We do this now to get the last inserted id for later use. |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
208 |
$errors = add_user(array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
209 |
'username' => $username, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
210 |
'group_id' => $initial_group_id, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
211 |
'salt' => $salt, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
212 |
'password' => $password1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
213 |
'password_hash' => $password_hash, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
214 |
'email' => $email1, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
215 |
'email_setting' => $email_setting, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
216 |
'save_pass' => $save_pass, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
217 |
'timezone' => $_POST['timezone'], |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
218 |
'language' => $language, |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
219 |
'style' => $pun_config['o_default_style'], |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
220 |
'registered' => time(), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
221 |
'registration_ip' => get_remote_address(), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
222 |
'activate_key' => ($pun_config['o_regs_verify'] == '1') ? '\''.random_key(8, true).'\'' : 'NULL', |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
223 |
'require_verification' => ($pun_config['o_regs_verify'] == '1'), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
224 |
'notify_admins' => ($pun_config['o_regs_report'] == '1') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
225 |
), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
226 |
$new_uid // By ref |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
227 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
228 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
229 |
// If we previously found out that the e-mail was banned |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
230 |
if ($banned_email && $pun_config['o_mailing_list'] != '') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
231 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
232 |
($hook = get_hook('rg_register_banned_email')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
233 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
234 |
$mail_subject = 'Alert - Banned e-mail detected'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
235 |
$mail_message = 'User \''.$username.'\' registered with banned e-mail address: '.$email1."\n\n".'User profile: '.pun_link($pun_url['user'], $new_uid)."\n\n".'-- '."\n".'Forum Mailer'."\n".'(Do not reply to this message)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
236 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
237 |
pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
238 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
239 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
240 |
// If we previously found out that the e-mail was a dupe |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
241 |
if (!empty($dupe_list) && $pun_config['o_mailing_list'] != '') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
242 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
243 |
($hook = get_hook('rg_register_dupe_email')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
244 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
245 |
$mail_subject = 'Alert - Duplicate e-mail detected'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
246 |
$mail_message = 'User \''.$username.'\' registered with an e-mail address that also belongs to: '.implode(', ', $dupe_list)."\n\n".'User profile: '.pun_link($pun_url['user'], $new_uid)."\n\n".'-- '."\n".'Forum Mailer'."\n".'(Do not reply to this message)'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
247 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
248 |
pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
249 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
250 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
251 |
($hook = get_hook('rg_register_pre_login_redirect')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
252 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
253 |
// Must the user verify the registration or do we log him/her in right now? |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
254 |
if ($pun_config['o_regs_verify'] == '1') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
255 |
message(sprintf($lang_profile['Reg e-mail'], '<a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>')); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
256 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
257 |
pun_setcookie($cookie_name, base64_encode($new_uid.'|'.$password_hash), ($save_pass != '0') ? time() + 31536000 : 0); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
258 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
259 |
pun_redirect(pun_link($pun_url['index']), $lang_profile['Reg complete']); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
260 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
261 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
262 |
// Setup form |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
263 |
$pun_page['set_count'] = $pun_page['fld_count'] = 0; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
264 |
$pun_page['form_action'] = $base_url.'/register.php?action=register'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
265 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
266 |
// Setup form information |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
267 |
$pun_page['frm_info'][] = '<p>'.$lang_profile['Register intro'].'</p>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
268 |
if ($pun_config['o_regs_verify'] != '0') |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
269 |
$pun_page['frm_info'][] = '<p class="warn">'.$lang_profile['E-mail info'].'</p>'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
270 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
271 |
// Setup breadcrumbs |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
272 |
$pun_page['crumbs'] = array( |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
273 |
array($pun_config['o_board_title'], pun_link($pun_url['index'])), |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
274 |
$lang_common['Register'] |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
275 |
); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
276 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
277 |
($hook = get_hook('rg_register_pre_header_load')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
278 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
279 |
define('PUN_PAGE', 'register'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
280 |
require PUN_ROOT.'header.php'; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
281 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
282 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
283 |
<div id="pun-main" class="main"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
284 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
285 |
<h1><span><?php echo end($pun_page['crumbs']) ?></span></h1> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
286 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
287 |
<div class="main-head"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
288 |
<h2><span><?php printf($lang_profile['Register at'], htmlspecialchars($pun_config['o_board_title'])) ?></span></h2> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
289 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
290 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
291 |
<div class="main-content frm"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
292 |
<div class="frm-info"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
293 |
<?php echo implode("\n\t\t\t\t", $pun_page['frm_info'])."\n" ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
294 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
295 |
<div id="req-msg" class="frm-warn"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
296 |
<p class="important"><?php printf($lang_common['Required warn'], '<em class="req-text">'.$lang_common['Required'].'</em>') ?></p> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
297 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
298 |
<form class="frm-form" id="afocus" method="post" accept-charset="utf-8" action="<?php echo $pun_page['form_action'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
299 |
<div class="hidden"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
300 |
<input type="hidden" name="form_sent" value="1" /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
301 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
302 |
<?php ($hook = get_hook('rg_register_pre_req_info_fieldset')) ? eval($hook) : null; ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
303 |
<fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
304 |
<legend class="frm-legend"><strong><?php echo $lang_common['Required information'] ?></strong></legend> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
305 |
<div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
306 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
307 |
<span class="fld-label"><?php echo $lang_profile['Username'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
308 |
<span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="req_username" size="35" maxlength="25" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
309 |
<em class="req-text"><?php echo $lang_common['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
310 |
<span class="fld-help"><?php echo $lang_profile['Username help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
311 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
312 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
313 |
<?php if ($pun_config['o_regs_verify'] == '0'): ?> <div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
314 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
315 |
<span class="fld-label"><?php echo $lang_profile['Password'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
316 |
<span class="fld-input"><input type="password" id="fld<?php echo $pun_page['fld_count'] ?>" name="req_password1" size="35" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
317 |
<em class="req-text"><?php echo $lang_common['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
318 |
<span class="fld-help"><?php echo $lang_profile['Password help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
319 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
320 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
321 |
<div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
322 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
323 |
<span class="fld-label"><?php echo $lang_profile['Confirm password'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
324 |
<span class="fld-input"><input type="password" id="fld<?php echo $pun_page['fld_count'] ?>" name="req_password2" size="35" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
325 |
<em class="req-text"><?php echo $lang_common['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
326 |
<span class="fld-help"><?php echo $lang_profile['Confirm password help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
327 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
328 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
329 |
<?php endif; ($hook = get_hook('rg_register_pre_email_field')) ? eval($hook) : null; ?> <div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
330 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
331 |
<span class="fld-label"><?php echo $lang_profile['E-mail'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
332 |
<span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="req_email1" size="35" maxlength="80" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
333 |
<em class="req-text"><?php echo $lang_common['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
334 |
<span class="fld-help"><?php echo $lang_profile['E-mail help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
335 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
336 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
337 |
<?php if ($pun_config['o_regs_verify'] == '1'): ?> <div class="frm-fld text required"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
338 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
339 |
<span class="fld-label"><?php echo $lang_profile['Confirm e-mail'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
340 |
<span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="req_email2" size="35" maxlength="80" /></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
341 |
<em class="req-text"><?php echo $lang_common['Required'] ?></em> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
342 |
<span class="fld-help"><?php echo $lang_profile['Confirm e-mail help'] ?></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
343 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
344 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
345 |
<?php endif; ($hook = get_hook('rg_register_req_info_end')) ? eval($hook) : null; ?> </fieldset> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
346 |
<?php ($hook = get_hook('rg_register_post_req_info_fieldset')) ? eval($hook) : null; ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
347 |
<fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
348 |
<legend class="frm-legend"><strong><?php echo $lang_profile['Local legend'] ?></strong></legend> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
349 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
350 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
351 |
$languages = array(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
352 |
$d = dir(PUN_ROOT.'lang'); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
353 |
while (($entry = $d->read()) !== false) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
354 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
355 |
if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry) && file_exists(PUN_ROOT.'lang/'.$entry.'/common.php')) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
356 |
$languages[] = $entry; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
357 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
358 |
$d->close(); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
359 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
360 |
// Only display the language selection box if there's more than one language available |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
361 |
if (count($languages) > 1) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
362 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
363 |
natcasesort($languages); |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
364 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
365 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
366 |
<div class="frm-fld select"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
367 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
368 |
<span class="fld-label"><?php echo $lang_profile['Language'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
369 |
<span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="language"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
370 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
371 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
372 |
while (list(, $temp) = @each($languages)) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
373 |
{ |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
374 |
if ($pun_config['o_default_lang'] == $temp) |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
375 |
echo "\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
376 |
else |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
377 |
echo "\t\t\t\t\t\t".'<option value="'.$temp.'">'.$temp.'</option>'."\n"; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
378 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
379 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
380 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
381 |
</select></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
382 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
383 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
384 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
385 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
386 |
} |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
387 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
388 |
?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
389 |
<div class="frm-fld select"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
390 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
391 |
<span class="fld-label"><?php echo $lang_profile['Timezone'] ?></span><br /> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
392 |
<span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="timezone"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
393 |
<option value="-12"<?php if ($pun_config['o_default_timezone'] == -12 ) echo ' selected="selected"' ?>>-12</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
394 |
<option value="-11"<?php if ($pun_config['o_default_timezone'] == -11) echo ' selected="selected"' ?>>-11</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
395 |
<option value="-10"<?php if ($pun_config['o_default_timezone'] == -10) echo ' selected="selected"' ?>>-10</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
396 |
<option value="-9.5"<?php if ($pun_config['o_default_timezone'] == -9.5) echo ' selected="selected"' ?>>-9.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
397 |
<option value="-9"<?php if ($pun_config['o_default_timezone'] == -9 ) echo ' selected="selected"' ?>>-09</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
398 |
<option value="-8.5"<?php if ($pun_config['o_default_timezone'] == -8.5) echo ' selected="selected"' ?>>-8.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
399 |
<option value="-8"<?php if ($pun_config['o_default_timezone'] == -8 ) echo ' selected="selected"' ?>>-08 PST</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
400 |
<option value="-7"<?php if ($pun_config['o_default_timezone'] == -7 ) echo ' selected="selected"' ?>>-07 MST</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
401 |
<option value="-6"<?php if ($pun_config['o_default_timezone'] == -6 ) echo ' selected="selected"' ?>>-06 CST</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
402 |
<option value="-5"<?php if ($pun_config['o_default_timezone'] == -5 ) echo ' selected="selected"' ?>>-05 EST</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
403 |
<option value="-4"<?php if ($pun_config['o_default_timezone'] == -4 ) echo ' selected="selected"' ?>>-04 AST</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
404 |
<option value="-3.5"<?php if ($pun_config['o_default_timezone'] == -3.5) echo ' selected="selected"' ?>>-3.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
405 |
<option value="-3"<?php if ($pun_config['o_default_timezone'] == -3 ) echo ' selected="selected"' ?>>-03 ADT</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
406 |
<option value="-2"<?php if ($pun_config['o_default_timezone'] == -2 ) echo ' selected="selected"' ?>>-02</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
407 |
<option value="-1"<?php if ($pun_config['o_default_timezone'] == -1) echo ' selected="selected"' ?>>-01</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
408 |
<option value="0"<?php if ($pun_config['o_default_timezone'] == 0) echo ' selected="selected"' ?>>00 GMT</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
409 |
<option value="1"<?php if ($pun_config['o_default_timezone'] == 1) echo ' selected="selected"' ?>>+01 CET</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
410 |
<option value="2"<?php if ($pun_config['o_default_timezone'] == 2 ) echo ' selected="selected"' ?>>+02</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
411 |
<option value="3"<?php if ($pun_config['o_default_timezone'] == 3 ) echo ' selected="selected"' ?>>+03</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
412 |
<option value="3.5"<?php if ($pun_config['o_default_timezone'] == 3.5 ) echo ' selected="selected"' ?>>+03.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
413 |
<option value="4"<?php if ($pun_config['o_default_timezone'] == 4 ) echo ' selected="selected"' ?>>+04</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
414 |
<option value="4.5"<?php if ($pun_config['o_default_timezone'] == 4.5 ) echo ' selected="selected"' ?>>+04.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
415 |
<option value="5"<?php if ($pun_config['o_default_timezone'] == 5 ) echo ' selected="selected"' ?>>+05</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
416 |
<option value="5.5"<?php if ($pun_config['o_default_timezone'] == 5.5 ) echo ' selected="selected"' ?>>+05.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
417 |
<option value="6"<?php if ($pun_config['o_default_timezone'] == 6 ) echo ' selected="selected"' ?>>+06</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
418 |
<option value="6.5"<?php if ($pun_config['o_default_timezone'] == 6.5 ) echo ' selected="selected"' ?>>+06.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
419 |
<option value="7"<?php if ($pun_config['o_default_timezone'] == 7 ) echo ' selected="selected"' ?>>+07</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
420 |
<option value="8"<?php if ($pun_config['o_default_timezone'] == 8 ) echo ' selected="selected"' ?>>+08</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
421 |
<option value="9"<?php if ($pun_config['o_default_timezone'] == 9 ) echo ' selected="selected"' ?>>+09</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
422 |
<option value="9.5"<?php if ($pun_config['o_default_timezone'] == 9.5 ) echo ' selected="selected"' ?>>+09.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
423 |
<option value="10"<?php if ($pun_config['o_default_timezone'] == 10) echo ' selected="selected"' ?>>+10</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
424 |
<option value="10.5"<?php if ($pun_config['o_default_timezone'] == 10.5 ) echo ' selected="selected"' ?>>+10.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
425 |
<option value="11"<?php if ($pun_config['o_default_timezone'] == 11) echo ' selected="selected"' ?>>+11</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
426 |
<option value="11.5"<?php if ($pun_config['o_default_timezone'] == 11.5 ) echo ' selected="selected"' ?>>+11.5</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
427 |
<option value="12"<?php if ($pun_config['o_default_timezone'] == 12 ) echo ' selected="selected"' ?>>+12</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
428 |
<option value="13"<?php if ($pun_config['o_default_timezone'] == 13 ) echo ' selected="selected"' ?>>+13</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
429 |
<option value="14"<?php if ($pun_config['o_default_timezone'] == 14 ) echo ' selected="selected"' ?>>+14</option> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
430 |
</select></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
431 |
</label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
432 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
433 |
<div class="checkbox radbox"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
434 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_profile['Adjust for DST'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" /> <?php echo $lang_profile['DST label'] ?></label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
435 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
436 |
<?php ($hook = get_hook('rg_register_local_end')) ? eval($hook) : null; ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
437 |
</fieldset> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
438 |
<?php ($hook = get_hook('rg_register_post_local_fieldset')) ? eval($hook) : null; ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
439 |
<fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
440 |
<legend class="frm-legend"><strong><?php echo $lang_profile['Other settings'] ?></strong></legend> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
441 |
<fieldset class="frm-group"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
442 |
<legend><span><?php echo $lang_profile['E-mail settings'] ?></span></legend> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
443 |
<div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="radio" id="fld<?php echo $pun_page['fld_count'] ?>" name="email_setting" value="0" /> <?php echo $lang_profile['E-mail setting 1'] ?></label></div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
444 |
<div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="radio" id="fld<?php echo $pun_page['fld_count'] ?>" name="email_setting" value="1" checked="checked" /> <?php echo $lang_profile['E-mail setting 2'] ?></label></div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
445 |
<div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="radio" id="fld<?php echo $pun_page['fld_count'] ?>" name="email_setting" value="2" /> <?php echo $lang_profile['E-mail setting 3'] ?></label></div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
446 |
</fieldset> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
447 |
<div class="checkbox radbox"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
448 |
<label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_profile['Persistent login'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="save_pass" value="1" checked="checked" /> <?php echo $lang_profile['Save user/pass'] ?></label> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
449 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
450 |
<?php ($hook = get_hook('rg_register_other_end')) ? eval($hook) : null; ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
451 |
</fieldset> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
452 |
<?php ($hook = get_hook('rg_register_post_other_fieldset')) ? eval($hook) : null; ?> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
453 |
<div class="frm-buttons"> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
454 |
<span class="submit"><input type="submit" name="register" value="<?php echo $lang_common['Register'] ?>" /></span> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
455 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
456 |
</form> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
457 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
458 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
459 |
</div> |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
460 |
<?php |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
461 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
462 |
($hook = get_hook('rg_end')) ? eval($hook) : null; |
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
463 |
|
98bbc533541c
Finishing re-add, addremove didn't work last time. Integrated with Enano's template engine properly.
Dan
parents:
diff
changeset
|
464 |
require PUN_ROOT.'footer.php'; |