🔗 Standalone View
edituser.php
Lines Changed:
299
Added:
+7
Removed:
-8
📊 Diff Results
🔴 Old File (Removed)
1<?php
2/*=======================================================================
3 Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
4 =======================================================================*/
5
6/*********************************************************************************/
7/* CNB Your Account: An Advanced User Management System for phpnuke */
8/* ============================================ */
9/* */
10/* Copyright (c) 2004 by Comunidade PHP Nuke Brasil */
11/* http://dev.phpnuke.org.br & http://www.phpnuke.org.br */
12/* */
13/* Contact author: escudero@phpnuke.org.br */
14/* International Support Forum: http://ravenphpscripts.com/forum76.html */
15/* */
16/* This program is free software. You can redistribute it and/or modify */
17/* it under the terms of the GNU General Public License as published by */
18/* the Free Software Foundation; either version 2 of the License. */
19/* */
20/*********************************************************************************/
21/* CNB Your Account it the official successor of NSN Your Account by Bob Marion */
22/*********************************************************************************/
23
24/*****[CHANGES]**********************************************************
25-=[Base]=-
26 Nuke Patched v3.1.0 06/26/2005
27-=[Other]=-
28 YA Forum Sig v1.0.0 06/15/2005
29 ************************************************************************/
30
31if (!defined('MODULE_FILE')) {
32 die ("You can't access this file directly...");
33}
34
35if (!defined('CNBYA')) {
36 die('CNBYA protection');
37}
38
39 global $cookie, $userinfo;
40 if ((is_user()) AND (strtolower($userinfo['username']) == strtolower($cookie[1])) AND ($userinfo['user_password'] == $cookie[2])) {
41 include_once(NUKE_BASE_DIR.'header.php');
42 title(_PERSONALINFO);
43 OpenTable();
44 nav();
45 CloseTable();
46
47//recup info user ----------------------------------
48 $result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field");
49 while ($sqlvalue = $db->sql_fetchrow($result)) {
50 list($value) = $db->sql_fetchrow( $db->sql_query("SELECT value FROM ".$user_prefix."_cnbya_value WHERE fid ='$sqlvalue[fid]' AND uid = '$userinfo[user_id]'"));
51
52 $userinfo[$sqlvalue['name']] = $value;
53 }
54//--------------------------------------------
55
56 echo "<br />";
57 if (!preg_match("#http://#i", $userinfo['user_website']) && $userinfo['user_website'] != "http://") {
58 $userinfo['user_website'] = "http://".$userinfo['user_website'];
59 }
60 OpenTable();
61 echo "<table class='forumline' cellpadding='3' cellspacing='3' border='0' width='100%'>";
62 echo "<form name='Register' action='modules.php?name=$module_name' method='post'>";
63 echo "<tr><td bgcolor='$bgcolor2'><strong>"._USRNICKNAME."</strong>:</td><td bgcolor='$bgcolor3'><strong>$userinfo[username]</strong></td></tr>";
64 echo "<tr><td bgcolor='$bgcolor2'><strong>"._UREALNAME."</strong>:<br />"._REQUIRED."</td><td bgcolor='$bgcolor3'>";
65 echo "<input type='text' name='realname' value=\"$userinfo[name]\" size='50' maxlength='60'></td></tr>";
66 if ($ya_config['allowmailchange'] < 1) {
67 echo "<tr><td bgcolor='$bgcolor2'><strong>"._UREALEMAIL.":</strong><br />"._REQUIRED."</td>";
68 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_email' value=\"$userinfo[user_email]\" size='50' maxlength='255'><br />"._EMAILNOTPUBLIC."</td></tr>";
69 } else {
70 echo "<input type='hidden' name='user_email' value=\"$userinfo[user_email]\">\n";
71 }
72 echo "<tr><td bgcolor='$bgcolor2'><strong>"._UFAKEMAIL.":</strong><br />"._OPTIONAL."</td>";
73 echo "<td bgcolor='$bgcolor3'><input type='text' name='femail' value=\"$userinfo[femail]\" size='50' maxlength='255'><br />"._EMAILPUBLIC."</td></tr>";
74 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YOURHOMEPAGE.":</strong><br />"._OPTIONAL."</td>";
75 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_website' value=\"$userinfo[user_website]\" size='50' maxlength='255'></td></tr>";
76
77 $result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field WHERE need <> '0' ORDER BY pos");
78 while ($sqlvalue = $db->sql_fetchrow($result)) {
79 $t = $sqlvalue[fid];
80 $value2 = explode("::", $sqlvalue[value]);
81 if (substr($sqlvalue[name],0,1)=='_') eval( "\$name_exit = $sqlvalue[name];"); else $name_exit = $sqlvalue[name];
82 if (count($value2) == 1) {
83 echo "<tr><td bgcolor='$bgcolor2'><strong>$name_exit</strong></td><td bgcolor='$bgcolor3'><input type='text' name='nfield[$t]' value='".$userinfo[$sqlvalue[name]]."' size='20' maxlength='$sqlvalue[size]'></td></tr>\n";
84 $sqlvalueMax = $sqlvalueMax - 1;
85 } else {
86 echo "<tr><td bgcolor='$bgcolor2'><strong>$name_exit</strong></td><td bgcolor='$bgcolor3'>";
87 echo "<select name='nfield[$t]'>\n";
88 for ($i = 0; $i<count($value2); $i++) {
89 if (trim($userinfo[$sqlvalue[name]]) == trim($value2[$i])) $sel = "selected"; else $sel = "";
90 echo "<option value=\"".trim($value2[$i])."\" $sel>$value2[$i]</option>\n";
91 }
92 echo "</select>";
93 echo "</td></tr>\n";
94 }
95 }
96
97 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YICQ.":</strong><br />"._OPTIONAL."</td>";
98 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_icq' value=\"$userinfo[user_icq]\" size='30' maxlength='100'></td></tr>";
99 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YAIM.":</strong><br />"._OPTIONAL."</td>";
100 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_aim' value=\"$userinfo[user_aim]\" size='30' maxlength='100'></td></tr>";
101 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YYIM.":</strong><br />"._OPTIONAL."</td>";
102 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_yim' value=\"$userinfo[user_yim]\" size='30' maxlength='100'></td></tr>";
103 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YMSNM.":</strong><br />"._OPTIONAL."</td>";
104 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_msnm' value=\"$userinfo[user_msnm]\" size='30' maxlength='100'></td></tr>";
105 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YLOCATION.":</strong><br />"._OPTIONAL."</td>";
106 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_from' value=\"$userinfo[user_from]\" size='30' maxlength='100'></td></tr>";
107 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YOCCUPATION.":</strong><br />"._OPTIONAL."</td>";
108 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_occ' value=\"$userinfo[user_occ]\" size='30' maxlength='100'></td></tr>";
109 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YINTERESTS.":</strong><br />"._OPTIONAL."</td>";
110 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_interests' value=\"$userinfo[user_interests]\" size='30' maxlength='100'></td></tr>";
111 echo "<tr><td bgcolor='$bgcolor2'><strong>"._RECEIVENEWSLETTER."</strong></td><td bgcolor='$bgcolor3'>";
112 if ($userinfo[newsletter] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
113 echo "<select name='newsletter'><option value='1'$ck1>"._YES."</option>";
114 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
115 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALWAYSSHOWEMAIL.":</strong></td><td bgcolor='$bgcolor3'>";
116 if ($userinfo[user_viewemail] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
117 echo "<select name='user_viewemail'><option value='1'$ck1>"._YES."</option>";
118 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
119 echo "<tr><td bgcolor='$bgcolor2'><strong>"._HIDEONLINE.":</strong></td><td bgcolor='$bgcolor3'>";
120 if ($userinfo[user_allow_viewonline] == 0) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
121 echo "<select name='user_allow_viewonline'><option value='0'$ck1>"._YES."</option>";
122 echo "<option value='1'$ck2>"._NO."</option></select></td></tr>";
123 echo "<tr><td bgcolor='$bgcolor2'><strong>"._REPLYNOTIFY.":</strong><br />"._REPLYNOTIFYMSG."</td><td bgcolor='$bgcolor3'>";
124 if ($userinfo[user_notify] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
125 echo "<select name='user_notify'><option value='1'$ck1>"._YES."</option>";
126 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
127 echo "<tr><td bgcolor='$bgcolor2'><strong>"._PMNOTIFY.":</strong></td><td bgcolor='$bgcolor3'>";
128 if ($userinfo[user_notify_pm] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
129 echo "<select name='user_notify_pm'><option value='1'$ck1>"._YES."</option>";
130 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
131 echo "<tr><td bgcolor='$bgcolor2'><strong>"._POPPM.":</strong><br />"._POPPMMSG."</td><td bgcolor='$bgcolor3'>";
132 if ($userinfo[user_popup_pm] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
133 echo "<select name='user_popup_pm'><option value='1'$ck1>"._YES."</option>";
134 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
135 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ATTACHSIG.":</strong></td><td bgcolor='$bgcolor3'>";
136 if ($userinfo[user_attachsig] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
137 echo "<select name='user_attachsig'><option value='1'$ck1>"._YES."</option>";
138 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
139 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWBBCODE."</strong></td><td bgcolor='$bgcolor3'>";
140 if ($userinfo[user_allowbbcode] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
141 echo "<select name='user_allowbbcode'><option value='1'$ck1>"._YES."</option>";
142 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
143 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWHTMLCODE."</strong></td><td bgcolor='$bgcolor3'>";
144 if ($userinfo[user_allowhtml] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
145 echo "<select name='user_allowhtml'><option value='1'$ck1>"._YES."</option>";
146 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
147 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWSMILIES."</strong></td><td bgcolor='$bgcolor3'>";
148 if ($userinfo[user_allowsmile] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
149 echo "<select name='user_allowsmile'><option value='1'$ck1>"._YES."</option>";
150 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
151 echo "<tr><td bgcolor='$bgcolor2'><strong>"._FORUMSTIME."</strong></td><td bgcolor='$bgcolor3'>";
152 echo "<select name='user_timezone'>";
153 for ($i=-12; $i<13; $i++) {
154 if ($i == 0) {
155 $dummy = "GMT";
156 } else {
157 if (!preg_match("/[\-]/", $i)) { $i = "+$i"; }
158 $dummy = "GMT $i "._HOURS."";
159 }
160 if ($userinfo[user_timezone] == $i) {
161 echo "<option name='user_timezone' value=\"$i\" selected>$dummy</option>";
162 } else {
163 echo "<option name='user_timezone' value=\"$i\">$dummy</option>";
164 }
165 }
166 echo "</select>";
167 echo "</td></tr>";
168 echo "<tr><td bgcolor='$bgcolor2'><strong>"._FORUMSDATE.":</strong><br />"._FORUMSDATEMSG."</strong></td><td bgcolor='$bgcolor3'>";
169 echo "<input size='15' maxlength='14' type='text' name='user_dateformat' value=\"$userinfo[user_dateformat]\">";
170 echo "</td></tr>";
171// echo "<tr><td bgcolor='$bgcolor2'><strong>"._SIGNATURE.":</strong><br />"._OPTIONAL."<br />"._NOHTML."</td>";
172// echo "<td bgcolor='$bgcolor3'><textarea wrap='virtual' cols='50' rows='5' name='user_sig'>$userinfo[user_sig]</textarea><br />"._255CHARMAX."</td></tr>";
173/*****[BEGIN]******************************************
174 [ Other: YA Forum Sig v1.0.0 ]
175 ******************************************************/
176 echo "<tr><td bgcolor='$bgcolor2'><strong>Signature:</strong><br />"._OPTIONAL."</td>";
177 echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=signature\"><strong>Create/Change</strong></a></td></tr>";
178/*****[END]********************************************
179 [ Other: YA Forum Sig v1.0.0 ]
180 ******************************************************/
181 echo "<tr><td bgcolor='$bgcolor2'><strong>"._EXTRAINFO.":</strong><br />"._OPTIONAL."<br />"._NOHTML."</td>";
182 echo "<td bgcolor='$bgcolor3'><textarea wrap='virtual' cols='50' rows='5' name='bio'>$userinfo[bio]</textarea><br />"._CANKNOWABOUT."</td></tr>";
183 echo "<tr><td bgcolor='$bgcolor2'><strong>"._PASSWORD."</strong>:</td><br />";
184 echo "<td bgcolor='$bgcolor3'><input type='password' name='user_password' size='22' maxlength='".$ya_config['pass_max']."'> <input type='password' name='vpass' size='22' maxlength='".$ya_config['pass_max']."'><br />"._TYPENEWPASSWORD."</td></tr>";
185 echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
186 echo "<input type='hidden' name='username' value=\"$userinfo[username]\">";
187 echo "<input type='hidden' name='user_id' value=\"$userinfo[user_id]\">";
188 echo "<input type='hidden' name='op' value='saveuser'>";
189 echo "<input type='submit' value='"._SAVECHANGES."'>";
190 echo "</form></td></tr>";
191 $avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? $HTTP_POST_VARS['avatarcategory'] : '';
192
193 //menelaos@hetnet.nl
194 $direktori = $board_config['avatar_gallery_path'];
195
196 $dir = @opendir($direktori);
197 $avatar_images = array();
198 while( $file = @readdir($dir) ) {
199 if( $file != '.' && $file != '..' && !is_file($direktori . '/' . $file) && !is_link($direktori . '/' . $file) ) {
200 $sub_dir = @opendir($direktori . '/' . $file);
201 $avatar_row_count = 0;
202 $avatar_col_count = 0;
203 while( $sub_file = @readdir($sub_dir) ) {
204 if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) ) {
205 $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file;
206 $avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));
207 $avatar_col_count++;
208 if( $avatar_col_count == 5 ) {
209 $avatar_row_count++;
210 $avatar_col_count = 0;
211 }
212 }
213 }
214 }
215 }
216 @closedir($dir);
217 @ksort($avatar_images);
218 @reset($avatar_images);
219 if( empty($category) ) {
220 list($category, ) = each($avatar_images);
221 }
222 @reset($avatar_images);
223 $s_categories = '<select name="avatarcategory">';
224 while( list($key) = each($avatar_images) ) {
225 $selected = ( $key == $category ) ? ' selected="selected"' : '';
226 if( count($avatar_images[$key]) ) {
227 $s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>';
228 }
229 }
230 $s_categories .= '</select>';
231
232 if ($userinfo[user_avatar_type] == 1) {
233 $user_avatar = $board_config[avatar_path]."/".$userinfo[user_avatar];
234 } elseif ($userinfo[user_avatar_type] == 2) {
235 $user_avatar = $userinfo[user_avatar];
236 } else {
237 $user_avatar = $board_config[avatar_gallery_path]."/".$userinfo[user_avatar];
238 }
239 echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
240 echo "<span class='title'>"._YA_AVCP."</span></strong><br />";
241 echo "<tr><td bgcolor='$bgcolor2'>"._YA_AVINF1." ".$board_config['avatar_max_width']." "._YA_AVINF2." ".$board_config['avatar_max_height']." "._YA_AVINF3." ".YA_CoolSize($board_config['avatar_filesize']).".</td>";
242 if (preg_match("#http#", $userinfo['user_avatar'])) {
243 //avatarfix by menelaos dot hetnet dot nl
244 echo "<td bgcolor='$bgcolor3' align=center>"._YA_CURRAV."<br /><IMG alt=\"\" src=\"$direktori/$userinfo[user_avatar]\" width=\"40\" height=\"50\"></td></tr>";
245 } elseif ($userinfo[user_avatar]) {
246 echo "<td bgcolor='$bgcolor3' align=center>"._YA_CURRAV."<br /><IMG alt=\"\" src=\"$direktori/$userinfo[user_avatar]\" width=\"40\" height=\"50\"></td></tr>";
247 }
248 echo "<br />";
249 if ($board_config['allow_avatar_local']) {
250 echo "<form action=\"modules.php?name=Your_Account&op=avatarlist\" method=\"post\">";
251 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_SELAVGALL.":</strong></td>";
252 echo "<td bgcolor='$bgcolor3'>".$s_categories." <img src=\"images/right.gif\" align=middle> <input class=button type=submit value=\""._YA_SHOWGALL."\"></td></tr>";
253 echo "</form>";
254 } else {
255 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_SELAVGALL.":</strong></td>";
256 echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
257 }
258 if ($board_config['allow_avatar_upload']) {
259 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADAV.":</strong></td>";
260 echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><strong>"._YA_UPLOADFORUM."</strong></a></td></tr>";
261 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADURL.":</strong><br /><SPAN class=gensmall>"._YA_AVCOPIED."</SPAN></td>";
262 echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><strong>"._YA_UPLOADFORUM."</strong></a></td></tr>";
263 } else {
264 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADURL.":</strong></td>";
265 echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
266 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADAV.":</strong></td>";
267 echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
268 }
269
270 if ($board_config['allow_avatar_remote']) {
271 echo "<form action=\"modules.php?name=Your_Account&op=avatarlinksave\" method=\"post\">";
272 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_OFFSITE.":</strong><br /><SPAN class=gensmall>"._YA_SUBMITBUTTON."</SPAN></td>";
273if ($userinfo[user_avatar_type] == 2) {
274 echo "<td bgcolor='$bgcolor3'><input class=post style=\"WIDTH: 150px\" size='25' name='avatar' value=\"".$userinfo[user_avatar]."\"> <input class=mainoption type=submit value=Submit></td></tr>";
275} else {
276echo "<td bgcolor='$bgcolor3'><input class=post style=\"WIDTH: 150px\" size='25' name='avatar' value=\"http://\"> <input class=mainoption type=submit value=Submit></td></tr>";
277}
278 echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
279 echo "</form>";
280 } else {
281 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_OFFSITE.":</strong></td>";
282 echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
283 echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
284 }
285 echo "</td></tr></table>";
286 CloseTable();
287 include_once(NUKE_BASE_DIR.'footer.php');
288 } else {
289 mmain($user);
290 }
291
292?>
🟢 New File (Added/Changed)
1<?php
2/*=======================================================================
3 Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
4 =======================================================================*/
5
6/*********************************************************************************/
7/* CNB Your Account: An Advanced User Management System for phpnuke */
8/* ============================================ */
9/* */
10/* Copyright (c) 2004 by Comunidade PHP Nuke Brasil */
11/* http://dev.phpnuke.org.br & http://www.phpnuke.org.br */
12/* */
13/* Contact author: escudero@phpnuke.org.br */
14/* International Support Forum: http://ravenphpscripts.com/forum76.html */
15/* */
16/* This program is free software. You can redistribute it and/or modify */
17/* it under the terms of the GNU General Public License as published by */
18/* the Free Software Foundation; either version 2 of the License. */
19/* */
20/*********************************************************************************/
21/* CNB Your Account it the official successor of NSN Your Account by Bob Marion */
22/*********************************************************************************/
23
24/*****[CHANGES]**********************************************************
25-=[Base]=-
26 Nuke Patched v3.1.0 06/26/2005
27-=[Other]=-
28 YA Forum Sig v1.0.0 06/15/2005
29 ************************************************************************/
30
31if (!defined('MODULE_FILE')) {
32 die ("You can't access this file directly...");
33}
34
35if (!defined('CNBYA')) {
36 die('CNBYA protection');
37}
38
39 global $cookie, $userinfo;
40 if ((is_user()) AND (strtolower($userinfo['username']) == strtolower($cookie[1])) AND ($userinfo['user_password'] == $cookie[2])) {
41 include_once(NUKE_BASE_DIR.'header.php');
42 title(_PERSONALINFO);
43 OpenTable();
44 nav();
45 CloseTable();
46
47//recup info user ----------------------------------
48 $result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field");
49 while ($sqlvalue = $db->sql_fetchrow($result)) {
50 list($value) = $db->sql_fetchrow( $db->sql_query("SELECT value FROM ".$user_prefix."_cnbya_value WHERE fid ='$sqlvalue[fid]' AND uid = '$userinfo[user_id]'"));
51
52 $userinfo[$sqlvalue['name']] = $value;
53 }
54//--------------------------------------------
55
56 echo "<br />";
57 if (!preg_match("#http://#i", $userinfo['user_website']) && $userinfo['user_website'] != "http://") {
58 $userinfo['user_website'] = "http://".$userinfo['user_website'];
59 }
60 OpenTable();
61 echo "<table class='forumline' cellpadding='3' cellspacing='3' border='0' width='100%'>";
62 echo "<form name='Register' action='modules.php?name=$module_name' method='post'>";
63 echo "<tr><td bgcolor='$bgcolor2'><strong>"._USRNICKNAME."</strong>:</td><td bgcolor='$bgcolor3'><strong>$userinfo[username]</strong></td></tr>";
64 echo "<tr><td bgcolor='$bgcolor2'><strong>"._UREALNAME."</strong>:<br />"._REQUIRED."</td><td bgcolor='$bgcolor3'>";
65 echo "<input type='text' name='realname' value=\"$userinfo[name]\" size='50' maxlength='60'></td></tr>";
66 if ($ya_config['allowmailchange'] < 1) {
67 echo "<tr><td bgcolor='$bgcolor2'><strong>"._UREALEMAIL.":</strong><br />"._REQUIRED."</td>";
68 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_email' value=\"$userinfo[user_email]\" size='50' maxlength='255'><br />"._EMAILNOTPUBLIC."</td></tr>";
69 } else {
70 echo "<input type='hidden' name='user_email' value=\"$userinfo[user_email]\">\n";
71 }
72 echo "<tr><td bgcolor='$bgcolor2'><strong>"._UFAKEMAIL.":</strong><br />"._OPTIONAL."</td>";
73 echo "<td bgcolor='$bgcolor3'><input type='text' name='femail' value=\"$userinfo[femail]\" size='50' maxlength='255'><br />"._EMAILPUBLIC."</td></tr>";
74 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YOURHOMEPAGE.":</strong><br />"._OPTIONAL."</td>";
75 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_website' value=\"$userinfo[user_website]\" size='50' maxlength='255'></td></tr>";
76
77 $result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field WHERE need <> '0' ORDER BY pos");
78 while ($sqlvalue = $db->sql_fetchrow($result)) {
79 $t = $sqlvalue[fid];
80 $value2 = explode("::", $sqlvalue[value]);
81 if (substr($sqlvalue[name],0,1)=='_') eval( "\$name_exit = $sqlvalue[name];"); else $name_exit = $sqlvalue[name];
82 if (count($value2) == 1) {
83 echo "<tr><td bgcolor='$bgcolor2'><strong>$name_exit</strong></td><td bgcolor='$bgcolor3'><input type='text' name='nfield[$t]' value='".$userinfo[$sqlvalue[name]]."' size='20' maxlength='$sqlvalue[size]'></td></tr>\n";
84 $sqlvalueMax = $sqlvalueMax - 1;
85 } else {
86 echo "<tr><td bgcolor='$bgcolor2'><strong>$name_exit</strong></td><td bgcolor='$bgcolor3'>";
87 echo "<select name='nfield[$t]'>\n";
88 for ($i = 0; $i<count($value2); $i++) {
89 if (trim($userinfo[$sqlvalue[name]]) == trim($value2[$i])) $sel = "selected"; else $sel = "";
90 echo "<option value=\"".trim($value2[$i])."\" $sel>$value2[$i]</option>\n";
91 }
92 echo "</select>";
93 echo "</td></tr>\n";
94 }
95 }
96
97 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YICQ.":</strong><br />"._OPTIONAL."</td>";
98 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_icq' value=\"$userinfo[user_icq]\" size='30' maxlength='100'></td></tr>";
99 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YAIM.":</strong><br />"._OPTIONAL."</td>";
100 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_aim' value=\"$userinfo[user_aim]\" size='30' maxlength='100'></td></tr>";
101 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YYIM.":</strong><br />"._OPTIONAL."</td>";
102 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_yim' value=\"$userinfo[user_yim]\" size='30' maxlength='100'></td></tr>";
103 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YMSNM.":</strong><br />"._OPTIONAL."</td>";
104 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_msnm' value=\"$userinfo[user_msnm]\" size='30' maxlength='100'></td></tr>";
105 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YLOCATION.":</strong><br />"._OPTIONAL."</td>";
106 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_from' value=\"$userinfo[user_from]\" size='30' maxlength='100'></td></tr>";
107 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YOCCUPATION.":</strong><br />"._OPTIONAL."</td>";
108 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_occ' value=\"$userinfo[user_occ]\" size='30' maxlength='100'></td></tr>";
109 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YINTERESTS.":</strong><br />"._OPTIONAL."</td>";
110 echo "<td bgcolor='$bgcolor3'><input type='text' name='user_interests' value=\"$userinfo[user_interests]\" size='30' maxlength='100'></td></tr>";
111 echo "<tr><td bgcolor='$bgcolor2'><strong>"._RECEIVENEWSLETTER."</strong></td><td bgcolor='$bgcolor3'>";
112 if ($userinfo[newsletter] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
113 echo "<select name='newsletter'><option value='1'$ck1>"._YES."</option>";
114 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
115 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALWAYSSHOWEMAIL.":</strong></td><td bgcolor='$bgcolor3'>";
116 if ($userinfo[user_viewemail] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
117 echo "<select name='user_viewemail'><option value='1'$ck1>"._YES."</option>";
118 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
119 echo "<tr><td bgcolor='$bgcolor2'><strong>"._HIDEONLINE.":</strong></td><td bgcolor='$bgcolor3'>";
120 if ($userinfo[user_allow_viewonline] == 0) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
121 echo "<select name='user_allow_viewonline'><option value='0'$ck1>"._YES."</option>";
122 echo "<option value='1'$ck2>"._NO."</option></select></td></tr>";
123 echo "<tr><td bgcolor='$bgcolor2'><strong>"._REPLYNOTIFY.":</strong><br />"._REPLYNOTIFYMSG."</td><td bgcolor='$bgcolor3'>";
124 if ($userinfo[user_notify] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
125 echo "<select name='user_notify'><option value='1'$ck1>"._YES."</option>";
126 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
127 echo "<tr><td bgcolor='$bgcolor2'><strong>"._PMNOTIFY.":</strong></td><td bgcolor='$bgcolor3'>";
128 if ($userinfo[user_notify_pm] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
129 echo "<select name='user_notify_pm'><option value='1'$ck1>"._YES."</option>";
130 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
131 echo "<tr><td bgcolor='$bgcolor2'><strong>"._POPPM.":</strong><br />"._POPPMMSG."</td><td bgcolor='$bgcolor3'>";
132 if ($userinfo[user_popup_pm] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
133 echo "<select name='user_popup_pm'><option value='1'$ck1>"._YES."</option>";
134 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
135 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ATTACHSIG.":</strong></td><td bgcolor='$bgcolor3'>";
136 if ($userinfo[user_attachsig] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
137 echo "<select name='user_attachsig'><option value='1'$ck1>"._YES."</option>";
138 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
139 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWBBCODE."</strong></td><td bgcolor='$bgcolor3'>";
140 if ($userinfo[user_allowbbcode] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
141 echo "<select name='user_allowbbcode'><option value='1'$ck1>"._YES."</option>";
142 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
143 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWHTMLCODE."</strong></td><td bgcolor='$bgcolor3'>";
144 if ($userinfo[user_allowhtml] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
145 echo "<select name='user_allowhtml'><option value='1'$ck1>"._YES."</option>";
146 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
147 echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWSMILIES."</strong></td><td bgcolor='$bgcolor3'>";
148 if ($userinfo[user_allowsmile] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
149 echo "<select name='user_allowsmile'><option value='1'$ck1>"._YES."</option>";
150 echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
151 echo "<tr><td bgcolor='$bgcolor2'><strong>"._FORUMSTIME."</strong></td><td bgcolor='$bgcolor3'>";
152 echo "<select name='user_timezone'>";
153 for ($i=-12; $i<13; $i++) {
154 if ($i == 0) {
155 $dummy = "GMT";
156 } else {
157 if (!preg_match("/[\-]/", $i)) { $i = "+$i"; }
158 $dummy = "GMT $i "._HOURS."";
159 }
160 if ($userinfo[user_timezone] == $i) {
161 echo "<option name='user_timezone' value=\"$i\" selected>$dummy</option>";
162 } else {
163 echo "<option name='user_timezone' value=\"$i\">$dummy</option>";
164 }
165 }
166 echo "</select>";
167 echo "</td></tr>";
168 echo "<tr><td bgcolor='$bgcolor2'><strong>"._FORUMSDATE.":</strong><br />"._FORUMSDATEMSG."</strong></td><td bgcolor='$bgcolor3'>";
169 echo "<input size='15' maxlength='14' type='text' name='user_dateformat' value=\"$userinfo[user_dateformat]\">";
170 echo "</td></tr>";
171// echo "<tr><td bgcolor='$bgcolor2'><strong>"._SIGNATURE.":</strong><br />"._OPTIONAL."<br />"._NOHTML."</td>";
172// echo "<td bgcolor='$bgcolor3'><textarea wrap='virtual' cols='50' rows='5' name='user_sig'>$userinfo[user_sig]</textarea><br />"._255CHARMAX."</td></tr>";
173/*****[BEGIN]******************************************
174 [ Other: YA Forum Sig v1.0.0 ]
175 ******************************************************/
176 echo "<tr><td bgcolor='$bgcolor2'><strong>Signature:</strong><br />"._OPTIONAL."</td>";
177 echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=signature\"><strong>Create/Change</strong></a></td></tr>";
178/*****[END]********************************************
179 [ Other: YA Forum Sig v1.0.0 ]
180 ******************************************************/
181 echo "<tr><td bgcolor='$bgcolor2'><strong>"._EXTRAINFO.":</strong><br />"._OPTIONAL."<br />"._NOHTML."</td>";
182 echo "<td bgcolor='$bgcolor3'><textarea wrap='virtual' cols='50' rows='5' name='bio'>$userinfo[bio]</textarea><br />"._CANKNOWABOUT."</td></tr>";
183 echo "<tr><td bgcolor='$bgcolor2'><strong>"._PASSWORD."</strong>:</td><br />";
184 echo "<td bgcolor='$bgcolor3'><input type='password' name='user_password' size='22' maxlength='".$ya_config['pass_max']."'> <input type='password' name='vpass' size='22' maxlength='".$ya_config['pass_max']."'><br />"._TYPENEWPASSWORD."</td></tr>";
185 echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
186 echo "<input type='hidden' name='username' value=\"$userinfo[username]\">";
187 echo "<input type='hidden' name='user_id' value=\"$userinfo[user_id]\">";
188 echo "<input type='hidden' name='op' value='saveuser'>";
189 echo "<input type='submit' value='"._SAVECHANGES."'>";
190 echo "</form></td></tr>";
191 $avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? $HTTP_POST_VARS['avatarcategory'] : '';
192
193 //menelaos@hetnet.nl
194 $direktori = $board_config['avatar_gallery_path'];
195
196 $dir = @opendir($direktori);
197 $avatar_images = array();
198 while( $file = @readdir($dir) ) {
199 if( $file != '.' && $file != '..' && !is_file($direktori . '/' . $file) && !is_link($direktori . '/' . $file) ) {
200 $sub_dir = @opendir($direktori . '/' . $file);
201 $avatar_row_count = 0;
202 $avatar_col_count = 0;
203 while( $sub_file = @readdir($sub_dir) ) {
204 if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) ) {
205 $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file;
206 $avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));
207 $avatar_col_count++;
208 if( $avatar_col_count == 5 ) {
209 $avatar_row_count++;
210 $avatar_col_count = 0;
211 }
212 }
213 }
214 }
215 }
216 @closedir($dir);
217 @ksort($avatar_images);
218 @reset($avatar_images);
219 if (empty($category)) { $category = array_key_first($avatar_images); }
220 @reset($avatar_images);
221 $s_categories = '<select name="avatarcategory">';
222 foreach (array_keys($avatar_images) as $key) {
223 $selected = ( $key == $category ) ? ' selected="selected"' : '';
224 if( count($avatar_images[$key]) )
225 {
226 $s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>';
227 }
228 }
229 $s_categories .= '</select>';
230
231 if ($userinfo[user_avatar_type] == 1) {
232 $user_avatar = $board_config[avatar_path]."/".$userinfo[user_avatar];
233 } elseif ($userinfo[user_avatar_type] == 2) {
234 $user_avatar = $userinfo[user_avatar];
235 } else {
236 $user_avatar = $board_config[avatar_gallery_path]."/".$userinfo[user_avatar];
237 }
238 echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
239 echo "<span class='title'>"._YA_AVCP."</span></strong><br />";
240 echo "<tr><td bgcolor='$bgcolor2'>"._YA_AVINF1." ".$board_config['avatar_max_width']." "._YA_AVINF2." ".$board_config['avatar_max_height']." "._YA_AVINF3." ".YA_CoolSize($board_config['avatar_filesize']).".</td>";
241 if (preg_match("#http#", $userinfo['user_avatar'])) {
242 //avatarfix by menelaos dot hetnet dot nl
243 echo "<td bgcolor='$bgcolor3' align=center>"._YA_CURRAV."<br /><IMG alt=\"\" src=\"$direktori/$userinfo[user_avatar]\" width=\"40\" height=\"50\"></td></tr>";
244 } elseif ($userinfo[user_avatar]) {
245 echo "<td bgcolor='$bgcolor3' align=center>"._YA_CURRAV."<br /><IMG alt=\"\" src=\"$direktori/$userinfo[user_avatar]\" width=\"40\" height=\"50\"></td></tr>";
246 }
247 echo "<br />";
248 if ($board_config['allow_avatar_local']) {
249 echo "<form action=\"modules.php?name=Your_Account&op=avatarlist\" method=\"post\">";
250 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_SELAVGALL.":</strong></td>";
251 echo "<td bgcolor='$bgcolor3'>".$s_categories." <img src=\"images/right.gif\" align=middle> <input class=button type=submit value=\""._YA_SHOWGALL."\"></td></tr>";
252 echo "</form>";
253 } else {
254 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_SELAVGALL.":</strong></td>";
255 echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
256 }
257 if ($board_config['allow_avatar_upload']) {
258 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADAV.":</strong></td>";
259 echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><strong>"._YA_UPLOADFORUM."</strong></a></td></tr>";
260 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADURL.":</strong><br /><SPAN class=gensmall>"._YA_AVCOPIED."</SPAN></td>";
261 echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><strong>"._YA_UPLOADFORUM."</strong></a></td></tr>";
262 } else {
263 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADURL.":</strong></td>";
264 echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
265 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADAV.":</strong></td>";
266 echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
267 }
268
269 if ($board_config['allow_avatar_remote']) {
270 echo "<form action=\"modules.php?name=Your_Account&op=avatarlinksave\" method=\"post\">";
271 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_OFFSITE.":</strong><br /><SPAN class=gensmall>"._YA_SUBMITBUTTON."</SPAN></td>";
272if ($userinfo[user_avatar_type] == 2) {
273 echo "<td bgcolor='$bgcolor3'><input class=post style=\"WIDTH: 150px\" size='25' name='avatar' value=\"".$userinfo[user_avatar]."\"> <input class=mainoption type=submit value=Submit></td></tr>";
274} else {
275echo "<td bgcolor='$bgcolor3'><input class=post style=\"WIDTH: 150px\" size='25' name='avatar' value=\"http://\"> <input class=mainoption type=submit value=Submit></td></tr>";
276}
277 echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
278 echo "</form>";
279 } else {
280 echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_OFFSITE.":</strong></td>";
281 echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
282 echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
283 }
284 echo "</td></tr></table>";
285 CloseTable();
286 include_once(NUKE_BASE_DIR.'footer.php');
287 } else {
288 mmain($user);
289 }
290
291?>
📋 Original Code (Copy Ready)
Original Old Code
<?php
/*=======================================================================
Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
=======================================================================*/
/*********************************************************************************/
/* CNB Your Account: An Advanced User Management System for phpnuke */
/* ============================================ */
/* */
/* Copyright (c) 2004 by Comunidade PHP Nuke Brasil */
/* http://dev.phpnuke.org.br & http://www.phpnuke.org.br */
/* */
/* Contact author: escudero@phpnuke.org.br */
/* International Support Forum: http://ravenphpscripts.com/forum76.html */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/*********************************************************************************/
/* CNB Your Account it the official successor of NSN Your Account by Bob Marion */
/*********************************************************************************/
/*****[CHANGES]**********************************************************
-=[Base]=-
Nuke Patched v3.1.0 06/26/2005
-=[Other]=-
YA Forum Sig v1.0.0 06/15/2005
************************************************************************/
if (!defined('MODULE_FILE')) {
die ("You can't access this file directly...");
}
if (!defined('CNBYA')) {
die('CNBYA protection');
}
global $cookie, $userinfo;
if ((is_user()) AND (strtolower($userinfo['username']) == strtolower($cookie[1])) AND ($userinfo['user_password'] == $cookie[2])) {
include_once(NUKE_BASE_DIR.'header.php');
title(_PERSONALINFO);
OpenTable();
nav();
CloseTable();
//recup info user ----------------------------------
$result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field");
while ($sqlvalue = $db->sql_fetchrow($result)) {
list($value) = $db->sql_fetchrow( $db->sql_query("SELECT value FROM ".$user_prefix."_cnbya_value WHERE fid ='$sqlvalue[fid]' AND uid = '$userinfo[user_id]'"));
$userinfo[$sqlvalue['name']] = $value;
}
//--------------------------------------------
echo "<br />";
if (!preg_match("#http://#i", $userinfo['user_website']) && $userinfo['user_website'] != "http://") {
$userinfo['user_website'] = "http://".$userinfo['user_website'];
}
OpenTable();
echo "<table class='forumline' cellpadding='3' cellspacing='3' border='0' width='100%'>";
echo "<form name='Register' action='modules.php?name=$module_name' method='post'>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._USRNICKNAME."</strong>:</td><td bgcolor='$bgcolor3'><strong>$userinfo[username]</strong></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._UREALNAME."</strong>:<br />"._REQUIRED."</td><td bgcolor='$bgcolor3'>";
echo "<input type='text' name='realname' value=\"$userinfo[name]\" size='50' maxlength='60'></td></tr>";
if ($ya_config['allowmailchange'] < 1) {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._UREALEMAIL.":</strong><br />"._REQUIRED."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_email' value=\"$userinfo[user_email]\" size='50' maxlength='255'><br />"._EMAILNOTPUBLIC."</td></tr>";
} else {
echo "<input type='hidden' name='user_email' value=\"$userinfo[user_email]\">\n";
}
echo "<tr><td bgcolor='$bgcolor2'><strong>"._UFAKEMAIL.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='femail' value=\"$userinfo[femail]\" size='50' maxlength='255'><br />"._EMAILPUBLIC."</td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YOURHOMEPAGE.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_website' value=\"$userinfo[user_website]\" size='50' maxlength='255'></td></tr>";
$result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field WHERE need <> '0' ORDER BY pos");
while ($sqlvalue = $db->sql_fetchrow($result)) {
$t = $sqlvalue[fid];
$value2 = explode("::", $sqlvalue[value]);
if (substr($sqlvalue[name],0,1)=='_') eval( "\$name_exit = $sqlvalue[name];"); else $name_exit = $sqlvalue[name];
if (count($value2) == 1) {
echo "<tr><td bgcolor='$bgcolor2'><strong>$name_exit</strong></td><td bgcolor='$bgcolor3'><input type='text' name='nfield[$t]' value='".$userinfo[$sqlvalue[name]]."' size='20' maxlength='$sqlvalue[size]'></td></tr>\n";
$sqlvalueMax = $sqlvalueMax - 1;
} else {
echo "<tr><td bgcolor='$bgcolor2'><strong>$name_exit</strong></td><td bgcolor='$bgcolor3'>";
echo "<select name='nfield[$t]'>\n";
for ($i = 0; $i<count($value2); $i++) {
if (trim($userinfo[$sqlvalue[name]]) == trim($value2[$i])) $sel = "selected"; else $sel = "";
echo "<option value=\"".trim($value2[$i])."\" $sel>$value2[$i]</option>\n";
}
echo "</select>";
echo "</td></tr>\n";
}
}
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YICQ.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_icq' value=\"$userinfo[user_icq]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YAIM.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_aim' value=\"$userinfo[user_aim]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YYIM.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_yim' value=\"$userinfo[user_yim]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YMSNM.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_msnm' value=\"$userinfo[user_msnm]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YLOCATION.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_from' value=\"$userinfo[user_from]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YOCCUPATION.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_occ' value=\"$userinfo[user_occ]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YINTERESTS.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_interests' value=\"$userinfo[user_interests]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._RECEIVENEWSLETTER."</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[newsletter] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='newsletter'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALWAYSSHOWEMAIL.":</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_viewemail] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_viewemail'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._HIDEONLINE.":</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_allow_viewonline] == 0) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_allow_viewonline'><option value='0'$ck1>"._YES."</option>";
echo "<option value='1'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._REPLYNOTIFY.":</strong><br />"._REPLYNOTIFYMSG."</td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_notify] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_notify'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._PMNOTIFY.":</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_notify_pm] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_notify_pm'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._POPPM.":</strong><br />"._POPPMMSG."</td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_popup_pm] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_popup_pm'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ATTACHSIG.":</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_attachsig] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_attachsig'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWBBCODE."</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_allowbbcode] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_allowbbcode'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWHTMLCODE."</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_allowhtml] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_allowhtml'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWSMILIES."</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_allowsmile] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_allowsmile'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._FORUMSTIME."</strong></td><td bgcolor='$bgcolor3'>";
echo "<select name='user_timezone'>";
for ($i=-12; $i<13; $i++) {
if ($i == 0) {
$dummy = "GMT";
} else {
if (!preg_match("/[\-]/", $i)) { $i = "+$i"; }
$dummy = "GMT $i "._HOURS."";
}
if ($userinfo[user_timezone] == $i) {
echo "<option name='user_timezone' value=\"$i\" selected>$dummy</option>";
} else {
echo "<option name='user_timezone' value=\"$i\">$dummy</option>";
}
}
echo "</select>";
echo "</td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._FORUMSDATE.":</strong><br />"._FORUMSDATEMSG."</strong></td><td bgcolor='$bgcolor3'>";
echo "<input size='15' maxlength='14' type='text' name='user_dateformat' value=\"$userinfo[user_dateformat]\">";
echo "</td></tr>";
// echo "<tr><td bgcolor='$bgcolor2'><strong>"._SIGNATURE.":</strong><br />"._OPTIONAL."<br />"._NOHTML."</td>";
// echo "<td bgcolor='$bgcolor3'><textarea wrap='virtual' cols='50' rows='5' name='user_sig'>$userinfo[user_sig]</textarea><br />"._255CHARMAX."</td></tr>";
/*****[BEGIN]******************************************
[ Other: YA Forum Sig v1.0.0 ]
******************************************************/
echo "<tr><td bgcolor='$bgcolor2'><strong>Signature:</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=signature\"><strong>Create/Change</strong></a></td></tr>";
/*****[END]********************************************
[ Other: YA Forum Sig v1.0.0 ]
******************************************************/
echo "<tr><td bgcolor='$bgcolor2'><strong>"._EXTRAINFO.":</strong><br />"._OPTIONAL."<br />"._NOHTML."</td>";
echo "<td bgcolor='$bgcolor3'><textarea wrap='virtual' cols='50' rows='5' name='bio'>$userinfo[bio]</textarea><br />"._CANKNOWABOUT."</td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._PASSWORD."</strong>:</td><br />";
echo "<td bgcolor='$bgcolor3'><input type='password' name='user_password' size='22' maxlength='".$ya_config['pass_max']."'> <input type='password' name='vpass' size='22' maxlength='".$ya_config['pass_max']."'><br />"._TYPENEWPASSWORD."</td></tr>";
echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
echo "<input type='hidden' name='username' value=\"$userinfo[username]\">";
echo "<input type='hidden' name='user_id' value=\"$userinfo[user_id]\">";
echo "<input type='hidden' name='op' value='saveuser'>";
echo "<input type='submit' value='"._SAVECHANGES."'>";
echo "</form></td></tr>";
$avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? $HTTP_POST_VARS['avatarcategory'] : '';
//menelaos@hetnet.nl
$direktori = $board_config['avatar_gallery_path'];
$dir = @opendir($direktori);
$avatar_images = array();
while( $file = @readdir($dir) ) {
if( $file != '.' && $file != '..' && !is_file($direktori . '/' . $file) && !is_link($direktori . '/' . $file) ) {
$sub_dir = @opendir($direktori . '/' . $file);
$avatar_row_count = 0;
$avatar_col_count = 0;
while( $sub_file = @readdir($sub_dir) ) {
if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) ) {
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file;
$avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));
$avatar_col_count++;
if( $avatar_col_count == 5 ) {
$avatar_row_count++;
$avatar_col_count = 0;
}
}
}
}
}
@closedir($dir);
@ksort($avatar_images);
@reset($avatar_images);
if( empty($category) ) {
list($category, ) = each($avatar_images);
}
@reset($avatar_images);
$s_categories = '<select name="avatarcategory">';
while( list($key) = each($avatar_images) ) {
$selected = ( $key == $category ) ? ' selected="selected"' : '';
if( count($avatar_images[$key]) ) {
$s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>';
}
}
$s_categories .= '</select>';
if ($userinfo[user_avatar_type] == 1) {
$user_avatar = $board_config[avatar_path]."/".$userinfo[user_avatar];
} elseif ($userinfo[user_avatar_type] == 2) {
$user_avatar = $userinfo[user_avatar];
} else {
$user_avatar = $board_config[avatar_gallery_path]."/".$userinfo[user_avatar];
}
echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
echo "<span class='title'>"._YA_AVCP."</span></strong><br />";
echo "<tr><td bgcolor='$bgcolor2'>"._YA_AVINF1." ".$board_config['avatar_max_width']." "._YA_AVINF2." ".$board_config['avatar_max_height']." "._YA_AVINF3." ".YA_CoolSize($board_config['avatar_filesize']).".</td>";
if (preg_match("#http#", $userinfo['user_avatar'])) {
//avatarfix by menelaos dot hetnet dot nl
echo "<td bgcolor='$bgcolor3' align=center>"._YA_CURRAV."<br /><IMG alt=\"\" src=\"$direktori/$userinfo[user_avatar]\" width=\"40\" height=\"50\"></td></tr>";
} elseif ($userinfo[user_avatar]) {
echo "<td bgcolor='$bgcolor3' align=center>"._YA_CURRAV."<br /><IMG alt=\"\" src=\"$direktori/$userinfo[user_avatar]\" width=\"40\" height=\"50\"></td></tr>";
}
echo "<br />";
if ($board_config['allow_avatar_local']) {
echo "<form action=\"modules.php?name=Your_Account&op=avatarlist\" method=\"post\">";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_SELAVGALL.":</strong></td>";
echo "<td bgcolor='$bgcolor3'>".$s_categories." <img src=\"images/right.gif\" align=middle> <input class=button type=submit value=\""._YA_SHOWGALL."\"></td></tr>";
echo "</form>";
} else {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_SELAVGALL.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
}
if ($board_config['allow_avatar_upload']) {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADAV.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><strong>"._YA_UPLOADFORUM."</strong></a></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADURL.":</strong><br /><SPAN class=gensmall>"._YA_AVCOPIED."</SPAN></td>";
echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><strong>"._YA_UPLOADFORUM."</strong></a></td></tr>";
} else {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADURL.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADAV.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
}
if ($board_config['allow_avatar_remote']) {
echo "<form action=\"modules.php?name=Your_Account&op=avatarlinksave\" method=\"post\">";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_OFFSITE.":</strong><br /><SPAN class=gensmall>"._YA_SUBMITBUTTON."</SPAN></td>";
if ($userinfo[user_avatar_type] == 2) {
echo "<td bgcolor='$bgcolor3'><input class=post style=\"WIDTH: 150px\" size='25' name='avatar' value=\"".$userinfo[user_avatar]."\"> <input class=mainoption type=submit value=Submit></td></tr>";
} else {
echo "<td bgcolor='$bgcolor3'><input class=post style=\"WIDTH: 150px\" size='25' name='avatar' value=\"http://\"> <input class=mainoption type=submit value=Submit></td></tr>";
}
echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
echo "</form>";
} else {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_OFFSITE.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
}
echo "</td></tr></table>";
CloseTable();
include_once(NUKE_BASE_DIR.'footer.php');
} else {
mmain($user);
}
?>
Original New Code
<?php
/*=======================================================================
Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
=======================================================================*/
/*********************************************************************************/
/* CNB Your Account: An Advanced User Management System for phpnuke */
/* ============================================ */
/* */
/* Copyright (c) 2004 by Comunidade PHP Nuke Brasil */
/* http://dev.phpnuke.org.br & http://www.phpnuke.org.br */
/* */
/* Contact author: escudero@phpnuke.org.br */
/* International Support Forum: http://ravenphpscripts.com/forum76.html */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/*********************************************************************************/
/* CNB Your Account it the official successor of NSN Your Account by Bob Marion */
/*********************************************************************************/
/*****[CHANGES]**********************************************************
-=[Base]=-
Nuke Patched v3.1.0 06/26/2005
-=[Other]=-
YA Forum Sig v1.0.0 06/15/2005
************************************************************************/
if (!defined('MODULE_FILE')) {
die ("You can't access this file directly...");
}
if (!defined('CNBYA')) {
die('CNBYA protection');
}
global $cookie, $userinfo;
if ((is_user()) AND (strtolower($userinfo['username']) == strtolower($cookie[1])) AND ($userinfo['user_password'] == $cookie[2])) {
include_once(NUKE_BASE_DIR.'header.php');
title(_PERSONALINFO);
OpenTable();
nav();
CloseTable();
//recup info user ----------------------------------
$result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field");
while ($sqlvalue = $db->sql_fetchrow($result)) {
list($value) = $db->sql_fetchrow( $db->sql_query("SELECT value FROM ".$user_prefix."_cnbya_value WHERE fid ='$sqlvalue[fid]' AND uid = '$userinfo[user_id]'"));
$userinfo[$sqlvalue['name']] = $value;
}
//--------------------------------------------
echo "<br />";
if (!preg_match("#http://#i", $userinfo['user_website']) && $userinfo['user_website'] != "http://") {
$userinfo['user_website'] = "http://".$userinfo['user_website'];
}
OpenTable();
echo "<table class='forumline' cellpadding='3' cellspacing='3' border='0' width='100%'>";
echo "<form name='Register' action='modules.php?name=$module_name' method='post'>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._USRNICKNAME."</strong>:</td><td bgcolor='$bgcolor3'><strong>$userinfo[username]</strong></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._UREALNAME."</strong>:<br />"._REQUIRED."</td><td bgcolor='$bgcolor3'>";
echo "<input type='text' name='realname' value=\"$userinfo[name]\" size='50' maxlength='60'></td></tr>";
if ($ya_config['allowmailchange'] < 1) {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._UREALEMAIL.":</strong><br />"._REQUIRED."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_email' value=\"$userinfo[user_email]\" size='50' maxlength='255'><br />"._EMAILNOTPUBLIC."</td></tr>";
} else {
echo "<input type='hidden' name='user_email' value=\"$userinfo[user_email]\">\n";
}
echo "<tr><td bgcolor='$bgcolor2'><strong>"._UFAKEMAIL.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='femail' value=\"$userinfo[femail]\" size='50' maxlength='255'><br />"._EMAILPUBLIC."</td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YOURHOMEPAGE.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_website' value=\"$userinfo[user_website]\" size='50' maxlength='255'></td></tr>";
$result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field WHERE need <> '0' ORDER BY pos");
while ($sqlvalue = $db->sql_fetchrow($result)) {
$t = $sqlvalue[fid];
$value2 = explode("::", $sqlvalue[value]);
if (substr($sqlvalue[name],0,1)=='_') eval( "\$name_exit = $sqlvalue[name];"); else $name_exit = $sqlvalue[name];
if (count($value2) == 1) {
echo "<tr><td bgcolor='$bgcolor2'><strong>$name_exit</strong></td><td bgcolor='$bgcolor3'><input type='text' name='nfield[$t]' value='".$userinfo[$sqlvalue[name]]."' size='20' maxlength='$sqlvalue[size]'></td></tr>\n";
$sqlvalueMax = $sqlvalueMax - 1;
} else {
echo "<tr><td bgcolor='$bgcolor2'><strong>$name_exit</strong></td><td bgcolor='$bgcolor3'>";
echo "<select name='nfield[$t]'>\n";
for ($i = 0; $i<count($value2); $i++) {
if (trim($userinfo[$sqlvalue[name]]) == trim($value2[$i])) $sel = "selected"; else $sel = "";
echo "<option value=\"".trim($value2[$i])."\" $sel>$value2[$i]</option>\n";
}
echo "</select>";
echo "</td></tr>\n";
}
}
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YICQ.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_icq' value=\"$userinfo[user_icq]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YAIM.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_aim' value=\"$userinfo[user_aim]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YYIM.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_yim' value=\"$userinfo[user_yim]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YMSNM.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_msnm' value=\"$userinfo[user_msnm]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YLOCATION.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_from' value=\"$userinfo[user_from]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YOCCUPATION.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_occ' value=\"$userinfo[user_occ]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YINTERESTS.":</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><input type='text' name='user_interests' value=\"$userinfo[user_interests]\" size='30' maxlength='100'></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._RECEIVENEWSLETTER."</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[newsletter] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='newsletter'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALWAYSSHOWEMAIL.":</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_viewemail] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_viewemail'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._HIDEONLINE.":</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_allow_viewonline] == 0) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_allow_viewonline'><option value='0'$ck1>"._YES."</option>";
echo "<option value='1'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._REPLYNOTIFY.":</strong><br />"._REPLYNOTIFYMSG."</td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_notify] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_notify'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._PMNOTIFY.":</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_notify_pm] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_notify_pm'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._POPPM.":</strong><br />"._POPPMMSG."</td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_popup_pm] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_popup_pm'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ATTACHSIG.":</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_attachsig] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_attachsig'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWBBCODE."</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_allowbbcode] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_allowbbcode'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWHTMLCODE."</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_allowhtml] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_allowhtml'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._ALLOWSMILIES."</strong></td><td bgcolor='$bgcolor3'>";
if ($userinfo[user_allowsmile] == 1) { $ck1 = " selected"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " selected"; }
echo "<select name='user_allowsmile'><option value='1'$ck1>"._YES."</option>";
echo "<option value='0'$ck2>"._NO."</option></select></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._FORUMSTIME."</strong></td><td bgcolor='$bgcolor3'>";
echo "<select name='user_timezone'>";
for ($i=-12; $i<13; $i++) {
if ($i == 0) {
$dummy = "GMT";
} else {
if (!preg_match("/[\-]/", $i)) { $i = "+$i"; }
$dummy = "GMT $i "._HOURS."";
}
if ($userinfo[user_timezone] == $i) {
echo "<option name='user_timezone' value=\"$i\" selected>$dummy</option>";
} else {
echo "<option name='user_timezone' value=\"$i\">$dummy</option>";
}
}
echo "</select>";
echo "</td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._FORUMSDATE.":</strong><br />"._FORUMSDATEMSG."</strong></td><td bgcolor='$bgcolor3'>";
echo "<input size='15' maxlength='14' type='text' name='user_dateformat' value=\"$userinfo[user_dateformat]\">";
echo "</td></tr>";
// echo "<tr><td bgcolor='$bgcolor2'><strong>"._SIGNATURE.":</strong><br />"._OPTIONAL."<br />"._NOHTML."</td>";
// echo "<td bgcolor='$bgcolor3'><textarea wrap='virtual' cols='50' rows='5' name='user_sig'>$userinfo[user_sig]</textarea><br />"._255CHARMAX."</td></tr>";
/*****[BEGIN]******************************************
[ Other: YA Forum Sig v1.0.0 ]
******************************************************/
echo "<tr><td bgcolor='$bgcolor2'><strong>Signature:</strong><br />"._OPTIONAL."</td>";
echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=signature\"><strong>Create/Change</strong></a></td></tr>";
/*****[END]********************************************
[ Other: YA Forum Sig v1.0.0 ]
******************************************************/
echo "<tr><td bgcolor='$bgcolor2'><strong>"._EXTRAINFO.":</strong><br />"._OPTIONAL."<br />"._NOHTML."</td>";
echo "<td bgcolor='$bgcolor3'><textarea wrap='virtual' cols='50' rows='5' name='bio'>$userinfo[bio]</textarea><br />"._CANKNOWABOUT."</td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._PASSWORD."</strong>:</td><br />";
echo "<td bgcolor='$bgcolor3'><input type='password' name='user_password' size='22' maxlength='".$ya_config['pass_max']."'> <input type='password' name='vpass' size='22' maxlength='".$ya_config['pass_max']."'><br />"._TYPENEWPASSWORD."</td></tr>";
echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
echo "<input type='hidden' name='username' value=\"$userinfo[username]\">";
echo "<input type='hidden' name='user_id' value=\"$userinfo[user_id]\">";
echo "<input type='hidden' name='op' value='saveuser'>";
echo "<input type='submit' value='"._SAVECHANGES."'>";
echo "</form></td></tr>";
$avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? $HTTP_POST_VARS['avatarcategory'] : '';
//menelaos@hetnet.nl
$direktori = $board_config['avatar_gallery_path'];
$dir = @opendir($direktori);
$avatar_images = array();
while( $file = @readdir($dir) ) {
if( $file != '.' && $file != '..' && !is_file($direktori . '/' . $file) && !is_link($direktori . '/' . $file) ) {
$sub_dir = @opendir($direktori . '/' . $file);
$avatar_row_count = 0;
$avatar_col_count = 0;
while( $sub_file = @readdir($sub_dir) ) {
if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) ) {
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file;
$avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));
$avatar_col_count++;
if( $avatar_col_count == 5 ) {
$avatar_row_count++;
$avatar_col_count = 0;
}
}
}
}
}
@closedir($dir);
@ksort($avatar_images);
@reset($avatar_images);
if (empty($category)) { $category = array_key_first($avatar_images); }
@reset($avatar_images);
$s_categories = '<select name="avatarcategory">';
foreach (array_keys($avatar_images) as $key) {
$selected = ( $key == $category ) ? ' selected="selected"' : '';
if( count($avatar_images[$key]) )
{
$s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>';
}
}
$s_categories .= '</select>';
if ($userinfo[user_avatar_type] == 1) {
$user_avatar = $board_config[avatar_path]."/".$userinfo[user_avatar];
} elseif ($userinfo[user_avatar_type] == 2) {
$user_avatar = $userinfo[user_avatar];
} else {
$user_avatar = $board_config[avatar_gallery_path]."/".$userinfo[user_avatar];
}
echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
echo "<span class='title'>"._YA_AVCP."</span></strong><br />";
echo "<tr><td bgcolor='$bgcolor2'>"._YA_AVINF1." ".$board_config['avatar_max_width']." "._YA_AVINF2." ".$board_config['avatar_max_height']." "._YA_AVINF3." ".YA_CoolSize($board_config['avatar_filesize']).".</td>";
if (preg_match("#http#", $userinfo['user_avatar'])) {
//avatarfix by menelaos dot hetnet dot nl
echo "<td bgcolor='$bgcolor3' align=center>"._YA_CURRAV."<br /><IMG alt=\"\" src=\"$direktori/$userinfo[user_avatar]\" width=\"40\" height=\"50\"></td></tr>";
} elseif ($userinfo[user_avatar]) {
echo "<td bgcolor='$bgcolor3' align=center>"._YA_CURRAV."<br /><IMG alt=\"\" src=\"$direktori/$userinfo[user_avatar]\" width=\"40\" height=\"50\"></td></tr>";
}
echo "<br />";
if ($board_config['allow_avatar_local']) {
echo "<form action=\"modules.php?name=Your_Account&op=avatarlist\" method=\"post\">";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_SELAVGALL.":</strong></td>";
echo "<td bgcolor='$bgcolor3'>".$s_categories." <img src=\"images/right.gif\" align=middle> <input class=button type=submit value=\""._YA_SHOWGALL."\"></td></tr>";
echo "</form>";
} else {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_SELAVGALL.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
}
if ($board_config['allow_avatar_upload']) {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADAV.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><strong>"._YA_UPLOADFORUM."</strong></a></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADURL.":</strong><br /><SPAN class=gensmall>"._YA_AVCOPIED."</SPAN></td>";
echo "<td bgcolor='$bgcolor3'><a href=\"modules.php?name=Forums&file=profile&mode=editprofile\"><strong>"._YA_UPLOADFORUM."</strong></a></td></tr>";
} else {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADURL.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_UPLOADAV.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
}
if ($board_config['allow_avatar_remote']) {
echo "<form action=\"modules.php?name=Your_Account&op=avatarlinksave\" method=\"post\">";
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_OFFSITE.":</strong><br /><SPAN class=gensmall>"._YA_SUBMITBUTTON."</SPAN></td>";
if ($userinfo[user_avatar_type] == 2) {
echo "<td bgcolor='$bgcolor3'><input class=post style=\"WIDTH: 150px\" size='25' name='avatar' value=\"".$userinfo[user_avatar]."\"> <input class=mainoption type=submit value=Submit></td></tr>";
} else {
echo "<td bgcolor='$bgcolor3'><input class=post style=\"WIDTH: 150px\" size='25' name='avatar' value=\"http://\"> <input class=mainoption type=submit value=Submit></td></tr>";
}
echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
echo "</form>";
} else {
echo "<tr><td bgcolor='$bgcolor2'><strong>"._YA_OFFSITE.":</strong></td>";
echo "<td bgcolor='$bgcolor3'><strong>"._YA_DISABLED."</strong></td></tr>";
echo "<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>";
}
echo "</td></tr></table>";
CloseTable();
include_once(NUKE_BASE_DIR.'footer.php');
} else {
mmain($user);
}
?>