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-2023 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2023 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: profilemain.php - Last Update: 6/22/2023 SVN 984 - 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 if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
28 if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else {
29 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
30 $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
31 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
32 $_SESSION['AncientViewingFile'] = $exfile['index']; } }
33 if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
34 if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
35 if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
36 if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
37 if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else {
38 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
39 $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
40 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
41 $_SESSION['OldViewingFile'] = $exfile['index']; } }
42 if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
43 if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
44 if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
45 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']);
46 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
47 $_SESSION['ViewingFile'] = $exfile['index'].$Settings['file_ext']; }
48 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
49 $_SESSION['ViewingFile'] = $exfile['index']; }
50 $_SESSION['PreViewingTitle'] = "Viewing";
51 $_SESSION['ViewingTitle'] = "UserCP";
52 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
54 <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
>
55 <div
class="DivNavLinks"> </div>
56 <table
class="Table3">
57 <tr style
="width: 100%; vertical-align: top;">
58 <td style
="width: 15%; vertical-align: top;">
59 <div
class="TableSMenuBorder">
60 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
61 <div
class="TableSMenuRow1">
62 <?php
echo $ThemeSet['TitleIcon']; ?
>Profile Settings
</div
>
64 <table id
="ProfileLinks" class="TableSMenu" style
="width: 100%; text-align: left; vertical-align: top;">
65 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
66 <tr
class="TableSMenuRow1">
67 <td
class="TableSMenuColumn1"><?php
echo $ThemeSet['TitleIcon']; ?
>Profile Settings
</td
>
69 <tr
class="TableSMenuRow2">
70 <td
class="TableSMenuColumn2"> </td>
71 </tr
><tr
class="TableSMenuRow3">
72 <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
>
73 </tr
><tr
class="TableSMenuRow3">
74 <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
>
75 </tr
><tr
class="TableSMenuRow3">
76 <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
>
77 </tr
><tr
class="TableSMenuRow3">
78 <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
>
79 </tr
><tr
class="TableSMenuRow4">
80 <td
class="TableSMenuColumn4"> </td>
82 <div
class="DivSMenu"> </div>
83 <div
class="TableSMenuBorder">
84 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
85 <div
class="TableSMenuRow1">
86 <?php
echo $ThemeSet['TitleIcon']; ?
>Board Settings
</div
>
88 <table
class="TableSMenu" style
="width: 100%; text-align: left; vertical-align: top;">
89 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
90 <tr
class="TableSMenuRow1">
91 <td
class="TableSMenuColumn1"><?php
echo $ThemeSet['TitleIcon']; ?
>Board Settings
</td
>
93 <tr
class="TableSMenuRow2">
94 <td
class="TableSMenuColumn2"> </td>
95 </tr
><tr
class="TableSMenuRow3">
96 <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
>
97 </tr
><tr
class="TableSMenuRow3">
98 <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
>
99 </tr
><tr
class="TableSMenuRow4">
100 <td
class="TableSMenuColumn4"> </td>
103 <td style
="width: 85%; vertical-align: top;">
104 <?php
if($_POST['update']=="now"&&$_GET['act']!=null) {
105 $updateact = url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
106 $profiletitle = " ".$ThemeSet['TitleDivider']." Updating Settings";
107 redirect("refresh",$rbasedir.url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile'],FALSE),"3");
108 $noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
109 $profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
111 <div
class="TableMenuBorder">
112 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
113 <div
class="TableMenuRow1">
114 <span style
="text-align: left;">
115 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $updateact; ?>">Updating Settings
</a
>
118 <table
class="TableMenu" style
="width: 100%;">
119 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
120 <tr
class="TableMenuRow1">
121 <td
class="TableMenuColumn1"><span style
="text-align: left;">
122 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $updateact; ?>">Updating Settings
</a
>
125 <tr id
="ProfileTitle" class="TableMenuRow2">
126 <th
class="TableMenuColumn2">Updating Settings
</th
>
128 <tr
class="TableMenuRow3" id
="ProfileUpdate">
129 <td
class="TableMenuColumn3">
130 <div style
="text-align: center;">
131 <br
/>Profile updated
<a href
="<?php echo $updateact; ?>">click here
</a
> to go back
. ^_^
<br
/> </div>
132 <?php
} if($_GET['act']=="view") {
133 if($_POST['update']!="now") {
134 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
135 $result=sql_query($query,$SQLStat);
136 $num=sql_num_rows($result);
138 $YourID=sql_result($result,$i,"id");
139 $Notes=sql_result($result,$i,"Notes");
140 $noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
141 $notepadact = $noteact; $profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
143 <div
class="TableMenuBorder">
144 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
145 <div
class="TableMenuRow1">
146 <span style
="text-align: left;">
147 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $noteact; ?>">NotePad
</a
>
150 <table
class="TableMenu" style
="width: 100%;">
151 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
152 <tr
class="TableMenuRow1">
153 <td
class="TableMenuColumn1"><span style
="text-align: left;">
154 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $noteact; ?>">NotePad
</a
>
157 <tr id
="ProfileTitle" class="TableMenuRow2">
158 <th
class="TableMenuColumn2">NotePad
</th
>
160 <tr
class="TableMenuRow3" id
="NotePadRow">
161 <td
class="TableMenuColumn3">
162 <form style
="display: inline;" method
="post" action
="<?php echo $notepadact; ?>"><div style
="text-align: center;">
163 <label
class="TextBoxLabel" for="NotePad">Your NotePad
</label
><br
/>
164 <textarea
class="TextBox" name
="NotePad" id
="NotePad" style
="width: 75%; height: 128px;" rows
="10" cols
="84"><?php
echo $Notes; ?
></textarea
>
165 <input type
="hidden" name
="act" value
="view" style
="display: none;" />
166 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
167 <br
/><input type
="submit" class="Button" value
="Save" /> <input class="Button" type="reset" />
170 <tr id
="ProfileEnd" class="TableMenuRow4">
171 <td
class="TableMenuColumn4"> </td>
175 <?php
sql_free_result($result); }
176 if($_POST['update']=="now") {
177 if($_POST['act']=="view"&&
178 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
179 $_POST['NotePad'] = htmlspecialchars($_POST['NotePad'], ENT_QUOTES
, $Settings['charset']);
180 $_POST['NotePad'] = remove_bad_entities($_POST['NotePad']);
181 //$_POST['Signature'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Signature']);
182 //$_POST['Signature'] = remove_spaces($_POST['Signature']);
183 //$_POST['Signature'] = remove_bad_entities($_POST['Signature']);
184 /* <_< iWordFilter >_>
185 by Kazuki Przyborowski - Cool Dude 2k */
186 $melanieqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."wordfilter\"", array(null));
187 $melaniert=sql_query($melanieqy,$SQLStat);
188 $melanienm=sql_num_rows($melaniert);
190 while ($melanies < $melanienm) {
191 $Filter=sql_result($melaniert,$melanies,"FilterWord");
192 $Replace=sql_result($melaniert,$melanies,"Replacement");
193 $CaseInsensitive=sql_result($melaniert,$melanies,"CaseInsensitive");
194 if($CaseInsensitive=="on") { $CaseInsensitive = "yes"; }
195 if($CaseInsensitive=="off") { $CaseInsensitive = "no"; }
196 if($CaseInsensitive!="yes"||
$CaseInsensitive!="no") { $CaseInsensitive = "no"; }
197 $WholeWord=sql_result($melaniert,$melanies,"WholeWord");
198 if($WholeWord=="on") { $WholeWord = "yes"; }
199 if($WholeWord=="off") { $WholeWord = "no"; }
200 if($WholeWord!="yes"&&$WholeWord!="no") { $WholeWord = "no"; }
201 $Filter = preg_quote($Filter, "/");
202 if($CaseInsensitive!="yes"&&$WholeWord=="yes") {
203 $_POST['NotePad'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['NotePad']); }
204 if($CaseInsensitive=="yes"&&$WholeWord=="yes") {
205 $_POST['NotePad'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['NotePad']); }
206 if($CaseInsensitive!="yes"&&$WholeWord!="yes") {
207 $_POST['NotePad'] = preg_replace("/".$Filter."/", $Replace, $_POST['NotePad']); }
208 if($CaseInsensitive=="yes"&&$WholeWord!="yes") {
209 $_POST['NotePad'] = preg_replace("/".$Filter."/i", $Replace, $_POST['NotePad']); }
210 ++
$melanies; } sql_free_result($melaniert);
211 $NewDay=$utccurtime->getTimestamp();
212 $NewIP=$_SERVER['REMOTE_ADDR'];
213 $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']));
214 sql_query($querynewskin,$SQLStat); } } }
215 if($_GET['act']=="signature") {
216 if($_POST['update']!="now") {
217 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
218 $result=sql_query($query,$SQLStat);
219 $num=sql_num_rows($result);
221 $YourID=sql_result($result,$i,"id");
222 $Signature=sql_result($result,$i,"Signature");
223 $signatureact = url_maker($exfile['profile'],$Settings['file_ext'],"act=signature",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
224 $profiletitle = " ".$ThemeSet['TitleDivider']." Signature Editor";
226 <div
class="TableMenuBorder">
227 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
228 <div
class="TableMenuRow1">
229 <span style
="text-align: left;">
230 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $signatureact; ?>">Signature Editer
</a
>
233 <table
class="TableMenu" style
="width: 100%;">
234 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
235 <tr
class="TableMenuRow1">
236 <td
class="TableMenuColumn1"><span style
="text-align: left;">
237 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $signatureact; ?>">Signature Editer
</a
>
240 <tr id
="ProfileTitle" class="TableMenuRow2">
241 <th
class="TableMenuColumn2">Signature Editor
</th
>
243 <tr
class="TableMenuRow3" id
="SignatureRow">
244 <td
class="TableMenuColumn3">
245 <form style
="display: inline;" method
="post" action
="<?php echo $signatureact; ?>"><div style
="text-align: center;">
246 <label
class="TextBoxLabel" for="Signature">Your Signature
</label
><br
/>
247 <textarea
class="TextBox" name
="Signature" id
="Signature" style
="width: 75%; height: 128px;" rows
="10" cols
="84"><?php
echo $Signature; ?
></textarea
>
248 <input type
="hidden" name
="act" value
="signature" style
="display: none;" />
249 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
250 <br
/><input type
="submit" class="Button" value
="Save" /> <input class="Button" type="reset" />
253 <tr id
="ProfileEnd" class="TableMenuRow4">
254 <td
class="TableMenuColumn4"> </td>
258 <?php
sql_free_result($result); }
259 if($_POST['update']=="now") {
260 if($_POST['act']=="signature"&&
261 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
262 $_POST['Signature'] = stripcslashes(htmlspecialchars($_POST['Signature'], ENT_QUOTES
));
263 //$_POST['Signature'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Signature']);
264 //$_POST['Signature'] = remove_spaces($_POST['Signature']);
265 $_POST['Signature'] = remove_bad_entities($_POST['Signature']);
266 /* <_< iWordFilter >_>
267 by Kazuki Przyborowski - Cool Dude 2k */
268 $melanieqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."wordfilter\"", array(null));
269 $melaniert=sql_query($melanieqy,$SQLStat);
270 $melanienm=sql_num_rows($melaniert);
272 while ($melanies < $melanienm) {
273 $Filter=sql_result($melaniert,$melanies,"FilterWord");
274 $Replace=sql_result($melaniert,$melanies,"Replacement");
275 $CaseInsensitive=sql_result($melaniert,$melanies,"CaseInsensitive");
276 if($CaseInsensitive=="on") { $CaseInsensitive = "yes"; }
277 if($CaseInsensitive=="off") { $CaseInsensitive = "no"; }
278 if($CaseInsensitive!="yes"||
$CaseInsensitive!="no") { $CaseInsensitive = "no"; }
279 $WholeWord=sql_result($melaniert,$melanies,"WholeWord");
280 if($WholeWord=="on") { $WholeWord = "yes"; }
281 if($WholeWord=="off") { $WholeWord = "no"; }
282 if($WholeWord!="yes"&&$WholeWord!="no") { $WholeWord = "no"; }
283 $Filter = preg_quote($Filter, "/");
284 if($CaseInsensitive!="yes"&&$WholeWord=="yes") {
285 $_POST['Signature'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['Signature']); }
286 if($CaseInsensitive=="yes"&&$WholeWord=="yes") {
287 $_POST['Signature'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['Signature']); }
288 if($CaseInsensitive!="yes"&&$WholeWord!="yes") {
289 $_POST['Signature'] = preg_replace("/".$Filter."/", $Replace, $_POST['Signature']); }
290 if($CaseInsensitive=="yes"&&$WholeWord!="yes") {
291 $_POST['Signature'] = preg_replace("/".$Filter."/i", $Replace, $_POST['Signature']); }
292 ++
$melanies; } sql_free_result($melaniert);
293 $NewDay=$utccurtime->getTimestamp();
294 $NewIP=$_SERVER['REMOTE_ADDR'];
295 $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']));
296 sql_query($querynewskin,$SQLStat); } } }
297 if($_GET['act']=="avatar") {
298 if($_POST['update']!="now") {
299 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
300 $result=sql_query($query,$SQLStat);
301 $num=sql_num_rows($result);
303 $YourID=sql_result($result,$i,"id");
304 $User1Avatar=sql_result($result,$i,"Avatar");
305 $User1AvatarSize=sql_result($result,$i,"AvatarSize");
306 $avataract = url_maker($exfile['profile'],$Settings['file_ext'],"act=avatar",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
307 $profiletitle = " ".$ThemeSet['TitleDivider']." Avatar Editor";
308 $Pre1Avatar = $User1Avatar;
309 if ($User1Avatar==null) { $User1Avatar="http://"; }
310 if ($Pre1Avatar=="http://"||
$Pre1Avatar==null||
311 strtolower($Pre1Avatar)=="noavatar") {
312 $Pre1Avatar=$ThemeSet['NoAvatar'];
313 $User1AvatarSize=$ThemeSet['NoAvatarSize']; }
314 if($User1Avatar=="http://") { $User1Avatar = ""; }
315 $AvatarSize1=explode("x", $User1AvatarSize);
316 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
318 <div
class="TableMenuBorder">
319 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
320 <div
class="TableMenuRow1">
321 <span style
="text-align: left;">
322 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $avataract; ?>">Avatar Editer
</a
>
325 <table
class="TableMenu" style
="width: 100%;">
326 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
327 <tr
class="TableMenuRow1">
328 <td
class="TableMenuColumn1"><span style
="text-align: left;">
329 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $avataract; ?>">Avatar Editer
</a
>
332 <tr id
="ProfileTitle" class="TableMenuRow2">
333 <th
class="TableMenuColumn2">Avatar Editor
</th
>
335 <tr
class="TableMenuRow3" id
="AvatarEditor">
336 <td
class="TableMenuColumn3">
337 <form style
="display: inline;" method
="post" action
="<?php echo $avataract; ?>">
338 <?php
// Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/
340 <table
class="AvatarTable" style
="width: 100px; height: 100px; text-align: center;">
341 <tr
class="AvatarRow" style
="width: 100%; height: 100%;">
342 <td
class="AvatarRow" style
="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
343 <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;" />
347 <table style
="text-align: left;">
348 <tr style
="text-align: left;">
349 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Avatar">Your Avatar
</label
></td
>
350 <td style
="width: 60%;"><input type
="url" class="TextBox" name
="Avatar" id
="Avatar" value
="<?php echo $User1Avatar; ?>" size
="20" /></td
>
351 </tr
><tr style
="text-align: left;">
352 <td style
="width: 40%;"><label
class="TextBoxLabel" for="AvatarSizeW">Avatar Width
</label
></td
>
353 <td style
="width: 60%;"><select size
="1" name
="AvatarSizeW" id
="AvatarSizeW" class="TextBox">
354 <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; } ?
>
356 </tr
><tr style
="text-align: left;">
357 <td style
="width: 40%;"><label
class="TextBoxLabel" for="AvatarSizeH">Avatar Height
</label
></td
>
358 <td style
="width: 60%;"><select size
="1" name
="AvatarSizeH" id
="AvatarSizeH" class="TextBox">
359 <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; } ?
>
362 <table style
="text-align: left;">
363 <tr style
="text-align: left;">
364 <td style
="width: 100%;">
365 <input type
="hidden" name
="act" value
="avatar" style
="display: none;" />
366 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
367 <input type
="submit" class="Button" value
="Save" />
368 <input
class="Button" type
="reset" />
372 <tr id
="ProfileEnd" class="TableMenuRow4">
373 <td
class="TableMenuColumn4"> </td>
377 <?php
sql_free_result($result); }
378 if($_POST['update']=="now") {
379 if($_POST['Avatar']!=null&&$_POST['AvatarSizeW']!=null&&$_POST['AvatarSizeH']!=null&&
380 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
381 if($_POST['Avatar']=="") { $_POST['Avatar'] = "http://"; }
382 if (!filter_var($_POST['Avatar'], FILTER_VALIDATE_URL
)&&$_POST['Avatar']!="http://"&&$_POST['Avatar']!="https://") { $Error="Yes"; ?
>
383 <div
class="TableMessage" style
="text-align: center;">Your avatar url is not a valid web url
.<br
/> </div>
385 if(!is_numeric($_POST['AvatarSizeW'])) { $_POST['AvatarSizeW'] = 100; }
386 if($_POST['AvatarSizeW']>=100) { $_POST['AvatarSizeW']=100; }
387 if(!is_numeric($_POST['AvatarSizeH'])) { $_POST['AvatarSizeH'] = 100; }
388 if($_POST['AvatarSizeH']>=100) { $_POST['AvatarSizeH']=100; }
389 $fullavatarsize = $_POST['AvatarSizeW']."x".$_POST['AvatarSizeH'];
390 $_POST['Avatar'] = htmlentities($_POST['Avatar'], ENT_QUOTES
, $Settings['charset']);
391 $NewDay=$utccurtime->getTimestamp();
392 $NewIP=$_SERVER['REMOTE_ADDR'];
393 $_POST['Avatar'] = remove_spaces($_POST['Avatar']);
395 $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']));
396 sql_query($querynewskin,$SQLStat); } } } }
397 if($_GET['act']=="settings") {
398 if($_POST['update']!="now") {
399 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
400 $result=sql_query($query,$SQLStat);
401 $num=sql_num_rows($result);
403 $YourID=sql_result($result,$i,"id");
404 $User1TimeZone=sql_result($result,$i,"TimeZone");
405 $User1DateFormat=sql_result($result,$i,"DateFormat");
406 $User1DateFormat = htmlspecialchars($User1DateFormat, ENT_QUOTES
, $Settings['charset']);
407 $User1TimeFormat=sql_result($result,$i,"TimeFormat");
408 $User1TimeFormat= htmlspecialchars($User1TimeFormat, ENT_QUOTES
, $Settings['charset']);
409 $settingsact = url_maker($exfile['profile'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
410 $profiletitle = " ".$ThemeSet['TitleDivider']." Board Settings";
411 // http://www.tutorialspoint.com/php/php_function_timezone_identifiers_list.htm
412 $timezone_identifiers = DateTimeZone
::listIdentifiers();
413 //$timezone_identifiers = timezone_identifiers_list();
414 $zonelist['africa'] = array();
415 $zonelist['america'] = array();
416 $zonelist['antarctica'] = array();
417 $zonelist['arctic'] = array();
418 $zonelist['asia'] = array();
419 $zonelist['atlantic'] = array();
420 $zonelist['australia'] = array();
421 $zonelist['europe'] = array();
422 $zonelist['indian'] = array();
423 $zonelist['pacific'] = array();
424 $zonelist['etcetera'] = array();
425 for ($i=0; $i < count($timezone_identifiers); $i++
) {
426 $zonelookup = explode("/", $timezone_identifiers[$i]);
427 if(count($zonelookup)==1) { array_push($zonelist['etcetera'], array($timezone_identifiers[$i], $timezone_identifiers[$i])); }
428 if(count($zonelookup)>1) {
429 if($zonelookup[0]=="Africa") {
430 if(count($zonelookup)==2) {
431 array_push($zonelist['africa'], array($zonelookup[1], $timezone_identifiers[$i])); }
432 if(count($zonelookup)==3) {
433 array_push($zonelist['africa'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
434 if($zonelookup[0]=="America") {
435 if(count($zonelookup)==2) {
436 array_push($zonelist['america'], array($zonelookup[1], $timezone_identifiers[$i])); }
437 if(count($zonelookup)==3) {
438 array_push($zonelist['america'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
439 if($zonelookup[0]=="Antarctica") {
440 if(count($zonelookup)==2) {
441 array_push($zonelist['antarctica'], array($zonelookup[1], $timezone_identifiers[$i])); }
442 if(count($zonelookup)==3) {
443 array_push($zonelist['antarctica'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
444 if($zonelookup[0]=="Arctic") {
445 if(count($zonelookup)==2) {
446 array_push($zonelist['arctic'], array($zonelookup[1], $timezone_identifiers[$i])); }
447 if(count($zonelookup)==3) {
448 array_push($zonelist['arctic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
449 if($zonelookup[0]=="Asia") {
450 if(count($zonelookup)==2) {
451 array_push($zonelist['asia'], array($zonelookup[1], $timezone_identifiers[$i])); }
452 if(count($zonelookup)==3) {
453 array_push($zonelist['asia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
454 if($zonelookup[0]=="Atlantic") {
455 if(count($zonelookup)==2) {
456 array_push($zonelist['atlantic'], array($zonelookup[1], $timezone_identifiers[$i])); }
457 if(count($zonelookup)==3) {
458 array_push($zonelist['atlantic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
459 if($zonelookup[0]=="Australia") {
460 if(count($zonelookup)==2) {
461 array_push($zonelist['australia'], array($zonelookup[1], $timezone_identifiers[$i])); }
462 if(count($zonelookup)==3) {
463 array_push($zonelist['australia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
464 if($zonelookup[0]=="Europe") {
465 if(count($zonelookup)==2) {
466 array_push($zonelist['europe'], array($zonelookup[1], $timezone_identifiers[$i])); }
467 if(count($zonelookup)==3) {
468 array_push($zonelist['europe'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
469 if($zonelookup[0]=="Indian") {
470 if(count($zonelookup)==2) {
471 array_push($zonelist['indian'], array($zonelookup[1], $timezone_identifiers[$i])); }
472 if(count($zonelookup)==3) {
473 array_push($zonelist['indian'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
474 if($zonelookup[0]=="Pacific") {
475 if(count($zonelookup)==2) {
476 array_push($zonelist['pacific'], array($zonelookup[1], $timezone_identifiers[$i])); }
477 if(count($zonelookup)==3) {
478 array_push($zonelist['pacific'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
482 <div
class="TableMenuBorder">
483 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
484 <div
class="TableMenuRow1">
485 <span style
="text-align: left;">
486 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $settingsact; ?>">Board Settings
</a
>
489 <table
class="TableMenu" style
="width: 100%;">
490 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
491 <tr
class="TableMenuRow1">
492 <td
class="TableMenuColumn1"><span style
="text-align: left;">
493 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $settingsact; ?>">Board Settings
</a
>
496 <tr id
="ProfileTitle" class="TableMenuRow2">
497 <th
class="TableMenuColumn2">Board Settings
</th
>
499 <tr
class="TableMenuRow3" id
="BoardSettings">
500 <td
class="TableMenuColumn3">
501 <form style
="display: inline;" method
="post" action
="<?php echo $settingsact; ?>">
502 <table style
="text-align: left;">
503 <tr style
="text-align: left;">
504 <td style
="width: 40%;"><label
class="TextBoxLabel" for="YourOffSet">Your TimeZone
:</label
></td
>
505 <td style
="width: 60%;"><select id
="YourOffSet" name
="YourOffSet" class="TextBox">
506 <optgroup label
="Africa">
509 for ($i=0; $i < count($zonelist['africa']); $i++
) {
510 if($User1TimeZone==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
511 echo "<option".$optsel." value=\"".$zonelist['africa'][$i][1]."\">".str_replace("_", " ", $zonelist['africa'][$i][0])."</option>\n";
515 <optgroup label
="America">
518 for ($i=0; $i < count($zonelist['america']); $i++
) {
519 if($User1TimeZone==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
520 echo "<option".$optsel." value=\"".$zonelist['america'][$i][1]."\">".str_replace("_", " ", $zonelist['america'][$i][0])."</option>\n";
524 <optgroup label
="Antarctica">
527 for ($i=0; $i < count($zonelist['antarctica']); $i++
) {
528 if($User1TimeZone==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
529 echo "<option".$optsel." value=\"".$zonelist['antarctica'][$i][1]."\">".str_replace("_", " ", $zonelist['antarctica'][$i][0])."</option>\n";
533 <optgroup label
="Arctic">
536 for ($i=0; $i < count($zonelist['arctic']); $i++
) {
537 if($User1TimeZone==$zonelist['arctic'][$i][1]) { $optsel = " selected=\"selected\""; }
538 echo "<option".$optsel." value=\"".$zonelist['arctic'][$i][1]."\">".str_replace("_", " ", $zonelist['arctic'][$i][0])."</option>\n";
542 <optgroup label
="Asia">
544 for ($i=0; $i < count($zonelist['asia']); $i++
) {
545 if($User1TimeZone==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
546 echo "<option".$optsel." value=\"".$zonelist['asia'][$i][1]."\">".str_replace("_", " ", $zonelist['asia'][$i][0])."</option>\n";
550 <optgroup label
="Atlantic">
553 for ($i=0; $i < count($zonelist['atlantic']); $i++
) {
554 if($User1TimeZone==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
555 echo "<option".$optsel." value=\"".$zonelist['atlantic'][$i][1]."\">".str_replace("_", " ", $zonelist['atlantic'][$i][0])."</option>\n";
559 <optgroup label
="Australia">
562 for ($i=0; $i < count($zonelist['australia']); $i++
) {
563 if($User1TimeZone==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
564 echo "<option".$optsel." value=\"".$zonelist['australia'][$i][1]."\">".str_replace("_", " ", $zonelist['australia'][$i][0])."</option>\n";
568 <optgroup label
="Europe">
571 for ($i=0; $i < count($zonelist['europe']); $i++
) {
572 if($User1TimeZone==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
573 echo "<option".$optsel." value=\"".$zonelist['europe'][$i][1]."\">".str_replace("_", " ", $zonelist['europe'][$i][0])."</option>\n";
577 <optgroup label
="Indian">
580 for ($i=0; $i < count($zonelist['indian']); $i++
) {
581 if($User1TimeZone==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
582 echo "<option".$optsel." value=\"".$zonelist['indian'][$i][1]."\">".str_replace("_", " ", $zonelist['indian'][$i][0])."</option>\n";
586 <optgroup label
="Pacific">
589 for ($i=0; $i < count($zonelist['pacific']); $i++
) {
590 if($User1TimeZone==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
591 echo "<option".$optsel." value=\"".$zonelist['pacific'][$i][1]."\">".str_replace("_", " ", $zonelist['pacific'][$i][0])."</option>\n";
595 <optgroup label
="Etcetera">
598 for ($i=0; $i < count($zonelist['etcetera']); $i++
) {
599 if($User1TimeZone==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
600 echo "<option".$optsel." value=\"".$zonelist['etcetera'][$i][1]."\">".str_replace("_", " ", $zonelist['etcetera'][$i][0])."</option>\n";
605 </tr
><tr style
="text-align: left;">
606 <td style
="width: 40%;"><label
class="TextBoxLabel" for="iDBTimeFormat">Insert time format
string:</label
></td
>
607 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="iDBTimeFormat" id
="iDBTimeFormat" value
="<?php echo $User1DateFormat; ?>" /></td
>
608 </tr
><tr style
="text-align: left;">
609 <td style
="width: 40%;"><label
class="TextBoxLabel" for="iDBDateFormat">Insert date format
string:</label
></td
>
610 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="iDBDateFormat" id
="iDBDateFormat" value
="<?php echo $User1TimeFormat; ?>" /></td
>
611 </tr
><tr style
="text-align: left;">
612 <td style
="width: 40%;"><label
class="TextBoxLabel" for="skin">Pick a CSS Theme
</label
></td
>
613 <td style
="width: 60%;"><select id
="skin" name
="skin" class="TextBox">
614 <option selected
="selected" value
="<?php echo $_SESSION['Theme']; ?>">Old
Value (<?php
echo $_SESSION['Theme']; ?
>)</option
><?php
615 if($Settings['SQLThemes']=="off") {
616 $skindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
617 if ($handle = opendir($skindir)) { $dirnum = null;
618 while (false !== ($file = readdir($handle))) {
619 if ($dirnum==null) { $dirnum = 0; }
620 if (file_exists($skindir.$file."/info.php")) {
621 if ($file != "." && $file != "..") {
622 require($skindir.$file."/info.php");
623 $themelist[$dirnum] = "<option value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>";
625 closedir($handle); asort($themelist);
626 $themenum=count($themelist); $themei=0;
627 while ($themei < $themenum) {
628 echo $themelist[$themei]."\n";
630 if($Settings['SQLThemes']=="on") {
631 $sknquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."themes\" ORDER BY \"id\" ASC, \"Name\" ASC", array(null));
632 $sknresult=sql_query($sknquery,$SQLStat);
633 $sknum=sql_num_rows($sknresult);
635 while ($skni < $sknum) {
636 $ThemeInfo['Name'] = sql_result($sknresult,$skni,"Name");
637 $ThemeInfo['ThemeName'] = sql_result($sknresult,$skni,"ThemeName");
638 echo "<option value=\"".$ThemeInfo['Name']."\">".$ThemeInfo['ThemeName']."</option>\n";
641 </tr
><tr style
="text-align: left;">
642 <td style
="width: 40%;"><label
class="TextBoxLabel" for="RepliesPerPage">Replies Per Page
:</label
></td
>
643 <td style
="width: 60%;"><select id
="RepliesPerPage" name
="RepliesPerPage" class="TextBox">
644 <option selected
="selected" value
="<?php echo $Settings['max_posts']; ?>">Old
Value (<?php
echo $Settings['max_posts']; ?
>)</option
>
645 <option value
="5">5</option
>
646 <option value
="10">10</option
>
647 <option value
="15">15</option
>
648 <option value
="20">20</option
>
649 <option value
="25">25</option
>
650 <option value
="30">30</option
>
651 <option value
="30">35</option
>
652 <option value
="30">40</option
>
654 </tr
><tr style
="text-align: left;">
655 <td style
="width: 40%;"><label
class="TextBoxLabel" for="TopicsPerPage">Topics Per Page
:</label
></td
>
656 <td style
="width: 60%;"><select id
="TopicsPerPage" name
="TopicsPerPage" class="TextBox">
657 <option selected
="selected" value
="<?php echo $Settings['max_topics']; ?>">Old
Value (<?php
echo $Settings['max_topics']; ?
>)</option
>
658 <option value
="5">5</option
>
659 <option value
="10">10</option
>
660 <option value
="15">15</option
>
661 <option value
="20">20</option
>
662 <option value
="25">25</option
>
663 <option value
="30">30</option
>
664 <option value
="30">35</option
>
665 <option value
="30">40</option
>
667 </tr
><tr style
="text-align: left;">
668 <td style
="width: 40%;"><label
class="TextBoxLabel" for="MessagesPerPage">Messages
/Members Per Page
:</label
></td
>
669 <td style
="width: 60%;"><select id
="MessagesPerPage" name
="MessagesPerPage" class="TextBox">
670 <option selected
="selected" value
="<?php echo $Settings['max_pmlist']; ?>">Old
Value (<?php
echo $Settings['max_pmlist']; ?
>)</option
>
671 <option value
="5">5</option
>
672 <option value
="10">10</option
>
673 <option value
="15">15</option
>
674 <option value
="20">20</option
>
675 <option value
="25">25</option
>
676 <option value
="30">30</option
>
677 <option value
="30">35</option
>
678 <option value
="30">40</option
>
681 <table style
="text-align: left;">
682 <tr style
="text-align: left;">
683 <td style
="width: 100%;">
684 <input type
="hidden" name
="act" value
="settings" style
="display: none;" />
685 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
686 <input type
="submit" class="Button" value
="Save" />
687 <input
class="Button" type
="reset" />
691 <tr id
="ProfileEnd" class="TableMenuRow4">
692 <td
class="TableMenuColumn4"> </td>
696 <?php
sql_free_result($result); }
697 if($_POST['update']=="now") {
698 if($_POST['act']=="settings"&&
699 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
700 $NewDay=$utccurtime->getTimestamp();
701 $NewIP=$_SERVER['REMOTE_ADDR'];
702 $_SESSION['UserTimeZone'] = $_POST['YourOffSet'];
703 $usertz = new DateTimeZone($_SESSION['UserTimeZone']);
704 $usercurtime->setTimezone($usertz);
705 if(!is_numeric($_POST['RepliesPerPage'])) { $_POST['RepliesPerPage'] = "10"; }
706 if(!is_numeric($_POST['TopicsPerPage'])) { $_POST['TopicsPerPage'] = "10"; }
707 if(!is_numeric($_POST['MessagesPerPage'])) { $_POST['MessagesPerPage'] = "10"; }
708 $_POST['iDBTimeFormat'] = convert_strftime($_POST['iDBTimeFormat']);
709 $_POST['iDBDateFormat'] = convert_strftime($_POST['iDBDateFormat']);
710 $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']));
711 sql_query($querynewskin,$SQLStat); } } }
712 if($_GET['act']=="profile") {
713 if($_POST['update']!="now") {
714 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
715 $result=sql_query($query,$SQLStat);
716 $num=sql_num_rows($result);
718 $YourID=sql_result($result,$i,"id");
719 $User1Interests=sql_result($result,$i,"Interests");
720 $User1Title=sql_result($result,$i,"Title");
721 $User1Website=sql_result($result,$i,"Website");
722 $User1Website = urlcheck($User1Website);
723 if($User1Website=="http://") { $User1Website = ""; }
724 $User1Gender=sql_result($result,$i,"Gender");
725 $User1TimeZone=sql_result($result,$i,"TimeZone");
726 $User1DateFormat=sql_result($result,$i,"DateFormat");
727 $User1DateFormat = htmlspecialchars($User1DateFormat, ENT_QUOTES
, $Settings['charset']);
728 $User1TimeFormat=sql_result($result,$i,"TimeFormat");
729 $User1TimeFormat= htmlspecialchars($User1TimeFormat, ENT_QUOTES
, $Settings['charset']);
730 $BirthDay=sql_result($result,$i,"BirthDay");
731 $BirthMonth=sql_result($result,$i,"BirthMonth");
732 $BirthYear=sql_result($result,$i,"BirthYear");
733 $User1Birthday = "MM/DD/YYYY";
734 if($BirthMonth!=null&&$BirthDay!=null&&$BirthYear!=null) {
735 if($BirthYear=="0") { $BirthYear = "YYYY"; }
736 if($BirthDay=="0") { $BirthDay = "DD"; }
737 if($BirthMonth=="0") { $BirthMonth = "MM"; }
738 if(pre_strlen($BirthMonth)=="1") { $BirthMonth = "0".$BirthMonth; }
739 if(pre_strlen($BirthDay)=="1") { $BirthDay = "0".$BirthDay; }
740 if($BirthYear!="MM"&&$BirthYear!="DD"&&$BirthYear!="YYYY"&&
741 checkdate($BirthMonth,$BirthDay,$BirthYear)===false) {
742 $BirthMonth = "MM"; $BirthDay = "DD"; $BirthYear = "YYYY"; }
743 $User1Birthday = $BirthMonth."/".$BirthDay."/".$BirthYear; }
744 $profileact = url_maker($exfile['profile'],$Settings['file_ext'],"act=profile",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
745 $profiletitle = " ".$ThemeSet['TitleDivider']." Profile Editor";
746 // http://www.tutorialspoint.com/php/php_function_timezone_identifiers_list.htm
747 $timezone_identifiers = DateTimeZone
::listIdentifiers();
748 //$timezone_identifiers = timezone_identifiers_list();
749 $zonelist['africa'] = array();
750 $zonelist['america'] = array();
751 $zonelist['antarctica'] = array();
752 $zonelist['arctic'] = array();
753 $zonelist['asia'] = array();
754 $zonelist['atlantic'] = array();
755 $zonelist['australia'] = array();
756 $zonelist['europe'] = array();
757 $zonelist['indian'] = array();
758 $zonelist['pacific'] = array();
759 $zonelist['etcetera'] = array();
760 for ($i=0; $i < count($timezone_identifiers); $i++
) {
761 $zonelookup = explode("/", $timezone_identifiers[$i]);
762 if(count($zonelookup)==1) { array_push($zonelist['etcetera'], array($timezone_identifiers[$i], $timezone_identifiers[$i])); }
763 if(count($zonelookup)>1) {
764 if($zonelookup[0]=="Africa") {
765 if(count($zonelookup)==2) {
766 array_push($zonelist['africa'], array($zonelookup[1], $timezone_identifiers[$i])); }
767 if(count($zonelookup)==3) {
768 array_push($zonelist['africa'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
769 if($zonelookup[0]=="America") {
770 if(count($zonelookup)==2) {
771 array_push($zonelist['america'], array($zonelookup[1], $timezone_identifiers[$i])); }
772 if(count($zonelookup)==3) {
773 array_push($zonelist['america'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
774 if($zonelookup[0]=="Antarctica") {
775 if(count($zonelookup)==2) {
776 array_push($zonelist['antarctica'], array($zonelookup[1], $timezone_identifiers[$i])); }
777 if(count($zonelookup)==3) {
778 array_push($zonelist['antarctica'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
779 if($zonelookup[0]=="Arctic") {
780 if(count($zonelookup)==2) {
781 array_push($zonelist['arctic'], array($zonelookup[1], $timezone_identifiers[$i])); }
782 if(count($zonelookup)==3) {
783 array_push($zonelist['arctic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
784 if($zonelookup[0]=="Asia") {
785 if(count($zonelookup)==2) {
786 array_push($zonelist['asia'], array($zonelookup[1], $timezone_identifiers[$i])); }
787 if(count($zonelookup)==3) {
788 array_push($zonelist['asia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
789 if($zonelookup[0]=="Atlantic") {
790 if(count($zonelookup)==2) {
791 array_push($zonelist['atlantic'], array($zonelookup[1], $timezone_identifiers[$i])); }
792 if(count($zonelookup)==3) {
793 array_push($zonelist['atlantic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
794 if($zonelookup[0]=="Australia") {
795 if(count($zonelookup)==2) {
796 array_push($zonelist['australia'], array($zonelookup[1], $timezone_identifiers[$i])); }
797 if(count($zonelookup)==3) {
798 array_push($zonelist['australia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
799 if($zonelookup[0]=="Europe") {
800 if(count($zonelookup)==2) {
801 array_push($zonelist['europe'], array($zonelookup[1], $timezone_identifiers[$i])); }
802 if(count($zonelookup)==3) {
803 array_push($zonelist['europe'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
804 if($zonelookup[0]=="Indian") {
805 if(count($zonelookup)==2) {
806 array_push($zonelist['indian'], array($zonelookup[1], $timezone_identifiers[$i])); }
807 if(count($zonelookup)==3) {
808 array_push($zonelist['indian'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
809 if($zonelookup[0]=="Pacific") {
810 if(count($zonelookup)==2) {
811 array_push($zonelist['pacific'], array($zonelookup[1], $timezone_identifiers[$i])); }
812 if(count($zonelookup)==3) {
813 array_push($zonelist['pacific'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
817 <div
class="TableMenuBorder">
818 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
819 <div
class="TableMenuRow1">
820 <span style
="text-align: left;">
821 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $profileact; ?>">Profile Editer
</a
>
824 <table
class="TableMenu" style
="width: 100%;">
825 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
826 <tr
class="TableMenuRow1">
827 <td
class="TableMenuColumn1"><span style
="text-align: left;">
828 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $profileact; ?>">Profile Editer
</a
>
831 <tr id
="ProfileTitle" class="TableMenuRow2">
832 <th
class="TableMenuColumn2">Profile Editor
</th
>
834 <tr
class="TableMenuRow3" id
="ProfileEditor">
835 <td
class="TableMenuColumn3">
836 <form style
="display: inline;" method
="post" action
="<?php echo $profileact; ?>">
837 <table style
="text-align: left;">
838 <tr style
="text-align: left;">
839 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Interests">Your Interests
</label
></td
>
840 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Interests" id
="Interests" value
="<?php echo $User1Interests; ?>" /></td
>
841 </tr
><tr style
="text-align: left;">
842 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Title">Your Title
</label
></td
>
843 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Title" id
="Title" value
="<?php echo $User1Title; ?>" /></td
>
844 </tr
><tr style
="text-align: left;">
845 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Website">Your Website
</label
></td
>
846 <td style
="width: 60%;"><input type
="url" class="TextBox" name
="Website" id
="Website" value
="<?php echo $User1Website; ?>" /></td
>
847 </tr
><tr style
="text-align: left;">
848 <td style
="width: 40%;"><label
class="TextBoxLabel" for="EventDay">Your Birthday
</label
></td
>
849 <td style
="width: 60%;"><input maxlength
="10" type
="date" class="TextBox" name
="EventDay" id
="EventDay" value
="<?php echo preg_replace("/([0-9]{2})\
/([0-9]{2})\
/([0-9]{4})/", "$3-$1-$2", $User1Birthday); ?>" /></td
>
850 </tr
><tr style
="text-align: left;">
851 <td style
="width: 40%;"><label
class="TextBoxLabel" for="YourOffSet">Your TimeZone
:</label
></td
>
852 <td style
="width: 60%;"><select id
="YourOffSet" name
="YourOffSet" class="TextBox">
853 <optgroup label
="Africa">
856 for ($i=0; $i < count($zonelist['africa']); $i++
) {
857 if($User1TimeZone==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
858 echo "<option".$optsel." value=\"".$zonelist['africa'][$i][1]."\">".str_replace("_", " ", $zonelist['africa'][$i][0])."</option>\n";
862 <optgroup label
="America">
865 for ($i=0; $i < count($zonelist['america']); $i++
) {
866 if($User1TimeZone==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
867 echo "<option".$optsel." value=\"".$zonelist['america'][$i][1]."\">".str_replace("_", " ", $zonelist['america'][$i][0])."</option>\n";
871 <optgroup label
="Antarctica">
874 for ($i=0; $i < count($zonelist['antarctica']); $i++
) {
875 if($User1TimeZone==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
876 echo "<option".$optsel." value=\"".$zonelist['antarctica'][$i][1]."\">".str_replace("_", " ", $zonelist['antarctica'][$i][0])."</option>\n";
880 <optgroup label
="Arctic">
883 for ($i=0; $i < count($zonelist['arctic']); $i++
) {
884 if($User1TimeZone==$zonelist['arctic'][$i][1]) { $optsel = " selected=\"selected\""; }
885 echo "<option".$optsel." value=\"".$zonelist['arctic'][$i][1]."\">".str_replace("_", " ", $zonelist['arctic'][$i][0])."</option>\n";
889 <optgroup label
="Asia">
891 for ($i=0; $i < count($zonelist['asia']); $i++
) {
892 if($User1TimeZone==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
893 echo "<option".$optsel." value=\"".$zonelist['asia'][$i][1]."\">".str_replace("_", " ", $zonelist['asia'][$i][0])."</option>\n";
897 <optgroup label
="Atlantic">
900 for ($i=0; $i < count($zonelist['atlantic']); $i++
) {
901 if($User1TimeZone==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
902 echo "<option".$optsel." value=\"".$zonelist['atlantic'][$i][1]."\">".str_replace("_", " ", $zonelist['atlantic'][$i][0])."</option>\n";
906 <optgroup label
="Australia">
909 for ($i=0; $i < count($zonelist['australia']); $i++
) {
910 if($User1TimeZone==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
911 echo "<option".$optsel." value=\"".$zonelist['australia'][$i][1]."\">".str_replace("_", " ", $zonelist['australia'][$i][0])."</option>\n";
915 <optgroup label
="Europe">
918 for ($i=0; $i < count($zonelist['europe']); $i++
) {
919 if($User1TimeZone==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
920 echo "<option".$optsel." value=\"".$zonelist['europe'][$i][1]."\">".str_replace("_", " ", $zonelist['europe'][$i][0])."</option>\n";
924 <optgroup label
="Indian">
927 for ($i=0; $i < count($zonelist['indian']); $i++
) {
928 if($User1TimeZone==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
929 echo "<option".$optsel." value=\"".$zonelist['indian'][$i][1]."\">".str_replace("_", " ", $zonelist['indian'][$i][0])."</option>\n";
933 <optgroup label
="Pacific">
936 for ($i=0; $i < count($zonelist['pacific']); $i++
) {
937 if($User1TimeZone==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
938 echo "<option".$optsel." value=\"".$zonelist['pacific'][$i][1]."\">".str_replace("_", " ", $zonelist['pacific'][$i][0])."</option>\n";
942 <optgroup label
="Etcetera">
945 for ($i=0; $i < count($zonelist['etcetera']); $i++
) {
946 if($User1TimeZone==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
947 echo "<option".$optsel." value=\"".$zonelist['etcetera'][$i][1]."\">".str_replace("_", " ", $zonelist['etcetera'][$i][0])."</option>\n";
952 </tr
><tr style
="text-align: left;">
953 <td style
="width: 40%;"><label
class="TextBoxLabel" for="iDBTimeFormat">Insert time format
string:</label
></td
>
954 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="iDBTimeFormat" id
="iDBTimeFormat" value
="<?php echo $User1DateFormat; ?>" /></td
>
955 </tr
><tr style
="text-align: left;">
956 <td style
="width: 40%;"><label
class="TextBoxLabel" for="iDBDateFormat">Insert date format
string:</label
></td
>
957 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="iDBDateFormat" id
="iDBDateFormat" value
="<?php echo $User1TimeFormat; ?>" /></td
>
958 </tr
><tr style
="text-align: left;">
959 <td style
="width: 40%;"><label
class="TextBoxLabel" for="YourGender">Your Gender
:</label
></td
>
960 <td style
="width: 60%;"><select id
="YourGender" name
="YourGender" class="TextBox">
961 <option selected
="selected" value
="<?php echo $User1Gender; ?>">Old
Value (<?php
echo $User1Gender; ?
>)</option
>
962 <option value
="Male">Male
</option
>
963 <option value
="Female">Female
</option
>
964 <option value
="Unknown">Unknown
</option
>
966 </tr
><tr style
="text-align: left;">
967 <td style
="width: 40%;"><label
class="TextBoxLabel" for="RepliesPerPage">Replies Per Page
:</label
></td
>
968 <td style
="width: 60%;"><select id
="RepliesPerPage" name
="RepliesPerPage" class="TextBox">
969 <option selected
="selected" value
="<?php echo $Settings['max_posts']; ?>">Old
Value (<?php
echo $Settings['max_posts']; ?
>)</option
>
970 <option value
="5">5</option
>
971 <option value
="10">10</option
>
972 <option value
="15">15</option
>
973 <option value
="20">20</option
>
974 <option value
="25">25</option
>
975 <option value
="30">30</option
>
976 <option value
="30">35</option
>
977 <option value
="30">40</option
>
979 </tr
><tr style
="text-align: left;">
980 <td style
="width: 40%;"><label
class="TextBoxLabel" for="TopicsPerPage">Topics Per Page
:</label
></td
>
981 <td style
="width: 60%;"><select id
="TopicsPerPage" name
="TopicsPerPage" class="TextBox">
982 <option selected
="selected" value
="<?php echo $Settings['max_topics']; ?>">Old
Value (<?php
echo $Settings['max_topics']; ?
>)</option
>
983 <option value
="5">5</option
>
984 <option value
="10">10</option
>
985 <option value
="15">15</option
>
986 <option value
="20">20</option
>
987 <option value
="25">25</option
>
988 <option value
="30">30</option
>
989 <option value
="30">35</option
>
990 <option value
="30">40</option
>
992 </tr
><tr style
="text-align: left;">
993 <td style
="width: 40%;"><label
class="TextBoxLabel" for="MessagesPerPage">Messages
/Members Per Page
:</label
></td
>
994 <td style
="width: 60%;"><select id
="MessagesPerPage" name
="MessagesPerPage" class="TextBox">
995 <option selected
="selected" value
="<?php echo $Settings['max_pmlist']; ?>">Old
Value (<?php
echo $Settings['max_pmlist']; ?
>)</option
>
996 <option value
="5">5</option
>
997 <option value
="10">10</option
>
998 <option value
="15">15</option
>
999 <option value
="20">20</option
>
1000 <option value
="25">25</option
>
1001 <option value
="30">30</option
>
1004 <table style
="text-align: left;">
1005 <tr style
="text-align: left;">
1006 <td style
="width: 100%;">
1007 <input type
="hidden" name
="act" value
="profile" style
="display: none;" />
1008 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
1009 <input type
="submit" class="Button" value
="Save" />
1010 <input
class="Button" type
="reset" />
1014 <tr id
="ProfileEnd" class="TableMenuRow4">
1015 <td
class="TableMenuColumn4"> </td>
1019 <?php
sql_free_result($result); }
1020 if($_POST['update']=="now") {
1021 if($_POST['act']=="profile"&&
1022 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
1023 if(preg_match("/([0-9]{4})\-([0-9]{2})\-([0-9]{2})/", $_POST['EventDay'])) { $_POST['EventDay'] = preg_replace("/([0-9]{4})\-([0-9]{2})\-([0-9]{2})/", "$2/$3/$1", $_POST['EventDay']); }
1025 if($_POST['Website']=="") { $_POST['Website'] = "http://"; }
1026 if (!filter_var($_POST['Website'], FILTER_VALIDATE_URL
)&&$_POST['Website']!="http://"&&$_POST['Website']!="https://") { $Error="Yes"; ?
>
1027 <div
class="TableMessage" style
="text-align: center;">Your website url is not a valid web url
.<br
/> </div>
1029 $_POST['Interests'] = htmlspecialchars($_POST['Interests'], ENT_QUOTES
, $Settings['charset']);
1030 $_POST['Interests'] = remove_spaces($_POST['Interests']);
1031 $_POST['Title'] = htmlspecialchars($_POST['Title'], ENT_QUOTES
, $Settings['charset']);
1032 $_POST['Title'] = remove_spaces($_POST['Title']);
1033 $_POST['Website'] = htmlentities($_POST['Website'], ENT_QUOTES
, $Settings['charset']);
1034 $_POST['Website'] = remove_spaces($_POST['Website']);
1035 //$_POST['Signature'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Signature']);
1036 //$_POST['Signature'] = remove_spaces($_POST['Signature']);
1037 //$_POST['Signature'] = remove_bad_entities($_POST['Signature']);
1038 /* <_< iWordFilter >_>
1039 by Kazuki Przyborowski - Cool Dude 2k */
1040 $melanieqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."wordfilter\"", array(null));
1041 $melaniert=sql_query($melanieqy,$SQLStat);
1042 $melanienm=sql_num_rows($melaniert);
1044 while ($melanies < $melanienm) {
1045 $Filter=sql_result($melaniert,$melanies,"FilterWord");
1046 $Replace=sql_result($melaniert,$melanies,"Replacement");
1047 $CaseInsensitive=sql_result($melaniert,$melanies,"CaseInsensitive");
1048 if($CaseInsensitive=="on") { $CaseInsensitive = "yes"; }
1049 if($CaseInsensitive=="off") { $CaseInsensitive = "no"; }
1050 if($CaseInsensitive!="yes"||
$CaseInsensitive!="no") { $CaseInsensitive = "no"; }
1051 $WholeWord=sql_result($melaniert,$melanies,"WholeWord");
1052 if($WholeWord=="on") { $WholeWord = "yes"; }
1053 if($WholeWord=="off") { $WholeWord = "no"; }
1054 if($WholeWord!="yes"&&$WholeWord!="no") { $WholeWord = "no"; }
1055 $Filter = preg_quote($Filter, "/");
1056 if($CaseInsensitive!="yes"&&$WholeWord=="yes") {
1057 $_POST['Interests'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['Interests']);
1058 $_POST['Title'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['Title']); }
1059 if($CaseInsensitive=="yes"&&$WholeWord=="yes") {
1060 $_POST['Interests'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['Interests']);
1061 $_POST['Title'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['Title']); }
1062 if($CaseInsensitive!="yes"&&$WholeWord!="yes") {
1063 $_POST['Interests'] = preg_replace("/".$Filter."/", $Replace, $_POST['Interests']);
1064 $_POST['Title'] = preg_replace("/".$Filter."/", $Replace, $_POST['Title']); }
1065 if($CaseInsensitive=="yes"&&$WholeWord!="yes") {
1066 $_POST['Interests'] = preg_replace("/".$Filter."/i", $Replace, $_POST['Interests']);
1067 $_POST['Title'] = preg_replace("/".$Filter."/i", $Replace, $_POST['Title']); }
1068 ++
$melanies; } sql_free_result($melaniert);
1069 if(!is_numeric($_POST['RepliesPerPage'])) { $_POST['RepliesPerPage'] = "10"; }
1070 if(!is_numeric($_POST['TopicsPerPage'])) { $_POST['TopicsPerPage'] = "10"; }
1071 if(!is_numeric($_POST['MessagesPerPage'])) { $_POST['MessagesPerPage'] = "10"; }
1072 if(!isset($_POST['EventDay'])) { $_POST['EventDay'] = null; }
1073 if($_POST['EventDay']!=null) {
1074 $BirthExpl = explode("/",$_POST['EventDay']);
1075 if(count($BirthExpl)!="3") {
1076 $BirthExpl[0] = "0"; $BirthExpl[1] = "0"; $BirthExpl[2] = "0"; }
1077 if(!is_numeric($BirthExpl[0])) { $BirthExpl[0] = "0"; }
1078 if(!is_numeric($BirthExpl[1])) { $BirthExpl[1] = "0"; }
1079 if(!is_numeric($BirthExpl[2])) { $BirthExpl[2] = "0"; }
1080 if(count($BirthExpl)=="3"&&checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===true) {
1081 if(is_numeric($BirthExpl[0])&&is_numeric($BirthExpl[1])&&is_numeric($BirthExpl[2])) {
1082 if(pre_strlen($BirthExpl[0])=="1") { $BirthExpl[0] = "0".$BirthExpl[0]; }
1083 if(pre_strlen($BirthExpl[1])=="1") { $BirthExpl[1] = "0".$BirthExpl[1]; }
1084 if(pre_strlen($BirthExpl[0])=="2"&&pre_strlen($BirthExpl[1])=="2"&&pre_strlen($BirthExpl[2])=="4") {
1085 $BirthIn = mktime(12,12,12,$BirthExpl[0],$BirthExpl[1],$BirthExpl[2]);
1086 $tmpusrcurtime = new DateTime();
1087 $tmpusrcurtime->setTimestamp($BirthIn);
1088 $tmpusrcurtime->setTimezone($utctz);
1089 $BirthMonth=$tmpusrcurtime->format("m");
1090 $BirthDay=$tmpusrcurtime->format("d");
1091 $BirthYear=$tmpusrcurtime->format("Y"); }
1092 if(pre_strlen($BirthExpl[0])!="2"||
pre_strlen($BirthExpl[1])!="2"||
pre_strlen($BirthExpl[2])!="4") {
1093 $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
1094 if (!is_numeric($BirthExpl[0])||
!is_numeric($BirthExpl[1])||
!is_numeric($BirthExpl[2])) {
1095 $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
1096 if(count($BirthExpl)=="3"&&
1097 checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===false) {
1098 $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; }
1099 if(count($BirthExpl)!="3") { $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
1100 if($_POST['EventDay']==null) { $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; }
1101 $_SESSION['UserTimeZone'] = $_POST['YourOffSet'];
1102 $usertz = new DateTimeZone($_SESSION['UserTimeZone']);
1103 $usercurtime->setTimezone($usertz);
1104 $NewDay=$utccurtime->getTimestamp();
1105 $NewIP=$_SERVER['REMOTE_ADDR'];
1106 $_POST['Website'] = urlcheck($_POST['Website']);
1107 $_POST['iDBTimeFormat'] = convert_strftime($_POST['iDBTimeFormat']);
1108 $_POST['iDBDateFormat'] = convert_strftime($_POST['iDBDateFormat']);
1110 $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']));
1111 sql_query($querynewprofile,$SQLStat); } } } }
1112 if($_GET['act']=="userinfo") {
1113 if($_POST['update']!="now") {
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 $YourID=sql_result($result,$i,"id");
1119 $User1Email=sql_result($result,$i,"Email");
1120 $userinfoact = url_maker($exfile['profile'],$Settings['file_ext'],"act=userinfo",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
1121 $profiletitle = " ".$ThemeSet['TitleDivider']." User Info Editer";
1123 <div
class="TableMenuBorder">
1124 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
1125 <div
class="TableMenuRow1">
1126 <span style
="text-align: left;">
1127 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $userinfoact; ?>">User Info Editer
</a
>
1130 <table
class="TableMenu" style
="width: 100%;">
1131 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
1132 <tr
class="TableMenuRow1">
1133 <td
class="TableMenuColumn1"><span style
="text-align: left;">
1134 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $userinfoact; ?>">User Info Editer
</a
>
1137 <tr id
="ProfileTitle" class="TableMenuRow2">
1138 <th
class="TableMenuColumn2">User Info Editer
</th
>
1140 <tr
class="TableMenuRow3" id
="UserInfoEditor">
1141 <td
class="TableMenuColumn3">
1142 <form style
="display: inline;" method
="post" action
="<?php echo $userinfoact; ?>">
1143 <table style
="text-align: left;">
1144 <tr style
="text-align: left;">
1145 <td style
="width: 40%;"><label
class="TextBoxLabel" for="OldPass">Insert old Password
:</label
></td
>
1146 <td style
="width: 60%;"><input maxlength
="30" type
="password" class="TextBox" name
="OldPass" size
="20" id
="OldPass" /></td
>
1147 </tr
><tr style
="text-align: left;">
1148 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Password">Insert a Password
:</label
></td
>
1149 <td style
="width: 60%;"><input maxlength
="30" type
="password" class="TextBox" name
="Password" size
="20" id
="Password" /></td
>
1150 </tr
><tr style
="text-align: left;">
1151 <td style
="width: 40%;"><label
class="TextBoxLabel" for="RePassword">ReInsert a Password
:</label
></td
>
1152 <td style
="width: 60%;"><input maxlength
="30" type
="password" class="TextBox" name
="RePassword" size
="20" id
="RePassword" /></td
>
1153 </tr
><tr style
="text-align: left;">
1154 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Email">Insert Your Email
:</label
></td
>
1155 <td style
="width: 60%;"><input type
="email" class="TextBox" name
="Email" size
="20" id
="Email" value
="<?php echo $User1Email; ?>" /></td
>
1157 <table style
="text-align: left;">
1158 <tr style
="text-align: left;">
1159 <td style
="width: 100%;">
1160 <input type
="hidden" name
="act" value
="userinfo" style
="display: none;" />
1161 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
1162 <input type
="submit" class="Button" value
="Save" />
1163 <input
class="Button" type
="reset" />
1167 <tr id
="ProfileEnd" class="TableMenuRow4">
1168 <td
class="TableMenuColumn4"> </td>
1172 <?php
sql_free_result($result); }
1173 if($_POST['update']=="now") {
1174 if($_POST['act']=="userinfo"&&
1175 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
1176 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
1177 $result=sql_query($query,$SQLStat);
1178 $num=sql_num_rows($result);
1180 $OldPassword=sql_result($result,$i,"UserPassword");
1181 $OldHashType=sql_result($result,$i,"HashType");
1182 $OldJoined=sql_result($result,$i,"Joined");
1183 $OldSalt=sql_result($result,$i,"Salt");
1184 $UpdateHash = false;
1185 if($OldHashType=="ODFH") {
1186 $YourPassword = PassHash2x($_POST['OldPass']); }
1187 if($OldHashType=="IPB2") {
1188 $YourPassword = hash2xkey($_POST['OldPass'],$OldSalt); }
1189 if($OldHashType=="DF4H") {
1190 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1"); }
1191 if($OldHashType=="iDBH2") {
1192 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"md2"); }
1193 if($OldHashType=="iDBH4") {
1194 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"md4"); }
1195 if($OldHashType=="iDBH5") {
1196 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"md5"); }
1197 if($OldHashType=="iDBH") {
1198 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1"); }
1199 if($OldHashType=="iDBH1") {
1200 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1"); }
1201 if($OldHashType=="iDBH224") {
1202 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha224"); }
1203 if($OldHashType=="iDBH256") {
1204 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha256"); }
1205 if($OldHashType=="iDBH384") {
1206 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha384"); }
1207 if($OldHashType=="iDBH512") {
1208 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha512"); }
1209 if($OldHashType=="iDBH3224") {
1210 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha3-224"); }
1211 if($OldHashType=="iDBH3256") {
1212 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha3-256"); }
1213 if($OldHashType=="iDBH3384") {
1214 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha3-384"); }
1215 if($OldHashType=="iDBH3512") {
1216 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha3-512"); }
1217 if($OldHashType=="iDBHRMD128") {
1218 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd128"); }
1219 if($OldHashType=="iDBHRMD160") {
1220 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd160"); }
1221 if($OldHashType=="iDBHRMD256") {
1222 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd256"); }
1223 if($OldHashType=="iDBHRMD320") {
1224 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd320"); }
1225 if($OldHashType=="iDBCRYPT") {
1226 $YourPassword = neo_b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"bcrypt"); }
1227 if($YourPassword!=$OldPassword) { $Error="Yes"; ?
>
1228 <div
class="TableMessage" style
="text-align: center;">Your old Password did not match
.<br
/> </div>
1229 <?php
} if(pre_strlen($_POST['Password'])>"60") { $Error="Yes"; ?
>
1230 <div
class="TableMessage" style
="text-align: center;">Your password is too big
.<br
/> </div>
1231 <?php
} if(pre_strlen($_POST['OldPass'])>"60") { $Error="Yes"; ?
>
1232 <div
class="TableMessage" style
="text-align: center;">Your old password is too big
.<br
/> </div>
1233 <?php
} if ($_POST['Password']!=$_POST['RePassword']) { $Error="Yes"; ?
>
1234 <div
class="TableMessage" style
="text-align: center;">Your passwords did not match
.<br
/> </div>
1235 <?php
} if (!filter_var($_POST['Email'], FILTER_VALIDATE_EMAIL
)) { $Error="Yes"; ?
>
1236 <div
class="TableMessage" style
="text-align: center;">Your email is not a valid email address
.<br
/> </div>
1238 $NewIP=$_SERVER['REMOTE_ADDR'];
1240 if($_POST['Password']!="") {
1241 $NewSalt = salt_hmac(); $NewDay = $utccurtime->getTimestamp();
1242 if($Settings['use_hashtype']=="md2") { $iDBHash = "iDBH2";
1243 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"md2"); }
1244 if($Settings['use_hashtype']=="md4") { $iDBHash = "iDBH4";
1245 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"md4"); }
1246 if($Settings['use_hashtype']=="md5") { $iDBHash = "iDBH5";
1247 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"md5"); }
1248 if($Settings['use_hashtype']=="sha1") { $iDBHash = "iDBH";
1249 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha1"); }
1250 if($Settings['use_hashtype']=="sha224") { $iDBHash = "iDBH224";
1251 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha224"); }
1252 if($Settings['use_hashtype']=="sha256") { $iDBHash = "iDBH256";
1253 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha256"); }
1254 if($Settings['use_hashtype']=="sha384") { $iDBHash = "iDBH384";
1255 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha384"); }
1256 if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
1257 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha512"); }
1258 if($Settings['use_hashtype']=="sha3-224") { $iDBHash = "iDBH3224";
1259 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha3-224"); }
1260 if($Settings['use_hashtype']=="sha3-256") { $iDBHash = "iDBH3256";
1261 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha3-256"); }
1262 if($Settings['use_hashtype']=="sha3-384") { $iDBHash = "iDBH3384";
1263 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha3-384"); }
1264 if($Settings['use_hashtype']=="sha3-512") { $iDBHash = "iDBH3512";
1265 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha3-512"); }
1266 if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
1267 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"ripemd128"); }
1268 if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
1269 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"ripemd160"); }
1270 if($Settings['use_hashtype']=="ripemd256") { $iDBHash = "iDBHRMD256";
1271 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"ripemd256"); }
1272 if($Settings['use_hashtype']=="ripemd320") { $iDBHash = "iDBHRMD320";
1273 $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"ripemd320"); }
1274 if($Settings['use_hashtype']=="bcrypt") { $iDBHash = "iDBCRYPT";
1275 $NewPassword = neo_b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"bcrypt"); }
1276 $_SESSION['UserPass']=$NewPassword;
1277 if($cookieDomain==null) {
1278 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir); }
1279 if($cookieDomain!=null) {
1280 if($cookieSecure===true) {
1281 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain, 1); }
1282 if($cookieSecure===false) {
1283 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain, 0); } } }
1284 $_POST['Email'] = remove_spaces($_POST['Email']);
1285 if($_POST['Password']!="") {
1286 $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']));
1287 sql_query($querynewuserinfo,$SQLStat); }
1288 if($_POST['Password']=="") {
1289 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']));
1290 sql_query($querynewuserinfo,$SQLStat); } } } } }
1292 <?php
if($_POST['update']=="now"&&$_GET['act']!=null) {
1293 $profiletitle = " ".$ThemeSet['TitleDivider']." Updating Settings"; ?
>
1295 <tr id
="ProfileTitleEnd" class="TableMenuRow4">
1296 <td
class="TableMenuColumn4"> </td>
1297 </tr
></table
></div
><?php
} ?
>
1300 <div
class="DivProfile"> </div>