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-2008 Cool Dude 2k - http://idb.berlios.de/
12 Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
14 $FileInfo: members.php - Last Update: 12/08/2008 SVN 205 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="members.php"||$File3Name=="/members.php") {
20 if(!is_numeric($_GET['id'])) { $_GET['id'] = null; }
21 if(!is_numeric($_GET['page'])) { $_GET['page'] = null; }
22 if($_GET['act']=="list") {
24 $orderlist = "order by `ID` asc";
25 if(!isset($_GET['orderby'])) { $_GET['orderby'] = null; }
26 if(!isset($_GET['sorttype'])) { $_GET['sorttype'] = null; }
27 if(!isset($_GET['ordertype'])) { $_GET['ordertype'] = null; }
28 if(!isset($_GET['orderby'])) { $_GET['orderby'] = null; }
29 if(!isset($_GET['sortby'])) { $_GET['sortby'] = null; }
30 if(!isset($_GET['gid'])) { $_GET['gid'] = null; }
31 if(!isset($_GET['groupid'])) { $_GET['groupid'] = null; }
32 if($_GET['orderby']==null) {
33 if($_GET['sortby']!=null) {
34 $_GET['orderby'] = $_GET['sortby']; } }
35 if($_GET['orderby']==null) { $_GET['orderby'] = "joined"; }
36 if($_GET['orderby']!=null) {
37 if($_GET['orderby']=="id") { $orderlist = "order by `ID`"; }
38 if($_GET['orderby']=="name") { $orderlist = "order by `Name`"; }
39 if($_GET['orderby']=="joined") { $orderlist = "order by `Joined`"; }
40 if($_GET['orderby']=="active") { $orderlist = "order by `LastActive`"; }
41 if($_GET['orderby']=="post") { $orderlist = "order by `PostCount`"; }
42 if($_GET['orderby']=="posts") { $orderlist = "order by `PostCount`"; }
43 if($_GET['orderby']=="karma") { $orderlist = "order by `Karma`"; }
44 if($_GET['orderby']=="offset") { $orderlist = "order by `TimeZone`"; } }
45 if($_GET['ordertype']==null) {
46 if($_GET['sorttype']!=null) {
47 $_GET['ordertype'] = $_GET['sorttype']; } }
48 if($_GET['ordertype']==null) { $_GET['ordertype'] = "asc"; }
49 if($_GET['ordertype']!=null) {
50 if($_GET['ordertype']=="ascending") { $orderlist .= " asc"; }
51 if($_GET['ordertype']=="descending") { $orderlist .= " desc"; }
52 if($_GET['ordertype']=="asc") { $orderlist .= " asc"; }
53 if($_GET['ordertype']=="desc") { $orderlist .= " desc"; } }
54 if(!is_numeric($_GET['gid'])) { $_GET['gid'] = null; }
55 if($_GET['gid']!=null&&$_GET['groupid']==null) { $_GET['groupid'] = $_GET['gid']; }
56 if(!is_numeric($_GET['groupid'])) { $_GET['groupid'] = null; }
57 $ggquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `Name`='%s'", array($Settings['GuestGroup']));
58 $ggresult=mysql_query($ggquery);
59 $GGroup=mysql_result($ggresult,0,"id");
60 @mysql_free_result($ggresult);
61 //Get SQL LIMIT Number
62 $nums = $_GET['page'] * $Settings['max_memlist'];
63 $PageLimit = $nums - $Settings['max_memlist'];
64 if($PageLimit<0) { $PageLimit = 0; }
66 if($_GET['groupid']==null) {
67 $query = query("SELECT SQL_CALC_FOUND_ROWS * FROM `".$Settings['sqltable']."members` WHERE `GroupID`<>%i ".$orderlist." LIMIT %i,%i", array($GGroup,$PageLimit,$Settings['max_memlist'])); }
68 if($_GET['groupid']!=null) {
69 $query = query("SELECT SQL_CALC_FOUND_ROWS * FROM `".$Settings['sqltable']."members` WHERE `GroupID`=%i AND `GroupID`<>%i ".$orderlist." LIMIT %i,%i", array($_GET['groupid'],$GGroup,$PageLimit,$Settings['max_memlist'])); }
70 $rnquery = query("SELECT FOUND_ROWS();", array(null));
71 $result=mysql_query($query);
72 $rnresult=mysql_query($rnquery);
73 $NumberMembers = mysql_result($rnresult,0);
74 @mysql_free_result($rnresult);
75 if($NumberMembers==null) {
77 $num = $NumberMembers;
78 //Start MemberList Page Code
79 if(!isset($Settings['max_memlist'])) { $Settings['max_memlist'] = 10; }
80 if($_GET['page']==null) { $_GET['page'] = 1; }
81 if($_GET['page']<=0) { $_GET['page'] = 1; }
82 $nums = $_GET['page'] * $Settings['max_memlist'];
83 if($nums>$num) { $nums = $num; }
84 $numz = $nums - $Settings['max_memlist'];
85 if($numz<=0) { $numz = 0; }
87 if($nums<$num) { $nextpage = $_GET['page'] + 1; }
88 if($nums>=$num) { $nextpage = $_GET['page']; }
89 if($numz>=$Settings['max_memlist']) { $backpage = $_GET['page'] - 1; }
90 if($_GET['page']<=1) { $backpage = 1; }
91 $pnum = $num; $l = 1; $Pages = null;
93 if($pnum>=$Settings['max_memlist']) {
94 $pnum = $pnum - $Settings['max_memlist'];
95 $Pages[$l] = $l; ++$l; }
96 if($pnum<$Settings['max_memlist']&&$pnum>0) {
97 $pnum = $pnum - $pnum;
98 $Pages[$l] = $l; ++$l; } }
99 $nums = $_GET['page'] * $Settings['max_memlist'];
100 //End MemberList Page Code
101 $num=mysql_num_rows($result);
102 //List Page Number Code Start
103 $pagenum=count($Pages);
104 if($_GET['page']>$pagenum) {
105 $_GET['page'] = $pagenum; }
106 $pagei=0; $pstring = "<div class=\"PageList\"><span class=\"pagelink\">Pages:</span> ";
107 if($_GET['page']<4) { $Pagez[0] = null; }
108 if($_GET['page']>=4) { $Pagez[0] = "First"; }
109 if($_GET['page']>=3) {
110 $Pagez[1] = $_GET['page'] - 2; }
111 if($_GET['page']<3) {
113 if($_GET['page']>=2) {
114 $Pagez[2] = $_GET['page'] - 1; }
115 if($_GET['page']<2) {
117 $Pagez[3] = $_GET['page'];
118 if($_GET['page']<$pagenum) {
119 $Pagez[4] = $_GET['page'] + 1; }
120 if($_GET['page']>=$pagenum) {
122 $pagenext = $_GET['page'] + 1;
123 if($pagenext<$pagenum) {
124 $Pagez[5] = $_GET['page'] + 2; }
125 if($pagenext>=$pagenum) {
127 if($_GET['page']<$pagenum) { $Pagez[6] = "Last"; }
128 if($_GET['page']>=$pagenum) { $Pagez[6] = null; }
129 $pagenumi=count($Pagez);
130 if($NumberMembers==0) {
132 $pstring = $pstring."<span class=\"pagelink\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">1</a></span> "; }
133 while ($pagei < $pagenumi) {
134 if($Pagez[$pagei]!=null&&
135 $Pagez[$pagei]!="First"&&
136 $Pagez[$pagei]!="Last") {
137 if($pagei==1&$Pagez[$pagei]!=null&&$Pagez[$pagei]>=2) {
138 $Pback = $Pagez[$pagei] - 1;
139 $pstring = $pstring."<span class=\"pagelink\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=".$Pback,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\"><</a></span> "; }
141 $pstring = $pstring."<span class=\"pagelink\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=".$Pagez[$pagei],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">".$Pagez[$pagei]."</a></span> "; }
143 $pstring = $pstring."<span class=\"pagecurrent\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=".$Pagez[$pagei],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">".$Pagez[$pagei]."</a></span> "; } }
144 if($Pagez[$pagei]=="First") {
145 $pstring = $pstring."<span class=\"pagelinklast\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">«</a></span> "; }
146 if($Pagez[$pagei]=="Last") {
147 $ptestnext = $pagenext + 1;
148 if($ptestnext<$pagenum) {
150 $Pnext = $Pagez[$paget] + 1;
151 $pstring = $pstring."<span class=\"pagelink\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=".$Pnext,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">></a></span> "; }
152 $pstring = $pstring."<span class=\"pagelinklast\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=".$pagenum,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">»</a></span> "; }
153 ++$pagei; } $pstring = $pstring."</div>";
155 <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']); ?>">Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Member list</a></div>
156 <div class="DivNavLinks"> </div>
159 //List Page Number Code end
161 <div class="DivPageLinks"> </div>
162 <div class="Table1Border">
163 <?php if($ThemeSet['TableStyle']=="div") { ?>
164 <div class="TableRow1">
165 <span style="text-align: left;">
166 <?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=".$_GET['page'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Member List</a>
169 <table class="Table1">
170 <?php if($ThemeSet['TableStyle']=="table") { ?>
171 <tr class="TableRow1">
172 <td class="TableColumn1" colspan="8"><span style="text-align: left;">
173 <?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=".$_GET['page'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Member List</a>
176 <tr id="Member" class="TableRow2">
177 <th class="TableColumn2" style="width: 5%;">ID</th>
178 <th class="TableColumn2" style="width: 28%;">Name</th>
179 <th class="TableColumn2" style="width: 10%;">Group</th>
180 <th class="TableColumn2" style="width: 5%;">Posts</th>
181 <th class="TableColumn2" style="width: 5%;">Karma</th>
182 <th class="TableColumn2" style="width: 20%;">Joined</th>
183 <th class="TableColumn2" style="width: 20%;">Last Active</th>
184 <th class="TableColumn2" style="width: 7%;">Website</th>
188 $MemList['ID']=mysql_result($result,$i,"id");
189 $MemList['Name']=mysql_result($result,$i,"Name");
190 $MemList['Email']=mysql_result($result,$i,"Email");
191 $MemList['GroupID']=mysql_result($result,$i,"GroupID");
192 $MemList['WarnLevel']=mysql_result($result,$i,"WarnLevel");
193 $MemList['Interests']=mysql_result($result,$i,"Interests");
194 $MemList['Title']=mysql_result($result,$i,"Title");
195 $MemList['Joined']=mysql_result($result,$i,"Joined");
196 $MemList['Joined']=GMTimeChange("F j Y, g:i a",$MemList['Joined'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
197 $MemList['LastActive']=mysql_result($result,$i,"LastActive");
198 $MemList['LastActive']=GMTimeChange("F j Y, g:i a",$MemList['LastActive'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
199 $MemList['Website']=mysql_result($result,$i,"Website");
200 $MemList['Gender']=mysql_result($result,$i,"Gender");
201 $MemList['PostCount']=mysql_result($result,$i,"PostCount");
202 $MemList['Karma']=mysql_result($result,$i,"Karma");
203 $MemList['TimeZone']=mysql_result($result,$i,"TimeZone");
204 $MemList['DST']=mysql_result($result,$i,"DST");
205 $MemList['IP']=mysql_result($result,$i,"IP");
206 $gquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i LIMIT 1", array($MemList['GroupID']));
207 $gresult=mysql_query($gquery);
208 $MemList['Group']=mysql_result($gresult,0,"Name");
209 $GroupNamePrefix=mysql_result($gresult,0,"NamePrefix");
210 $GroupNameSuffix=mysql_result($gresult,0,"NameSuffix");
211 @mysql_free_result($gresult);
212 if(isset($GroupNamePrefix)&&$GroupNamePrefix!=null) {
213 $MemList['Name'] = $GroupNamePrefix.$MemList['Name']; }
214 if(isset($GroupNameSuffix)&&$GroupNameSuffix!=null) {
215 $MemList['Name'] = $MemList['Name'].$GroupNameSuffix; }
216 $membertitle = " ".$ThemeSet['TitleDivider']." Member List";
217 if($MemList['Group']!=$Settings['GuestGroup']) {
219 <tr class="TableRow3" id="Member<?php echo $MemList['ID']; ?>">
220 <td class="TableColumn3" style="text-align: center;"><?php echo $MemList['ID']; ?></td>
221 <td class="TableColumn3"> <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>
222 <td class="TableColumn3" 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>
223 <td class="TableColumn3" style="text-align: center;"><?php echo $MemList['PostCount']; ?></td>
224 <td class="TableColumn3" style="text-align: center;"><?php echo $MemList['Karma']; ?></td>
225 <td class="TableColumn3" style="text-align: center;"><?php echo $MemList['Joined']; ?></td>
226 <td class="TableColumn3" style="text-align: center;"><?php echo $MemList['LastActive']; ?></td>
227 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo $MemList['Website']; ?>" onclick="window.open(this.href);return false;">Website</a></td>
230 ++$i; } @mysql_free_result($result);
232 <tr id="MemEnd" class="TableRow4">
233 <td class="TableColumn4" colspan="8"> </td>
237 if($_GET['act']=="view") {
238 $query = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `id`=%i LIMIT 1", array($_GET['id']));
239 $result=mysql_query($query);
240 $num=mysql_num_rows($result);
242 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));
243 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
244 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
245 $ViewMem['ID']=mysql_result($result,$i,"id");
246 $ViewMem['Name']=mysql_result($result,$i,"Name");
247 $ViewMem['Signature']=mysql_result($result,$i,"Signature");
248 $ViewMem['Avatar']=mysql_result($result,$i,"Avatar");
249 $ViewMem['AvatarSize']=mysql_result($result,$i,"AvatarSize");
250 $ViewMem['Email']=mysql_result($result,$i,"Email");
251 $ViewMem['GroupID']=mysql_result($result,$i,"GroupID");
252 $ViewMem['WarnLevel']=mysql_result($result,$i,"WarnLevel");
253 $ViewMem['Interests']=mysql_result($result,$i,"Interests");
254 $ViewMem['Title']=mysql_result($result,$i,"Title");
255 $ViewMem['Joined']=mysql_result($result,$i,"Joined");
256 $ViewMem['Joined']=GMTimeChange("M j Y, g:i a",$ViewMem['Joined'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
257 $ViewMem['LastActive']=mysql_result($result,$i,"LastActive");
258 $ViewMem['LastActive']=GMTimeChange("M j Y, g:i a",$ViewMem['LastActive'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
259 $ViewMem['Website']=mysql_result($result,$i,"Website");
260 $ViewMem['Gender']=mysql_result($result,$i,"Gender");
261 $ViewMem['PostCount']=mysql_result($result,$i,"PostCount");
262 $ViewMem['Karma']=mysql_result($result,$i,"Karma");
263 $ViewMem['TimeZone']=mysql_result($result,$i,"TimeZone");
264 $ViewMem['DST']=mysql_result($result,$i,"DST");
265 $ViewMem['IP']=mysql_result($result,$i,"IP");
266 $gquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i LIMIT 1", array($ViewMem['GroupID']));
267 $gresult=mysql_query($gquery);
268 $ViewMem['Group']=mysql_result($gresult,0,"Name");
270 $GroupNamePrefix=mysql_result($gresult,0,"NamePrefix");
271 $GroupNameSuffix=mysql_result($gresult,0,"NameSuffix");
273 @mysql_free_result($gresult);
275 if(isset($GroupNamePrefix)&&$GroupNamePrefix!=null) {
276 $ViewMem['Name'] = $GroupNamePrefix.$ViewMem['Name']; }
277 if(isset($GroupNameSuffix)&&$GroupNameSuffix!=null) {
278 $ViewMem['Name'] = $ViewMem['Name'].$GroupNameSuffix; }
280 $membertitle = " ".$ThemeSet['TitleDivider']." ".$ViewMem['Name'];
281 if ($ViewMem['Avatar']=="http://"||$ViewMem['Avatar']==null||
282 strtolower($ViewMem['Avatar'])=="noavatar") {
283 $ViewMem['Avatar']=$ThemeSet['NoAvatar'];
284 $ViewMem['AvatarSize']=$ThemeSet['NoAvatarSize']; }
285 $AvatarSize1=explode("x", $ViewMem['AvatarSize']);
286 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
287 $ViewMem['Signature'] = text2icons($ViewMem['Signature'],$Settings['sqltable']);
288 if($_GET['view']==null) { $_GET['view'] = "profile"; }
289 if($_GET['view']!="profile"&&$_GET['view']!="avatar"&&
290 $_GET['view']!="website"&&$_GET['view']!="homepage") { $_GET['view'] = "profile"; }
291 if($_GET['view']=="avatar") {
292 @session_write_close();
293 @header("Location: ".$ViewMem['Avatar']); }
294 if($_GET['view']=="website"||$_GET['view']=="homepage") {
295 if ($ViewMem['Website']!="http://"&&$ViewMem['Website']!=null) {
296 @session_write_close();
297 @header("Location: ".$ViewMem['Website']); }
298 if ($ViewMem['Website']=="http://"||$ViewMem['Website']==null||
299 strtolower($ViewMem['Avatar'])=="noavatar") {
300 @session_write_close();
301 @header("Location: ".$BoardURL."index.php?act=view"); } }
303 <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']); ?>">Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><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></div>
304 <div class="DivNavLinks"> </div>
305 <div class="Table1Border">
306 <?php if($ThemeSet['TableStyle']=="div") { ?>
307 <div class="TableRow1">
308 <span style="text-align: left;">
309 <?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<?php echo $ThemeSet['NavLinkDivider']; ?><?php echo $ViewMem['Name']; ?></a>
312 <table class="Table1">
313 <?php if($ThemeSet['TableStyle']=="table") { ?>
314 <tr class="TableRow1">
315 <td class="TableColumn1" colspan="2"><span style="text-align: left;">
316 <?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<?php echo $ThemeSet['NavLinkDivider']; ?><?php echo $ViewMem['Name']; ?></a>
319 <tr id="Member" class="TableRow2">
320 <th class="TableColumn2" style="width: 50%;">Avatar</th>
321 <th class="TableColumn2" style="width: 50%;">User Info</th>
323 <tr class="TableRow3" id="MemberProfile">
324 <td class="TableColumn3">
325 <?php /* Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/ */ ?>
326 <table class="AvatarTable" style="width: 100%; height: 100px; text-align: center;">
327 <tr class="AvatarRow" style="width: 100px; height: 100px;">
328 <td class="AvatarRow" style="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
329 <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;" />
333 <div style="text-align: center;">
334 Name: <?php echo $ViewMem['Name']; ?><br />
335 Title: <?php echo $ViewMem['Title']; ?>
336 <?php if($GroupInfo['HasAdminCP']=="yes") { ?>
337 <br />User IP: <a onclick="window.open(this.href);return false;" href="http://ip-lookup.net/?<?php echo $ViewMem['IP']; ?>">
338 <?php echo $ViewMem['IP']; echo "</a>"; } ?></div>
340 <td class="TableColumn3">
341 User Name: <?php echo $ViewMem['Name']; ?><br />
342 User Title: <?php echo $ViewMem['Title']; ?><br />
343 User Group: <?php echo $ViewMem['Group']; ?><br />
344 User Joined: <?php echo $ViewMem['Joined']; ?><br />
345 Last Active: <?php echo $ViewMem['LastActive']; ?><br />
346 User Time: <?php echo GMTimeGet("M j Y, g:i a",$ViewMem['TimeZone'],0,$ViewMem['DST']); ?><br />
347 User Website: <a href="<?php echo $ViewMem['Website']; ?>" onclick="window.open(this.href);return false;">Website</a><br />
348 Post Count: <?php echo $ViewMem['PostCount']; ?><br />
349 Karma: <?php echo $ViewMem['Karma']; ?><br />
350 Interests: <?php echo $ViewMem['Interests']; ?><br />
353 <tr class="TableRow4">
354 <td class="TableColumn4" colspan="2"> </td>
357 <?php } @mysql_free_result($result);
358 if($_GET['act']=="logout") {
360 if($cookieDomain==null) {
361 @setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir);
362 @setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir);
363 @setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir);
364 @setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir); }
365 if($cookieDomain!=null) {
366 if($cookieSecure===true) {
367 @setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
368 @setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
369 @setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
370 @setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1); }
371 if($cookieSecure===false) {
372 @setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
373 @setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
374 @setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
375 @setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain); } }
376 unset($_COOKIE[session_name()]);
380 @redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
381 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
382 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
383 if($_GET['act']=="login") {
384 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
385 redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
386 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
387 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
388 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
389 $membertitle = " ".$ThemeSet['TitleDivider']." Login";
391 <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']); ?>">Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Login</a></div>
392 <div class="DivNavLinks"> </div>
393 <div class="Table1Border">
394 <?php if($ThemeSet['TableStyle']=="div") { ?>
395 <div class="TableRow1">
396 <span style="text-align: left;">
397 <?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>
400 <table class="Table1">
401 <?php if($ThemeSet['TableStyle']=="table") { ?>
402 <tr class="TableRow1">
403 <td class="TableColumn1"><span style="text-align: left;">
404 <?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>
407 <tr class="TableRow2">
408 <th class="TableColumn2" style="width: 100%; text-align: left;"> Inert your login info: </th>
410 <tr class="TableRow3">
411 <td class="TableColumn3">
412 <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']); ?>">
413 <table style="text-align: left;">
414 <tr style="text-align: left;">
415 <td style="width: 30%;"><label class="TextBoxLabel" for="username">Enter UserName: </label></td>
416 <td style="width: 70%;"><input maxlength="24" class="TextBox" id="username" type="text" name="username" /></td>
417 </tr><tr style="text-align: left;">
418 <td style="width: 30%;"><label class="TextBoxLabel" for="userpass">Enter Password: </label></td>
419 <td style="width: 70%;"><input maxlength="30" class="TextBox" id="userpass" type="password" name="userpass" /></td>
420 </tr><tr style="text-align: left;">
421 <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>
422 <td style="width: 70%;"><select id="storecookie" name="storecookie" class="TextBox">
423 <option value="true">Yes</option>
424 <option value="false">No</option>
427 <table style="text-align: left;">
428 <tr style="text-align: left;">
429 <td style="width: 100%;">
430 <input type="hidden" name="act" value="loginmember" style="display: none;" />
431 <input class="Button" type="submit" value="Log in" />
436 <tr class="TableRow4">
437 <td class="TableColumn4"> </td>
440 <?php } } if($_POST['act']=="loginmember"&&$_GET['act']=="login_now") {
441 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
442 redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
443 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
444 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
445 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
446 $membertitle = " ".$ThemeSet['TitleDivider']." Login";
447 $REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
448 $URL['REFERER'] = $REFERERurl['host'];
449 $URL['HOST'] = $_SERVER["SERVER_NAME"];
452 <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']); ?>">Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Login</a></div>
453 <div class="DivNavLinks"> </div>
454 <div class="Table1Border">
455 <?php if($ThemeSet['TableStyle']=="div") { ?>
456 <div class="TableRow1">
457 <span style="text-align: 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>
460 <table class="Table1">
461 <?php if($ThemeSet['TableStyle']=="table") { ?>
462 <tr class="TableRow1">
463 <td class="TableColumn1">
464 <span style="text-align: 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>
467 <tr class="TableRow2">
468 <th class="TableColumn2" style="width: 100%; text-align: left;"> Login Message: </th>
470 <tr class="TableRow3">
471 <td class="TableColumn3">
472 <table style="width: 100%; height: 25%; text-align: center;">
474 if (pre_strlen($_POST['userpass'])>="30") { $Error="Yes"; ?>
476 <td><span class="TableMessage">
477 <br />Your password is too big.<br />
480 <?php } if (pre_strlen($_POST['username'])>="24") { $Error="Yes"; ?>
482 <td><span class="TableMessage">
483 <br />Your user name is too big.<br />
486 <?php } if ($Settings['TestReferer']===true) {
487 if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes"; ?>
489 <td><span class="TableMessage">
490 <br />Sorry the referering url dose not match our host name.<br />
493 <?php } } $BanError = null;
495 @redirect("refresh",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false),"4"); }
497 $YourName = stripcslashes(htmlspecialchars($_POST['username'], ENT_QUOTES, $Settings['charset']));
498 //$YourName = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $YourName);
499 $YourName = @remove_spaces($YourName);
501 $querylog = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `Name`='%s' LIMIT 1", array($YourName));
502 $resultlog=mysql_query($querylog);
503 $numlog=mysql_num_rows($resultlog);
506 $YourPassTry=mysql_result($resultlog,$i,"Password");
507 $HashType=mysql_result($resultlog,$i,"HashType");
508 $JoinedPass=mysql_result($resultlog,$i,"Joined");
509 $HashSalt=mysql_result($resultlog,$i,"Salt");
511 if($HashType=="ODFH") { $YourPassword = sha1(md5($_POST['userpass'])); }
512 if($HashType=="DF4H") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
513 if($HashType=="iDBH"||$UpdateHash!==true) { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
514 if($YourPassword!=$YourPassTry) { $passright = false; }
515 if($YourPassword==$YourPassTry) { $passright = true;
516 $YourIDM=mysql_result($resultlog,$i,"id");
517 $YourNameM=mysql_result($resultlog,$i,"Name");
518 $YourPassM=mysql_result($resultlog,$i,"Password");
519 $PostCount=mysql_result($resultlog,$i,"PostCount");
520 $YourGroupM=mysql_result($resultlog,$i,"GroupID");
521 $YourBanTime=mysql_result($resultlog,$i,"BanTime");
522 $CGMTime = GMTimeStamp();
523 if($YourBanTime!=0&&$YourBanTime!=null) {
524 if($YourBanTime>=$CGMTime) { $BanError = "yes"; } }
525 $gquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i LIMIT 1", array($YourGroupM));
526 $gresult=mysql_query($gquery);
527 $YourGroupM=mysql_result($gresult,0,"Name");
528 @mysql_free_result($gresult);
529 $YourTimeZoneM=mysql_result($resultlog,$i,"TimeZone");
530 $YourDSTM=mysql_result($resultlog,$i,"DST");
531 $JoinedDate=mysql_result($resultlog,$i,"Joined");
532 $UseTheme=mysql_result($resultlog,$i,"UseTheme");
533 $NewHashSalt = salt_hmac();
534 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha1");
535 $NewDay=GMTimeStamp();
536 $NewIP=$_SERVER['REMOTE_ADDR'];
537 if($BanError!="yes") {
538 $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));
539 mysql_query($queryup);
540 @mysql_free_result($resultlog); @mysql_free_result($queryup);
541 //session_regenerate_id();
542 $_SESSION['Theme']=$UseTheme;
543 $_SESSION['MemberName']=$YourNameM;
544 $_SESSION['UserID']=$YourIDM;
545 $_SESSION['UserTimeZone']=$YourTimeZoneM;
546 $_SESSION['UserGroup']=$YourGroupM;
547 $_SESSION['UserDST']=$YourDSTM;
548 $_SESSION['UserPass']=$NewPassword;
549 $_SESSION['DBName']=$Settings['sqldb'];
550 if($_POST['storecookie']===true) {
551 if($cookieDomain==null) {
552 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir);
553 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir);
554 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir); }
555 if($cookieDomain!=null) {
556 if($cookieSecure===true) {
557 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
558 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
559 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain, 1); }
560 if($cookieSecure===false) {
561 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain);
562 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain);
563 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain); } } } }
565 //echo "Password was not right or user not found!! <_< ";
567 <?php if($passright===true&&$BanError!="yes") {
568 @redirect("refresh",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false),"3"); ?>
570 <td><span class="TableMessage">
571 <br />Welcome to the Board <?php echo $_SESSION['MemberName']; ?>. ^_^<br />
572 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 />
575 <?php } if($passright===false||$BanError=="yes"||$numlog<=0) { ?>
577 <td><span class="TableMessage">
578 <br />Password was not right or user not found or user is banned!! <_<<br />
579 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 />
585 <tr class="TableRow4">
586 <td class="TableColumn4"> </td>
589 <?php } } if($_GET['act']=="signup") {
590 $membertitle = " ".$ThemeSet['TitleDivider']." Signing up";
591 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
592 redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
593 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
594 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
595 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
597 <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']); ?>">Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Signup</a></div>
598 <div class="DivNavLinks"> </div>
599 <div class="Table1Border">
600 <?php if($ThemeSet['TableStyle']=="div") { ?>
601 <div class="TableRow1">
602 <span style="text-align: left;">
603 <?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>
606 <table class="Table1">
607 <?php if($ThemeSet['TableStyle']=="table") { ?>
608 <tr class="TableRow1">
609 <td class="TableColumn1"><span style="text-align: left;">
610 <?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>
613 <tr class="TableRow2">
614 <th class="TableColumn2" style="width: 100%; text-align: left;"> Inert your user info: </th>
616 <tr class="TableRow3">
617 <td class="TableColumn3">
618 <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']); ?>">
619 <table style="text-align: left;">
620 <tr style="text-align: left;">
621 <td style="width: 30%;"><label class="TextBoxLabel" for="Name">Insert a UserName:</label></td>
622 <?php if(!isset($_SESSION['GuestName'])) { ?>
623 <td style="width: 70%;"><input maxlength="24" type="text" class="TextBox" name="Name" size="20" id="Name" /></td>
624 <?php } if(isset($_SESSION['GuestName'])) { ?>
625 <td style="width: 70%;"><input maxlength="24" type="text" class="TextBox" name="Name" size="20" id="Name" value="<?php echo $_SESSION['GuestName']; ?>" /></td>
628 <td style="width: 30%;"><label class="TextBoxLabel" for="Password">Insert a Password:</label></td>
629 <td style="width: 70%;"><input maxlength="30" type="password" class="TextBox" name="Password" size="20" id="Password" /></td>
631 <td style="width: 30%;"><label class="TextBoxLabel" for="RePassword">ReInsert a Password:</label></td>
632 <td style="width: 70%;"><input maxlength="30" type="password" class="TextBox" name="RePassword" size="20" id="RePassword" /></td>
634 <td style="width: 30%;"><label class="TextBoxLabel" for="Email">Insert Your Email:</label></td>
635 <td style="width: 70%;"><input type="text" class="TextBox" name="Email" size="20" id="Email" /></td>
637 <td style="width: 30%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
638 <td style="width: 70%;"><select id="YourOffSet" name="YourOffSet" class="TextBox"><?php
639 $tsa_mem = explode(":",$Settings['DefaultTimeZone']);
640 $TimeZoneArray = array("offset" => $Settings['DefaultTimeZone'], "hour" => $tsa_mem[0], "minute" => $tsa_mem[1]);
641 $plusi = 1; $minusi = 12;
642 $plusnum = 13; $minusnum = 0;
643 while ($minusi > $minusnum) {
644 if($TimeZoneArray['hour']==-$minusi) {
645 echo "<option selected=\"selected\" value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
646 if($TimeZoneArray['hour']!=-$minusi) {
647 echo "<option value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
649 if($TimeZoneArray['hour']==0) { ?>
650 <option selected="selected" value="0">GMT +/- 0:00 hours</option>
651 <?php } if($TimeZoneArray['hour']!=0) { ?>
652 <option value="0">GMT +/- 0:00 hours</option>
654 while ($plusi < $plusnum) {
655 if($TimeZoneArray['hour']==$plusi) {
656 echo "<option selected=\"selected\" value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
657 if($TimeZoneArray['hour']!=$plusi) {
658 echo "<option value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
662 <td style="width: 50%;"><label class="TextBoxLabel" for="MinOffSet">Minute OffSet:</label></td>
663 <td style="width: 50%;"><select id="MinOffSet" name="MinOffSet" class="TextBox"><?php
664 $mini = 0; $minnum = 60;
665 while ($mini < $minnum) {
666 if(pre_strlen($mini)==2) { $showmin = $mini; }
667 if(pre_strlen($mini)==1) { $showmin = "0".$mini; }
668 if($mini==$TimeZoneArray['minute']) {
669 echo "\n<option selected=\"selected\" value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
670 if($mini!=$TimeZoneArray['minute']) {
671 echo "<option value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
675 <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>
676 <td style="width: 70%;"><select id="DST" name="DST" class="TextBox"><?php echo "\n" ?>
677 <?php if($Settings['DefaultDST']=="off"||$Settings['DefaultDST']!="on") { ?>
678 <option selected="selected" value="off">off</option><?php echo "\n" ?><option value="on">on</option>
679 <?php } if($Settings['DefaultDST']=="on") { ?>
680 <option selected="selected" value="on">on</option><?php echo "\n" ?><option value="off">off</option>
681 <?php } echo "\n" ?></select></td>
683 <td style="width: 30%;"><label class="TextBoxLabel" for="YourGender">Your Gender:</label></td>
684 <td style="width: 70%;"><select id="YourGender" name="YourGender" class="TextBox">
685 <option value="Male">Male</option>
686 <option value="Female">Female</option>
687 <option value="Unknow">Unknow</option>
690 <td style="width: 30%;"><label class="TextBoxLabel" for="Website">Insert your Website:</label></td>
691 <td style="width: 70%;"><input type="text" class="TextBox" name="Website" size="20" value="http://" id="Website" /></td>
693 <td style="width: 30%;"><label class="TextBoxLabel" for="Avatar">Insert a URL for Avatar:</label></td>
694 <td style="width: 70%;"><input type="text" class="TextBox" name="Avatar" size="20" value="http://" id="Avatar" /></td>
696 <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>
697 <td style="width: 70%;"><select id="storecookie" name="storecookie" class="TextBox">
698 <option value="true">Yes</option>
699 <option value="false">No</option>
703 <table style="text-align: left;">
704 <tr style="text-align: left;">
705 <td style="width: 100%;">
706 <label class="TextBoxLabel" for="TOSBox">TOS - Please read fully and check 'I agree' box ONLY if you agree to terms</label><br />
707 <textarea rows="10" cols="58" id="TOSBox" name="TOSBox" class="TextBox" readonly="readonly" accesskey="T"><?php
708 echo file_get_contents("TOS"); ?></textarea><br />
709 <input type="checkbox" class="TextBox" name="TOS" value="Agree" id="TOS" /><label class="TextBoxLabel" for="TOS">I Agree</label>
710 <?php if($Settings['use_captcha']!="on") { ?><br />
711 <?php } if($Settings['use_captcha']=="on") { ?>
713 <tr style="text-align: left;">
714 <td style="width: 100%;">
715 <label class="TextBoxLabel" for="signcode"><img src="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=MkCaptcha",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" alt="CAPTCHA Code" title="CAPTCHA Code" /></label><br />
716 <input maxlength="25" type="text" class="TextBox" name="signcode" size="20" id="signcode" value="Enter SignCode" /><br /><?php } ?>
717 <input type="hidden" style="display: none;" name="act" value="makemembers" />
718 <input type="submit" class="Button" value="Sign UP" />
724 <tr class="TableRow4">
725 <td class="TableColumn4"> </td>
728 <?php } } if($_GET['act']=="makemember") {
729 if($_POST['act']=="makemembers") {
730 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
731 redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
732 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
733 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
734 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
735 $membertitle = " ".$ThemeSet['TitleDivider']." Signing up";
736 $REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
737 $URL['REFERER'] = $REFERERurl['host'];
738 $URL['HOST'] = $_SERVER["SERVER_NAME"];
740 if(!isset($_POST['username'])) { $_POST['username'] = null; }
741 if(!isset($_POST['TOS'])) { $_POST['TOS'] = null; }
742 if($Settings['use_captcha']=="on") {
743 require($SettDir['inc']."captcha.php"); }
745 <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']); ?>">Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Signup</a></div>
746 <div class="DivNavLinks"> </div>
747 <div class="Table1Border">
748 <?php if($ThemeSet['TableStyle']=="div") { ?>
749 <div class="TableRow1">
750 <span style="text-align: left;">
751 <a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">Register</a></span></div>
753 <table class="Table1">
754 <?php if($ThemeSet['TableStyle']=="table") { ?>
755 <tr class="TableRow1">
756 <td class="TableColumn1"><span style="text-align: left;">
757 <a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">Register</a></span></td>
759 <tr class="TableRow2">
760 <th class="TableColumn2" style="width: 100%; text-align: left;"> Signup Message: </th>
762 <tr class="TableRow3">
763 <td class="TableColumn3">
764 <table style="width: 100%; height: 25%; text-align: center;">
765 <?php if (pre_strlen($_POST['Password'])>="30") { $Error="Yes"; ?>
767 <td><span class="TableMessage">
768 <br />Your password is too big.<br />
771 <?php } if (pre_strlen($_POST['username'])>="24") { $Error="Yes"; ?>
773 <td><span class="TableMessage">
774 <br />Your user name is too big.<br />
777 <?php } if ($_POST['Password']!=$_POST['RePassword']) { $Error="Yes"; ?>
779 <td><span class="TableMessage">
780 <br />Your passwords did not match.<br />
783 <?php } if($Settings['use_captcha']=="on") {
784 if (PhpCaptcha::Validate($_POST['signcode'])) {
785 //echo 'Valid code entered';
786 } else { $Error="Yes"; ?>
788 <td><span class="TableMessage">
789 <br />Invalid code entered<br />
792 <?php } } if ($Settings['TestReferer']===true) {
793 if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes"; ?>
795 <td><span class="TableMessage">
796 <br />Sorry the referering url dose not match our host name.<br />
800 $Name = stripcslashes(htmlspecialchars($_POST['Name'], ENT_QUOTES, $Settings['charset']));
801 //$Name = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Name);
802 $Name = @remove_spaces($Name);
803 $lonewolfqy=query("SELECT * FROM `".$Settings['sqltable']."restrictedwords` WHERE `RestrictedUserName`='yes'", array(null));
804 $lonewolfrt=mysql_query($lonewolfqy);
805 $lonewolfnm=mysql_num_rows($lonewolfrt);
806 $lonewolfs=0; $RMatches = null;
807 while ($lonewolfs < $lonewolfnm) {
808 $RWord=mysql_result($lonewolfrt,$lonewolfs,"Word");
809 $RCaseInsensitive=mysql_result($lonewolfrt,$lonewolfs,"CaseInsensitive");
810 if($RCaseInsensitive=="on") { $RCaseInsensitive = "yes"; }
811 if($RCaseInsensitive=="off") { $RCaseInsensitive = "no"; }
812 if($RCaseInsensitive!="yes"||$RCaseInsensitive!="no") { $RCaseInsensitive = "no"; }
813 $RWholeWord=mysql_result($lonewolfrt,$lonewolfs,"WholeWord");
814 if($RWholeWord=="on") { $RWholeWord = "yes"; }
815 if($RWholeWord=="off") { $RWholeWord = "no"; }
816 if($RWholeWord!="yes"||$RWholeWord!="no") { $RWholeWord = "no"; }
817 $RWord = preg_quote($RWord, "/");
818 if($RCaseInsensitive!="yes"&&$RWholeWord=="yes") {
819 $RMatches = preg_match("/\b(".$RWord.")\b/", $Name);
820 if($RMatches==true) { break 1; } }
821 if($RCaseInsensitive=="yes"&&$RWholeWord=="yes") {
822 $RMatches = preg_match("/\b(".$RWord.")\b/i", $Name);
823 if($RMatches==true) { break 1; } }
824 if($RCaseInsensitive!="yes"&&$RWholeWord!="yes") {
825 $RMatches = preg_match("/".$RWord."/", $Name);
826 if($RMatches==true) { break 1; } }
827 if($RCaseInsensitive=="yes"&&$RWholeWord!="yes") {
828 $RMatches = preg_match("/".$RWord."/i", $Name);
829 if($RMatches==true) { break 1; } }
830 ++$lonewolfs; } @mysql_free_result($lonewolfrt);
831 $sql_email_check = mysql_query(query("SELECT `Email` FROM `".$Settings['sqltable']."members` WHERE `Email`='%s'", array($_POST['Email'])));
832 $sql_username_check = mysql_query(query("SELECT `Name` FROM `".$Settings['sqltable']."members` WHERE `Name`='%s'", array($Name)));
833 $email_check = mysql_num_rows($sql_email_check);
834 $username_check = mysql_num_rows($sql_username_check);
835 @mysql_free_result($sql_email_check); @mysql_free_result($sql_username_check);
836 if ($_POST['TOS']!="Agree") { $Error="Yes"; ?>
838 <td><span class="TableMessage">
839 <br />You need to agree to the tos.<br />
842 <?php } if ($_POST['Name']==null) { $Error="Yes"; ?>
844 <td><span class="TableMessage">
845 <br />You need to enter a name.<br />
848 <?php } if ($_POST['Name']=="ShowMe") { $Error="Yes"; ?>
850 <td><span class="TableMessage">
851 <br />You need to enter a name.<br />
854 <?php } if ($_POST['Password']==null) { $Error="Yes"; ?>
856 <td><span class="TableMessage">
857 <br />You need to enter a password.<br />
860 <?php } if ($_POST['Email']==null) { $Error="Yes"; ?>
862 <td><span class="TableMessage">
863 <br />You need to enter a email.<br />
866 <?php } if($email_check > 0) { $Error="Yes"; ?>
868 <td><span class="TableMessage">
869 <br />Email address is already used.<br />
872 <?php } if($username_check > 0) { $Error="Yes"; ?>
874 <td><span class="TableMessage">
875 <br />User Name is already used.<br />
878 <?php } if($RMatches==true) { $Error="Yes"; ?>
880 <td><span class="TableMessage">
881 <br />This User Name is restricted to use.<br />
884 <?php } if ($Error=="Yes") {
885 @redirect("refresh",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],FALSE),"4"); ?>
887 <td><span class="TableMessage">
888 <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 />
891 <?php } if ($Error!="Yes") {
892 $_POST['UserIP'] = $_SERVER['REMOTE_ADDR'];
893 $_POST['Group'] = $Settings['MemberGroup'];
894 $_POST['Joined'] = GMTimeStamp(); $_POST['LastActive'] = GMTimeStamp();
895 $_POST['Signature'] = ""; $_POST['Interests'] = "";
896 $_POST['Title'] = ""; $_POST['PostCount'] = "0";
897 if($Settings['AdminValidate']===true||$Settings['AdminValidate']!==false)
898 { $ValidateStats="no"; $yourgroup=$Settings['ValidateGroup']; }
899 if($Settings['AdminValidate']===false)
900 { $ValidateStats="yes"; $yourgroup=$Settings['MemberGroup']; }
901 $HashSalt = salt_hmac();
902 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha1");
903 $_GET['YourPost'] = $_POST['Signature'];
904 //require( './'.$SettDir['misc'].'HTMLTags.php');
905 $_GET['YourPost'] = htmlspecialchars($_GET['YourPost'], ENT_QUOTES, $Settings['charset']);
906 //$_GET['YourPost'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_GET['YourPost']);
907 $NewSignature = $_GET['YourPost'];
908 $_GET['YourPost'] = preg_replace("/\t+/"," ",$_GET['YourPost']);
909 $_GET['YourPost'] = preg_replace("/\s\s+/"," ",$_GET['YourPost']);
910 $_GET['YourPost'] = remove_bad_entities($_GET['YourPost']);
911 $Avatar = stripcslashes(htmlspecialchars($_POST['Avatar'], ENT_QUOTES, $Settings['charset']));
912 //$Avatar = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Avatar);
913 $Avatar = @remove_spaces($Avatar);
914 $Website = stripcslashes(htmlspecialchars($_POST['Website'], ENT_QUOTES, $Settings['charset']));
915 //$Website = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Website);
916 $Website = @remove_spaces($Website);
917 $gquerys = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `Name`='%s' LIMIT 1", array($yourgroup));
918 $gresults=mysql_query($gquerys);
919 $yourgroup=mysql_result($gresults,0,"id");
920 @mysql_free_result($gresults);
921 $yourid = getnextid($Settings['sqltable'],"members");
922 $_POST['Interests'] = @remove_spaces($_POST['Interests']);
923 $_POST['Title'] = @remove_spaces($_POST['Title']);
924 $_POST['Email'] = @remove_spaces($_POST['Email']);
925 if(!is_numeric($_POST['YourOffSet'])) { $_POST['YourOffSet'] = "0"; }
926 if($_POST['YourOffSet']>12) { $_POST['YourOffSet'] = "12"; }
927 if($_POST['YourOffSet']<-12) { $_POST['YourOffSet'] = "-12"; }
928 if(!is_numeric($_POST['MinOffSet'])) { $_POST['MinOffSet'] = "00"; }
929 if($_POST['MinOffSet']>59) { $_POST['MinOffSet'] = "59"; }
930 if($_POST['MinOffSet']<0) { $_POST['MinOffSet'] = "00"; }
931 $_POST['YourOffSet'] = $_POST['YourOffSet'].":".$_POST['MinOffSet'];
932 $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,0,0,10,10,10,'%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));
934 $querylogr = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `Name`='%s' AND `Password`='%s' LIMIT 1", array($Name,$NewPassword));
935 $resultlogr=mysql_query($querylogr);
936 $numlogr=mysql_num_rows($resultlogr);
939 $YourIDMr=mysql_result($resultlogr,$ir,"id");
940 $YourNameMr=mysql_result($resultlogr,$ir,"Name");
941 $YourGroupMr=mysql_result($resultlogr,$ir,"GroupID");
942 $gquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i LIMIT 1", array($YourGroupMr));
943 $gresult=mysql_query($gquery);
944 $YourGroupMr=mysql_result($gresult,0,"Name");
945 @mysql_free_result($gresult);
946 $YourTimeZoneMr=mysql_result($resultlogr,$ir,"TimeZone");
947 $YourDSTMr=mysql_result($resultlogr,$ir,"DST"); }
948 @mysql_free_result($resultlogr);
949 @session_regenerate_id(true);
950 $_SESSION['Loggedin']=true;
951 $_SESSION['MemberName']=$YourNameMr;
952 $_SESSION['UserID']=$YourIDMr;
953 $_SESSION['UserTimeZone']=$YourTimeZoneMr;
954 $_SESSION['UserDST']=$YourDSTMr;
955 $_SESSION['UserGroup']=$YourGroupMr;
956 $_SESSION['UserPass']=$NewPassword;
957 $_SESSION['DBName']=$Settings['sqldb'];
958 if($_POST['storecookie']===true) {
959 if($cookieDomain==null) {
960 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir);
961 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir);
962 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir); }
963 if($cookieDomain!=null) {
964 if($cookieSecure===true) {
965 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
966 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
967 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain, 1); }
968 if($cookieSecure===false) {
969 @setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain);
970 @setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain);
971 @setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain); } } }
973 $SendPMtoID=$_SESSION['UserID'];
975 $PMTitle = "Welcome ".$Name.".";
976 $YourMessage = "Hello ".$Name.". Welcome to ".$Settings['board_name'].". I hope you enjoy your stay here. ^_^ ";
977 $_POST['YourDate'] = $_POST['Joined'];
978 $query = query("INSERT INTO `".$Settings['sqltable']."messenger` VALUES (null,%i,%i,'%s','%s','%s','%s',0)", array($YourPMID,$SendPMtoID,'',$PMTitle,$YourMessage,$_POST['YourDate']));
979 //mysql_query($query);
980 @redirect("refresh",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],FALSE),"3");
984 <td><span class="TableMessage">
985 <br />Welcome to the Board <?php echo $_SESSION['MemberName']; ?>. ^_^<br />
986 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.<?php echo "\n";
987 if($Settings['AdminValidate']===true||$Settings['AdminValidate']!==false) {
988 echo "<br />The admin has to validate your account befoure you can post.\n";
989 echo "<br />The admin has been notified of your registration.\n"; } ?>
996 <tr class="TableRow4">
997 <td class="TableColumn4"> </td>
1001 <div class="DivMembers"> </div>