3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2015 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: profilemain.php - Last Update: 08/18/2015 SVN 797 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="profilemain.php"||
$File3Name=="/profilemain.php") {
21 // Check if we can edit the profile
22 if($_SESSION['UserGroup']==$Settings['GuestGroup']||
$GroupInfo['CanEditProfile']=="no") {
23 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
24 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
25 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
26 if(!isset($_POST['update'])) { $_POST['update'] = null; }
27 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']);
28 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
29 $_SESSION['ViewingFile'] = $exfile['index'].$Settings['file_ext']; }
30 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
31 $_SESSION['ViewingFile'] = $exfile['index']; }
32 $_SESSION['PreViewingTitle'] = "Viewing";
33 $_SESSION['ViewingTitle'] = "UserCP";
34 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
36 <div
class="NavLinks"><?php
echo $ThemeSet['NavLinkIcon']; ?
><a href
="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act
=view
",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php
echo $Settings['board_name']; ?
></a
><?php
echo $ThemeSet['NavLinkDivider']; ?
><a href
="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act
=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Profile Editor
</a
></div
>
37 <div
class="DivNavLinks"> 
;</div
>
38 <table
class="Table3">
39 <tr style
="width: 100%; vertical-align: top;">
40 <td style
="width: 15%; vertical-align: top;">
41 <div
class="TableSMenuBorder">
42 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
43 <div
class="TableSMenuRow1">
44 <?php
echo $ThemeSet['TitleIcon']; ?
>Profile Settings
</div
>
46 <table id
="ProfileLinks" class="TableSMenu" style
="width: 100%; text-align: left; vertical-align: top;">
47 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
48 <tr
class="TableSMenuRow1">
49 <td
class="TableSMenuColumn1"><?php
echo $ThemeSet['TitleIcon']; ?
>Profile Settings
</td
>
51 <tr
class="TableSMenuRow2">
52 <td
class="TableSMenuColumn2"> 
;</td
>
53 </tr
><tr
class="TableSMenuRow3">
54 <td
class="TableSMenuColumn3"><a href
="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act
=view
",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Edit NotePad
</a
></td
>
55 </tr
><tr
class="TableSMenuRow3">
56 <td
class="TableSMenuColumn3"><a href
="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act
=profile
",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Edit Profile
</a
></td
>
57 </tr
><tr
class="TableSMenuRow3">
58 <td
class="TableSMenuColumn3"><a href
="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act
=signature
",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Edit Signature
</a
></td
>
59 </tr
><tr
class="TableSMenuRow3">
60 <td
class="TableSMenuColumn3"><a href
="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act
=avatar
",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Edit Avatar
</a
></td
>
61 </tr
><tr
class="TableSMenuRow4">
62 <td
class="TableSMenuColumn4"> 
;</td
>
64 <div
class="DivSMenu"> 
;</div
>
65 <div
class="TableSMenuBorder">
66 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
67 <div
class="TableSMenuRow1">
68 <?php
echo $ThemeSet['TitleIcon']; ?
>Board Settings
</div
>
70 <table
class="TableSMenu" style
="width: 100%; text-align: left; vertical-align: top;">
71 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
72 <tr
class="TableSMenuRow1">
73 <td
class="TableSMenuColumn1"><?php
echo $ThemeSet['TitleIcon']; ?
>Board Settings
</td
>
75 <tr
class="TableSMenuRow2">
76 <td
class="TableSMenuColumn2"> 
;</td
>
77 </tr
><tr
class="TableSMenuRow3">
78 <td
class="TableSMenuColumn3"><a href
="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act
=settings
",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Board Settings
</a
></td
>
79 </tr
><tr
class="TableSMenuRow3">
80 <td
class="TableSMenuColumn3"><a href
="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act
=userinfo
",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Change User Info
</a
></td
>
81 </tr
><tr
class="TableSMenuRow4">
82 <td
class="TableSMenuColumn4"> 
;</td
>
85 <td style
="width: 85%; vertical-align: top;">
86 <?php
if($_POST['update']=="now"&&$_GET['act']!=null) {
87 $updateact = url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
88 $profiletitle = " ".$ThemeSet['TitleDivider']." Updating Settings";
89 redirect("refresh",$rbasedir.url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile'],FALSE),"3");
90 $noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
91 $profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
93 <div
class="TableMenuBorder">
94 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
95 <div
class="TableMenuRow1">
96 <span style
="text-align: left;">
97 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $updateact; ?>">Updating Settings
</a
>
100 <table
class="TableMenu" style
="width: 100%;">
101 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
102 <tr
class="TableMenuRow1">
103 <td
class="TableMenuColumn1"><span style
="text-align: left;">
104 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $updateact; ?>">Updating Settings
</a
>
107 <tr id
="ProfileTitle" class="TableMenuRow2">
108 <th
class="TableMenuColumn2">Updating Settings
</th
>
110 <tr
class="TableMenuRow3" id
="ProfileUpdate">
111 <td
class="TableMenuColumn3">
112 <div style
="text-align: center;">
113 <br
/>Profile updated
<a href
="<?php echo $updateact; ?>">click here
</a
> to go back
. ^_^
<br
/> 
;</div
>
114 <?php
} if($_GET['act']=="view") {
115 if($_POST['update']!="now") {
116 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
117 $result=sql_query($query,$SQLStat);
118 $num=sql_num_rows($result);
120 $YourID=sql_result($result,$i,"id");
121 $Notes=sql_result($result,$i,"Notes");
122 $noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
123 $notepadact = $noteact; $profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
125 <div
class="TableMenuBorder">
126 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
127 <div
class="TableMenuRow1">
128 <span style
="text-align: left;">
129 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $noteact; ?>">NotePad
</a
>
132 <table
class="TableMenu" style
="width: 100%;">
133 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
134 <tr
class="TableMenuRow1">
135 <td
class="TableMenuColumn1"><span style
="text-align: left;">
136 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $noteact; ?>">NotePad
</a
>
139 <tr id
="ProfileTitle" class="TableMenuRow2">
140 <th
class="TableMenuColumn2">NotePad
</th
>
142 <tr
class="TableMenuRow3" id
="NotePadRow">
143 <td
class="TableMenuColumn3">
144 <form style
="display: inline;" method
="post" action
="<?php echo $notepadact; ?>"><div style
="text-align: center;">
145 <label
class="TextBoxLabel" for="NotePad">Your NotePad
</label
><br
/>
146 <textarea
class="TextBox" name
="NotePad" id
="NotePad" style
="width: 75%; height: 128px;" rows
="10" cols
="84"><?php
echo $Notes; ?
></textarea
>
147 <input type
="hidden" name
="act" value
="view" style
="display: none;" />
148 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
149 <br
/><input type
="submit" class="Button" value
="Save" /> 
;<input
class="Button" type
="reset" />
152 <tr id
="ProfileEnd" class="TableMenuRow4">
153 <td
class="TableMenuColumn4"> 
;</td
>
157 <?php
sql_free_result($result); }
158 if($_POST['update']=="now") {
159 if($_POST['act']=="view"&&
160 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
161 $_POST['NotePad'] = htmlspecialchars($_POST['NotePad'], ENT_QUOTES
, $Settings['charset']);
162 $_POST['NotePad'] = remove_bad_entities($_POST['NotePad']);
163 //$_POST['Signature'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Signature']);
164 //$_POST['Signature'] = remove_spaces($_POST['Signature']);
165 //$_POST['Signature'] = remove_bad_entities($_POST['Signature']);
166 /* <_< iWordFilter >_>
167 by Kazuki Przyborowski - Cool Dude 2k */
168 $katarzynaqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."wordfilter\"", array(null));
169 $katarzynart=sql_query($katarzynaqy,$SQLStat);
170 $katarzynanm=sql_num_rows($katarzynart);
172 while ($katarzynas < $katarzynanm) {
173 $Filter=sql_result($katarzynart,$katarzynas,"FilterWord");
174 $Replace=sql_result($katarzynart,$katarzynas,"Replacement");
175 $CaseInsensitive=sql_result($katarzynart,$katarzynas,"CaseInsensitive");
176 if($CaseInsensitive=="on") { $CaseInsensitive = "yes"; }
177 if($CaseInsensitive=="off") { $CaseInsensitive = "no"; }
178 if($CaseInsensitive!="yes"||
$CaseInsensitive!="no") { $CaseInsensitive = "no"; }
179 $WholeWord=sql_result($katarzynart,$katarzynas,"WholeWord");
180 if($WholeWord=="on") { $WholeWord = "yes"; }
181 if($WholeWord=="off") { $WholeWord = "no"; }
182 if($WholeWord!="yes"&&$WholeWord!="no") { $WholeWord = "no"; }
183 $Filter = preg_quote($Filter, "/");
184 if($CaseInsensitive!="yes"&&$WholeWord=="yes") {
185 $_POST['NotePad'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['NotePad']); }
186 if($CaseInsensitive=="yes"&&$WholeWord=="yes") {
187 $_POST['NotePad'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['NotePad']); }
188 if($CaseInsensitive!="yes"&&$WholeWord!="yes") {
189 $_POST['NotePad'] = preg_replace("/".$Filter."/", $Replace, $_POST['NotePad']); }
190 if($CaseInsensitive=="yes"&&$WholeWord!="yes") {
191 $_POST['NotePad'] = preg_replace("/".$Filter."/i", $Replace, $_POST['NotePad']); }
192 ++
$katarzynas; } sql_free_result($katarzynart);
193 $NewDay=$utccurtime->getTimestamp();
194 $NewIP=$_SERVER['REMOTE_ADDR'];
195 $querynewskin = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Notes\"='%s',\"LastActive\"=%i,\"IP\"='%s' WHERE \"id\"=%i", array($_POST['NotePad'],$NewDay,$NewIP,$_SESSION['UserID']));
196 sql_query($querynewskin,$SQLStat); } } }
197 if($_GET['act']=="signature") {
198 if($_POST['update']!="now") {
199 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
200 $result=sql_query($query,$SQLStat);
201 $num=sql_num_rows($result);
203 $YourID=sql_result($result,$i,"id");
204 $Signature=sql_result($result,$i,"Signature");
205 $signatureact = url_maker($exfile['profile'],$Settings['file_ext'],"act=signature",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
206 $profiletitle = " ".$ThemeSet['TitleDivider']." Signature Editor";
208 <div
class="TableMenuBorder">
209 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
210 <div
class="TableMenuRow1">
211 <span style
="text-align: left;">
212 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $signatureact; ?>">Signature Editer
</a
>
215 <table
class="TableMenu" style
="width: 100%;">
216 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
217 <tr
class="TableMenuRow1">
218 <td
class="TableMenuColumn1"><span style
="text-align: left;">
219 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $signatureact; ?>">Signature Editer
</a
>
222 <tr id
="ProfileTitle" class="TableMenuRow2">
223 <th
class="TableMenuColumn2">Signature Editor
</th
>
225 <tr
class="TableMenuRow3" id
="SignatureRow">
226 <td
class="TableMenuColumn3">
227 <form style
="display: inline;" method
="post" action
="<?php echo $signatureact; ?>"><div style
="text-align: center;">
228 <label
class="TextBoxLabel" for="Signature">Your Signature
</label
><br
/>
229 <textarea
class="TextBox" name
="Signature" id
="Signature" style
="width: 75%; height: 128px;" rows
="10" cols
="84"><?php
echo $Signature; ?
></textarea
>
230 <input type
="hidden" name
="act" value
="signature" style
="display: none;" />
231 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
232 <br
/><input type
="submit" class="Button" value
="Save" /> 
;<input
class="Button" type
="reset" />
235 <tr id
="ProfileEnd" class="TableMenuRow4">
236 <td
class="TableMenuColumn4"> 
;</td
>
240 <?php
sql_free_result($result); }
241 if($_POST['update']=="now") {
242 if($_POST['act']=="signature"&&
243 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
244 $_POST['Signature'] = stripcslashes(htmlspecialchars($_POST['Signature'], ENT_QUOTES
));
245 //$_POST['Signature'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Signature']);
246 //$_POST['Signature'] = remove_spaces($_POST['Signature']);
247 $_POST['Signature'] = remove_bad_entities($_POST['Signature']);
248 /* <_< iWordFilter >_>
249 by Kazuki Przyborowski - Cool Dude 2k */
250 $katarzynaqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."wordfilter\"", array(null));
251 $katarzynart=sql_query($katarzynaqy,$SQLStat);
252 $katarzynanm=sql_num_rows($katarzynart);
254 while ($katarzynas < $katarzynanm) {
255 $Filter=sql_result($katarzynart,$katarzynas,"FilterWord");
256 $Replace=sql_result($katarzynart,$katarzynas,"Replacement");
257 $CaseInsensitive=sql_result($katarzynart,$katarzynas,"CaseInsensitive");
258 if($CaseInsensitive=="on") { $CaseInsensitive = "yes"; }
259 if($CaseInsensitive=="off") { $CaseInsensitive = "no"; }
260 if($CaseInsensitive!="yes"||
$CaseInsensitive!="no") { $CaseInsensitive = "no"; }
261 $WholeWord=sql_result($katarzynart,$katarzynas,"WholeWord");
262 if($WholeWord=="on") { $WholeWord = "yes"; }
263 if($WholeWord=="off") { $WholeWord = "no"; }
264 if($WholeWord!="yes"&&$WholeWord!="no") { $WholeWord = "no"; }
265 $Filter = preg_quote($Filter, "/");
266 if($CaseInsensitive!="yes"&&$WholeWord=="yes") {
267 $_POST['Signature'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['Signature']); }
268 if($CaseInsensitive=="yes"&&$WholeWord=="yes") {
269 $_POST['Signature'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['Signature']); }
270 if($CaseInsensitive!="yes"&&$WholeWord!="yes") {
271 $_POST['Signature'] = preg_replace("/".$Filter."/", $Replace, $_POST['Signature']); }
272 if($CaseInsensitive=="yes"&&$WholeWord!="yes") {
273 $_POST['Signature'] = preg_replace("/".$Filter."/i", $Replace, $_POST['Signature']); }
274 ++
$katarzynas; } sql_free_result($katarzynart);
275 $NewDay=$utccurtime->getTimestamp();
276 $NewIP=$_SERVER['REMOTE_ADDR'];
277 $querynewskin = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Signature\"='%s',\"LastActive\"=%i,\"IP\"='%s' WHERE \"id\"=%i", array($_POST['Signature'],$NewDay,$NewIP,$_SESSION['UserID']));
278 sql_query($querynewskin,$SQLStat); } } }
279 if($_GET['act']=="avatar") {
280 if($_POST['update']!="now") {
281 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
282 $result=sql_query($query,$SQLStat);
283 $num=sql_num_rows($result);
285 $YourID=sql_result($result,$i,"id");
286 $User1Avatar=sql_result($result,$i,"Avatar");
287 $User1AvatarSize=sql_result($result,$i,"AvatarSize");
288 $avataract = url_maker($exfile['profile'],$Settings['file_ext'],"act=avatar",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
289 $profiletitle = " ".$ThemeSet['TitleDivider']." Avatar Editor";
290 $Pre1Avatar = $User1Avatar;
291 if ($User1Avatar==null) { $User1Avatar="http://"; }
292 if ($Pre1Avatar=="http://"||
$Pre1Avatar==null||
293 strtolower($Pre1Avatar)=="noavatar") {
294 $Pre1Avatar=$ThemeSet['NoAvatar'];
295 $User1AvatarSize=$ThemeSet['NoAvatarSize']; }
296 $AvatarSize1=explode("x", $User1AvatarSize);
297 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
299 <div
class="TableMenuBorder">
300 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
301 <div
class="TableMenuRow1">
302 <span style
="text-align: left;">
303 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $avataract; ?>">Avatar Editer
</a
>
306 <table
class="TableMenu" style
="width: 100%;">
307 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
308 <tr
class="TableMenuRow1">
309 <td
class="TableMenuColumn1"><span style
="text-align: left;">
310 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $avataract; ?>">Avatar Editer
</a
>
313 <tr id
="ProfileTitle" class="TableMenuRow2">
314 <th
class="TableMenuColumn2">Avatar Editor
</th
>
316 <tr
class="TableMenuRow3" id
="AvatarEditor">
317 <td
class="TableMenuColumn3">
318 <form style
="display: inline;" method
="post" action
="<?php echo $avataract; ?>">
319 <?php
// Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/
321 <table
class="AvatarTable" style
="width: 100px; height: 100px; text-align: center;">
322 <tr
class="AvatarRow" style
="width: 100%; height: 100%;">
323 <td
class="AvatarRow" style
="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
324 <img src
="<?php echo $Pre1Avatar; ?>" alt
="<?php echo $_SESSION['MemberName']; ?>'s Avatar" title
="<?php echo $_SESSION['MemberName']; ?>'s Avatar" style
="border: 0px; width: <?php echo $AvatarSize1W; ?>px; height: <?php echo $AvatarSize1H; ?>px;" />
328 <table style
="text-align: left;">
329 <tr style
="text-align: left;">
330 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Avatar">Your Avatar
</label
></td
>
331 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Avatar" id
="Avatar" value
="<?php echo $User1Avatar; ?>" size
="20" /></td
>
332 </tr
><tr style
="text-align: left;">
333 <td style
="width: 40%;"><label
class="TextBoxLabel" for="AvatarSizeW">Avatar Width
</label
></td
>
334 <td style
="width: 60%;"><select size
="1" name
="AvatarSizeW" id
="AvatarSizeW" class="TextBox">
335 <option value
="<?php echo $AvatarSize1W; ?>" selected
="selected"><?php
echo $AvatarSize1W; ?
></option
><?php
echo "\n"; $r=1; while ($r <= 100) { ?
><option value
="<?php echo $r ?>"><?php
echo $r; ?
></option
><?php
echo "\n"; ++
$r; } ?
>
337 </tr
><tr style
="text-align: left;">
338 <td style
="width: 40%;"><label
class="TextBoxLabel" for="AvatarSizeH">Avatar Height
</label
></td
>
339 <td style
="width: 60%;"><select size
="1" name
="AvatarSizeH" id
="AvatarSizeH" class="TextBox">
340 <option value
="<?php echo $AvatarSize1H; ?>" selected
="selected"><?php
echo $AvatarSize1H; ?
></option
><?php
echo "\n"; $s=1; while ($s <= 100) { ?
><option value
="<?php echo $s ?>"><?php
echo $s; ?
></option
><?php
echo "\n"; ++
$s; } ?
>
343 <table style
="text-align: left;">
344 <tr style
="text-align: left;">
345 <td style
="width: 100%;">
346 <input type
="hidden" name
="act" value
="avatar" style
="display: none;" />
347 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
348 <input type
="submit" class="Button" value
="Save" />
349 <input
class="Button" type
="reset" />
353 <tr id
="ProfileEnd" class="TableMenuRow4">
354 <td
class="TableMenuColumn4"> 
;</td
>
358 <?php
sql_free_result($result); }
359 if($_POST['update']=="now") {
360 if($_POST['Avatar']!=null&&$_POST['AvatarSizeW']!=null&&$_POST['AvatarSizeH']!=null&&
361 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
362 if(!is_numeric($_POST['AvatarSizeW'])) { $_POST['AvatarSizeW'] = 100; }
363 if($_POST['AvatarSizeW']>=100) { $_POST['AvatarSizeW']=100; }
364 if(!is_numeric($_POST['AvatarSizeH'])) { $_POST['AvatarSizeH'] = 100; }
365 if($_POST['AvatarSizeH']>=100) { $_POST['AvatarSizeH']=100; }
366 $fullavatarsize = $_POST['AvatarSizeW']."x".$_POST['AvatarSizeH'];
367 $_POST['Avatar'] = htmlentities($_POST['Avatar'], ENT_QUOTES
, $Settings['charset']);
368 $NewDay=$utccurtime->getTimestamp();
369 $NewIP=$_SERVER['REMOTE_ADDR'];
370 $_POST['Avatar'] = remove_spaces($_POST['Avatar']);
371 $querynewskin = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Avatar\"='%s',\"AvatarSize\"='%s',\"LastActive\"=%i,\"IP\"='%s' WHERE \"id\"=%i", array($_POST['Avatar'],$fullavatarsize,$NewDay,$NewIP,$_SESSION['UserID']));
372 sql_query($querynewskin,$SQLStat); } } }
373 if($_GET['act']=="settings") {
374 if($_POST['update']!="now") {
375 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
376 $result=sql_query($query,$SQLStat);
377 $num=sql_num_rows($result);
379 $YourID=sql_result($result,$i,"id");
380 $User1TimeZone=sql_result($result,$i,"TimeZone");
381 $User1DateFormat=sql_result($result,$i,"DateFormat");
382 $User1DateFormat = htmlspecialchars($User1DateFormat, ENT_QUOTES
, $Settings['charset']);
383 $User1TimeFormat=sql_result($result,$i,"TimeFormat");
384 $User1TimeFormat= htmlspecialchars($User1TimeFormat, ENT_QUOTES
, $Settings['charset']);
385 $settingsact = url_maker($exfile['profile'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
386 $profiletitle = " ".$ThemeSet['TitleDivider']." Board Settings";
387 // http://www.tutorialspoint.com/php/php_function_timezone_identifiers_list.htm
388 $timezone_identifiers = DateTimeZone
::listIdentifiers();
389 //$timezone_identifiers = timezone_identifiers_list();
390 $zonelist['africa'] = array();
391 $zonelist['america'] = array();
392 $zonelist['antarctica'] = array();
393 $zonelist['asia'] = array();
394 $zonelist['atlantic'] = array();
395 $zonelist['australia'] = array();
396 $zonelist['europe'] = array();
397 $zonelist['indian'] = array();
398 $zonelist['pacific'] = array();
399 $zonelist['etcetera'] = array();
400 for ($i=0; $i < count($timezone_identifiers); $i++
) {
401 $zonelookup = explode("/", $timezone_identifiers[$i]);
402 if(count($zonelookup)==1) { array_push($zonelist['etcetera'], array($timezone_identifiers[$i], $timezone_identifiers[$i])); }
403 if(count($zonelookup)>1) {
404 if($zonelookup[0]=="Africa") {
405 if(count($zonelookup)==2) {
406 array_push($zonelist['africa'], array($zonelookup[1], $timezone_identifiers[$i])); }
407 if(count($zonelookup)==3) {
408 array_push($zonelist['africa'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
409 if($zonelookup[0]=="America") {
410 if(count($zonelookup)==2) {
411 array_push($zonelist['america'], array($zonelookup[1], $timezone_identifiers[$i])); }
412 if(count($zonelookup)==3) {
413 array_push($zonelist['america'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
414 if($zonelookup[0]=="Antarctica") {
415 if(count($zonelookup)==2) {
416 array_push($zonelist['antarctica'], array($zonelookup[1], $timezone_identifiers[$i])); }
417 if(count($zonelookup)==3) {
418 array_push($zonelist['antarctica'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
419 if($zonelookup[0]=="Asia") {
420 if(count($zonelookup)==2) {
421 array_push($zonelist['asia'], array($zonelookup[1], $timezone_identifiers[$i])); }
422 if(count($zonelookup)==3) {
423 array_push($zonelist['asia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
424 if($zonelookup[0]=="Atlantic") {
425 if(count($zonelookup)==2) {
426 array_push($zonelist['atlantic'], array($zonelookup[1], $timezone_identifiers[$i])); }
427 if(count($zonelookup)==3) {
428 array_push($zonelist['atlantic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
429 if($zonelookup[0]=="Australia") {
430 if(count($zonelookup)==2) {
431 array_push($zonelist['australia'], array($zonelookup[1], $timezone_identifiers[$i])); }
432 if(count($zonelookup)==3) {
433 array_push($zonelist['australia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
434 if($zonelookup[0]=="Europe") {
435 if(count($zonelookup)==2) {
436 array_push($zonelist['europe'], array($zonelookup[1], $timezone_identifiers[$i])); }
437 if(count($zonelookup)==3) {
438 array_push($zonelist['europe'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
439 if($zonelookup[0]=="Indian") {
440 if(count($zonelookup)==2) {
441 array_push($zonelist['indian'], array($zonelookup[1], $timezone_identifiers[$i])); }
442 if(count($zonelookup)==3) {
443 array_push($zonelist['indian'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
444 if($zonelookup[0]=="Pacific") {
445 if(count($zonelookup)==2) {
446 array_push($zonelist['pacific'], array($zonelookup[1], $timezone_identifiers[$i])); }
447 if(count($zonelookup)==3) {
448 array_push($zonelist['pacific'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
452 <div
class="TableMenuBorder">
453 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
454 <div
class="TableMenuRow1">
455 <span style
="text-align: left;">
456 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $settingsact; ?>">Board Settings
</a
>
459 <table
class="TableMenu" style
="width: 100%;">
460 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
461 <tr
class="TableMenuRow1">
462 <td
class="TableMenuColumn1"><span style
="text-align: left;">
463 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $settingsact; ?>">Board Settings
</a
>
466 <tr id
="ProfileTitle" class="TableMenuRow2">
467 <th
class="TableMenuColumn2">Board Settings
</th
>
469 <tr
class="TableMenuRow3" id
="BoardSettings">
470 <td
class="TableMenuColumn3">
471 <form style
="display: inline;" method
="post" action
="<?php echo $settingsact; ?>">
472 <table style
="text-align: left;">
473 <tr style
="text-align: left;">
474 <td style
="width: 40%;"><label
class="TextBoxLabel" for="YourOffSet">Your TimeZone
:</label
></td
>
475 <td style
="width: 60%;"><select id
="YourOffSet" name
="YourOffSet" class="TextBox">
476 <optgroup label
="Africa">
479 for ($i=0; $i < count($zonelist['africa']); $i++
) {
480 if($User1TimeZone==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
481 echo "<option".$optsel." value=\"".$zonelist['africa'][$i][1]."\">".str_replace("_", " ", $zonelist['africa'][$i][0])."</option>\n";
485 <optgroup label
="America">
488 for ($i=0; $i < count($zonelist['america']); $i++
) {
489 if($User1TimeZone==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
490 echo "<option".$optsel." value=\"".$zonelist['america'][$i][1]."\">".str_replace("_", " ", $zonelist['america'][$i][0])."</option>\n";
494 <optgroup label
="Antarctica">
497 for ($i=0; $i < count($zonelist['antarctica']); $i++
) {
498 if($User1TimeZone==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
499 echo "<option".$optsel." value=\"".$zonelist['antarctica'][$i][1]."\">".str_replace("_", " ", $zonelist['antarctica'][$i][0])."</option>\n";
503 <optgroup label
="Asia">
505 for ($i=0; $i < count($zonelist['asia']); $i++
) {
506 if($User1TimeZone==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
507 echo "<option".$optsel." value=\"".$zonelist['asia'][$i][1]."\">".str_replace("_", " ", $zonelist['asia'][$i][0])."</option>\n";
511 <optgroup label
="Atlantic">
514 for ($i=0; $i < count($zonelist['atlantic']); $i++
) {
515 if($User1TimeZone==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
516 echo "<option".$optsel." value=\"".$zonelist['atlantic'][$i][1]."\">".str_replace("_", " ", $zonelist['atlantic'][$i][0])."</option>\n";
520 <optgroup label
="Australia">
523 for ($i=0; $i < count($zonelist['australia']); $i++
) {
524 if($User1TimeZone==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
525 echo "<option".$optsel." value=\"".$zonelist['australia'][$i][1]."\">".str_replace("_", " ", $zonelist['australia'][$i][0])."</option>\n";
529 <optgroup label
="Europe">
532 for ($i=0; $i < count($zonelist['europe']); $i++
) {
533 if($User1TimeZone==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
534 echo "<option".$optsel." value=\"".$zonelist['europe'][$i][1]."\">".str_replace("_", " ", $zonelist['europe'][$i][0])."</option>\n";
538 <optgroup label
="Indian">
541 for ($i=0; $i < count($zonelist['indian']); $i++
) {
542 if($User1TimeZone==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
543 echo "<option".$optsel." value=\"".$zonelist['indian'][$i][1]."\">".str_replace("_", " ", $zonelist['indian'][$i][0])."</option>\n";
547 <optgroup label
="Pacific">
550 for ($i=0; $i < count($zonelist['pacific']); $i++
) {
551 if($User1TimeZone==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
552 echo "<option".$optsel." value=\"".$zonelist['pacific'][$i][1]."\">".str_replace("_", " ", $zonelist['pacific'][$i][0])."</option>\n";
556 <optgroup label
="Etcetera">
559 for ($i=0; $i < count($zonelist['etcetera']); $i++
) {
560 if($User1TimeZone==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
561 echo "<option".$optsel." value=\"".$zonelist['etcetera'][$i][1]."\">".str_replace("_", " ", $zonelist['etcetera'][$i][0])."</option>\n";
566 </tr
><tr style
="text-align: left;">
567 <td style
="width: 40%;"><label
class="TextBoxLabel" for="iDBTimeFormat">Insert time format
string:</label
></td
>
568 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="iDBTimeFormat" id
="iDBTimeFormat" value
="<?php echo $User1DateFormat; ?>" /></td
>
569 </tr
><tr style
="text-align: left;">
570 <td style
="width: 40%;"><label
class="TextBoxLabel" for="iDBDateFormat">Insert date format
string:</label
></td
>
571 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="iDBDateFormat" id
="iDBDateFormat" value
="<?php echo $User1TimeFormat; ?>" /></td
>
572 </tr
><tr style
="text-align: left;">
573 <td style
="width: 40%;"><label
class="TextBoxLabel" for="skin">Pick a CSS Theme
</label
></td
>
574 <td style
="width: 60%;"><select id
="skin" name
="skin" class="TextBox">
575 <option selected
="selected" value
="<?php echo $_SESSION['Theme']; ?>">Old
Value (<?php
echo $_SESSION['Theme']; ?
>)</option
><?php
576 if($Settings['SQLThemes']=="off") {
577 $skindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
578 if ($handle = opendir($skindir)) { $dirnum = null;
579 while (false !== ($file = readdir($handle))) {
580 if ($dirnum==null) { $dirnum = 0; }
581 if (file_exists($skindir.$file."/info.php")) {
582 if ($file != "." && $file != "..") {
583 include($skindir.$file."/info.php");
584 $themelist[$dirnum] = "<option value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>";
586 closedir($handle); asort($themelist);
587 $themenum=count($themelist); $themei=0;
588 while ($themei < $themenum) {
589 echo $themelist[$themei]."\n";
591 if($Settings['SQLThemes']=="on") {
592 $sknquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."themes\" ORDER BY \"id\" ASC, \"Name\" ASC", array(null));
593 $sknresult=sql_query($sknquery,$SQLStat);
594 $sknum=sql_num_rows($sknresult);
596 while ($skni < $sknum) {
597 $ThemeInfo['Name'] = sql_result($sknresult,$skni,"Name");
598 $ThemeInfo['ThemeName'] = sql_result($sknresult,$skni,"ThemeName");
599 echo "<option value=\"".$ThemeInfo['Name']."\">".$ThemeInfo['ThemeName']."</option>\n";
602 </tr
><tr style
="text-align: left;">
603 <td style
="width: 40%;"><label
class="TextBoxLabel" for="RepliesPerPage">Replies Per Page
:</label
></td
>
604 <td style
="width: 60%;"><select id
="RepliesPerPage" name
="RepliesPerPage" class="TextBox">
605 <option selected
="selected" value
="<?php echo $Settings['max_posts']; ?>">Old
Value (<?php
echo $Settings['max_posts']; ?
>)</option
>
606 <option value
="5">5</option
>
607 <option value
="10">10</option
>
608 <option value
="15">15</option
>
609 <option value
="20">20</option
>
610 <option value
="25">25</option
>
611 <option value
="30">30</option
>
612 <option value
="30">35</option
>
613 <option value
="30">40</option
>
615 </tr
><tr style
="text-align: left;">
616 <td style
="width: 40%;"><label
class="TextBoxLabel" for="TopicsPerPage">Topics Per Page
:</label
></td
>
617 <td style
="width: 60%;"><select id
="TopicsPerPage" name
="TopicsPerPage" class="TextBox">
618 <option selected
="selected" value
="<?php echo $Settings['max_topics']; ?>">Old
Value (<?php
echo $Settings['max_topics']; ?
>)</option
>
619 <option value
="5">5</option
>
620 <option value
="10">10</option
>
621 <option value
="15">15</option
>
622 <option value
="20">20</option
>
623 <option value
="25">25</option
>
624 <option value
="30">30</option
>
625 <option value
="30">35</option
>
626 <option value
="30">40</option
>
628 </tr
><tr style
="text-align: left;">
629 <td style
="width: 40%;"><label
class="TextBoxLabel" for="MessagesPerPage">Messages
/Members Per Page
:</label
></td
>
630 <td style
="width: 60%;"><select id
="MessagesPerPage" name
="MessagesPerPage" class="TextBox">
631 <option selected
="selected" value
="<?php echo $Settings['max_pmlist']; ?>">Old
Value (<?php
echo $Settings['max_pmlist']; ?
>)</option
>
632 <option value
="5">5</option
>
633 <option value
="10">10</option
>
634 <option value
="15">15</option
>
635 <option value
="20">20</option
>
636 <option value
="25">25</option
>
637 <option value
="30">30</option
>
638 <option value
="30">35</option
>
639 <option value
="30">40</option
>
642 <table style
="text-align: left;">
643 <tr style
="text-align: left;">
644 <td style
="width: 100%;">
645 <input type
="hidden" name
="act" value
="settings" style
="display: none;" />
646 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
647 <input type
="submit" class="Button" value
="Save" />
648 <input
class="Button" type
="reset" />
652 <tr id
="ProfileEnd" class="TableMenuRow4">
653 <td
class="TableMenuColumn4"> 
;</td
>
657 <?php
sql_free_result($result); }
658 if($_POST['update']=="now") {
659 if($_POST['act']=="settings"&&
660 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
661 $NewDay=$utccurtime->getTimestamp();
662 $NewIP=$_SERVER['REMOTE_ADDR'];
663 $_SESSION['UserTimeZone'] = $_POST['YourOffSet'];
664 $usertz = new DateTimeZone($_SESSION['UserTimeZone']);
665 $usercurtime->setTimezone($usertz);
666 if(!is_numeric($_POST['RepliesPerPage'])) { $_POST['RepliesPerPage'] = "10"; }
667 if(!is_numeric($_POST['TopicsPerPage'])) { $_POST['TopicsPerPage'] = "10"; }
668 if(!is_numeric($_POST['MessagesPerPage'])) { $_POST['MessagesPerPage'] = "10"; }
669 $_POST['iDBTimeFormat'] = convert_strftime($_POST['iDBTimeFormat']);
670 $_POST['iDBDateFormat'] = convert_strftime($_POST['iDBDateFormat']);
671 $querynewskin = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"UseTheme\"='%s',\"TimeZone\"='%s',\"DateFormat\"='%s',\"TimeFormat\"='%s',\"LastActive\"=%i,\"RepliesPerPage\"=%i,\"TopicsPerPage\"=%i,\"MessagesPerPage\"=%i,\"IP\"='%s' WHERE \"id\"=%i", array(chack_themes($_POST['skin']),$_POST['YourOffSet'],$_POST['iDBTimeFormat'],$_POST['iDBDateFormat'],$NewDay,$_POST['RepliesPerPage'],$_POST['TopicsPerPage'],$_POST['MessagesPerPage'],$NewIP,$_SESSION['UserID']));
672 sql_query($querynewskin,$SQLStat); } } }
673 if($_GET['act']=="profile") {
674 if($_POST['update']!="now") {
675 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
676 $result=sql_query($query,$SQLStat);
677 $num=sql_num_rows($result);
679 $YourID=sql_result($result,$i,"id");
680 $User1Interests=sql_result($result,$i,"Interests");
681 $User1Title=sql_result($result,$i,"Title");
682 $User1Website=sql_result($result,$i,"Website");
683 $User1Website = urlcheck($User1Website);
684 $User1Gender=sql_result($result,$i,"Gender");
685 $User1TimeZone=sql_result($result,$i,"TimeZone");
686 $User1DateFormat=sql_result($result,$i,"DateFormat");
687 $User1DateFormat = htmlspecialchars($User1DateFormat, ENT_QUOTES
, $Settings['charset']);
688 $User1TimeFormat=sql_result($result,$i,"TimeFormat");
689 $User1TimeFormat= htmlspecialchars($User1TimeFormat, ENT_QUOTES
, $Settings['charset']);
690 $BirthDay=sql_result($result,$i,"BirthDay");
691 $BirthMonth=sql_result($result,$i,"BirthMonth");
692 $BirthYear=sql_result($result,$i,"BirthYear");
693 $User1Birthday = "MM/DD/YYYY";
694 if($BirthMonth!=null&&$BirthDay!=null&&$BirthYear!=null) {
695 if($BirthYear=="0") { $BirthYear = "YYYY"; }
696 if($BirthDay=="0") { $BirthDay = "DD"; }
697 if($BirthMonth=="0") { $BirthMonth = "MM"; }
698 if(pre_strlen($BirthMonth)=="1") { $BirthMonth = "0".$BirthMonth; }
699 if(pre_strlen($BirthDay)=="1") { $BirthDay = "0".$BirthDay; }
700 if($BirthYear!="MM"&&$BirthYear!="DD"&&$BirthYear!="YYYY"&&
701 checkdate($BirthMonth,$BirthDay,$BirthYear)===false) {
702 $BirthMonth = "MM"; $BirthDay = "DD"; $BirthYear = "YYYY"; }
703 $User1Birthday = $BirthMonth."/".$BirthDay."/".$BirthYear; }
704 $profileact = url_maker($exfile['profile'],$Settings['file_ext'],"act=profile",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
705 $profiletitle = " ".$ThemeSet['TitleDivider']." Profile Editor";
706 // http://www.tutorialspoint.com/php/php_function_timezone_identifiers_list.htm
707 $timezone_identifiers = DateTimeZone
::listIdentifiers();
708 //$timezone_identifiers = timezone_identifiers_list();
709 $zonelist['africa'] = array();
710 $zonelist['america'] = array();
711 $zonelist['antarctica'] = array();
712 $zonelist['asia'] = array();
713 $zonelist['atlantic'] = array();
714 $zonelist['australia'] = array();
715 $zonelist['europe'] = array();
716 $zonelist['indian'] = array();
717 $zonelist['pacific'] = array();
718 $zonelist['etcetera'] = array();
719 for ($i=0; $i < count($timezone_identifiers); $i++
) {
720 $zonelookup = explode("/", $timezone_identifiers[$i]);
721 if(count($zonelookup)==1) { array_push($zonelist['etcetera'], array($timezone_identifiers[$i], $timezone_identifiers[$i])); }
722 if(count($zonelookup)>1) {
723 if($zonelookup[0]=="Africa") {
724 if(count($zonelookup)==2) {
725 array_push($zonelist['africa'], array($zonelookup[1], $timezone_identifiers[$i])); }
726 if(count($zonelookup)==3) {
727 array_push($zonelist['africa'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
728 if($zonelookup[0]=="America") {
729 if(count($zonelookup)==2) {
730 array_push($zonelist['america'], array($zonelookup[1], $timezone_identifiers[$i])); }
731 if(count($zonelookup)==3) {
732 array_push($zonelist['america'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
733 if($zonelookup[0]=="Antarctica") {
734 if(count($zonelookup)==2) {
735 array_push($zonelist['antarctica'], array($zonelookup[1], $timezone_identifiers[$i])); }
736 if(count($zonelookup)==3) {
737 array_push($zonelist['antarctica'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
738 if($zonelookup[0]=="Asia") {
739 if(count($zonelookup)==2) {
740 array_push($zonelist['asia'], array($zonelookup[1], $timezone_identifiers[$i])); }
741 if(count($zonelookup)==3) {
742 array_push($zonelist['asia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
743 if($zonelookup[0]=="Atlantic") {
744 if(count($zonelookup)==2) {
745 array_push($zonelist['atlantic'], array($zonelookup[1], $timezone_identifiers[$i])); }
746 if(count($zonelookup)==3) {
747 array_push($zonelist['atlantic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
748 if($zonelookup[0]=="Australia") {
749 if(count($zonelookup)==2) {
750 array_push($zonelist['australia'], array($zonelookup[1], $timezone_identifiers[$i])); }
751 if(count($zonelookup)==3) {
752 array_push($zonelist['australia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
753 if($zonelookup[0]=="Europe") {
754 if(count($zonelookup)==2) {
755 array_push($zonelist['europe'], array($zonelookup[1], $timezone_identifiers[$i])); }
756 if(count($zonelookup)==3) {
757 array_push($zonelist['europe'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
758 if($zonelookup[0]=="Indian") {
759 if(count($zonelookup)==2) {
760 array_push($zonelist['indian'], array($zonelookup[1], $timezone_identifiers[$i])); }
761 if(count($zonelookup)==3) {
762 array_push($zonelist['indian'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
763 if($zonelookup[0]=="Pacific") {
764 if(count($zonelookup)==2) {
765 array_push($zonelist['pacific'], array($zonelookup[1], $timezone_identifiers[$i])); }
766 if(count($zonelookup)==3) {
767 array_push($zonelist['pacific'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
771 <div
class="TableMenuBorder">
772 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
773 <div
class="TableMenuRow1">
774 <span style
="text-align: left;">
775 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $profileact; ?>">Profile Editer
</a
>
778 <table
class="TableMenu" style
="width: 100%;">
779 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
780 <tr
class="TableMenuRow1">
781 <td
class="TableMenuColumn1"><span style
="text-align: left;">
782 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $profileact; ?>">Profile Editer
</a
>
785 <tr id
="ProfileTitle" class="TableMenuRow2">
786 <th
class="TableMenuColumn2">Profile Editor
</th
>
788 <tr
class="TableMenuRow3" id
="ProfileEditor">
789 <td
class="TableMenuColumn3">
790 <form style
="display: inline;" method
="post" action
="<?php echo $profileact; ?>">
791 <table style
="text-align: left;">
792 <tr style
="text-align: left;">
793 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Interests">Your Interests
</label
></td
>
794 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Interests" id
="Interests" value
="<?php echo $User1Interests; ?>" /></td
>
795 </tr
><tr style
="text-align: left;">
796 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Title">Your Title
</label
></td
>
797 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Title" id
="Title" value
="<?php echo $User1Title; ?>" /></td
>
798 </tr
><tr style
="text-align: left;">
799 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Website">Your Website
</label
></td
>
800 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Website" id
="Website" value
="<?php echo $User1Website; ?>" /></td
>
801 </tr
><tr style
="text-align: left;">
802 <td style
="width: 40%;"><label
class="TextBoxLabel" for="EventDay">Your Birthday
</label
></td
>
803 <td style
="width: 60%;"><input maxlength
="10" type
="text" class="TextBox" name
="EventDay" id
="EventDay" value
="<?php echo $User1Birthday; ?>" /></td
>
804 </tr
><tr style
="text-align: left;">
805 <td style
="width: 40%;"><label
class="TextBoxLabel" for="YourOffSet">Your TimeZone
:</label
></td
>
806 <td style
="width: 60%;"><select id
="YourOffSet" name
="YourOffSet" class="TextBox">
807 <optgroup label
="Africa">
810 for ($i=0; $i < count($zonelist['africa']); $i++
) {
811 if($User1TimeZone==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
812 echo "<option".$optsel." value=\"".$zonelist['africa'][$i][1]."\">".str_replace("_", " ", $zonelist['africa'][$i][0])."</option>\n";
816 <optgroup label
="America">
819 for ($i=0; $i < count($zonelist['america']); $i++
) {
820 if($User1TimeZone==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
821 echo "<option".$optsel." value=\"".$zonelist['america'][$i][1]."\">".str_replace("_", " ", $zonelist['america'][$i][0])."</option>\n";
825 <optgroup label
="Antarctica">
828 for ($i=0; $i < count($zonelist['antarctica']); $i++
) {
829 if($User1TimeZone==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
830 echo "<option".$optsel." value=\"".$zonelist['antarctica'][$i][1]."\">".str_replace("_", " ", $zonelist['antarctica'][$i][0])."</option>\n";
834 <optgroup label
="Asia">
836 for ($i=0; $i < count($zonelist['asia']); $i++
) {
837 if($User1TimeZone==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
838 echo "<option".$optsel." value=\"".$zonelist['asia'][$i][1]."\">".str_replace("_", " ", $zonelist['asia'][$i][0])."</option>\n";
842 <optgroup label
="Atlantic">
845 for ($i=0; $i < count($zonelist['atlantic']); $i++
) {
846 if($User1TimeZone==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
847 echo "<option".$optsel." value=\"".$zonelist['atlantic'][$i][1]."\">".str_replace("_", " ", $zonelist['atlantic'][$i][0])."</option>\n";
851 <optgroup label
="Australia">
854 for ($i=0; $i < count($zonelist['australia']); $i++
) {
855 if($User1TimeZone==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
856 echo "<option".$optsel." value=\"".$zonelist['australia'][$i][1]."\">".str_replace("_", " ", $zonelist['australia'][$i][0])."</option>\n";
860 <optgroup label
="Europe">
863 for ($i=0; $i < count($zonelist['europe']); $i++
) {
864 if($User1TimeZone==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
865 echo "<option".$optsel." value=\"".$zonelist['europe'][$i][1]."\">".str_replace("_", " ", $zonelist['europe'][$i][0])."</option>\n";
869 <optgroup label
="Indian">
872 for ($i=0; $i < count($zonelist['indian']); $i++
) {
873 if($User1TimeZone==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
874 echo "<option".$optsel." value=\"".$zonelist['indian'][$i][1]."\">".str_replace("_", " ", $zonelist['indian'][$i][0])."</option>\n";
878 <optgroup label
="Pacific">
881 for ($i=0; $i < count($zonelist['pacific']); $i++
) {
882 if($User1TimeZone==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
883 echo "<option".$optsel." value=\"".$zonelist['pacific'][$i][1]."\">".str_replace("_", " ", $zonelist['pacific'][$i][0])."</option>\n";
887 <optgroup label
="Etcetera">
890 for ($i=0; $i < count($zonelist['etcetera']); $i++
) {
891 if($User1TimeZone==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
892 echo "<option".$optsel." value=\"".$zonelist['etcetera'][$i][1]."\">".str_replace("_", " ", $zonelist['etcetera'][$i][0])."</option>\n";
897 </tr
><tr style
="text-align: left;">
898 <td style
="width: 40%;"><label
class="TextBoxLabel" for="iDBTimeFormat">Insert time format
string:</label
></td
>
899 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="iDBTimeFormat" id
="iDBTimeFormat" value
="<?php echo $User1DateFormat; ?>" /></td
>
900 </tr
><tr style
="text-align: left;">
901 <td style
="width: 40%;"><label
class="TextBoxLabel" for="iDBDateFormat">Insert date format
string:</label
></td
>
902 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="iDBDateFormat" id
="iDBDateFormat" value
="<?php echo $User1TimeFormat; ?>" /></td
>
903 </tr
><tr style
="text-align: left;">
904 <td style
="width: 40%;"><label
class="TextBoxLabel" for="YourGender">Your Gender
:</label
></td
>
905 <td style
="width: 60%;"><select id
="YourGender" name
="YourGender" class="TextBox">
906 <option selected
="selected" value
="<?php echo $User1Gender; ?>">Old
Value (<?php
echo $User1Gender; ?
>)</option
>
907 <option value
="Male">Male
</option
>
908 <option value
="Female">Female
</option
>
909 <option value
="Unknown">Unknown
</option
>
911 </tr
><tr style
="text-align: left;">
912 <td style
="width: 40%;"><label
class="TextBoxLabel" for="RepliesPerPage">Replies Per Page
:</label
></td
>
913 <td style
="width: 60%;"><select id
="RepliesPerPage" name
="RepliesPerPage" class="TextBox">
914 <option selected
="selected" value
="<?php echo $Settings['max_posts']; ?>">Old
Value (<?php
echo $Settings['max_posts']; ?
>)</option
>
915 <option value
="5">5</option
>
916 <option value
="10">10</option
>
917 <option value
="15">15</option
>
918 <option value
="20">20</option
>
919 <option value
="25">25</option
>
920 <option value
="30">30</option
>
921 <option value
="30">35</option
>
922 <option value
="30">40</option
>
924 </tr
><tr style
="text-align: left;">
925 <td style
="width: 40%;"><label
class="TextBoxLabel" for="TopicsPerPage">Topics Per Page
:</label
></td
>
926 <td style
="width: 60%;"><select id
="TopicsPerPage" name
="TopicsPerPage" class="TextBox">
927 <option selected
="selected" value
="<?php echo $Settings['max_topics']; ?>">Old
Value (<?php
echo $Settings['max_topics']; ?
>)</option
>
928 <option value
="5">5</option
>
929 <option value
="10">10</option
>
930 <option value
="15">15</option
>
931 <option value
="20">20</option
>
932 <option value
="25">25</option
>
933 <option value
="30">30</option
>
934 <option value
="30">35</option
>
935 <option value
="30">40</option
>
937 </tr
><tr style
="text-align: left;">
938 <td style
="width: 40%;"><label
class="TextBoxLabel" for="MessagesPerPage">Messages
/Members Per Page
:</label
></td
>
939 <td style
="width: 60%;"><select id
="MessagesPerPage" name
="MessagesPerPage" class="TextBox">
940 <option selected
="selected" value
="<?php echo $Settings['max_pmlist']; ?>">Old
Value (<?php
echo $Settings['max_pmlist']; ?
>)</option
>
941 <option value
="5">5</option
>
942 <option value
="10">10</option
>
943 <option value
="15">15</option
>
944 <option value
="20">20</option
>
945 <option value
="25">25</option
>
946 <option value
="30">30</option
>
949 <table style
="text-align: left;">
950 <tr style
="text-align: left;">
951 <td style
="width: 100%;">
952 <input type
="hidden" name
="act" value
="profile" style
="display: none;" />
953 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
954 <input type
="submit" class="Button" value
="Save" />
955 <input
class="Button" type
="reset" />
959 <tr id
="ProfileEnd" class="TableMenuRow4">
960 <td
class="TableMenuColumn4"> 
;</td
>
964 <?php
sql_free_result($result); }
965 if($_POST['update']=="now") {
966 if($_POST['act']=="profile"&&
967 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
968 $_POST['Interests'] = htmlspecialchars($_POST['Interests'], ENT_QUOTES
, $Settings['charset']);
969 $_POST['Interests'] = remove_spaces($_POST['Interests']);
970 $_POST['Title'] = htmlspecialchars($_POST['Title'], ENT_QUOTES
, $Settings['charset']);
971 $_POST['Title'] = remove_spaces($_POST['Title']);
972 $_POST['Website'] = htmlentities($_POST['Website'], ENT_QUOTES
, $Settings['charset']);
973 $_POST['Website'] = remove_spaces($_POST['Website']);
974 //$_POST['Signature'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Signature']);
975 //$_POST['Signature'] = remove_spaces($_POST['Signature']);
976 //$_POST['Signature'] = remove_bad_entities($_POST['Signature']);
977 /* <_< iWordFilter >_>
978 by Kazuki Przyborowski - Cool Dude 2k */
979 $katarzynaqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."wordfilter\"", array(null));
980 $katarzynart=sql_query($katarzynaqy,$SQLStat);
981 $katarzynanm=sql_num_rows($katarzynart);
983 while ($katarzynas < $katarzynanm) {
984 $Filter=sql_result($katarzynart,$katarzynas,"FilterWord");
985 $Replace=sql_result($katarzynart,$katarzynas,"Replacement");
986 $CaseInsensitive=sql_result($katarzynart,$katarzynas,"CaseInsensitive");
987 if($CaseInsensitive=="on") { $CaseInsensitive = "yes"; }
988 if($CaseInsensitive=="off") { $CaseInsensitive = "no"; }
989 if($CaseInsensitive!="yes"||
$CaseInsensitive!="no") { $CaseInsensitive = "no"; }
990 $WholeWord=sql_result($katarzynart,$katarzynas,"WholeWord");
991 if($WholeWord=="on") { $WholeWord = "yes"; }
992 if($WholeWord=="off") { $WholeWord = "no"; }
993 if($WholeWord!="yes"&&$WholeWord!="no") { $WholeWord = "no"; }
994 $Filter = preg_quote($Filter, "/");
995 if($CaseInsensitive!="yes"&&$WholeWord=="yes") {
996 $_POST['Interests'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['Interests']);
997 $_POST['Title'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['Title']); }
998 if($CaseInsensitive=="yes"&&$WholeWord=="yes") {
999 $_POST['Interests'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['Interests']);
1000 $_POST['Title'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['Title']); }
1001 if($CaseInsensitive!="yes"&&$WholeWord!="yes") {
1002 $_POST['Interests'] = preg_replace("/".$Filter."/", $Replace, $_POST['Interests']);
1003 $_POST['Title'] = preg_replace("/".$Filter."/", $Replace, $_POST['Title']); }
1004 if($CaseInsensitive=="yes"&&$WholeWord!="yes") {
1005 $_POST['Interests'] = preg_replace("/".$Filter."/i", $Replace, $_POST['Interests']);
1006 $_POST['Title'] = preg_replace("/".$Filter."/i", $Replace, $_POST['Title']); }
1007 ++
$katarzynas; } sql_free_result($katarzynart);
1008 if(!is_numeric($_POST['RepliesPerPage'])) { $_POST['RepliesPerPage'] = "10"; }
1009 if(!is_numeric($_POST['TopicsPerPage'])) { $_POST['TopicsPerPage'] = "10"; }
1010 if(!is_numeric($_POST['MessagesPerPage'])) { $_POST['MessagesPerPage'] = "10"; }
1011 if(!isset($_POST['EventDay'])) { $_POST['EventDay'] = null; }
1012 if($_POST['EventDay']!=null) {
1013 $BirthExpl = explode("/",$_POST['EventDay']);
1014 if(count($BirthExpl)!="3") {
1015 $BirthExpl[0] = "0"; $BirthExpl[1] = "0"; $BirthExpl[2] = "0"; }
1016 if(!is_numeric($BirthExpl[0])) { $BirthExpl[0] = "0"; }
1017 if(!is_numeric($BirthExpl[1])) { $BirthExpl[1] = "0"; }
1018 if(!is_numeric($BirthExpl[2])) { $BirthExpl[2] = "0"; }
1019 if(count($BirthExpl)=="3"&&checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===true) {
1020 if(is_numeric($BirthExpl[0])&&is_numeric($BirthExpl[1])&&is_numeric($BirthExpl[2])) {
1021 if(pre_strlen($BirthExpl[0])=="1") { $BirthExpl[0] = "0".$BirthExpl[0]; }
1022 if(pre_strlen($BirthExpl[1])=="1") { $BirthExpl[1] = "0".$BirthExpl[1]; }
1023 if(pre_strlen($BirthExpl[0])=="2"&&pre_strlen($BirthExpl[1])=="2"&&pre_strlen($BirthExpl[2])=="4") {
1024 $BirthIn = mktime(12,12,12,$BirthExpl[0],$BirthExpl[1],$BirthExpl[2]);
1025 $eventendcurtime = new DateTime();
1026 $eventendcurtime->setTimestamp($BirthIn);
1027 $eventendcurtime->setTimezone($utctz);
1028 $BirthMonth=$tmpusrcurtime->format("m");
1029 $BirthDay=$tmpusrcurtime->format("d");
1030 $BirthYear=$tmpusrcurtime->format("Y"); }
1031 if(pre_strlen($BirthExpl[0])!="2"||
pre_strlen($BirthExpl[1])!="2"||
pre_strlen($BirthExpl[2])!="4") {
1032 $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
1033 if (!is_numeric($BirthExpl[0])||
!is_numeric($BirthExpl[1])||
!is_numeric($BirthExpl[2])) {
1034 $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
1035 if(count($BirthExpl)=="3"&&
1036 checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===false) {
1037 $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; }
1038 if(count($BirthExpl)!="3") { $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
1039 if($_POST['EventDay']==null) { $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; }
1040 $_SESSION['UserTimeZone'] = $_POST['YourOffSet'];
1041 $usertz = new DateTimeZone($_SESSION['UserTimeZone']);
1042 $usercurtime->setTimezone($usertz);
1043 $NewDay=$utccurtime->getTimestamp();
1044 $NewIP=$_SERVER['REMOTE_ADDR'];
1045 $_POST['Website'] = urlcheck($_POST['Website']);
1046 $_POST['iDBTimeFormat'] = convert_strftime($_POST['iDBTimeFormat']);
1047 $_POST['iDBDateFormat'] = convert_strftime($_POST['iDBDateFormat']);
1048 $querynewprofile = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Interests\"='%s',\"Title\"='%s',\"Website\"='%s',\"TimeZone\"='%s',\"DateFormat\"='%s',\"TimeFormat\"='%s',\"Gender\"='%s',\"LastActive\"=%i,\"BirthMonth\"=%i,\"BirthDay\"=%i,\"BirthYear\"=%i,\"RepliesPerPage\"=%i,\"TopicsPerPage\"=%i,\"MessagesPerPage\"=%i,\"IP\"='%s' WHERE \"id\"=%i", array($_POST['Interests'],$_POST['Title'],$_POST['Website'],$_POST['YourOffSet'],$_POST['iDBTimeFormat'],$_POST['iDBDateFormat'],$_POST['YourGender'],$NewDay,$BirthMonth,$BirthDay,$BirthYear,$_POST['RepliesPerPage'],$_POST['TopicsPerPage'],$_POST['MessagesPerPage'],$NewIP,$_SESSION['UserID']));
1049 sql_query($querynewprofile,$SQLStat); } } }
1050 if($_GET['act']=="userinfo") {
1051 if($_POST['update']!="now") {
1052 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
1053 $result=sql_query($query,$SQLStat);
1054 $num=sql_num_rows($result);
1056 $YourID=sql_result($result,$i,"id");
1057 $User1Email=sql_result($result,$i,"Email");
1058 $userinfoact = url_maker($exfile['profile'],$Settings['file_ext'],"act=userinfo",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
1059 $profiletitle = " ".$ThemeSet['TitleDivider']." User Info Editer";
1061 <div
class="TableMenuBorder">
1062 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
1063 <div
class="TableMenuRow1">
1064 <span style
="text-align: left;">
1065 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $userinfoact; ?>">User Info Editer
</a
>
1068 <table
class="TableMenu" style
="width: 100%;">
1069 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
1070 <tr
class="TableMenuRow1">
1071 <td
class="TableMenuColumn1"><span style
="text-align: left;">
1072 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $userinfoact; ?>">User Info Editer
</a
>
1075 <tr id
="ProfileTitle" class="TableMenuRow2">
1076 <th
class="TableMenuColumn2">User Info Editer
</th
>
1078 <tr
class="TableMenuRow3" id
="UserInfoEditor">
1079 <td
class="TableMenuColumn3">
1080 <form style
="display: inline;" method
="post" action
="<?php echo $userinfoact; ?>">
1081 <table style
="text-align: left;">
1082 <tr style
="text-align: left;">
1083 <td style
="width: 40%;"><label
class="TextBoxLabel" for="OldPass">Insert old Password
:</label
></td
>
1084 <td style
="width: 60%;"><input maxlength
="30" type
="password" class="TextBox" name
="OldPass" size
="20" id
="OldPass" /></td
>
1085 </tr
><tr style
="text-align: left;">
1086 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Password">Insert a Password
:</label
></td
>
1087 <td style
="width: 60%;"><input maxlength
="30" type
="password" class="TextBox" name
="Password" size
="20" id
="Password" /></td
>
1088 </tr
><tr style
="text-align: left;">
1089 <td style
="width: 40%;"><label
class="TextBoxLabel" for="RePassword">ReInsert a Password
:</label
></td
>
1090 <td style
="width: 60%;"><input maxlength
="30" type
="password" class="TextBox" name
="RePassword" size
="20" id
="RePassword" /></td
>
1091 </tr
><tr style
="text-align: left;">
1092 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Email">Insert Your Email
:</label
></td
>
1093 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Email" size
="20" id
="Email" value
="<?php echo $User1Email; ?>" /></td
>
1095 <table style
="text-align: left;">
1096 <tr style
="text-align: left;">
1097 <td style
="width: 100%;">
1098 <input type
="hidden" name
="act" value
="userinfo" style
="display: none;" />
1099 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
1100 <input type
="submit" class="Button" value
="Save" />
1101 <input
class="Button" type
="reset" />
1105 <tr id
="ProfileEnd" class="TableMenuRow4">
1106 <td
class="TableMenuColumn4"> 
;</td
>
1110 <?php
sql_free_result($result); }
1111 if($_POST['update']=="now") {
1112 if($_POST['act']=="userinfo"&&
1113 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
1114 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
1115 $result=sql_query($query,$SQLStat);
1116 $num=sql_num_rows($result);
1118 $OldPassword=sql_result($result,$i,"UserPassword");
1119 $OldHashType=sql_result($result,$i,"HashType");
1120 $OldJoined=sql_result($result,$i,"Joined");
1121 $OldSalt=sql_result($result,$i,"Salt");
1122 $UpdateHash = false;
1123 if($OldHashType=="ODFH") {
1124 $YourPassword = PassHash2x($_POST['OldPass']); }
1125 if($OldHashType=="IPB2") {
1126 $YourPassword = hash2xkey($_POST['OldPass'],$OldSalt); }
1127 if($OldHashType=="DF4H") {
1128 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1"); }
1129 if($OldHashType=="iDBH2") {
1130 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"md2"); }
1131 if($OldHashType=="iDBH4") {
1132 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"md4"); }
1133 if($OldHashType=="iDBH5") {
1134 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"md5"); }
1135 if($OldHashType=="iDBH") {
1136 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1"); }
1137 if($OldHashType=="iDBH1") {
1138 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1"); }
1139 if($OldHashType=="iDBH224") {
1140 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha224"); }
1141 if($OldHashType=="iDBH256") {
1142 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha256"); }
1143 if($OldHashType=="iDBH384") {
1144 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha384"); }
1145 if($OldHashType=="iDBH512") {
1146 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha512"); }
1147 if($OldHashType=="iDBHRMD128") {
1148 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd128"); }
1149 if($OldHashType=="iDBHRMD160") {
1150 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd160"); }
1151 if($OldHashType=="iDBHRMD256") {
1152 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd256"); }
1153 if($OldHashType=="iDBHRMD320") {
1154 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd320"); }
1155 if($YourPassword!=$OldPassword) { $Error="Yes"; ?
>
1156 <div
class="TableMessage" style
="text-align: center;">Your old Password did not match
.<br
/> 
;</div
>
1157 <?php
} if(pre_strlen($_POST['Password'])>"60") { $Error="Yes"; ?
>
1158 <div
class="TableMessage" style
="text-align: center;">Your password is too big
.<br
/> 
;</div
>
1159 <?php
} if(pre_strlen($_POST['OldPass'])>"60") { $Error="Yes"; ?
>
1160 <div
class="TableMessage" style
="text-align: center;">Your old password is too big
.<br
/> 
;</div
>
1161 <?php
} if ($_POST['Password']!=$_POST['RePassword']) { $Error="Yes"; ?
>
1162 <div
class="TableMessage" style
="text-align: center;">Your passwords did not match
.<br
/> 
;</div
>
1164 $NewIP=$_SERVER['REMOTE_ADDR'];
1166 if($_POST['Password']!="") {
1167 $NewSalt = salt_hmac(); $NewDay = $utccurtime->getTimestamp();
1168 if($Settings['use_hashtype']=="md2") { $iDBHash = "iDBH2";
1169 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"md2"); }
1170 if($Settings['use_hashtype']=="md4") { $iDBHash = "iDBH4";
1171 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"md4"); }
1172 if($Settings['use_hashtype']=="md5") { $iDBHash = "iDBH5";
1173 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"md5"); }
1174 if($Settings['use_hashtype']=="sha1") { $iDBHash = "iDBH";
1175 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha1"); }
1176 if($Settings['use_hashtype']=="sha224") { $iDBHash = "iDBH224";
1177 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha224"); }
1178 if($Settings['use_hashtype']=="sha256") { $iDBHash = "iDBH256";
1179 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha256"); }
1180 if($Settings['use_hashtype']=="sha384") { $iDBHash = "iDBH384";
1181 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha384"); }
1182 if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
1183 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha512"); }
1184 if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
1185 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"ripemd128"); }
1186 if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
1187 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"ripemd160"); }
1188 if($Settings['use_hashtype']=="ripemd256") { $iDBHash = "iDBHRMD256";
1189 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"ripemd256"); }
1190 if($Settings['use_hashtype']=="ripemd320") { $iDBHash = "iDBHRMD320";
1191 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"ripemd320"); }
1192 $_SESSION['UserPass']=$NewPassword;
1193 if($cookieDomain==null) {
1194 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir); }
1195 if($cookieDomain!=null) {
1196 if($cookieSecure===true) {
1197 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain, 1); }
1198 if($cookieSecure===false) {
1199 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain); } } }
1200 $_POST['Email'] = remove_spaces($_POST['Email']);
1201 if($_POST['Password']!="") {
1202 $querynewuserinfo = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"UserPassword\"='%s',\"HashType\"='%s',\"Email\"='%s',\"LastActive\"=%i,\"IP\"='%s',\"Salt\"='%s' WHERE \"id\"=%i", array($NewPassword,$iDBHash,$_POST['Email'],$NewDay,$NewIP,$NewSalt,$_SESSION['UserID']));
1203 sql_query($querynewuserinfo,$SQLStat); }
1204 if($_POST['Password']=="") {
1205 echo $querynewuserinfo = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Email\"='%s',\"LastActive\"=%i,\"IP\"='%s' WHERE \"id\"=%i", array($_POST['Email'],$NewDay,$NewIP,$_SESSION['UserID']));
1206 sql_query($querynewuserinfo,$SQLStat); } } } } }
1208 <?php
if($_POST['update']=="now"&&$_GET['act']!=null) {
1209 $profiletitle = " ".$ThemeSet['TitleDivider']." Updating Settings"; ?
>
1211 <tr id
="ProfileTitleEnd" class="TableMenuRow4">
1212 <td
class="TableMenuColumn4"> 
;</td
>
1213 </tr
></table
></div
><?php
} ?
>
1216 <div
class="DivProfile"> 
;</div
>