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-2011 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: profilemain.php - Last Update: 07/14/2011 SVN 717 - 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";
35 <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
>
36 <div
class="DivNavLinks"> 
;</div
>
37 <table
class="Table3">
38 <tr style
="width: 100%; vertical-align: top;">
39 <td style
="width: 15%; vertical-align: top;">
40 <div
class="TableSMenuBorder">
41 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
42 <div
class="TableSMenuRow1">
43 <?php
echo $ThemeSet['TitleIcon']; ?
>Profile Settings
</div
>
45 <table id
="ProfileLinks" class="TableSMenu" style
="width: 100%; text-align: left; vertical-align: top;">
46 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
47 <tr
class="TableSMenuRow1">
48 <td
class="TableSMenuColumn1"><?php
echo $ThemeSet['TitleIcon']; ?
>Profile Settings
</td
>
50 <tr
class="TableSMenuRow2">
51 <td
class="TableSMenuColumn2"> 
;</td
>
52 </tr
><tr
class="TableSMenuRow3">
53 <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
>
54 </tr
><tr
class="TableSMenuRow3">
55 <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
>
56 </tr
><tr
class="TableSMenuRow3">
57 <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
>
58 </tr
><tr
class="TableSMenuRow3">
59 <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
>
60 </tr
><tr
class="TableSMenuRow4">
61 <td
class="TableSMenuColumn4"> 
;</td
>
63 <div
class="DivSMenu"> 
;</div
>
64 <div
class="TableSMenuBorder">
65 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
66 <div
class="TableSMenuRow1">
67 <?php
echo $ThemeSet['TitleIcon']; ?
>Board Settings
</div
>
69 <table
class="TableSMenu" style
="width: 100%; text-align: left; vertical-align: top;">
70 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
71 <tr
class="TableSMenuRow1">
72 <td
class="TableSMenuColumn1"><?php
echo $ThemeSet['TitleIcon']; ?
>Board Settings
</td
>
74 <tr
class="TableSMenuRow2">
75 <td
class="TableSMenuColumn2"> 
;</td
>
76 </tr
><tr
class="TableSMenuRow3">
77 <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
>
78 </tr
><tr
class="TableSMenuRow3">
79 <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
>
80 </tr
><tr
class="TableSMenuRow4">
81 <td
class="TableSMenuColumn4"> 
;</td
>
84 <td style
="width: 85%; vertical-align: top;">
85 <?php
if($_POST['update']=="now"&&$_GET['act']!=null) {
86 $updateact = url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
87 $profiletitle = " ".$ThemeSet['TitleDivider']." Updating Settings";
88 redirect("refresh",$rbasedir.url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile'],FALSE),"3");
89 $noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
90 $profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
92 <div
class="TableMenuBorder">
93 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
94 <div
class="TableMenuRow1">
95 <span style
="text-align: left;">
96 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $updateact; ?>">Updating Settings
</a
>
99 <table
class="TableMenu" style
="width: 100%;">
100 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
101 <tr
class="TableMenuRow1">
102 <td
class="TableMenuColumn1"><span style
="text-align: left;">
103 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $updateact; ?>">Updating Settings
</a
>
106 <tr id
="ProfileTitle" class="TableMenuRow2">
107 <th
class="TableMenuColumn2">Updating Settings
</th
>
109 <tr
class="TableMenuRow3" id
="ProfileUpdate">
110 <td
class="TableMenuColumn3">
111 <div style
="text-align: center;">
112 <br
/>Profile updated
<a href
="<?php echo $updateact; ?>">click here
</a
> to go back
. ^_^
<br
/> 
;</div
>
113 <?php
} if($_GET['act']=="view") {
114 if($_POST['update']!="now") {
115 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
116 $result=sql_query($query,$SQLStat);
117 $num=sql_num_rows($result);
119 $YourID=sql_result($result,$i,"id");
120 $Notes=sql_result($result,$i,"Notes");
121 $noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
122 $notepadact = $noteact; $profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
124 <div
class="TableMenuBorder">
125 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
126 <div
class="TableMenuRow1">
127 <span style
="text-align: left;">
128 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $noteact; ?>">NotePad
</a
>
131 <table
class="TableMenu" style
="width: 100%;">
132 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
133 <tr
class="TableMenuRow1">
134 <td
class="TableMenuColumn1"><span style
="text-align: left;">
135 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $noteact; ?>">NotePad
</a
>
138 <tr id
="ProfileTitle" class="TableMenuRow2">
139 <th
class="TableMenuColumn2">NotePad
</th
>
141 <tr
class="TableMenuRow3" id
="NotePadRow">
142 <td
class="TableMenuColumn3">
143 <form style
="display: inline;" method
="post" action
="<?php echo $notepadact; ?>"><div style
="text-align: center;">
144 <label
class="TextBoxLabel" for="NotePad">Your NotePad
</label
><br
/>
145 <textarea
class="TextBox" name
="NotePad" id
="NotePad" style
="width: 75%; height: 128px;" rows
="10" cols
="84"><?php
echo $Notes; ?
></textarea
>
146 <input type
="hidden" name
="act" value
="view" style
="display: none;" />
147 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
148 <br
/><input type
="submit" class="Button" value
="Save" /> 
;<input
class="Button" type
="reset" />
151 <tr id
="ProfileEnd" class="TableMenuRow4">
152 <td
class="TableMenuColumn4"> 
;</td
>
156 <?php
sql_free_result($result); }
157 if($_POST['update']=="now") {
158 if($_POST['act']=="view"&&
159 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
160 $_POST['NotePad'] = htmlspecialchars($_POST['NotePad'], ENT_QUOTES
, $Settings['charset']);
161 $_POST['NotePad'] = remove_bad_entities($_POST['NotePad']);
162 //$_POST['Signature'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Signature']);
163 //$_POST['Signature'] = remove_spaces($_POST['Signature']);
164 //$_POST['Signature'] = remove_bad_entities($_POST['Signature']);
165 /* <_< iWordFilter >_>
166 by Kazuki Przyborowski - Cool Dude 2k */
167 $katarzynaqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."wordfilter\"", array(null));
168 $katarzynart=sql_query($katarzynaqy,$SQLStat);
169 $katarzynanm=sql_num_rows($katarzynart);
171 while ($katarzynas < $katarzynanm) {
172 $Filter=sql_result($katarzynart,$katarzynas,"FilterWord");
173 $Replace=sql_result($katarzynart,$katarzynas,"Replacement");
174 $CaseInsensitive=sql_result($katarzynart,$katarzynas,"CaseInsensitive");
175 if($CaseInsensitive=="on") { $CaseInsensitive = "yes"; }
176 if($CaseInsensitive=="off") { $CaseInsensitive = "no"; }
177 if($CaseInsensitive!="yes"||
$CaseInsensitive!="no") { $CaseInsensitive = "no"; }
178 $WholeWord=sql_result($katarzynart,$katarzynas,"WholeWord");
179 if($WholeWord=="on") { $WholeWord = "yes"; }
180 if($WholeWord=="off") { $WholeWord = "no"; }
181 if($WholeWord!="yes"&&$WholeWord!="no") { $WholeWord = "no"; }
182 $Filter = preg_quote($Filter, "/");
183 if($CaseInsensitive!="yes"&&$WholeWord=="yes") {
184 $_POST['NotePad'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['NotePad']); }
185 if($CaseInsensitive=="yes"&&$WholeWord=="yes") {
186 $_POST['NotePad'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['NotePad']); }
187 if($CaseInsensitive!="yes"&&$WholeWord!="yes") {
188 $_POST['NotePad'] = preg_replace("/".$Filter."/", $Replace, $_POST['NotePad']); }
189 if($CaseInsensitive=="yes"&&$WholeWord!="yes") {
190 $_POST['NotePad'] = preg_replace("/".$Filter."/i", $Replace, $_POST['NotePad']); }
191 ++
$katarzynas; } sql_free_result($katarzynart);
192 $NewDay=GMTimeStamp();
193 $NewIP=$_SERVER['REMOTE_ADDR'];
194 $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']));
195 sql_query($querynewskin,$SQLStat); } } }
196 if($_GET['act']=="signature") {
197 if($_POST['update']!="now") {
198 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
199 $result=sql_query($query,$SQLStat);
200 $num=sql_num_rows($result);
202 $YourID=sql_result($result,$i,"id");
203 $Signature=sql_result($result,$i,"Signature");
204 $signatureact = url_maker($exfile['profile'],$Settings['file_ext'],"act=signature",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
205 $profiletitle = " ".$ThemeSet['TitleDivider']." Signature Editor";
207 <div
class="TableMenuBorder">
208 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
209 <div
class="TableMenuRow1">
210 <span style
="text-align: left;">
211 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $signatureact; ?>">Signature Editer
</a
>
214 <table
class="TableMenu" style
="width: 100%;">
215 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
216 <tr
class="TableMenuRow1">
217 <td
class="TableMenuColumn1"><span style
="text-align: left;">
218 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $signatureact; ?>">Signature Editer
</a
>
221 <tr id
="ProfileTitle" class="TableMenuRow2">
222 <th
class="TableMenuColumn2">Signature Editor
</th
>
224 <tr
class="TableMenuRow3" id
="SignatureRow">
225 <td
class="TableMenuColumn3">
226 <form style
="display: inline;" method
="post" action
="<?php echo $signatureact; ?>"><div style
="text-align: center;">
227 <label
class="TextBoxLabel" for="Signature">Your Signature
</label
><br
/>
228 <textarea
class="TextBox" name
="Signature" id
="Signature" style
="width: 75%; height: 128px;" rows
="10" cols
="84"><?php
echo $Signature; ?
></textarea
>
229 <input type
="hidden" name
="act" value
="signature" style
="display: none;" />
230 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
231 <br
/><input type
="submit" class="Button" value
="Save" /> 
;<input
class="Button" type
="reset" />
234 <tr id
="ProfileEnd" class="TableMenuRow4">
235 <td
class="TableMenuColumn4"> 
;</td
>
239 <?php
sql_free_result($result); }
240 if($_POST['update']=="now") {
241 if($_POST['act']=="signature"&&
242 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
243 $_POST['Signature'] = stripcslashes(htmlspecialchars($_POST['Signature'], ENT_QUOTES
));
244 //$_POST['Signature'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Signature']);
245 //$_POST['Signature'] = remove_spaces($_POST['Signature']);
246 $_POST['Signature'] = remove_bad_entities($_POST['Signature']);
247 /* <_< iWordFilter >_>
248 by Kazuki Przyborowski - Cool Dude 2k */
249 $katarzynaqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."wordfilter\"", array(null));
250 $katarzynart=sql_query($katarzynaqy,$SQLStat);
251 $katarzynanm=sql_num_rows($katarzynart);
253 while ($katarzynas < $katarzynanm) {
254 $Filter=sql_result($katarzynart,$katarzynas,"FilterWord");
255 $Replace=sql_result($katarzynart,$katarzynas,"Replacement");
256 $CaseInsensitive=sql_result($katarzynart,$katarzynas,"CaseInsensitive");
257 if($CaseInsensitive=="on") { $CaseInsensitive = "yes"; }
258 if($CaseInsensitive=="off") { $CaseInsensitive = "no"; }
259 if($CaseInsensitive!="yes"||
$CaseInsensitive!="no") { $CaseInsensitive = "no"; }
260 $WholeWord=sql_result($katarzynart,$katarzynas,"WholeWord");
261 if($WholeWord=="on") { $WholeWord = "yes"; }
262 if($WholeWord=="off") { $WholeWord = "no"; }
263 if($WholeWord!="yes"&&$WholeWord!="no") { $WholeWord = "no"; }
264 $Filter = preg_quote($Filter, "/");
265 if($CaseInsensitive!="yes"&&$WholeWord=="yes") {
266 $_POST['Signature'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['Signature']); }
267 if($CaseInsensitive=="yes"&&$WholeWord=="yes") {
268 $_POST['Signature'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['Signature']); }
269 if($CaseInsensitive!="yes"&&$WholeWord!="yes") {
270 $_POST['Signature'] = preg_replace("/".$Filter."/", $Replace, $_POST['Signature']); }
271 if($CaseInsensitive=="yes"&&$WholeWord!="yes") {
272 $_POST['Signature'] = preg_replace("/".$Filter."/i", $Replace, $_POST['Signature']); }
273 ++
$katarzynas; } sql_free_result($katarzynart);
274 $NewDay=GMTimeStamp();
275 $NewIP=$_SERVER['REMOTE_ADDR'];
276 $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']));
277 sql_query($querynewskin,$SQLStat); } } }
278 if($_GET['act']=="avatar") {
279 if($_POST['update']!="now") {
280 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
281 $result=sql_query($query,$SQLStat);
282 $num=sql_num_rows($result);
284 $YourID=sql_result($result,$i,"id");
285 $User1Avatar=sql_result($result,$i,"Avatar");
286 $User1AvatarSize=sql_result($result,$i,"AvatarSize");
287 $avataract = url_maker($exfile['profile'],$Settings['file_ext'],"act=avatar",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
288 $profiletitle = " ".$ThemeSet['TitleDivider']." Avatar Editor";
289 $Pre1Avatar = $User1Avatar;
290 if ($User1Avatar==null) { $User1Avatar="http://"; }
291 if ($Pre1Avatar=="http://"||
$Pre1Avatar==null||
292 strtolower($Pre1Avatar)=="noavatar") {
293 $Pre1Avatar=$ThemeSet['NoAvatar'];
294 $User1AvatarSize=$ThemeSet['NoAvatarSize']; }
295 $AvatarSize1=explode("x", $User1AvatarSize);
296 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
298 <div
class="TableMenuBorder">
299 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
300 <div
class="TableMenuRow1">
301 <span style
="text-align: left;">
302 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $avataract; ?>">Avatar Editer
</a
>
305 <table
class="TableMenu" style
="width: 100%;">
306 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
307 <tr
class="TableMenuRow1">
308 <td
class="TableMenuColumn1"><span style
="text-align: left;">
309 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $avataract; ?>">Avatar Editer
</a
>
312 <tr id
="ProfileTitle" class="TableMenuRow2">
313 <th
class="TableMenuColumn2">Avatar Editor
</th
>
315 <tr
class="TableMenuRow3" id
="AvatarEditor">
316 <td
class="TableMenuColumn3">
317 <form style
="display: inline;" method
="post" action
="<?php echo $avataract; ?>">
318 <?php
// Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/
320 <table
class="AvatarTable" style
="width: 100px; height: 100px; text-align: center;">
321 <tr
class="AvatarRow" style
="width: 100%; height: 100%;">
322 <td
class="AvatarRow" style
="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
323 <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;" />
327 <table style
="text-align: left;">
328 <tr style
="text-align: left;">
329 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Avatar">Your Avatar
</label
></td
>
330 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Avatar" id
="Avatar" value
="<?php echo $User1Avatar; ?>" size
="20" /></td
>
331 </tr
><tr style
="text-align: left;">
332 <td style
="width: 40%;"><label
class="TextBoxLabel" for="AvatarSizeW">Avatar Width
</label
></td
>
333 <td style
="width: 60%;"><select size
="1" name
="AvatarSizeW" id
="AvatarSizeW" class="TextBox">
334 <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; } ?
>
336 </tr
><tr style
="text-align: left;">
337 <td style
="width: 40%;"><label
class="TextBoxLabel" for="AvatarSizeH">Avatar Height
</label
></td
>
338 <td style
="width: 60%;"><select size
="1" name
="AvatarSizeH" id
="AvatarSizeH" class="TextBox">
339 <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; } ?
>
342 <table style
="text-align: left;">
343 <tr style
="text-align: left;">
344 <td style
="width: 100%;">
345 <input type
="hidden" name
="act" value
="avatar" style
="display: none;" />
346 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
347 <input type
="submit" class="Button" value
="Save" />
348 <input
class="Button" type
="reset" />
352 <tr id
="ProfileEnd" class="TableMenuRow4">
353 <td
class="TableMenuColumn4"> 
;</td
>
357 <?php
sql_free_result($result); }
358 if($_POST['update']=="now") {
359 if($_POST['Avatar']!=null&&$_POST['AvatarSizeW']!=null&&$_POST['AvatarSizeH']!=null&&
360 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
361 if(!is_numeric($_POST['AvatarSizeW'])) { $_POST['AvatarSizeW'] = 100; }
362 if($_POST['AvatarSizeW']>=100) { $_POST['AvatarSizeW']=100; }
363 if(!is_numeric($_POST['AvatarSizeH'])) { $_POST['AvatarSizeH'] = 100; }
364 if($_POST['AvatarSizeH']>=100) { $_POST['AvatarSizeH']=100; }
365 $fullavatarsize = $_POST['AvatarSizeW']."x".$_POST['AvatarSizeH'];
366 $_POST['Avatar'] = htmlentities($_POST['Avatar'], ENT_QUOTES
, $Settings['charset']);
367 $NewDay=GMTimeStamp();
368 $NewIP=$_SERVER['REMOTE_ADDR'];
369 $_POST['Avatar'] = remove_spaces($_POST['Avatar']);
370 $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']));
371 sql_query($querynewskin,$SQLStat); } } }
372 if($_GET['act']=="settings") {
373 if($_POST['update']!="now") {
374 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
375 $result=sql_query($query,$SQLStat);
376 $num=sql_num_rows($result);
378 $YourID=sql_result($result,$i,"id");
379 $User1TimeZone=sql_result($result,$i,"TimeZone");
380 $tsa_mem = explode(":",$User1TimeZone);
381 $TimeZoneArray = array("offset" => $User1TimeZone, "hour" => $tsa_mem[0], "minute" => $tsa_mem[1]);
382 $User1DST=sql_result($result,$i,"DST");
383 $settingsact = url_maker($exfile['profile'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
384 $profiletitle = " ".$ThemeSet['TitleDivider']." Board Settings"; ?
>
385 <div
class="TableMenuBorder">
386 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
387 <div
class="TableMenuRow1">
388 <span style
="text-align: left;">
389 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $settingsact; ?>">Board Settings
</a
>
392 <table
class="TableMenu" style
="width: 100%;">
393 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
394 <tr
class="TableMenuRow1">
395 <td
class="TableMenuColumn1"><span style
="text-align: left;">
396 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $settingsact; ?>">Board Settings
</a
>
399 <tr id
="ProfileTitle" class="TableMenuRow2">
400 <th
class="TableMenuColumn2">Board Settings
</th
>
402 <tr
class="TableMenuRow3" id
="BoardSettings">
403 <td
class="TableMenuColumn3">
404 <form style
="display: inline;" method
="post" action
="<?php echo $settingsact; ?>">
405 <table style
="text-align: left;">
406 <tr style
="text-align: left;">
407 <td style
="width: 40%;"><label
class="TextBoxLabel" for="YourOffSet">Your TimeZone
:</label
></td
>
408 <td style
="width: 60%;"><select id
="YourOffSet" name
="YourOffSet" class="TextBox">
410 $plusi = 1; $minusi = 12;
411 $plusnum = 15; $minusnum = 0;
412 while ($minusi > $minusnum) {
413 if($TimeZoneArray['hour']==-$minusi) {
414 echo "<option selected=\"selected\" value=\"-".$minusi."\">UTC - ".$minusi.":00 hours</option>\n"; }
415 if($TimeZoneArray['hour']!=-$minusi) {
416 echo "<option value=\"-".$minusi."\">UTC - ".$minusi.":00 hours</option>\n"; }
418 if($TimeZoneArray['hour']==0) { ?
>
419 <option selected
="selected" value
="0">UTC +
/- 0:00 hours
</option
>
420 <?php
} if($TimeZoneArray['hour']!=0) { ?
>
421 <option value
="0">UTC +
/- 0:00 hours
</option
>
423 while ($plusi < $plusnum) {
424 if($TimeZoneArray['hour']==$plusi) {
425 echo "<option selected=\"selected\" value=\"".$plusi."\">UTC + ".$plusi.":00 hours</option>\n"; }
426 if($TimeZoneArray['hour']!=$plusi) {
427 echo "<option value=\"".$plusi."\">UTC + ".$plusi.":00 hours</option>\n"; }
430 </tr
><tr style
="text-align: left;">
431 <td style
="width: 40%;"><label
class="TextBoxLabel" for="MinOffSet">Minute OffSet
:</label
></td
>
432 <td style
="width: 60%;"><select id
="MinOffSet" name
="MinOffSet" class="TextBox">
433 <option selected
="selected" value
="<?php echo $TimeZoneArray['minute']; ?>">Old
Value (<?php
echo "0:".$TimeZoneArray['minute']." minutes"; ?
>)</option
>
435 $mini = 0; $minnum = 60;
436 while ($mini < $minnum) {
437 if(strlen($mini)==2) { $showmin = $mini; }
438 if(strlen($mini)==1) { $showmin = "0".$mini; }
439 echo "<option value=\"".$showmin."\">0:".$showmin." minutes</option>\n";
442 </tr
><tr style
="text-align: left;">
443 <td style
="width: 40%;"><label
class="TextBoxLabel" for="skin">Pick a CSS Theme
</label
></td
>
444 <td style
="width: 60%;"><select id
="skin" name
="skin" class="TextBox">
445 <option selected
="selected" value
="<?php echo $_SESSION['Theme']; ?>">Old
Value (<?php
echo $_SESSION['Theme']; ?
>)</option
><?php
446 if($Settings['SQLThemes']=="off") {
447 $skindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
448 if ($handle = opendir($skindir)) { $dirnum = null;
449 while (false !== ($file = readdir($handle))) {
450 if ($dirnum==null) { $dirnum = 0; }
451 if (file_exists($skindir.$file."/info.php")) {
452 if ($file != "." && $file != "..") {
453 include($skindir.$file."/info.php");
454 $themelist[$dirnum] = "<option value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>";
456 closedir($handle); asort($themelist);
457 $themenum=count($themelist); $themei=0;
458 while ($themei < $themenum) {
459 echo $themelist[$themei]."\n";
461 if($Settings['SQLThemes']=="on") {
462 $sknquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."themes\" ORDER BY \"id\" ASC, \"Name\" ASC", array(null));
463 $sknresult=sql_query($sknquery,$SQLStat);
464 $sknum=sql_num_rows($sknresult);
466 while ($skni < $sknum) {
467 $ThemeInfo['Name'] = sql_result($sknresult,$skni,"Name");
468 $ThemeInfo['ThemeName'] = sql_result($sknresult,$skni,"ThemeName");
469 echo "<option value=\"".$ThemeInfo['Name']."\">".$ThemeInfo['ThemeName']."</option>\n";
472 </tr
><tr style
="text-align: left;">
473 <td style
="width: 40%;"><label
class="TextBoxLabel" for="RepliesPerPage">Replies Per Page
:</label
></td
>
474 <td style
="width: 60%;"><select id
="RepliesPerPage" name
="RepliesPerPage" class="TextBox">
475 <option selected
="selected" value
="<?php echo $Settings['max_posts']; ?>">Old
Value (<?php
echo $Settings['max_posts']; ?
>)</option
>
476 <option value
="5">5</option
>
477 <option value
="10">10</option
>
478 <option value
="15">15</option
>
479 <option value
="20">20</option
>
480 <option value
="25">25</option
>
481 <option value
="30">30</option
>
482 <option value
="30">35</option
>
483 <option value
="30">40</option
>
485 </tr
><tr style
="text-align: left;">
486 <td style
="width: 40%;"><label
class="TextBoxLabel" for="TopicsPerPage">Topics Per Page
:</label
></td
>
487 <td style
="width: 60%;"><select id
="TopicsPerPage" name
="TopicsPerPage" class="TextBox">
488 <option selected
="selected" value
="<?php echo $Settings['max_topics']; ?>">Old
Value (<?php
echo $Settings['max_topics']; ?
>)</option
>
489 <option value
="5">5</option
>
490 <option value
="10">10</option
>
491 <option value
="15">15</option
>
492 <option value
="20">20</option
>
493 <option value
="25">25</option
>
494 <option value
="30">30</option
>
495 <option value
="30">35</option
>
496 <option value
="30">40</option
>
498 </tr
><tr style
="text-align: left;">
499 <td style
="width: 40%;"><label
class="TextBoxLabel" for="MessagesPerPage">Messages
/Members Per Page
:</label
></td
>
500 <td style
="width: 60%;"><select id
="MessagesPerPage" name
="MessagesPerPage" class="TextBox">
501 <option selected
="selected" value
="<?php echo $Settings['max_pmlist']; ?>">Old
Value (<?php
echo $Settings['max_pmlist']; ?
>)</option
>
502 <option value
="5">5</option
>
503 <option value
="10">10</option
>
504 <option value
="15">15</option
>
505 <option value
="20">20</option
>
506 <option value
="25">25</option
>
507 <option value
="30">30</option
>
508 <option value
="30">35</option
>
509 <option value
="30">40</option
>
511 </tr
><tr style
="text-align: left;">
512 <td style
="width: 40%;"><label
class="TextBoxLabel" for="DST">Is
<span title
="Daylight Savings Time">DST
</span
> / <span title
="Summer Time">ST
</span
> on
or off
:</label
></td
>
513 <td style
="width: 60%;"><select id
="DST" name
="DST" class="TextBox"><?php
echo "\n" ?
>
514 <?php
if($User1DST=="off"||
$User1DST!="on") { ?
>
515 <option selected
="selected" value
="off">off
</option
><?php
echo "\n" ?
><option value
="on">on
</option
>
516 <?php
} if($User1DST=="on") { ?
>
517 <option selected
="selected" value
="on">on
</option
><?php
echo "\n" ?
><option value
="off">off
</option
>
518 <?php
} echo "\n" ?
></select
></td
>
520 <table style
="text-align: left;">
521 <tr style
="text-align: left;">
522 <td style
="width: 100%;">
523 <input type
="hidden" name
="act" value
="settings" style
="display: none;" />
524 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
525 <input type
="submit" class="Button" value
="Save" />
526 <input
class="Button" type
="reset" />
530 <tr id
="ProfileEnd" class="TableMenuRow4">
531 <td
class="TableMenuColumn4"> 
;</td
>
535 <?php
sql_free_result($result); }
536 if($_POST['update']=="now") {
537 if($_POST['act']=="settings"&&
538 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
539 $NewDay=GMTimeStamp();
540 $NewIP=$_SERVER['REMOTE_ADDR'];
541 if(!is_numeric($_POST['YourOffSet'])) { $_POST['YourOffSet'] = "0"; }
542 if(!is_numeric($_POST['MinOffSet'])) { $_POST['MinOffSet'] = "00"; }
543 if($_POST['MinOffSet']<0) { $_POST['MinOffSet'] = "00"; }
544 $_POST['YourOffSet'] = $_POST['YourOffSet'].":".$_POST['MinOffSet'];
545 $_SESSION['UserTimeZone'] = $_POST['YourOffSet'];
546 $_SESSION['UserDST'] = $_POST['DST'];
547 if(!is_numeric($_POST['RepliesPerPage'])) { $_POST['RepliesPerPage'] = "10"; }
548 if(!is_numeric($_POST['TopicsPerPage'])) { $_POST['TopicsPerPage'] = "10"; }
549 if(!is_numeric($_POST['MessagesPerPage'])) { $_POST['MessagesPerPage'] = "10"; }
550 $querynewskin = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"UseTheme\"='%s',\"TimeZone\"='%s',\"DST\"='%s',\"LastActive\"=%i,\"RepliesPerPage\"=%i,\"TopicsPerPage\"=%i,\"MessagesPerPage\"=%i,\"IP\"='%s' WHERE \"id\"=%i", array(chack_themes($_POST['skin']),$_POST['YourOffSet'],$_POST['DST'],$NewDay,$_POST['RepliesPerPage'],$_POST['TopicsPerPage'],$_POST['MessagesPerPage'],$NewIP,$_SESSION['UserID']));
551 sql_query($querynewskin,$SQLStat); } } }
552 if($_GET['act']=="profile") {
553 if($_POST['update']!="now") {
554 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
555 $result=sql_query($query,$SQLStat);
556 $num=sql_num_rows($result);
558 $YourID=sql_result($result,$i,"id");
559 $User1Interests=sql_result($result,$i,"Interests");
560 $User1Title=sql_result($result,$i,"Title");
561 $User1Website=sql_result($result,$i,"Website");
562 $User1Website = urlcheck($User1Website);
563 $User1Gender=sql_result($result,$i,"Gender");
564 $User1TimeZone=sql_result($result,$i,"TimeZone");
565 $BirthDay=sql_result($result,$i,"BirthDay");
566 $BirthMonth=sql_result($result,$i,"BirthMonth");
567 $BirthYear=sql_result($result,$i,"BirthYear");
568 $User1Birthday = "MM/DD/YYYY";
569 if($BirthMonth!=null&&$BirthDay!=null&&$BirthYear!=null) {
570 if($BirthYear=="0") { $BirthYear = "YYYY"; }
571 if($BirthDay=="0") { $BirthDay = "DD"; }
572 if($BirthMonth=="0") { $BirthMonth = "MM"; }
573 if(pre_strlen($BirthMonth)=="1") { $BirthMonth = "0".$BirthMonth; }
574 if(pre_strlen($BirthDay)=="1") { $BirthDay = "0".$BirthDay; }
575 if($BirthYear!="MM"&&$BirthYear!="DD"&&$BirthYear!="YYYY"&&
576 checkdate($BirthMonth,$BirthDay,$BirthYear)===false) {
577 $BirthMonth = "MM"; $BirthDay = "DD"; $BirthYear = "YYYY"; }
578 $User1Birthday = $BirthMonth."/".$BirthDay."/".$BirthYear; }
579 $tsa_mem = explode(":",$User1TimeZone);
580 $TimeZoneArray = array("offset" => $User1TimeZone, "hour" => $tsa_mem[0], "minute" => $tsa_mem[1]);
581 $User1DST=sql_result($result,$i,"DST");
582 $profileact = url_maker($exfile['profile'],$Settings['file_ext'],"act=profile",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
583 $profiletitle = " ".$ThemeSet['TitleDivider']." Profile Editor";
585 <div
class="TableMenuBorder">
586 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
587 <div
class="TableMenuRow1">
588 <span style
="text-align: left;">
589 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $profileact; ?>">Profile Editer
</a
>
592 <table
class="TableMenu" style
="width: 100%;">
593 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
594 <tr
class="TableMenuRow1">
595 <td
class="TableMenuColumn1"><span style
="text-align: left;">
596 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $profileact; ?>">Profile Editer
</a
>
599 <tr id
="ProfileTitle" class="TableMenuRow2">
600 <th
class="TableMenuColumn2">Profile Editor
</th
>
602 <tr
class="TableMenuRow3" id
="ProfileEditor">
603 <td
class="TableMenuColumn3">
604 <form style
="display: inline;" method
="post" action
="<?php echo $profileact; ?>">
605 <table style
="text-align: left;">
606 <tr style
="text-align: left;">
607 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Interests">Your Interests
</label
></td
>
608 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Interests" id
="Interests" value
="<?php echo $User1Interests; ?>" /></td
>
609 </tr
><tr style
="text-align: left;">
610 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Title">Your Title
</label
></td
>
611 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Title" id
="Title" value
="<?php echo $User1Title; ?>" /></td
>
612 </tr
><tr style
="text-align: left;">
613 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Website">Your Website
</label
></td
>
614 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Website" id
="Website" value
="<?php echo $User1Website; ?>" /></td
>
615 </tr
><tr style
="text-align: left;">
616 <td style
="width: 40%;"><label
class="TextBoxLabel" for="EventDay">Your Birthday
</label
></td
>
617 <td style
="width: 60%;"><input maxlength
="10" type
="text" class="TextBox" name
="EventDay" id
="EventDay" value
="<?php echo $User1Birthday; ?>" /></td
>
618 </tr
><tr style
="text-align: left;">
619 <td style
="width: 40%;"><label
class="TextBoxLabel" for="YourOffSet">Your TimeZone
:</label
></td
>
620 <td style
="width: 60%;"><select id
="YourOffSet" name
="YourOffSet" class="TextBox">
621 <option selected
="selected" value
="<?php echo $TimeZoneArray['hour']; ?>">Old
Value (<?php
echo $TimeZoneArray['hour'].":00 hours"; ?
>)</option
>
623 $plusi = 1; $minusi = 12;
624 $plusnum = 15; $minusnum = 0;
625 while ($minusi > $minusnum) {
626 echo "<option value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n";
629 <option value
="0">GMT +
/- 0:00 hours
</option
>
631 while ($plusi < $plusnum) {
632 echo "<option value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n";
635 </tr
><tr style
="text-align: left;">
636 <td style
="width: 40%;"><label
class="TextBoxLabel" for="MinOffSet">Minute OffSet
:</label
></td
>
637 <td style
="width: 60%;"><select id
="MinOffSet" name
="MinOffSet" class="TextBox">
638 <option selected
="selected" value
="<?php echo $TimeZoneArray['minute']; ?>">Old
Value (<?php
echo "0:".$TimeZoneArray['minute']." minutes"; ?
>)</option
>
640 $mini = 0; $minnum = 60;
641 while ($mini < $minnum) {
642 if(strlen($mini)==2) { $showmin = $mini; }
643 if(strlen($mini)==1) { $showmin = "0".$mini; }
644 echo "<option value=\"".$showmin."\">0:".$showmin." minutes</option>\n";
647 </tr
><tr style
="text-align: left;">
648 <td style
="width: 40%;"><label
class="TextBoxLabel" for="YourGender">Your Gender
:</label
></td
>
649 <td style
="width: 60%;"><select id
="YourGender" name
="YourGender" class="TextBox">
650 <option selected
="selected" value
="<?php echo $User1Gender; ?>">Old
Value (<?php
echo $User1Gender; ?
>)</option
>
651 <option value
="Male">Male
</option
>
652 <option value
="Female">Female
</option
>
653 <option value
="Unknown">Unknown
</option
>
655 </tr
><tr style
="text-align: left;">
656 <td style
="width: 40%;"><label
class="TextBoxLabel" for="RepliesPerPage">Replies Per Page
:</label
></td
>
657 <td style
="width: 60%;"><select id
="RepliesPerPage" name
="RepliesPerPage" class="TextBox">
658 <option selected
="selected" value
="<?php echo $Settings['max_posts']; ?>">Old
Value (<?php
echo $Settings['max_posts']; ?
>)</option
>
659 <option value
="5">5</option
>
660 <option value
="10">10</option
>
661 <option value
="15">15</option
>
662 <option value
="20">20</option
>
663 <option value
="25">25</option
>
664 <option value
="30">30</option
>
665 <option value
="30">35</option
>
666 <option value
="30">40</option
>
668 </tr
><tr style
="text-align: left;">
669 <td style
="width: 40%;"><label
class="TextBoxLabel" for="TopicsPerPage">Topics Per Page
:</label
></td
>
670 <td style
="width: 60%;"><select id
="TopicsPerPage" name
="TopicsPerPage" class="TextBox">
671 <option selected
="selected" value
="<?php echo $Settings['max_topics']; ?>">Old
Value (<?php
echo $Settings['max_topics']; ?
>)</option
>
672 <option value
="5">5</option
>
673 <option value
="10">10</option
>
674 <option value
="15">15</option
>
675 <option value
="20">20</option
>
676 <option value
="25">25</option
>
677 <option value
="30">30</option
>
678 <option value
="30">35</option
>
679 <option value
="30">40</option
>
681 </tr
><tr style
="text-align: left;">
682 <td style
="width: 40%;"><label
class="TextBoxLabel" for="MessagesPerPage">Messages
/Members Per Page
:</label
></td
>
683 <td style
="width: 60%;"><select id
="MessagesPerPage" name
="MessagesPerPage" class="TextBox">
684 <option selected
="selected" value
="<?php echo $Settings['max_pmlist']; ?>">Old
Value (<?php
echo $Settings['max_pmlist']; ?
>)</option
>
685 <option value
="5">5</option
>
686 <option value
="10">10</option
>
687 <option value
="15">15</option
>
688 <option value
="20">20</option
>
689 <option value
="25">25</option
>
690 <option value
="30">30</option
>
692 </tr
><tr style
="text-align: left;">
693 <td style
="width: 40%;"><label
class="TextBoxLabel" for="DST">Is
<span title
="Daylight Savings Time">DST
</span
> / <span title
="Summer Time">ST
</span
> on
or off
:</label
></td
>
694 <td style
="width: 60%;"><select id
="DST" name
="DST" class="TextBox"><?php
echo "\n" ?
>
695 <?php
if($User1DST=="off"||
$User1DST!="on") { ?
>
696 <option selected
="selected" value
="off">off
</option
><?php
echo "\n" ?
><option value
="on">on
</option
>
697 <?php
} if($User1DST=="on") { ?
>
698 <option selected
="selected" value
="on">on
</option
><?php
echo "\n" ?
><option value
="off">off
</option
>
699 <?php
} echo "\n" ?
></select
></td
>
701 <table style
="text-align: left;">
702 <tr style
="text-align: left;">
703 <td style
="width: 100%;">
704 <input type
="hidden" name
="act" value
="profile" style
="display: none;" />
705 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
706 <input type
="submit" class="Button" value
="Save" />
707 <input
class="Button" type
="reset" />
711 <tr id
="ProfileEnd" class="TableMenuRow4">
712 <td
class="TableMenuColumn4"> 
;</td
>
716 <?php
sql_free_result($result); }
717 if($_POST['update']=="now") {
718 if($_POST['act']=="profile"&&
719 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
720 $_POST['Interests'] = htmlspecialchars($_POST['Interests'], ENT_QUOTES
, $Settings['charset']);
721 $_POST['Interests'] = remove_spaces($_POST['Interests']);
722 $_POST['Title'] = htmlspecialchars($_POST['Title'], ENT_QUOTES
, $Settings['charset']);
723 $_POST['Title'] = remove_spaces($_POST['Title']);
724 $_POST['Website'] = htmlentities($_POST['Website'], ENT_QUOTES
, $Settings['charset']);
725 $_POST['Website'] = remove_spaces($_POST['Website']);
726 //$_POST['Signature'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Signature']);
727 //$_POST['Signature'] = remove_spaces($_POST['Signature']);
728 //$_POST['Signature'] = remove_bad_entities($_POST['Signature']);
729 /* <_< iWordFilter >_>
730 by Kazuki Przyborowski - Cool Dude 2k */
731 $katarzynaqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."wordfilter\"", array(null));
732 $katarzynart=sql_query($katarzynaqy,$SQLStat);
733 $katarzynanm=sql_num_rows($katarzynart);
735 while ($katarzynas < $katarzynanm) {
736 $Filter=sql_result($katarzynart,$katarzynas,"FilterWord");
737 $Replace=sql_result($katarzynart,$katarzynas,"Replacement");
738 $CaseInsensitive=sql_result($katarzynart,$katarzynas,"CaseInsensitive");
739 if($CaseInsensitive=="on") { $CaseInsensitive = "yes"; }
740 if($CaseInsensitive=="off") { $CaseInsensitive = "no"; }
741 if($CaseInsensitive!="yes"||
$CaseInsensitive!="no") { $CaseInsensitive = "no"; }
742 $WholeWord=sql_result($katarzynart,$katarzynas,"WholeWord");
743 if($WholeWord=="on") { $WholeWord = "yes"; }
744 if($WholeWord=="off") { $WholeWord = "no"; }
745 if($WholeWord!="yes"&&$WholeWord!="no") { $WholeWord = "no"; }
746 $Filter = preg_quote($Filter, "/");
747 if($CaseInsensitive!="yes"&&$WholeWord=="yes") {
748 $_POST['Interests'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['Interests']);
749 $_POST['Title'] = preg_replace("/\b(".$Filter.")\b/", $Replace, $_POST['Title']); }
750 if($CaseInsensitive=="yes"&&$WholeWord=="yes") {
751 $_POST['Interests'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['Interests']);
752 $_POST['Title'] = preg_replace("/\b(".$Filter.")\b/i", $Replace, $_POST['Title']); }
753 if($CaseInsensitive!="yes"&&$WholeWord!="yes") {
754 $_POST['Interests'] = preg_replace("/".$Filter."/", $Replace, $_POST['Interests']);
755 $_POST['Title'] = preg_replace("/".$Filter."/", $Replace, $_POST['Title']); }
756 if($CaseInsensitive=="yes"&&$WholeWord!="yes") {
757 $_POST['Interests'] = preg_replace("/".$Filter."/i", $Replace, $_POST['Interests']);
758 $_POST['Title'] = preg_replace("/".$Filter."/i", $Replace, $_POST['Title']); }
759 ++
$katarzynas; } sql_free_result($katarzynart);
760 if(!is_numeric($_POST['RepliesPerPage'])) { $_POST['RepliesPerPage'] = "10"; }
761 if(!is_numeric($_POST['TopicsPerPage'])) { $_POST['TopicsPerPage'] = "10"; }
762 if(!is_numeric($_POST['MessagesPerPage'])) { $_POST['MessagesPerPage'] = "10"; }
763 if(!isset($_POST['EventDay'])) { $_POST['EventDay'] = null; }
764 if($_POST['EventDay']!=null) {
765 $BirthExpl = explode("/",$_POST['EventDay']);
766 if(count($BirthExpl)!="3") {
767 $BirthExpl[0] = "0"; $BirthExpl[1] = "0"; $BirthExpl[2] = "0"; }
768 if(!is_numeric($BirthExpl[0])) { $BirthExpl[0] = "0"; }
769 if(!is_numeric($BirthExpl[1])) { $BirthExpl[1] = "0"; }
770 if(!is_numeric($BirthExpl[2])) { $BirthExpl[2] = "0"; }
771 if(count($BirthExpl)=="3"&&checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===true) {
772 if(is_numeric($BirthExpl[0])&&is_numeric($BirthExpl[1])&&is_numeric($BirthExpl[2])) {
773 if(pre_strlen($BirthExpl[0])=="1") { $BirthExpl[0] = "0".$BirthExpl[0]; }
774 if(pre_strlen($BirthExpl[1])=="1") { $BirthExpl[1] = "0".$BirthExpl[1]; }
775 if(pre_strlen($BirthExpl[0])=="2"&&pre_strlen($BirthExpl[1])=="2"&&pre_strlen($BirthExpl[2])=="4") {
776 $BirthIn = mktime(12,12,12,$BirthExpl[0],$BirthExpl[1],$BirthExpl[2]);
777 $BirthMonth=GMTimeChange("m",$BirthIn,0,0,"off");
778 $BirthDay=GMTimeChange("d",$BirthIn,0,0,"off");
779 $BirthYear=GMTimeChange("Y",$BirthIn,0,0,"off"); }
780 if(pre_strlen($BirthExpl[0])!="2"||
pre_strlen($BirthExpl[1])!="2"||
pre_strlen($BirthExpl[2])!="4") {
781 $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
782 if (!is_numeric($BirthExpl[0])||
!is_numeric($BirthExpl[1])||
!is_numeric($BirthExpl[2])) {
783 $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
784 if(count($BirthExpl)=="3"&&
785 checkdate($BirthExpl[0],$BirthExpl[1],$BirthExpl[2])===false) {
786 $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; }
787 if(count($BirthExpl)!="3") { $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } }
788 if($_POST['EventDay']==null) { $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; }
789 if(!is_numeric($_POST['YourOffSet'])) { $_POST['YourOffSet'] = "0"; }
790 if(!is_numeric($_POST['MinOffSet'])) { $_POST['MinOffSet'] = "00"; }
791 if($_POST['MinOffSet']<0) { $_POST['MinOffSet'] = "00"; }
792 $_POST['YourOffSet'] = $_POST['YourOffSet'].":".$_POST['MinOffSet'];
793 $_SESSION['UserTimeZone'] = $_POST['YourOffSet'];
794 $_SESSION['UserDST'] = $_POST['DST'];
795 $NewDay=GMTimeStamp();
796 $NewIP=$_SERVER['REMOTE_ADDR'];
797 $_POST['Website'] = urlcheck($_POST['Website']);
798 $querynewprofile = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Interests\"='%s',\"Title\"='%s',\"Website\"='%s',\"TimeZone\"='%s',\"Gender\"='%s',\"DST\"='%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['YourGender'],$_POST['DST'],$NewDay,$BirthMonth,$BirthDay,$BirthYear,$_POST['RepliesPerPage'],$_POST['TopicsPerPage'],$_POST['MessagesPerPage'],$NewIP,$_SESSION['UserID']));
799 sql_query($querynewprofile,$SQLStat); } } }
800 if($_GET['act']=="userinfo") {
801 if($_POST['update']!="now") {
802 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
803 $result=sql_query($query,$SQLStat);
804 $num=sql_num_rows($result);
806 $YourID=sql_result($result,$i,"id");
807 $User1Email=sql_result($result,$i,"Email");
808 $userinfoact = url_maker($exfile['profile'],$Settings['file_ext'],"act=userinfo",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
809 $profiletitle = " ".$ThemeSet['TitleDivider']." User Info Editer";
811 <div
class="TableMenuBorder">
812 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
813 <div
class="TableMenuRow1">
814 <span style
="text-align: left;">
815 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $userinfoact; ?>">User Info Editer
</a
>
818 <table
class="TableMenu" style
="width: 100%;">
819 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
820 <tr
class="TableMenuRow1">
821 <td
class="TableMenuColumn1"><span style
="text-align: left;">
822 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo $userinfoact; ?>">User Info Editer
</a
>
825 <tr id
="ProfileTitle" class="TableMenuRow2">
826 <th
class="TableMenuColumn2">User Info Editer
</th
>
828 <tr
class="TableMenuRow3" id
="UserInfoEditor">
829 <td
class="TableMenuColumn3">
830 <form style
="display: inline;" method
="post" action
="<?php echo $userinfoact; ?>">
831 <table style
="text-align: left;">
832 <tr style
="text-align: left;">
833 <td style
="width: 40%;"><label
class="TextBoxLabel" for="OldPass">Insert old Password
:</label
></td
>
834 <td style
="width: 60%;"><input maxlength
="30" type
="password" class="TextBox" name
="OldPass" size
="20" id
="OldPass" /></td
>
835 </tr
><tr style
="text-align: left;">
836 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Password">Insert a Password
:</label
></td
>
837 <td style
="width: 60%;"><input maxlength
="30" type
="password" class="TextBox" name
="Password" size
="20" id
="Password" /></td
>
838 </tr
><tr style
="text-align: left;">
839 <td style
="width: 40%;"><label
class="TextBoxLabel" for="RePassword">ReInsert a Password
:</label
></td
>
840 <td style
="width: 60%;"><input maxlength
="30" type
="password" class="TextBox" name
="RePassword" size
="20" id
="RePassword" /></td
>
841 </tr
><tr style
="text-align: left;">
842 <td style
="width: 40%;"><label
class="TextBoxLabel" for="Email">Insert Your Email
:</label
></td
>
843 <td style
="width: 60%;"><input type
="text" class="TextBox" name
="Email" size
="20" id
="Email" value
="<?php echo $User1Email; ?>" /></td
>
845 <table style
="text-align: left;">
846 <tr style
="text-align: left;">
847 <td style
="width: 100%;">
848 <input type
="hidden" name
="act" value
="userinfo" style
="display: none;" />
849 <input type
="hidden" name
="update" value
="now" style
="display: none;" />
850 <input type
="submit" class="Button" value
="Save" />
851 <input
class="Button" type
="reset" />
855 <tr id
="ProfileEnd" class="TableMenuRow4">
856 <td
class="TableMenuColumn4"> 
;</td
>
860 <?php
sql_free_result($result); }
861 if($_POST['update']=="now") {
862 if($_POST['act']=="userinfo"&&
863 $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
864 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
865 $result=sql_query($query,$SQLStat);
866 $num=sql_num_rows($result);
868 $OldPassword=sql_result($result,$i,"UserPassword");
869 $OldHashType=sql_result($result,$i,"HashType");
870 $OldJoined=sql_result($result,$i,"Joined");
871 $OldSalt=sql_result($result,$i,"Salt");
873 if($OldHashType=="ODFH") {
874 $YourPassword = PassHash2x($_POST['OldPass']); }
875 if($OldHashType=="IPB2") {
876 $YourPassword = hash2xkey($_POST['OldPass'],$OldSalt); }
877 if($OldHashType=="DF4H") {
878 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1"); }
879 if($OldHashType=="iDBH2") {
880 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"md2"); }
881 if($OldHashType=="iDBH4") {
882 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"md4"); }
883 if($OldHashType=="iDBH5") {
884 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"md5"); }
885 if($OldHashType=="iDBH") {
886 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1"); }
887 if($OldHashType=="iDBH1") {
888 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1"); }
889 if($OldHashType=="iDBH224") {
890 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha224"); }
891 if($OldHashType=="iDBH256") {
892 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha256"); }
893 if($OldHashType=="iDBH384") {
894 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha384"); }
895 if($OldHashType=="iDBH512") {
896 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha512"); }
897 if($OldHashType=="iDBHRMD128") {
898 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd128"); }
899 if($OldHashType=="iDBHRMD160") {
900 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd160"); }
901 if($OldHashType=="iDBHRMD256") {
902 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd256"); }
903 if($OldHashType=="iDBHRMD320") {
904 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"ripemd320"); }
905 if($OldHashType=="iDBHSALSA10") {
906 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"salsa10"); }
907 if($OldHashType=="iDBHSALSA20") {
908 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"salsa20"); }
909 if($OldHashType=="iDBHSFRU") {
910 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"snefru"); }
911 if($OldHashType=="iDBHSFRU256") {
912 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"snefru256"); }
913 if($OldHashType=="iDBHGOST") {
914 $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"gost"); }
915 if($YourPassword!=$OldPassword) { $Error="Yes"; ?
>
916 <div
class="TableMessage" style
="text-align: center;">Your old Password did not match
.<br
/> 
;</div
>
917 <?php
} if(pre_strlen($_POST['Password'])>"60") { $Error="Yes"; ?
>
918 <div
class="TableMessage" style
="text-align: center;">Your password is too big
.<br
/> 
;</div
>
919 <?php
} if(pre_strlen($_POST['OldPass'])>"60") { $Error="Yes"; ?
>
920 <div
class="TableMessage" style
="text-align: center;">Your old password is too big
.<br
/> 
;</div
>
921 <?php
} if ($_POST['Password']!=$_POST['RePassword']) { $Error="Yes"; ?
>
922 <div
class="TableMessage" style
="text-align: center;">Your passwords did not match
.<br
/> 
;</div
>
924 $NewIP=$_SERVER['REMOTE_ADDR'];
926 if($_POST['Password']!="") {
927 $NewSalt = salt_hmac(); $NewDay = GMTimeStamp();
928 if($Settings['use_hashtype']=="md2") { $iDBHash = "iDBH2";
929 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"md2"); }
930 if($Settings['use_hashtype']=="md4") { $iDBHash = "iDBH4";
931 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"md4"); }
932 if($Settings['use_hashtype']=="md5") { $iDBHash = "iDBH5";
933 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"md5"); }
934 if($Settings['use_hashtype']=="sha1") { $iDBHash = "iDBH";
935 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"sha1"); }
936 if($Settings['use_hashtype']=="sha224") { $iDBHash = "iDBH224";
937 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"sha224"); }
938 if($Settings['use_hashtype']=="sha256") { $iDBHash = "iDBH256";
939 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"sha256"); }
940 if($Settings['use_hashtype']=="sha384") { $iDBHash = "iDBH384";
941 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"sha384"); }
942 if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
943 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"sha512"); }
944 if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
945 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"ripemd128"); }
946 if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
947 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"ripemd160"); }
948 if($Settings['use_hashtype']=="ripemd256") { $iDBHash = "iDBHRMD256";
949 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"ripemd256"); }
950 if($Settings['use_hashtype']=="ripemd320") { $iDBHash = "iDBHRMD320";
951 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"ripemd320"); }
952 if($Settings['use_hashtype']=="salsa10") { $iDBHash = "iDBHSALSA10";
953 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"salsa10"); }
954 if($Settings['use_hashtype']=="salsa20") { $iDBHash = "iDBHSALSA20";
955 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"salsa20"); }
956 if($Settings['use_hashtype']=="snefru") { $iDBHash = "iDBHSFRU";
957 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"snefru"); }
958 if($Settings['use_hashtype']=="snefru256") { $iDBHash = "iDBHSFRU256";
959 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"snefru256"); }
960 if($Settings['use_hashtype']=="gost") { $iDBHash = "iDBHGOST";
961 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$NewSalt,"gost"); }
962 $_SESSION['UserPass']=$NewPassword;
963 if($cookieDomain==null) {
964 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir); }
965 if($cookieDomain!=null) {
966 if($cookieSecure===true) {
967 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain, 1); }
968 if($cookieSecure===false) {
969 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain); } } }
970 $_POST['Email'] = remove_spaces($_POST['Email']);
971 if($_POST['Password']!="") {
972 $querynewuserinfo = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"UserPassword\"='%s',\"HashType\"='iDBH',\"Email\"='%s',\"LastActive\"=%i,\"IP\"='%s',\"Salt\"='%s' WHERE \"id\"=%i", array($NewPassword,$_POST['Email'],$NewDay,$NewIP,$NewSalt,$_SESSION['UserID']));
973 sql_query($querynewuserinfo,$SQLStat); }
974 if($_POST['Password']=="") {
975 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']));
976 sql_query($querynewuserinfo,$SQLStat); } } } } }
978 <?php
if($_POST['update']=="now"&&$_GET['act']!=null) {
979 $profiletitle = " ".$ThemeSet['TitleDivider']." Updating Settings"; ?
>
981 <tr id
="ProfileTitleEnd" class="TableMenuRow4">
982 <td
class="TableMenuColumn4"> 
;</td
>
983 </tr
></table
></div
><?php
} ?
>
986 <div
class="DivProfile"> 
;</div
>