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-2007 Cool Dude 2k - http://intdb.sourceforge.net/
12 Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
14 $FileInfo: members.php - Last Update: 12/14/2007 SVN 137 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="members.php"||$File3Name=="/members.php") {
20 if($_GET['act']=="list") {
22 $orderlist = "order by `ID` asc";
23 if(!isset($_GET['orderby'])) { $_GET['orderby'] = null; }
24 if(!isset($_GET['sorttype'])) { $_GET['sorttype'] = null; }
25 if(!isset($_GET['ordertype'])) { $_GET['ordertype'] = null; }
26 if(!isset($_GET['orderby'])) { $_GET['orderby'] = null; }
27 if(!isset($_GET['sortby'])) { $_GET['sortby'] = null; }
28 if(!isset($_GET['gid'])) { $_GET['gid'] = null; }
29 if(!isset($_GET['groupid'])) { $_GET['groupid'] = null; }
30 if($_GET['orderby']==null) {
31 if($_GET['sortby']!=null) {
32 $_GET['orderby'] = $_GET['sortby']; } }
33 if($_GET['orderby']==null) { $_GET['orderby'] = "joined"; }
34 if($_GET['orderby']!=null) {
35 if($_GET['orderby']=="id") { $orderlist = "order by `ID`"; }
36 if($_GET['orderby']=="name") { $orderlist = "order by `Name`"; }
37 if($_GET['orderby']=="joined") { $orderlist = "order by `Joined`"; }
38 if($_GET['orderby']=="active") { $orderlist = "order by `LastActive`"; }
39 if($_GET['orderby']=="posts") { $orderlist = "order by `PostCount`"; }
40 if($_GET['orderby']=="offset") { $orderlist = "order by `TimeZone`"; } }
41 if($_GET['ordertype']==null) {
42 if($_GET['sorttype']!=null) {
43 $_GET['ordertype'] = $_GET['sorttype']; } }
44 if($_GET['ordertype']==null) { $_GET['ordertype'] = "asc"; }
45 if($_GET['ordertype']!=null) {
46 if($_GET['ordertype']=="ascending") { $orderlist .= " asc"; }
47 if($_GET['ordertype']=="descending") { $orderlist .= " desc"; }
48 if($_GET['ordertype']=="asc") { $orderlist .= " asc"; }
49 if($_GET['ordertype']=="desc") { $orderlist .= " desc"; } }
50 if(!is_numeric($_GET['gid'])) { $_GET['gid'] = null; }
51 if($_GET['gid']!=null&&$_GET['groupid']==null) { $_GET['groupid'] = $_GET['gid']; }
52 if(!is_numeric($_GET['groupid'])) { $_GET['groupid'] = null; }
53 $ggquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `Name`='%s'", array($Settings['GuestGroup']));
54 $ggresult=mysql_query($ggquery);
55 $GGroup=mysql_result($ggresult,0,"id");
56 @mysql_free_result($ggresult);
57 if($_GET['groupid']==null) {
58 $query = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `GroupID`<>%i ".$orderlist, array($GGroup)); }
59 if($_GET['groupid']!=null) {
60 $query = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `GroupID`=%i AND `GroupID`<>%i ".$orderlist, array($_GET['groupid'],$GGroup)); }
61 $result=mysql_query($query);
62 $num=mysql_num_rows($result);
63 //Start MemberList Page Code
64 if(!isset($Settings['max_memlist'])) { $Settings['max_memlist'] = 10; }
65 if($_GET['page']==null) { $_GET['page'] = 1; }
66 if($_GET['page']<=0) { $_GET['page'] = 1; }
67 $nums = $_GET['page'] * $Settings['max_memlist'];
68 if($nums>$num) { $nums = $num; }
69 $numz = $nums - $Settings['max_memlist'];
70 if($numz<=0) { $numz = 0; }
72 if($nums<$num) { $nextpage = $_GET['page'] + 1; }
73 if($nums>=$num) { $nextpage = $_GET['page']; }
74 if($numz>=$Settings['max_memlist']) { $backpage = $_GET['page'] - 1; }
75 if($_GET['page']<=1) { $backpage = 1; }
76 $pnum = $num; $l = 1; $Pages = null;
78 if($pnum>=$Settings['max_memlist']) {
79 $pnum = $pnum - $Settings['max_memlist'];
80 $Pages[$l] = $l; ++$l; }
81 if($pnum<$Settings['max_memlist']&&$pnum>0) {
82 $pnum = $pnum - $pnum;
83 $Pages[$l] = $l; ++$l; } }
84 //End MemberList Page Code
86 $pagenum=count($Pages);
87 $pagei=1; $pstring = "<div class=\"PageList\">Pages: ";
89 if($pagenum>=2) { $Pagez[2] = 2; }
90 if($pagenum>=3) { $Pagez[3] = 3; }
91 if($pagenum>=4) { $Pagez[4] = 4; }
92 if($pagenum>=5&&$_GET['page']>=4) {
93 $page_back_one = $_GET['page']-1;
94 $page_now = $_GET['page'];
95 $page_up_one = $_GET['page']+1;
96 $page_up_two = $_GET['page']+2;
97 $page_up_three = $_GET['page']+3;
98 if($pagenum>=$page_now&&$page_back_one>4) {
99 $Pagez[5] = $page_back_one; }
100 if($pagenum>=$page_now&&$page_back_one<=4) {
102 if($pagenum>=$page_now&&$page_now>4) {
103 $Pagez[6] = $page_now; }
104 if($pagenum>=$page_now&&$page_now<=4) {
106 if($pagenum>=$page_up_one) { $Pagez[7] = $page_up_one; }
107 if($pagenum>=$page_up_two) { $Pagez[8] = $page_up_two; }
108 if($pagenum>=$page_up_three) { $Pagez[9] = $page_up_three; } }
109 $pagenum=count($Pagez);
110 while ($pagei <= $pagenum) {
111 if($Pagez[$pagei]!=null) {
112 $pstring = $pstring."<a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=list&page=".$Pagez[$pagei],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">".$Pagez[$pagei]."</a> "; }
113 ++$pagei; } $pstring = $pstring."</div>";
116 <div class="Table1Border">
117 <table class="Table1">
118 <tr class="TableRow1">
119 <td class="TableRow1" colspan="7"><span style="float: left;">
120 <?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&page=".$_GET['page'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Member List</a>
121 </span><span style="float: right;"> </span></td>
123 <tr id="Member" class="TableRow2">
124 <th class="TableRow2" style="width: 5%;">ID</th>
125 <th class="TableRow2" style="width: 28%;">Name</th>
126 <th class="TableRow2" style="width: 10%;">Group</th>
127 <th class="TableRow2" style="width: 10%;">Posts</th>
128 <th class="TableRow2" style="width: 20%;">Joined</th>
129 <th class="TableRow2" style="width: 20%;">Last Active</th>
130 <th class="TableRow2" style="width: 7%;">Website</th>
134 $MemList['ID']=mysql_result($result,$i,"id");
135 $MemList['Name']=mysql_result($result,$i,"Name");
136 $MemList['Email']=mysql_result($result,$i,"Email");
137 $MemList['GroupID']=mysql_result($result,$i,"GroupID");
138 $MemList['WarnLevel']=mysql_result($result,$i,"WarnLevel");
139 $MemList['Interests']=mysql_result($result,$i,"Interests");
140 $MemList['Title']=mysql_result($result,$i,"Title");
141 $MemList['Joined']=mysql_result($result,$i,"Joined");
142 $MemList['Joined']=GMTimeChange("F j Y, g:i a",$MemList['Joined'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
143 $MemList['LastActive']=mysql_result($result,$i,"LastActive");
144 $MemList['LastActive']=GMTimeChange("F j Y, g:i a",$MemList['LastActive'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
145 $MemList['Website']=mysql_result($result,$i,"Website");
146 $MemList['Gender']=mysql_result($result,$i,"Gender");
147 $MemList['PostCount']=mysql_result($result,$i,"PostCount");
148 $MemList['TimeZone']=mysql_result($result,$i,"TimeZone");
149 $MemList['DST']=mysql_result($result,$i,"DST");
150 $MemList['IP']=mysql_result($result,$i,"IP");
151 $gquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i", array($MemList['GroupID']));
152 $gresult=mysql_query($gquery);
153 $MemList['Group']=mysql_result($gresult,0,"Name");
154 @mysql_free_result($gresult);
155 $membertitle = " ".$ThemeSet['TitleDivider']." Member List";
156 if($MemList['Group']!=$Settings['GuestGroup']) {
158 <tr class="TableRow3" id="Member<?php echo $MemList['ID']; ?>">
159 <td class="TableRow3" style="text-align: center;"><?php echo $MemList['ID']; ?></td>
160 <td class="TableRow3"> <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$MemList['ID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>"><?php echo $MemList['Name']; ?></a></td>
161 <td class="TableRow3" style="text-align: center;"><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&gid=".$MemList['GroupID']."&page=".$_GET['page'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>"><?php echo $MemList['Group']; ?></a></td>
162 <td class="TableRow3" style="text-align: center;"><?php echo $MemList['PostCount']; ?></td>
163 <td class="TableRow3" style="text-align: center;"><?php echo $MemList['Joined']; ?></td>
164 <td class="TableRow3" style="text-align: center;"><?php echo $MemList['LastActive']; ?></td>
165 <td class="TableRow3" style="text-align: center;"><a href="<?php echo $MemList['Website']; ?>" onclick="window.open(this.href);return false;">Website</a></td>
168 ++$i; } @mysql_free_result($result);
170 <tr id="MemEnd" class="TableRow4">
171 <td class="TableRow4" colspan="7"> </td>
175 if($_GET['act']=="view") {
176 $query = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `id`=%i", array($_GET['id']));
177 $result=mysql_query($query);
178 $num=mysql_num_rows($result);
180 if($num==0||$_GET['id']=="-1") { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
181 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
182 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
183 $ViewMem['ID']=mysql_result($result,$i,"id");
184 $ViewMem['Name']=mysql_result($result,$i,"Name");
185 $ViewMem['Signature']=mysql_result($result,$i,"Signature");
186 $ViewMem['Avatar']=mysql_result($result,$i,"Avatar");
187 $ViewMem['AvatarSize']=mysql_result($result,$i,"AvatarSize");
188 $ViewMem['Email']=mysql_result($result,$i,"Email");
189 $ViewMem['GroupID']=mysql_result($result,$i,"GroupID");
190 $ViewMem['WarnLevel']=mysql_result($result,$i,"WarnLevel");
191 $ViewMem['Interests']=mysql_result($result,$i,"Interests");
192 $ViewMem['Title']=mysql_result($result,$i,"Title");
193 $ViewMem['Joined']=mysql_result($result,$i,"Joined");
194 $ViewMem['Joined']=GMTimeChange("M j Y, g:i a",$ViewMem['Joined'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
195 $ViewMem['LastActive']=mysql_result($result,$i,"LastActive");
196 $ViewMem['LastActive']=GMTimeChange("M j Y, g:i a",$ViewMem['LastActive'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
197 $ViewMem['Website']=mysql_result($result,$i,"Website");
198 $ViewMem['Gender']=mysql_result($result,$i,"Gender");
199 $ViewMem['PostCount']=mysql_result($result,$i,"PostCount");
200 $ViewMem['TimeZone']=mysql_result($result,$i,"TimeZone");
201 $ViewMem['DST']=mysql_result($result,$i,"DST");
202 $ViewMem['IP']=mysql_result($result,$i,"IP");
203 $gquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i", array($ViewMem['GroupID']));
204 $gresult=mysql_query($gquery);
205 $ViewMem['Group']=mysql_result($gresult,0,"Name");
206 @mysql_free_result($gresult);
207 $membertitle = " ".$ThemeSet['TitleDivider']." ".$ViewMem['Name'];
208 if ($ViewMem['Avatar']=="http://"||$ViewMem['Avatar']==null) {
209 $ViewMem['Avatar']=$ThemeSet['NoAvatar'];
210 $ViewMem['AvatarSize']=$ThemeSet['NoAvatarSize']; }
211 $AvatarSize1=explode("x", $ViewMem['AvatarSize']);
212 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
213 $ViewMem['Signature'] = text2icons($ViewMem['Signature'],$Settings['sqltable']);
214 if($_GET['view']==null) { $_GET['view'] = "profile"; }
215 if($_GET['view']!="profile"&&$_GET['view']!="avatar"&&
216 $_GET['view']!="website"&&$_GET['view']!="homepage") { $_GET['view'] = "profile"; }
217 if($_GET['view']=="avatar") {
218 @session_write_close();
219 @header("Location: ".$ViewMem['Avatar']); }
220 if($_GET['view']=="website"||$_GET['view']=="homepage") {
221 if ($ViewMem['Website']!="http://"&&$ViewMem['Website']!=null) {
222 @session_write_close();
223 @header("Location: ".$ViewMem['Website']); }
224 if ($ViewMem['Website']=="http://"||$ViewMem['Website']==null) {
225 @session_write_close();
226 @header("Location: ".$BoardURL."index.php?act=view"); } }
228 <div class="Table1Border">
229 <table class="Table1">
230 <tr class="TableRow1">
231 <td class="TableRow1" colspan="2"><span style="float: left;">
232 <?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Viewing Profile</a>
233 </span><span style="float: right;"> </span></td>
235 <tr id="Member" class="TableRow2">
236 <th class="TableRow2" style="width: 50%;">Avatar</th>
237 <th class="TableRow2" style="width: 50%;">User Info</th>
239 <tr class="TableRow3" id="MemberProfile">
240 <td class="TableRow3">
241 <?php /* Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/ */ ?>
242 <table class="AvatarTable" style="width: 100%; height: 100px; text-align: center;">
243 <tr class="AvatarRow" style="width: 100px; height: 100px;">
244 <td class="AvatarRow" style="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
245 <img src="<?php echo $ViewMem['Avatar']; ?>" alt="<?php echo $ViewMem['Name']; ?>'s Avatar" title="<?php echo $ViewMem['Name']; ?>'s Avatar" style="border: 0px; width: <?php echo $AvatarSize1W; ?>px; height: <?php echo $AvatarSize1H; ?>px;" />
249 <div style="text-align: center;">
250 Name: <?php echo $ViewMem['Name']; ?><br />
251 Title: <?php echo $ViewMem['Title']; ?></div>
253 <td class="TableRow3">
254 User Name: <?php echo $ViewMem['Name']; ?><br />
255 User Title: <?php echo $ViewMem['Title']; ?><br />
256 User Group: <?php echo $ViewMem['Group']; ?><br />
257 User Joined: <?php echo $ViewMem['Joined']; ?><br />
258 Last Active: <?php echo $ViewMem['LastActive']; ?><br />
259 User Time: <?php echo GMTimeGet("M j Y, g:i a",$ViewMem['TimeZone'],0,$ViewMem['DST']); ?><br />
260 User Website: <a href="<?php echo $ViewMem['Website']; ?>" onclick="window.open(this.href);return false;">Website</a><br />
261 Post Count: <?php echo $ViewMem['PostCount']; ?><br />
262 Interests: <?php echo $ViewMem['Interests']; ?><br />
265 <tr class="TableRow4">
266 <td class="TableRow4" colspan="2"> </td>
269 <?php } @mysql_free_result($result);
270 if($_GET['act']=="logout") {
272 if($cookieDomain==null) {
273 @setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir);
274 @setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir);
275 @setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir);
276 @setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir); }
277 if($cookieDomain!=null) {
278 if($cookieSecure==true) {
279 @setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
280 @setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
281 @setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
282 @setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1); }
283 if($cookieSecure==false) {
284 @setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
285 @setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
286 @setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
287 @setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain); } }
288 unset($_COOKIE[session_name()]);
292 @redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
293 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
294 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
295 if($_GET['act']=="login") {
296 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
297 redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
298 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
299 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
300 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
301 $membertitle = " ".$ThemeSet['TitleDivider']." Login";
303 <div class="Table1Border">
304 <table class="Table1">
305 <tr class="TableRow1">
306 <td class="TableRow1"><span style="float: left;">
307 <?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Log in</a>
308 </span><span style="float: right;"> </span></td>
310 <tr class="TableRow2">
311 <th class="TableRow2" style="width: 100%; text-align: left;"> Inert your login info: </th>
313 <tr class="TableRow3">
314 <td class="TableRow3">
315 <form style="display: inline;" method="post" action="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login_now",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">
316 <table style="text-align: left;">
317 <tr style="text-align: left;">
318 <td style="width: 30%;"><label class="TextBoxLabel" for="username">Enter UserName: </label></td>
319 <td style="width: 70%;"><input maxlength="20" class="TextBox" id="username" type="text" name="username" /></td>
321 <td style="width: 30%;"><label class="TextBoxLabel" for="userpass">Enter Password: </label></td>
322 <td style="width: 70%;"><input maxlength="30" class="TextBox" id="userpass" type="password" name="userpass" /></td>
324 <td style="width: 30%;"><label class="TextBoxLabel" title="Store userinfo as a cookie so you dont need to login again." for="storecookie">Store as cookie?</label></td>
325 <td style="width: 70%;"><select id="storecookie" name="storecookie" class="TextBox">
326 <option value="true">Yes</option>
327 <option value="false">No</option>
330 <table style="text-align: left;">
331 <tr style="text-align: left;">
332 <td style="width: 100%;">
333 <input type="hidden" name="act" value="loginmember" style="display: none;" />
334 <input class="Button" type="submit" value="Log in" />
339 <tr class="TableRow4">
340 <td class="TableRow4"> </td>
343 <?php } } if($_POST['act']=="loginmember"&&$_GET['act']=="login_now") {
344 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
345 redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
346 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
347 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
348 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
349 $membertitle = " ".$ThemeSet['TitleDivider']." Login";
350 $REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
351 $URL['REFERER'] = $REFERERurl['host'];
352 $URL['HOST'] = $_SERVER["SERVER_NAME"];
353 $REFERERurl = null; unset($REFERERurl);
355 <div class="Table1Border">
356 <table class="Table1">
357 <tr class="TableRow1">
358 <td class="TableRow1">
359 <span style="float: left;"> <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Log in</a></span>
360 <span style="float: right;"> </span></td>
362 <tr class="TableRow2">
363 <th class="TableRow2" style="width: 100%; text-align: left;"> Login Message: </th>
365 <tr class="TableRow3">
366 <td class="TableRow3">
367 <table style="width: 100%; height: 25%; text-align: center;">
369 if (pre_strlen($_POST['userpass'])>="30") { $Error="Yes"; ?>
371 <td><span class="TableMessage">
372 <br />Your password is too big.<br />
375 <?php } if (pre_strlen($_POST['username'])>="20") { $Error="Yes"; ?>
377 <td><span class="TableMessage">
378 <br />Your user name is too big.<br />
381 <?php } if ($Settings['TestReferer']==true) {
382 if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes"; ?>
384 <td><span class="TableMessage">
385 <br />Sorry the referering url dose not match our host name.<br />
388 <?php } } $BanError = null;
390 @redirect("refresh",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false),"4"); }
392 $YourName = stripcslashes(htmlspecialchars($_POST['username'], ENT_QUOTES, $Settings['charset']));
393 //$YourName = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $YourName);
394 $YourName = @remove_spaces($YourName);
396 $querylog = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `Name`='%s'", array($YourName));
397 $resultlog=mysql_query($querylog);
398 $numlog=mysql_num_rows($resultlog);
401 $YourPassTry=mysql_result($resultlog,$i,"Password");
402 $HashType=mysql_result($resultlog,$i,"HashType");
403 $JoinedPass=mysql_result($resultlog,$i,"Joined");
404 $HashSalt=mysql_result($resultlog,$i,"Salt");
406 if($HashType=="ODFH") { $YourPassword = sha1(md5($_POST['userpass'])); }
407 if($HashType=="DF4H") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
408 if($HashType=="iDBH"||$UpdateHash!=true) { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
409 if($YourPassword==$YourPassTry) { $passright = false; }
410 if($YourPassword==$YourPassTry) { $passright = true;
411 $YourIDM=mysql_result($resultlog,$i,"id");
412 $YourNameM=mysql_result($resultlog,$i,"Name");
413 $YourPassM=mysql_result($resultlog,$i,"Password");
414 $PostCount=mysql_result($resultlog,$i,"PostCount");
415 $YourGroupM=mysql_result($resultlog,$i,"GroupID");
416 $YourBanTime=mysql_result($resultlog,$i,"BanTime");
417 $CGMTime = GMTimeStamp();
418 if($YourBanTime!=0&&$YourBanTime!=null) {
419 if($YourBanTime>=$CGMTime) { $BanError = "yes"; } }
420 $gquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i", array($YourGroupM));
421 $gresult=mysql_query($gquery);
422 $YourGroupM=mysql_result($gresult,0,"Name");
423 @mysql_free_result($gresult);
424 $YourTimeZoneM=mysql_result($resultlog,$i,"TimeZone");
425 $YourDSTM=mysql_result($resultlog,$i,"DST");
426 $JoinedDate=mysql_result($resultlog,$i,"Joined");
427 $UseTheme=mysql_result($resultlog,$i,"UseTheme");
428 $NewHashSalt = salt_hmac();
429 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha1");
430 $NewDay=GMTimeStamp();
431 $NewIP=$_SERVER['REMOTE_ADDR'];
432 if($BanError!="yes") {
433 $queryup = query("UPDATE `".$Settings['sqltable']."members` SET `Password`='%s',`HashType`='iDBH',`LastActive`=%i,`IP`='%s',`Salt`='%s' WHERE `id`=%i", array($NewPassword,$NewDay,$NewIP,$NewHashSalt,$YourIDM));
434 mysql_query($queryup);
435 @mysql_free_result($resultlog); @mysql_free_result($queryup);
436 //session_regenerate_id();
437 $_SESSION['Theme']=$UseTheme;
438 $_SESSION['MemberName']=$YourNameM;
439 $_SESSION['UserID']=$YourIDM;
440 $_SESSION['UserTimeZone']=$YourTimeZoneM;
441 $_SESSION['UserGroup']=$YourGroupM;
442 $_SESSION['UserDST']=$YourDSTM;
443 $_SESSION['UserPass']=$NewPassword;
444 $_SESSION['DBName']=$Settings['sqldb'];
445 if($_POST['storecookie']==true) {
446 if($cookieDomain==null) {
447 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir);
448 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir);
449 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir); }
450 if($cookieDomain!=null) {
451 if($cookieSecure==true) {
452 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
453 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
454 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain, 1); }
455 if($cookieSecure==false) {
456 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain);
457 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain);
458 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain); } } } }
460 //echo "Password was not right or user not found!! <_< ";
462 <?php if($passright==true&&$BanError!="yes") {
463 @redirect("refresh",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false),"3"); ?>
465 <td><span class="TableMessage">
466 <br />Welcome to the Board <?php echo $_SESSION['MemberName']; ?>. ^_^<br />
467 Click <a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">here</a> to continue to board.<br />
470 <?php } if($passright==false||$BanError=="yes") { ?>
472 <td><span class="TableMessage">
473 <br />Password was not right or user not found or user is banned!! <_<<br />
474 Click <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$exqstr['member'],$prexqstr['member']); ?>">here</a> to try again.<br />
480 <tr class="TableRow4">
481 <td class="TableRow4"> </td>
484 <?php } } if($_GET['act']=="signup") {
485 $membertitle = " ".$ThemeSet['TitleDivider']." Signing up";
486 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
487 redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
488 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
489 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
490 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
492 <div class="Table1Border">
493 <table class="Table1">
494 <tr class="TableRow1">
495 <td class="TableRow1"><span style="float: left;">
496 <?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Register</a>
497 </span><span style="float: right;"> </span></td>
499 <tr class="TableRow2">
500 <th class="TableRow2" style="width: 100%; text-align: left;"> Inert your user info: </th>
502 <tr class="TableRow3">
503 <td class="TableRow3">
504 <form style="display: inline;" method="post" action="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=makemember",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">
505 <table style="text-align: left;">
506 <tr style="text-align: left;">
507 <td style="width: 30%;"><label class="TextBoxLabel" for="Name">Insert a UserName:</label></td>
508 <td style="width: 70%;"><input maxlength="20" type="text" class="TextBox" name="Name" size="20" id="Name" /></td>
510 <td style="width: 30%;"><label class="TextBoxLabel" for="Password">Insert a Password:</label></td>
511 <td style="width: 70%;"><input maxlength="30" type="password" class="TextBox" name="Password" size="20" id="Password" /></td>
513 <td style="width: 30%;"><label class="TextBoxLabel" for="RePassword">ReInsert a Password:</label></td>
514 <td style="width: 70%;"><input maxlength="30" type="password" class="TextBox" name="RePassword" size="20" id="RePassword" /></td>
516 <td style="width: 30%;"><label class="TextBoxLabel" for="Email">Insert Your Email:</label></td>
517 <td style="width: 70%;"><input type="text" class="TextBox" name="Email" size="20" id="Email" /></td>
519 <td style="width: 30%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
520 <td style="width: 70%;"><select id="YourOffSet" name="YourOffSet" class="TextBox"><?php
521 $tsa_mem = explode(":",$Settings['DefaultTimeZone']);
522 $TimeZoneArray = array("offset" => $Settings['DefaultTimeZone'], "hour" => $tsa_mem[0], "minute" => $tsa_mem[1]);
523 $plusi = 1; $minusi = 12;
524 $plusnum = 13; $minusnum = 0;
525 while ($minusi > $minusnum) {
526 if($TimeZoneArray['hour']==-$minusi) {
527 echo "<option selected=\"selected\" value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
528 if($TimeZoneArray['hour']!=-$minusi) {
529 echo "<option value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
531 if($TimeZoneArray['hour']==0) { ?>
532 <option selected="selected" value="0">GMT +/- 0:00 hours</option>
533 <?php } if($TimeZoneArray['hour']!=0) { ?>
534 <option value="0">GMT +/- 0:00 hours</option>
536 while ($plusi < $plusnum) {
537 if($TimeZoneArray['hour']==$plusi) {
538 echo "<option selected=\"selected\" value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
539 if($TimeZoneArray['hour']!=$plusi) {
540 echo "<option value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
544 <td style="width: 50%;"><label class="TextBoxLabel" for="MinOffSet">Minute OffSet:</label></td>
545 <td style="width: 50%;"><select id="MinOffSet" name="MinOffSet" class="TextBox"><?php
546 $mini = 0; $minnum = 60;
547 while ($mini < $minnum) {
548 if(pre_strlen($mini)==2) { $showmin = $mini; }
549 if(pre_strlen($mini)==1) { $showmin = "0".$mini; }
550 if($mini==$TimeZoneArray['minute']) {
551 echo "\n<option selected=\"selected\" value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
552 if($mini!=$TimeZoneArray['minute']) {
553 echo "<option value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
557 <td style="width: 30%;"><label class="TextBoxLabel" for="DST">Is <span title="Daylight Savings Time">DST</span> / <span title="Summer Time">ST</span> on or off:</label></td>
558 <td style="width: 70%;"><select id="DST" name="DST" class="TextBox"><?php echo "\n" ?>
559 <?php if($Settings['DefaultDST']=="off"||$Settings['DefaultDST']!="on") { ?>
560 <option selected="selected" value="off">off</option><?php echo "\n" ?><option value="on">on</option>
561 <?php } if($Settings['DefaultDST']=="on") { ?>
562 <option selected="selected" value="on">on</option><?php echo "\n" ?><option value="off">off</option>
563 <?php } echo "\n" ?></select></td>
565 <td style="width: 30%;"><label class="TextBoxLabel" for="YourGender">Your Gender:</label></td>
566 <td style="width: 70%;"><select id="YourGender" name="YourGender" class="TextBox">
567 <option value="Male">Male</option>
568 <option value="Female">Female</option>
569 <option value="Unknow">Unknow</option>
572 <td style="width: 30%;"><label class="TextBoxLabel" for="Website">Insert your Website:</label></td>
573 <td style="width: 70%;"><input type="text" class="TextBox" name="Website" size="20" value="http://" id="Website" /></td>
575 <td style="width: 30%;"><label class="TextBoxLabel" for="Avatar">Insert a URL for Avatar:</label></td>
576 <td style="width: 70%;"><input type="text" class="TextBox" name="Avatar" size="20" value="http://" id="Avatar" /></td>
578 <td style="width: 30%;"><label class="TextBoxLabel" title="Store userinfo as a cookie so you dont need to login again." for="storecookie">Store as cookie?</label></td>
579 <td style="width: 70%;"><select id="storecookie" name="storecookie" class="TextBox">
580 <option value="true">Yes</option>
581 <option value="false">No</option>
585 <table style="text-align: left;">
586 <tr style="text-align: left;">
587 <td style="width: 100%;">
588 <label class="TextBoxLabel" for="TOSBox">TOS - Please read fully and check 'I agree' box ONLY if you agree to terms</label><br />
589 <textarea rows="10" cols="58" id="TOSBox" name="TOSBox" class="TextBox" readonly="readonly" accesskey="T"><?php
590 echo file_get_contents("TOS"); ?></textarea><br />
591 <input type="checkbox" class="TextBox" name="TOS" value="Agree" id="TOS" /><label class="TextBoxLabel" for="TOS">I Agree</label><br/>
592 <input type="hidden" style="display: none;" name="act" value="makemembers" />
593 <input type="submit" class="Button" value="Sign UP" />
598 <tr class="TableRow4">
599 <td class="TableRow4"> </td>
602 <?php } } if($_GET['act']=="makemember") {
603 if($_POST['act']=="makemembers") {
604 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
605 redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
606 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
607 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
608 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
609 $membertitle = " ".$ThemeSet['TitleDivider']." Signing up";
610 $REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
611 $URL['REFERER'] = $REFERERurl['host'];
612 $URL['HOST'] = $_SERVER["SERVER_NAME"];
613 $REFERERurl = null; unset($REFERERurl);
614 if(!isset($_POST['username'])) { $_POST['username'] = null; }
615 if(!isset($_POST['TOS'])) { $_POST['TOS'] = null; }
617 <div class="Table1Border">
618 <table class="Table1">
619 <tr class="TableRow1">
620 <td class="TableRow1"><span style="float: right;"> </span>
621 <a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">Register</a></td>
623 <tr class="TableRow2">
624 <th class="TableRow2" style="width: 100%; text-align: left;"> Signup Message: </th>
626 <tr class="TableRow3">
627 <td class="TableRow3">
628 <table style="width: 100%; height: 25%; text-align: center;">
629 <?php if (pre_strlen($_POST['Password'])>="30") { $Error="Yes"; ?>
631 <td><span class="TableMessage">
632 <br />Your password is too big.<br />
635 <?php } if (pre_strlen($_POST['username'])>="20") { $Error="Yes"; ?>
637 <td><span class="TableMessage">
638 <br />Your user name is too big.<br />
641 <?php } if ($_POST['Password']!=$_POST['RePassword']) { $Error="Yes"; ?>
643 <td><span class="TableMessage">
644 <br />Your passwords did not match.<br />
647 <?php } if ($Settings['TestReferer']==true) {
648 if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes"; ?>
650 <td><span class="TableMessage">
651 <br />Sorry the referering url dose not match our host name.<br />
655 $Name = stripcslashes(htmlspecialchars($_POST['Name'], ENT_QUOTES, $Settings['charset']));
656 //$Name = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Name);
657 $Name = @remove_spaces($Name);
658 $lonewolfqy=query("SELECT * FROM `".$Settings['sqltable']."restrictedwords` WHERE `RestrictedUserName`='yes'", array(null));
659 $lonewolfrt=mysql_query($lonewolfqy);
660 $lonewolfnm=mysql_num_rows($lonewolfrt);
661 $lonewolfs=0; $RMatches = null;
662 while ($lonewolfs < $lonewolfnm) {
663 $RWord=mysql_result($lonewolfrt,$lonewolfs,"Word");
664 $RCaseInsensitive=mysql_result($lonewolfrt,$lonewolfs,"CaseInsensitive");
665 if($RCaseInsensitive=="on") { $RCaseInsensitive = "yes"; }
666 if($RCaseInsensitive=="off") { $RCaseInsensitive = "no"; }
667 if($RCaseInsensitive!="yes"||$RCaseInsensitive!="no") { $RCaseInsensitive = "no"; }
668 $RWholeWord=mysql_result($lonewolfrt,$lonewolfs,"WholeWord");
669 if($RWholeWord=="on") { $RWholeWord = "yes"; }
670 if($RWholeWord=="off") { $RWholeWord = "no"; }
671 if($RWholeWord!="yes"||$RWholeWord!="no") { $RWholeWord = "no"; }
672 $RWord = preg_quote($RWord, "/");
673 if($RCaseInsensitive!="yes"&&$RWholeWord=="yes") {
674 $RMatches = preg_match("/\b(".$RWord.")\b/", $Name);
675 if($RMatches==true) { break 1; } }
676 if($RCaseInsensitive=="yes"&&$RWholeWord=="yes") {
677 $RMatches = preg_match("/\b(".$RWord.")\b/i", $Name);
678 if($RMatches==true) { break 1; } }
679 if($RCaseInsensitive!="yes"&&$RWholeWord!="yes") {
680 $RMatches = preg_match("/".$RWord."/", $Name);
681 if($RMatches==true) { break 1; } }
682 if($RCaseInsensitive=="yes"&&$RWholeWord!="yes") {
683 $RMatches = preg_match("/".$RWord."/i", $Name);
684 if($RMatches==true) { break 1; } }
685 ++$lonewolfs; } @mysql_free_result($lonewolfrt);
686 $sql_email_check = mysql_query(query("SELECT `Email` FROM `".$Settings['sqltable']."members` WHERE `Email`='%s'", array($_POST['Email'])));
687 $sql_username_check = mysql_query(query("SELECT `Name` FROM `".$Settings['sqltable']."members` WHERE `Name`='%s'", array($Name)));
688 $email_check = mysql_num_rows($sql_email_check);
689 $username_check = mysql_num_rows($sql_username_check);
690 @mysql_free_result($sql_email_check); @mysql_free_result($sql_username_check);
691 if ($_POST['TOS']!="Agree") { $Error="Yes"; ?>
693 <td><span class="TableMessage">
694 <br />You need to agree to the tos.<br />
697 <?php } if ($_POST['Name']==null) { $Error="Yes"; ?>
699 <td><span class="TableMessage">
700 <br />You need to enter a name.<br />
703 <?php } if ($_POST['Name']=="ShowMe") { $Error="Yes"; ?>
705 <td><span class="TableMessage">
706 <br />You need to enter a name.<br />
709 <?php } if ($_POST['Password']==null) { $Error="Yes"; ?>
711 <td><span class="TableMessage">
712 <br />You need to enter a password.<br />
715 <?php } if ($_POST['Email']==null) { $Error="Yes"; ?>
717 <td><span class="TableMessage">
718 <br />You need to enter a email.<br />
721 <?php } if($email_check > 0) { $Error="Yes"; ?>
723 <td><span class="TableMessage">
724 <br />Email address is already used.<br />
727 <?php } if($username_check > 0) { $Error="Yes"; ?>
729 <td><span class="TableMessage">
730 <br />User Name is already used.<br />
733 <?php } if($RMatches==true) { $Error="Yes"; ?>
735 <td><span class="TableMessage">
736 <br />This User Name is restricted to use.<br />
739 <?php } if ($Error=="Yes") {
740 @redirect("refresh",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],FALSE),"4"); ?>
742 <td><span class="TableMessage">
743 <br />Click <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$exqstr['member'],$prexqstr['member']); ?>">here</a> to try again.<br />
746 <?php } if ($Error!="Yes") {
747 $_POST['UserIP'] = $_SERVER['REMOTE_ADDR'];
748 $_POST['Group'] = $Settings['MemberGroup'];
749 $_POST['Joined'] = GMTimeStamp(); $_POST['LastActive'] = GMTimeStamp();
750 $_POST['Signature'] = ""; $_POST['Interests'] = "";
751 $_POST['Title'] = ""; $_POST['PostCount'] = "0";
752 if($Settings['AdminValidate']==true||$Settings['AdminValidate']!=false)
753 { $ValidateStats="no"; $yourgroup=$Settings['ValidateGroup']; }
754 if($Settings['AdminValidate']==false)
755 { $ValidateStats="yes"; $yourgroup=$Settings['MemberGroup']; }
756 $HashSalt = salt_hmac();
757 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha1");
758 $_GET['YourPost'] = $_POST['Signature'];
759 //require( './'.$SettDir['misc'].'HTMLTags.php');
760 $_GET['YourPost'] = htmlspecialchars($_GET['YourPost'], ENT_QUOTES, $Settings['charset']);
761 //$_GET['YourPost'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_GET['YourPost']);
762 $NewSignature = $_GET['YourPost'];
763 $_GET['YourPost'] = preg_replace("/\t+/"," ",$_GET['YourPost']);
764 $_GET['YourPost'] = preg_replace("/\s\s+/"," ",$_GET['YourPost']);
765 $_GET['YourPost'] = remove_bad_entities($_GET['YourPost']);
766 $Avatar = stripcslashes(htmlspecialchars($_POST['Avatar'], ENT_QUOTES, $Settings['charset']));
767 //$Avatar = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Avatar);
768 $Avatar = @remove_spaces($Avatar);
769 $Website = stripcslashes(htmlspecialchars($_POST['Website'], ENT_QUOTES, $Settings['charset']));
770 //$Website = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Website);
771 $Website = @remove_spaces($Website);
772 $gquerys = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `Name`='%s'", array($yourgroup));
773 $gresults=mysql_query($gquerys);
774 $yourgroup=mysql_result($gresults,0,"id");
775 @mysql_free_result($gresults);
776 $yourid = getnextid($Settings['sqltable'],"members");
777 $_POST['Interests'] = @remove_spaces($_POST['Interests']);
778 $_POST['Title'] = @remove_spaces($_POST['Title']);
779 $_POST['Email'] = @remove_spaces($_POST['Email']);
780 if(!is_numeric($_POST['YourOffSet'])) { $_POST['YourOffSet'] = "0"; }
781 if($_POST['YourOffSet']>12) { $_POST['YourOffSet'] = "12"; }
782 if($_POST['YourOffSet']<-12) { $_POST['YourOffSet'] = "-12"; }
783 if(!is_numeric($_POST['MinOffSet'])) { $_POST['MinOffSet'] = "00"; }
784 if($_POST['MinOffSet']>59) { $_POST['MinOffSet'] = "59"; }
785 if($_POST['MinOffSet']<0) { $_POST['MinOffSet'] = "00"; }
786 $_POST['YourOffSet'] = $_POST['YourOffSet'].":".$_POST['MinOffSet'];
787 $query = query("INSERT INTO `".$Settings['sqltable']."members` VALUES (".$yourid.",'%s','%s','%s','%s','%s','%s',%i,'%s','%s',%i,%i,'0','0','0','0','%s','%s','%s','%s','%s','%s',%i,'%s','%s','%s','%s','%s')", array($Name,$NewPassword,"iDBH",$_POST['Email'],$yourgroup,$ValidateStats,"0",$_POST['Interests'],$_POST['Title'],$_POST['Joined'],$_POST['LastActive'],$NewSignature,'Your Notes',$Avatar,"100x100",$Website,$_POST['YourGender'],$_POST['PostCount'],$_POST['YourOffSet'],$_POST['DST'],$Settings['DefaultTheme'],$_POST['UserIP'],$HashSalt));
789 $querylogr = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `Name`='%s' AND `Password`='%s'", array($Name,$NewPassword));
790 $resultlogr=mysql_query($querylogr);
791 $numlogr=mysql_num_rows($resultlogr);
794 $YourIDMr=mysql_result($resultlogr,$ir,"id");
795 $YourNameMr=mysql_result($resultlogr,$ir,"Name");
796 $YourGroupMr=mysql_result($resultlogr,$ir,"GroupID");
797 $gquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i", array($YourGroupMr));
798 $gresult=mysql_query($gquery);
799 $YourGroupMr=mysql_result($gresult,0,"Name");
800 @mysql_free_result($gresult);
801 $YourTimeZoneMr=mysql_result($resultlogr,$ir,"TimeZone");
802 $YourDSTMr=mysql_result($resultlogr,$ir,"DST"); }
803 @mysql_free_result($resultlogr);
804 @session_regenerate_id(true);
805 $_SESSION['Loggedin']=true;
806 $_SESSION['MemberName']=$YourNameMr;
807 $_SESSION['UserID']=$YourIDMr;
808 $_SESSION['UserTimeZone']=$YourTimeZoneMr;
809 $_SESSION['UserDST']=$YourDSTMr;
810 $_SESSION['UserGroup']=$YourGroupMr;
811 $_SESSION['UserPass']=$NewPassword;
812 $_SESSION['DBName']=$Settings['sqldb'];
813 if($_POST['storecookie']==true) {
814 if($cookieDomain==null) {
815 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir);
816 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir);
817 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir); }
818 if($cookieDomain!=null) {
819 if($cookieSecure==true) {
820 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
821 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
822 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain, 1); }
823 if($cookieSecure==false) {
824 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain);
825 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain);
826 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain); } } }
828 $SendPMtoID=$_SESSION['UserID'];
830 $PMTitle = "Welcome ".$Name.".";
831 $YourMessage = "Hello ".$Name.". Welcome to ".$Settings['board_name'].". I hope you enjoy your stay here. ^_^ ";
832 $_POST['YourDate'] = $_POST['Joined'];
833 $query = query("INSERT INTO `".$Settings['sqltable']."messenger` VALUES (null,%i,%i,'%s','%s','%s','%s',0)", array($YourPMID,$SendPMtoID,'',$PMTitle,$YourMessage,$_POST['YourDate']));
834 //mysql_query($query);
835 @redirect("refresh",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],FALSE),"3");
839 <td><span class="TableMessage">
840 <br />Welcome to the Board <?php echo $_SESSION['MemberName']; ?>. ^_^<br />
841 Click <a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">here</a> to continue to board.<br />
847 <tr class="TableRow4">
848 <td class="TableRow4"> </td>