3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2011 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: members.php - Last Update: 12/28/2010 SVN 607 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="members.php"||
$File3Name=="/members.php") {
21 if(!is_numeric($_GET['id'])) { $_GET['id'] = null; }
22 if(!is_numeric($_GET['page'])) { $_GET['page'] = 1; }
23 if($_GET['act']=="list") {
25 $orderlist = "order by \"ID\" asc";
26 if(!isset($_GET['list'])) { $_GET['list'] = "members"; }
27 if(!isset($_GET['orderby'])) { $_GET['orderby'] = null; }
28 if(!isset($_GET['sorttype'])) { $_GET['sorttype'] = null; }
29 if(!isset($_GET['ordertype'])) { $_GET['ordertype'] = null; }
30 if(!isset($_GET['orderby'])) { $_GET['orderby'] = null; }
31 if(!isset($_GET['sortby'])) { $_GET['sortby'] = null; }
32 if(!isset($_GET['gid'])) { $_GET['gid'] = null; }
33 if(!isset($_GET['groupid'])) { $_GET['groupid'] = null; }
34 if($_GET['orderby']==null) {
35 if($_GET['sortby']!=null) {
36 $_GET['orderby'] = $_GET['sortby']; } }
37 if($_GET['orderby']==null) { $_GET['orderby'] = "joined"; }
38 if($_GET['orderby']!=null) {
39 if($_GET['orderby']=="id") { $orderlist = "order by \"ID\""; }
40 if($_GET['orderby']=="name") { $orderlist = "order by \"Name\""; }
41 if($_GET['orderby']=="joined") { $orderlist = "order by \"Joined\""; }
42 if($_GET['orderby']=="active") { $orderlist = "order by \"LastActive\""; }
43 if($_GET['orderby']=="post") { $orderlist = "order by \"PostCount\""; }
44 if($_GET['orderby']=="posts") { $orderlist = "order by \"PostCount\""; }
45 if($_GET['orderby']=="karma") { $orderlist = "order by \"Karma\""; }
46 if($_GET['orderby']=="offset") { $orderlist = "order by \"TimeZone\""; } }
47 if($_GET['ordertype']==null) {
48 if($_GET['sorttype']!=null) {
49 $_GET['ordertype'] = $_GET['sorttype']; } }
50 if($_GET['ordertype']==null) { $_GET['ordertype'] = "asc"; }
51 if($_GET['ordertype']!=null) {
52 if($_GET['ordertype']=="ascending") { $orderlist .= " asc"; }
53 if($_GET['ordertype']=="descending") { $orderlist .= " desc"; }
54 if($_GET['ordertype']=="asc") { $orderlist .= " asc"; }
55 if($_GET['ordertype']=="desc") { $orderlist .= " desc"; } }
56 if(!is_numeric($_GET['gid'])) { $_GET['gid'] = null; }
57 if($_GET['gid']!=null&&$_GET['groupid']==null) { $_GET['groupid'] = $_GET['gid']; }
58 if(!is_numeric($_GET['groupid'])) { $_GET['groupid'] = null; }
59 $ggquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s'", array($Settings['GuestGroup']));
60 $ggresult=sql_query($ggquery,$SQLStat);
61 $GGroup=sql_result($ggresult,0,"id");
62 sql_free_result($ggresult);
63 //Get SQL LIMIT Number
64 $nums = $_GET['page'] * $Settings['max_memlist'];
65 $PageLimit = $nums - $Settings['max_memlist'];
66 if($PageLimit<0) { $PageLimit = 0; }
68 if($_GET['groupid']==null) {
69 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"<>%i AND \"id\">=0 AND \"HiddenMember\"='no' ".$orderlist." ".$SQLimit, array($GGroup,$PageLimit,$Settings['max_memlist']));
70 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"<>%i AND \"id\">=0 AND \"HiddenMember\"='no'", array($GGroup)); }
71 if($_GET['groupid']!=null) {
72 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"=%i AND \"GroupID\"<>%i AND \"id\">=0 ".$orderlist." ".$SQLimit, array($_GET['groupid'],$GGroup,$PageLimit,$Settings['max_memlist']));
73 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"=%i AND \"GroupID\"<>%i AND \"id\">=0", array($_GET['groupid'],$GGroup)); }
74 $result=sql_query($query,$SQLStat);
75 $rnresult=sql_query($rnquery,$SQLStat);
76 $NumberMembers = sql_result($rnresult,0);
77 sql_free_result($rnresult);
78 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=".$_GET['page'],"&","=",$prexqstr['member'],$exqstr['member']);
79 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
80 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
81 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
82 $_SESSION['ViewingFile'] = $exfile['member']; }
83 $_SESSION['PreViewingTitle'] = "Viewing";
84 $_SESSION['ViewingTitle'] = "Member List";
85 if($NumberMembers==null) {
87 $num = $NumberMembers;
88 //Start MemberList Page Code
89 if(!isset($Settings['max_memlist'])) { $Settings['max_memlist'] = 10; }
90 if($_GET['page']==null) { $_GET['page'] = 1; }
91 if($_GET['page']<=0) { $_GET['page'] = 1; }
92 $nums = $_GET['page'] * $Settings['max_memlist'];
93 if($nums>$num) { $nums = $num; }
94 $numz = $nums - $Settings['max_memlist'];
95 if($numz<=0) { $numz = 0; }
97 if($nums<$num) { $nextpage = $_GET['page'] +
1; }
98 if($nums>=$num) { $nextpage = $_GET['page']; }
99 if($numz>=$Settings['max_memlist']) { $backpage = $_GET['page'] - 1; }
100 if($_GET['page']<=1) { $backpage = 1; }
101 $pnum = $num; $l = 1; $Pages = null;
103 if($pnum>=$Settings['max_memlist']) {
104 $pnum = $pnum - $Settings['max_memlist'];
105 $Pages[$l] = $l; ++
$l; }
106 if($pnum<$Settings['max_memlist']&&$pnum>0) {
107 $pnum = $pnum - $pnum;
108 $Pages[$l] = $l; ++
$l; } }
109 $nums = $_GET['page'] * $Settings['max_memlist'];
110 //End MemberList Page Code
111 $num=sql_num_rows($result);
112 //List Page Number Code Start
113 $pagenum=count($Pages);
114 if($_GET['page']>$pagenum) {
115 $_GET['page'] = $pagenum; }
116 $pagei=0; $pstring = null;
118 $pstring = "<div class=\"PageList\"><span class=\"pagelink\">".$pagenum." Pages:</span> "; }
119 if($_GET['page']<4) { $Pagez[0] = null; }
120 if($_GET['page']>=4) { $Pagez[0] = "First"; }
121 if($_GET['page']>=3) {
122 $Pagez[1] = $_GET['page'] - 2; }
123 if($_GET['page']<3) {
125 if($_GET['page']>=2) {
126 $Pagez[2] = $_GET['page'] - 1; }
127 if($_GET['page']<2) {
129 $Pagez[3] = $_GET['page'];
130 if($_GET['page']<$pagenum) {
131 $Pagez[4] = $_GET['page'] +
1; }
132 if($_GET['page']>=$pagenum) {
134 $pagenext = $_GET['page'] +
1;
135 if($pagenext<$pagenum) {
136 $Pagez[5] = $_GET['page'] +
2; }
137 if($pagenext>=$pagenum) {
139 if($_GET['page']<$pagenum) { $Pagez[6] = "Last"; }
140 if($_GET['page']>=$pagenum) { $Pagez[6] = null; }
141 $pagenumi=count($Pagez);
142 if($NumberMembers==0) {
146 while ($pagei < $pagenumi) {
147 if($_GET['page']!=1&&$pagei==1) {
148 $Pback = $_GET['page'] - 1;
149 $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> "; }
150 if($Pagez[$pagei]!=null&&
151 $Pagez[$pagei]!="First"&&
152 $Pagez[$pagei]!="Last") {
154 $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> "; }
156 $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> "; } }
157 if($Pagez[$pagei]=="First") {
158 $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> "; }
159 if($Pagez[$pagei]=="Last") {
160 $ptestnext = $pagenext +
1;
162 $Pnext = $_GET['page'] +
1;
163 $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> ";
164 if($ptestnext<$pagenum) {
165 $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> "; } }
166 ++
$pagei; } $pstring = $pstring."</div>"; }
168 <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
>
169 <div
class="DivNavLinks"> 
;</div
>
172 //List Page Number Code end
175 <div
class="DivPageLinks"> 
;</div
>
177 <div
class="Table1Border">
178 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
179 <div
class="TableRow1">
180 <span style
="text-align: left;">
181 <?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
>
184 <table
class="Table1">
185 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
186 <tr
class="TableRow1">
187 <td
class="TableColumn1" colspan
="8"><span style
="text-align: left;">
188 <?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
>
191 <tr id
="Member" class="TableRow2">
192 <th
class="TableColumn2" style
="width: 5%;">ID
</th
>
193 <th
class="TableColumn2" style
="width: 28%;">Name
</th
>
194 <th
class="TableColumn2" style
="width: 10%;">Group
</th
>
195 <th
class="TableColumn2" style
="width: 5%;">Posts
</th
>
196 <th
class="TableColumn2" style
="width: 5%;">Karma
</th
>
197 <th
class="TableColumn2" style
="width: 20%;">Joined
</th
>
198 <th
class="TableColumn2" style
="width: 20%;">Last Active
</th
>
199 <th
class="TableColumn2" style
="width: 7%;">Website
</th
>
203 $MemList['ID']=sql_result($result,$i,"id");
204 $MemList['Name']=sql_result($result,$i,"Name");
205 $MemList['Email']=sql_result($result,$i,"Email");
206 $MemList['GroupID']=sql_result($result,$i,"GroupID");
207 $MemList['WarnLevel']=sql_result($result,$i,"WarnLevel");
208 $MemList['Interests']=sql_result($result,$i,"Interests");
209 $MemList['Title']=sql_result($result,$i,"Title");
210 $MemList['Joined']=sql_result($result,$i,"Joined");
211 $MemList['Joined']=GMTimeChange("F j Y, g:i a",$MemList['Joined'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
212 $MemList['LastActive']=sql_result($result,$i,"LastActive");
213 $MemList['LastActive']=GMTimeChange("F j Y, g:i a",$MemList['LastActive'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
214 $MemList['Website']=sql_result($result,$i,"Website");
215 $MemList['Website'] = urlcheck($MemList['Website']);
216 $BoardWWWChCk = parse_url($Settings['idburl']);
217 $MemsWWWChCk = parse_url($MemList['Website']);
218 $opennew = " onclick=\"window.open(this.href);return false;\"";
219 if($BoardWWWChCk['host']==$MemsWWWChCk['host']) {
221 $MemList['Gender']=sql_result($result,$i,"Gender");
222 $MemList['PostCount']=sql_result($result,$i,"PostCount");
223 $MemList['Karma']=sql_result($result,$i,"Karma");
224 $MemList['TimeZone']=sql_result($result,$i,"TimeZone");
225 $MemList['DST']=sql_result($result,$i,"DST");
226 $MemList['IP']=sql_result($result,$i,"IP");
227 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($MemList['GroupID']));
228 $gresult=sql_query($gquery,$SQLStat);
229 $MemList['Group']=sql_result($gresult,0,"Name");
230 $GroupNamePrefix=sql_result($gresult,0,"NamePrefix");
231 $GroupNameSuffix=sql_result($gresult,0,"NameSuffix");
232 sql_free_result($gresult);
233 if(isset($GroupNamePrefix)&&$GroupNamePrefix!=null) {
234 $MemList['Name'] = $GroupNamePrefix.$MemList['Name']; }
235 if(isset($GroupNameSuffix)&&$GroupNameSuffix!=null) {
236 $MemList['Name'] = $MemList['Name'].$GroupNameSuffix; }
237 $membertitle = " ".$ThemeSet['TitleDivider']." Member List";
238 if($MemList['Group']!=$Settings['GuestGroup']) {
240 <tr
class="TableRow3" id
="Member<?php echo $MemList['ID']; ?>">
241 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $MemList['ID']; ?
></td
>
242 <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
>
243 <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
>
244 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $MemList['PostCount']; ?
></td
>
245 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $MemList['Karma']; ?
></td
>
246 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $MemList['Joined']; ?
></td
>
247 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $MemList['LastActive']; ?
></td
>
248 <td
class="TableColumn3" style
="text-align: center;"><a href
="<?php echo $MemList['Website']; ?>"<?php
echo $opennew; ?
>>Website
</a
></td
>
251 ++
$i; } sql_free_result($result);
253 <tr id
="MemEnd" class="TableRow4">
254 <td
class="TableColumn4" colspan
="8"> 
;</td
>
260 <div
class="DivMembers"> 
;</div
>
263 //List Page Number Code end
266 <div
class="DivPageLinks"> 
;</div
>
268 if($_GET['act']=="online") {
269 if($_GET['list']!="all"&&$_GET['list']!="members"&&$_GET['list']!="guests") {
270 $_GET['list'] = "members"; }
271 //Get SQL LIMIT Number
272 $nums = $_GET['page'] * $Settings['max_memlist'];
273 $PageLimit = $nums - $Settings['max_memlist'];
274 if($PageLimit<0) { $PageLimit = 0; }
276 $uolcuttime = GMTimeStamp();
277 $uoltime = $uolcuttime - ini_get("session.gc_maxlifetime");
278 if($_GET['list']=="members") {
279 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i AND \"session_data\" NOT LIKE '%s' ORDER BY \"expires\" DESC ".$SQLimit, array($uoltime,"%UserGroup|s:".strlen($Settings['GuestGroup']).":\"".$Settings['GuestGroup']."\";%",$PageLimit,$Settings['max_memlist']));
280 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i AND \"session_data\" NOT LIKE '%s'", array($uoltime,"%UserGroup|s:".strlen($Settings['GuestGroup']).":\"".$Settings['GuestGroup']."\";%")); }
281 if($_GET['list']=="guests") {
282 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i AND \"session_data\" LIKE '%s' ORDER BY \"expires\" DESC ".$SQLimit, array($uoltime,"%UserGroup|s:".strlen($Settings['GuestGroup']).":\"".$Settings['GuestGroup']."\";%",$PageLimit,$Settings['max_memlist']));
283 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i AND \"session_data\" LIKE '%s'", array($uoltime,"%UserGroup|s:".strlen($Settings['GuestGroup']).":\"".$Settings['GuestGroup']."\";%")); }
284 if($_GET['list']=="all") {
285 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i ORDER BY \"expires\" DESC ".$SQLimit, array($uoltime,$PageLimit,$Settings['max_memlist']));
286 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i", array($uoltime)); }
287 $result=sql_query($query,$SQLStat);
288 $rnresult=sql_query($rnquery,$SQLStat);
289 $NumberMembers = sql_result($rnresult,0);
290 sql_free_result($rnresult);
291 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=online&list=".$_GET['list']."&page=".$_GET['page'],"&","=",$prexqstr['member'],$exqstr['member']);
292 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
293 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
294 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
295 $_SESSION['ViewingFile'] = $exfile['member']; }
296 $_SESSION['PreViewingTitle'] = "Viewing";
297 $_SESSION['ViewingTitle'] = "Online Member List";
298 if($NumberMembers==null) {
299 $NumberMembers = 0; }
300 $num = $NumberMembers;
301 //Start MemberList Page Code
302 if(!isset($Settings['max_memlist'])) { $Settings['max_memlist'] = 10; }
303 if($_GET['page']==null) { $_GET['page'] = 1; }
304 if($_GET['page']<=0) { $_GET['page'] = 1; }
305 $nums = $_GET['page'] * $Settings['max_memlist'];
306 if($nums>$num) { $nums = $num; }
307 $numz = $nums - $Settings['max_memlist'];
308 if($numz<=0) { $numz = 0; }
310 if($nums<$num) { $nextpage = $_GET['page'] +
1; }
311 if($nums>=$num) { $nextpage = $_GET['page']; }
312 if($numz>=$Settings['max_memlist']) { $backpage = $_GET['page'] - 1; }
313 if($_GET['page']<=1) { $backpage = 1; }
314 $pnum = $num; $l = 1; $Pages = null;
316 if($pnum>=$Settings['max_memlist']) {
317 $pnum = $pnum - $Settings['max_memlist'];
318 $Pages[$l] = $l; ++
$l; }
319 if($pnum<$Settings['max_memlist']&&$pnum>0) {
320 $pnum = $pnum - $pnum;
321 $Pages[$l] = $l; ++
$l; } }
322 $nums = $_GET['page'] * $Settings['max_memlist'];
323 //End MemberList Page Code
324 $num=sql_num_rows($result);
325 //List Page Number Code Start
326 $pagenum=count($Pages);
327 if($_GET['page']>$pagenum) {
328 $_GET['page'] = $pagenum; }
329 $pagei=0; $pstring = null;
331 $pstring = "<div class=\"PageList\"><span class=\"pagelink\">".$pagenum." Pages:</span> "; }
332 if($_GET['page']<4) { $Pagez[0] = null; }
333 if($_GET['page']>=4) { $Pagez[0] = "First"; }
334 if($_GET['page']>=3) {
335 $Pagez[1] = $_GET['page'] - 2; }
336 if($_GET['page']<3) {
338 if($_GET['page']>=2) {
339 $Pagez[2] = $_GET['page'] - 1; }
340 if($_GET['page']<2) {
342 $Pagez[3] = $_GET['page'];
343 if($_GET['page']<$pagenum) {
344 $Pagez[4] = $_GET['page'] +
1; }
345 if($_GET['page']>=$pagenum) {
347 $pagenext = $_GET['page'] +
1;
348 if($pagenext<$pagenum) {
349 $Pagez[5] = $_GET['page'] +
2; }
350 if($pagenext>=$pagenum) {
352 if($_GET['page']<$pagenum) { $Pagez[6] = "Last"; }
353 if($_GET['page']>=$pagenum) { $Pagez[6] = null; }
354 $pagenumi=count($Pagez);
355 if($NumberMembers==0) {
359 while ($pagei < $pagenumi) {
360 if($_GET['page']!=1&&$pagei==1) {
361 $Pback = $_GET['page'] - 1;
362 $pstring = $pstring."<span class=\"pagelink\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=online&list=".$_GET['list']."&page=".$Pback,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\"><</a></span> "; }
363 if($Pagez[$pagei]!=null&&
364 $Pagez[$pagei]!="First"&&
365 $Pagez[$pagei]!="Last") {
367 $pstring = $pstring."<span class=\"pagelink\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=online&list=".$_GET['list']."&page=".$Pagez[$pagei],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">".$Pagez[$pagei]."</a></span> "; }
369 $pstring = $pstring."<span class=\"pagecurrent\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=online&list=".$_GET['list']."&page=".$Pagez[$pagei],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">".$Pagez[$pagei]."</a></span> "; } }
370 if($Pagez[$pagei]=="First") {
371 $pstring = $pstring."<span class=\"pagelinklast\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=online&list=".$_GET['list']."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">«</a></span> "; }
372 if($Pagez[$pagei]=="Last") {
373 $ptestnext = $pagenext +
1;
375 $Pnext = $_GET['page'] +
1;
376 $pstring = $pstring."<span class=\"pagelink\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=online&list=".$_GET['list']."&page=".$Pnext,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">></a></span> ";
377 if($ptestnext<$pagenum) {
378 $pstring = $pstring."<span class=\"pagelinklast\"><a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=online&list=".$_GET['list']."&page=".$pagenum,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\">»</a></span> "; } }
379 ++
$pagei; } $pstring = $pstring."</div>"; }
381 <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
=online
&list=all
&page
=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Online Member
List</a
></div
>
382 <div
class="DivNavLinks"> 
;</div
>
385 //List Page Number Code end
388 <div
class="DivPageLinks"> 
;</div
>
390 <div
class="Table1Border">
391 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
392 <div
class="TableRow1">
393 <span style
="text-align: left;">
394 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act
=online
&list=".$_GET['list']."&page
=".$_GET['page'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Online Member
List</a
>
397 <table
class="Table1">
398 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
399 <tr
class="TableRow1">
400 <td
class="TableColumn1" colspan
="8"><span style
="text-align: left;">
401 <?php
echo $ThemeSet['TitleIcon']; ?
><a href
="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act
=online
&list=".$_GET['list']."&page
=".$_GET['page'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Online Member
List</a
>
404 <tr id
="Member" class="TableRow2">
405 <th
class="TableColumn2" style
="width: 5%;">ID
</th
>
406 <th
class="TableColumn2" style
="width: 28%;">Member Name
</th
>
407 <th
class="TableColumn2" style
="width: 15%;">Group Name
</th
>
408 <th
class="TableColumn2" style
="width: 28%;">Location
</th
>
409 <th
class="TableColumn2" style
="width: 24%;">Time
</th
>
413 $AmIHiddenUser = "no";
414 $session_data=sql_result($result,$i,"session_data");
415 $session_user_agent=sql_result($result,$i,"user_agent");
416 $session_ip_address=sql_result($result,$i,"ip_address");
417 $session_expires=sql_result($result,$i,"expires");
418 $session_expires = GMTimeChange("F j Y, g:i a",$session_expires,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
419 $UserSessInfo = unserialize_session($session_data);
420 if(!isset($UserSessInfo['UserGroup'])) {
421 $UserSessInfo['UserGroup'] = $Settings['GuestGroup']; }
422 if(!isset($session_ip_address)) {
423 $session_ip_address = "127.0.0.1"; }
424 if($UserSessInfo['UserGroup']!=$Settings['GuestGroup']) {
425 $PreAmIHiddenUser = GetUserName($UserSessInfo['UserID'],$Settings['sqltable'],$SQLStat);
426 $AmIHiddenUser = $PreAmIHiddenUser['Hidden']; }
427 if(!isset($AmIHiddenUser)) { $AmIHiddenUser = "no"; }
428 if($AmIHiddenUser===null) { $AmIHiddenUser = "no"; }
429 if(!isset($UserSessInfo['ViewingPage'])) {
430 $UserSessInfo['ViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
431 if(!isset($UserSessInfo['ViewingFile'])) {
432 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
433 $UserSessInfo['ViewingFile'] = $exfile['index'].$Settings['file_ext']; }
434 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
435 $UserSessInfo['ViewingFile'] = $exfile['index']; } }
436 if(!isset($UserSessInfo['PreViewingTitle'])) {
437 $UserSessInfo['PreViewingTitle'] = "Viewing"; }
438 if(!isset($UserSessInfo['ViewingTitle'])) {
439 $UserSessInfo['ViewingTitle'] = "Board index"; }
440 $PreExpPage = explode("?",$UserSessInfo['ViewingPage']);
441 $PreFileName = $UserSessInfo['ViewingFile'];
442 $qstr = htmlentities("&", ENT_QUOTES
, $Settings['charset']);
443 $qsep = htmlentities("=", ENT_QUOTES
, $Settings['charset']);
444 $PreExpPage = preg_replace("/^\?/","",$UserSessInfo['ViewingPage']);
445 $PreExpPage = str_replace($qstr, "&", $PreExpPage);
446 $PreExpPage = str_replace($qsep, "=", $PreExpPage);
447 parse_str($PreExpPage,$ChkID);
448 if($PreFileName==$exfile['topic'].$Settings['file_ext']) {
449 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"];
450 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"id\"=%i LIMIT 1", array($ChkID));
451 $preresult=sql_query($prequery,$SQLStat);
452 $prenum=sql_num_rows($preresult);
454 $TopicForumID=sql_result($preresult,0,"ForumID");
455 $TopicCatID=sql_result($preresult,0,"CategoryID"); }
459 if($CatPermissionInfo['CanViewCategory'][$TopicCatID]=="no"||
460 $CatPermissionInfo['CanViewCategory'][$TopicCatID]!="yes") {
461 $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
462 $UserSessInfo['PreViewingTitle'] = "Viewing";
463 $UserSessInfo['ViewingTitle'] = "Board index"; }
464 if($PermissionInfo['CanViewForum'][$TopicForumID]=="no"||
465 $PermissionInfo['CanViewForum'][$TopicForumID]!="yes") {
466 $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
467 $UserSessInfo['PreViewingTitle'] = "Viewing";
468 $UserSessInfo['ViewingTitle'] = "Board index"; } } }
469 if($PreFileName==$exfile['forum'].$Settings['file_ext']) {
470 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"];
471 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"id\"=%i LIMIT 1", array($ChkID));
472 $preresult=sql_query($prequery,$SQLStat);
473 $prenum=sql_num_rows($preresult);
474 $ForumCatID=sql_result($preresult,0,"CategoryID");
475 sql_free_result($preresult);
476 if($CatPermissionInfo['CanViewCategory'][$ForumCatID]=="no"||
477 $CatPermissionInfo['CanViewCategory'][$ForumCatID]!="yes") {
478 $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
479 $UserSessInfo['PreViewingTitle'] = "Viewing";
480 $UserSessInfo['ViewingTitle'] = "Board index"; }
481 if($PermissionInfo['CanViewForum'][$ChkID]=="no"||
482 $PermissionInfo['CanViewForum'][$ChkID]!="yes") {
483 $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
484 $UserSessInfo['PreViewingTitle'] = "Viewing";
485 $UserSessInfo['ViewingTitle'] = "Board index"; } } }
486 if($PreFileName==$exfile['subforum'].$Settings['file_ext']) {
487 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"];
488 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"id\"=%i LIMIT 1", array($ChkID));
489 $preresult=sql_query($prequery,$SQLStat);
490 $prenum=sql_num_rows($preresult);
491 $ForumCatID=sql_result($preresult,0,"CategoryID");
492 sql_free_result($preresult);
493 if($CatPermissionInfo['CanViewCategory'][$ForumCatID]=="no"||
494 $CatPermissionInfo['CanViewCategory'][$ForumCatID]!="yes") {
495 $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
496 $UserSessInfo['PreViewingTitle'] = "Viewing";
497 $UserSessInfo['ViewingTitle'] = "Board index"; }
498 if($PermissionInfo['CanViewForum'][$ChkID]=="no"||
499 $PermissionInfo['CanViewForum'][$ChkID]!="yes") {
500 $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
501 $UserSessInfo['PreViewingTitle'] = "Viewing";
502 $UserSessInfo['ViewingTitle'] = "Board index"; } } }
503 if($PreFileName==$exfile['category'].$Settings['file_ext']) {
504 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"];
505 if($CatPermissionInfo['CanViewCategory'][$ChkID]=="no"||
506 $CatPermissionInfo['CanViewCategory'][$ChkID]!="yes") {
507 $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
508 $UserSessInfo['PreViewingTitle'] = "Viewing";
509 $UserSessInfo['ViewingTitle'] = "Board index"; } } }
510 if($PreFileName==$exfile['subcategory'].$Settings['file_ext']) {
511 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"];
512 if($CatPermissionInfo['CanViewCategory'][$ChkID]=="no"||
513 $CatPermissionInfo['CanViewCategory'][$ChkID]!="yes") {
514 $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
515 $UserSessInfo['PreViewingTitle'] = "Viewing";
516 $UserSessInfo['ViewingTitle'] = "Board index"; } } }
517 if($_GET['list']=="all"||
$_GET['list']=="members") {
518 if($UserSessInfo['UserGroup']!=$Settings['GuestGroup']) {
519 if($AmIHiddenUser=="no"&&$UserSessInfo['UserID']>0) {
521 <tr id
="Member<?php echo $i; ?>" class="TableRow3">
522 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $UserSessInfo['UserID']; ?
></td
>
523 <td
class="TableColumn3" style
="text-align: center;"><a href
="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act
=view
&id
=".$UserSessInfo['UserID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>"><?php
echo $UserSessInfo['MemberName']; ?
></a
>
524 <?php
if($GroupInfo['HasAdminCP']=="yes") { ?
> ( <a onclick
="window.open(this.href);return false;" href
="<?php echo sprintf($IPCheckURL,$session_ip_address); ?>"><?php
echo $session_ip_address; ?
></a
> )<?php
} ?
></td
>
525 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $UserSessInfo['UserGroup']; ?
></td
>
526 <td
class="TableColumn3" style
="text-align: center;"><a href
="<?php echo url_maker($PreFileName,"no+ext
",$PreExpPage,$Settings['qstr'],$Settings['qsep'],null,null); ?>"><?php
echo $UserSessInfo['PreViewingTitle']; ?
> <?php
echo $UserSessInfo['ViewingTitle']; ?
></a
></td
>
527 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $session_expires; ?
></td
>
530 if($UserSessInfo['UserGroup']==$Settings['GuestGroup']) {
531 if(!isset($UserSessInfo['GuestName'])) {
532 $UserSessInfo['GuestName'] = "Guest"; }
533 if(!isset($UserSessInfo['UserID'])) {
534 $UserSessInfo['UserID'] = "0"; }
535 if($_GET['list']=="all"||
$_GET['list']=="guests") {
536 if(user_agent_check($session_user_agent)) {
537 $UserSessInfo['GuestName'] = user_agent_check($session_user_agent); }
539 <tr id
="Member<?php echo $i; ?>" class="TableRow3">
540 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $UserSessInfo['UserID']; ?
></td
>
541 <td
class="TableColumn3" style
="text-align: center;"><span
><?php
echo $UserSessInfo['GuestName']; ?
></span
>
542 <?php
if($GroupInfo['HasAdminCP']=="yes") { ?
> ( <a onclick
="window.open(this.href);return false;" href
="<?php echo sprintf($IPCheckURL,$session_ip_address); ?>"><?php
echo $session_ip_address; ?
></a
> )<?php
} ?
></td
>
543 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $UserSessInfo['UserGroup']; ?
></td
>
544 <td
class="TableColumn3" style
="text-align: center;"><a href
="<?php echo url_maker($PreFileName,"no+ext
",$PreExpPage,$Settings['qstr'],$Settings['qsep'],null,null); ?>"><?php
echo $UserSessInfo['PreViewingTitle']; ?
> <?php
echo $UserSessInfo['ViewingTitle']; ?
></a
></td
>
545 <td
class="TableColumn3" style
="text-align: center;"><?php
echo $session_expires; ?
></td
>
550 <tr id
="MemEnd" class="TableRow4">
551 <td
class="TableColumn4" colspan
="8"> 
;</td
>
557 <div
class="DivMembers"> 
;</div
>
560 //List Page Number Code end
563 <div
class="DivPageLinks"> 
;</div
>
565 if($_GET['act']=="view") {
566 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_GET['id']));
567 $result=sql_query($query,$SQLStat);
568 $num=sql_num_rows($result);
570 if($num==0||
$_GET['id']<=0) { redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
571 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
572 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
573 $ViewMem['ID']=sql_result($result,$i,"id");
574 $ViewMem['Name']=sql_result($result,$i,"Name");
575 $ViewMem['Signature']=sql_result($result,$i,"Signature");
576 $ViewMem['Avatar']=sql_result($result,$i,"Avatar");
577 $ViewMem['AvatarSize']=sql_result($result,$i,"AvatarSize");
578 $ViewMem['Email']=sql_result($result,$i,"Email");
579 $ViewMem['GroupID']=sql_result($result,$i,"GroupID");
580 $ViewMem['HiddenMember']=sql_result($result,$i,"HiddenMember");
581 $ViewMem['WarnLevel']=sql_result($result,$i,"WarnLevel");
582 $ViewMem['Interests']=sql_result($result,$i,"Interests");
583 $ViewMem['Title']=sql_result($result,$i,"Title");
584 $ViewMem['Joined']=sql_result($result,$i,"Joined");
585 $ViewMem['Joined']=GMTimeChange("M j Y, g:i a",$ViewMem['Joined'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
586 $ViewMem['LastActive']=sql_result($result,$i,"LastActive");
587 $ViewMem['LastActive']=GMTimeChange("M j Y, g:i a",$ViewMem['LastActive'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
588 $ViewMem['Website']=sql_result($result,$i,"Website");
589 $ViewMem['Website'] = urlcheck($ViewMem['Website']);
590 $BoardWWWChCk = parse_url($Settings['idburl']);
591 $MemsWWWChCk = parse_url($ViewMem['Website']);
592 $opennew = " onclick=\"window.open(this.href);return false;\"";
593 if($BoardWWWChCk['host']==$MemsWWWChCk['host']) {
595 $ViewMem['Gender']=sql_result($result,$i,"Gender");
596 $ViewMem['PostCount']=sql_result($result,$i,"PostCount");
597 $ViewMem['Karma']=sql_result($result,$i,"Karma");
598 $ViewMem['TimeZone']=sql_result($result,$i,"TimeZone");
599 $ViewMem['DST']=sql_result($result,$i,"DST");
600 $ViewMem['IP']=sql_result($result,$i,"IP");
601 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($ViewMem['GroupID']));
602 $gresult=sql_query($gquery,$SQLStat);
603 $ViewMem['Group']=sql_result($gresult,0,"Name");
605 $GroupNamePrefix=sql_result($gresult,0,"NamePrefix");
606 $GroupNameSuffix=sql_result($gresult,0,"NameSuffix");
608 sql_free_result($gresult);
609 if($ViewMem['Title']=="") { $ViewMem['Title'] = $ViewMem['Group']; }
611 if(isset($GroupNamePrefix)&&$GroupNamePrefix!=null) {
612 $ViewMem['Name'] = $GroupNamePrefix.$ViewMem['Name']; }
613 if(isset($GroupNameSuffix)&&$GroupNameSuffix!=null) {
614 $ViewMem['Name'] = $ViewMem['Name'].$GroupNameSuffix; }
616 if($ViewMem['HiddenMember']=="yes") { redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
617 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
618 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
619 $membertitle = " ".$ThemeSet['TitleDivider']." ".$ViewMem['Name'];
620 if ($ViewMem['Avatar']=="http://"||
$ViewMem['Avatar']==null||
621 strtolower($ViewMem['Avatar'])=="noavatar") {
622 $ViewMem['Avatar']=$ThemeSet['NoAvatar'];
623 $ViewMem['AvatarSize']=$ThemeSet['NoAvatarSize']; }
624 $AvatarSize1=explode("x", $ViewMem['AvatarSize']);
625 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
626 $ViewMem['Signature'] = url2link($ViewMem['Signature']);
627 $ViewMem['Signature'] = text2icons($ViewMem['Signature'],$Settings['sqltable'],$SQLStat);
628 if($_GET['view']==null) { $_GET['view'] = "profile"; }
629 if($_GET['view']!="profile"&&$_GET['view']!="avatar"&&
630 $_GET['view']!="website"&&$_GET['view']!="homepage") { $_GET['view'] = "profile"; }
631 if($_GET['view']=="avatar") {
632 session_write_close();
633 header("Location: ".$ViewMem['Avatar']); }
634 if($_GET['view']=="website"||
$_GET['view']=="homepage") {
635 if ($ViewMem['Website']!="http://"&&$ViewMem['Website']!=null) {
636 session_write_close();
637 header("Location: ".$ViewMem['Website']); }
638 if ($ViewMem['Website']=="http://"||
$ViewMem['Website']==null||
639 strtolower($ViewMem['Avatar'])=="noavatar") {
640 session_write_close();
641 header("Location: ".$BoardURL."index.php?act=view"); } }
642 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=view&id=".$_GET['id'],"&","=",$prexqstr['member'],$exqstr['member']);
643 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
644 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
645 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
646 $_SESSION['ViewingFile'] = $exfile['member']; }
647 $_SESSION['PreViewingTitle'] = "Viewing Profile:";
648 $_SESSION['ViewingTitle'] = $ViewMem['Name'];
650 <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
>
651 <div
class="DivNavLinks"> 
;</div
>
652 <div
class="Table1Border">
653 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
654 <div
class="TableRow1">
655 <span style
="text-align: left;">
656 <?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
>
659 <table
class="Table1">
660 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
661 <tr
class="TableRow1">
662 <td
class="TableColumn1" colspan
="2"><span style
="text-align: left;">
663 <?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
>
666 <tr id
="Member" class="TableRow2">
667 <th
class="TableColumn2" style
="width: 50%;">Avatar
</th
>
668 <th
class="TableColumn2" style
="width: 50%;">User Info
</th
>
670 <tr
class="TableRow3" id
="MemberProfile">
671 <td
class="TableColumn3">
672 <?php
// Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/
674 <table
class="AvatarTable" style
="width: 100%; height: 100px; text-align: center;">
675 <tr
class="AvatarRow" style
="width: 100px; height: 100px;">
676 <td
class="AvatarRow" style
="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
677 <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;" />
681 <div style
="text-align: center;">
682 Name
: <?php
echo $ViewMem['Name']; ?
><br
/>
683 Title
: <?php
echo $ViewMem['Title']; ?
>
684 <?php
if($GroupInfo['HasAdminCP']=="yes") { ?
>
685 <br
/>User IP
: <a onclick
="window.open(this.href);return false;" href
="<?php echo sprintf($IPCheckURL,$ViewMem['IP']); ?>">
686 <?php
echo $ViewMem['IP']; echo "</a>"; } ?
></div
>
688 <td
class="TableColumn3">
689  
;User Name
: <?php
echo $ViewMem['Name']; ?
><br
/>
690  
;User Title
: <?php
echo $ViewMem['Title']; ?
><br
/>
691  
;User Group
: <?php
echo $ViewMem['Group']; ?
><br
/>
692  
;User Joined
: <?php
echo $ViewMem['Joined']; ?
><br
/>
693  
;Last Active
: <?php
echo $ViewMem['LastActive']; ?
><br
/>
694  
;User Time
: <?php
echo GMTimeGet("M j Y, g:i a",$ViewMem['TimeZone'],0,$ViewMem['DST']); ?
><br
/>
695  
;User Website
: <a href
="<?php echo $ViewMem['Website']; ?>"<?php
echo $opennew; ?
>>Website
</a
><br
/>
696  
;Post Count
: <?php
echo $ViewMem['PostCount']; ?
><br
/>
697  
;Karma
: <?php
echo $ViewMem['Karma']; ?
><br
/>
698  
;Interests
: <?php
echo $ViewMem['Interests']; ?
><br
/>
699  
;Topics
: <?php
if($Settings['enable_search']=="on"&&$GroupInfo['CanSearch']=="yes") { ?
>
700 <a href
="<?php echo url_maker($exfile['search'],$Settings['file_ext'],"act
=topics
&search
=%
&type
=wildcard
&memid
=".$ViewMem['ID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search']); ?>">Find Topics
</a
>
704 <tr
class="TableRow4">
705 <td
class="TableColumn4" colspan
="2"> 
;</td
>
708 <?php
sql_free_result($result); }
709 if($_GET['act']=="logout") {
711 if($cookieDomain==null) {
712 setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir);
713 setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir);
714 setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir);
715 setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir); }
716 if($cookieDomain!=null) {
717 if($cookieSecure===true) {
718 setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
719 setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
720 setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1);
721 setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain, 1); }
722 if($cookieSecure===false) {
723 setcookie("MemberName", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
724 setcookie("UserID", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
725 setcookie("SessPass", null, GMTimeStamp() - 3600, $cbasedir, $cookieDomain);
726 setcookie(session_name(), "", GMTimeStamp() - 3600, $cbasedir, $cookieDomain); } }
727 unset($_COOKIE[session_name()]);
731 $temp_user_ip = $_SERVER['REMOTE_ADDR'];
732 $exptime = GMTimeStamp() - ini_get("session.gc_maxlifetime");
733 sql_query(sql_pre_query("DELETE FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" < %i OR ip_address='%s'", array($exptime,$temp_user_ip)),$SQLStat);
734 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
735 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
736 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
737 if($_GET['act']=="login") {
738 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
739 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
740 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
741 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
742 if($_SESSION['UserID']==0||
$_SESSION['UserID']==null) {
743 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=login","&","=",$prexqstr['member'],$exqstr['member']);
744 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
745 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
746 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
747 $_SESSION['ViewingFile'] = $exfile['member']; }
748 $_SESSION['PreViewingTitle'] = "Act: ";
749 $_SESSION['ViewingTitle'] = "Logging in";
750 $membertitle = " ".$ThemeSet['TitleDivider']." Login";
751 $UFID = rand_uuid("rand");
752 $_SESSION['UserFormID'] = $UFID;
754 <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
>
755 <div
class="DivNavLinks"> 
;</div
>
756 <div
class="Table1Border">
757 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
758 <div
class="TableRow1">
759 <span style
="text-align: left;">
760 <?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
>
763 <table
class="Table1">
764 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
765 <tr
class="TableRow1">
766 <td
class="TableColumn1"><span style
="text-align: left;">
767 <?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
>
770 <tr
class="TableRow2">
771 <th
class="TableColumn2" style
="width: 100%; text-align: left;"> 
;Inert your login info
: </th
>
773 <tr
class="TableRow3">
774 <td
class="TableColumn3">
775 <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']); ?>">
776 <table style
="text-align: left;">
777 <tr style
="text-align: left;">
778 <td style
="width: 30%;"><label
class="TextBoxLabel" for="username">Enter UserName
: </label
></td
>
779 <td style
="width: 70%;"><input maxlength
="24" class="TextBox" id
="username" type
="text" name
="username" /></td
>
780 </tr
><tr style
="text-align: left;">
781 <td style
="width: 30%;"><label
class="TextBoxLabel" for="userpass">Enter Password
: </label
></td
>
782 <td style
="width: 70%;"><input maxlength
="30" class="TextBox" id
="userpass" type
="password" name
="userpass" /></td
>
783 </tr
><tr style
="text-align: left;">
784 <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
>
785 <td style
="width: 70%;"><select id
="storecookie" name
="storecookie" class="TextBox">
786 <option value
="true">Yes
</option
>
787 <option value
="false">No
</option
>
789 </tr
><tr style
="text-align: left;">
790 <td style
="width: 30%;"><label
class="TextBoxLabel" title
="Use your Email address for username." for="loginemail">Login by Email?
</label
></td
>
791 <td style
="width: 70%;"><select id
="loginemail" name
="loginemail" class="TextBox">
792 <option value
="false">No
</option
>
793 <option value
="true">Yes
</option
>
796 <table style
="text-align: left;">
797 <tr style
="text-align: left;">
798 <td style
="width: 100%;">
799 <input type
="hidden" name
="act" value
="loginmember" style
="display: none;" />
800 <input type
="hidden" style
="display: none;" name
="fid" value
="<?php echo $UFID; ?>" />
801 <input
class="Button" type
="submit" value
="Log in" />
806 <tr
class="TableRow4">
807 <td
class="TableColumn4"> 
;</td
>
810 <?php
} } if($_POST['act']=="loginmember"&&$_GET['act']=="login_now") {
811 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
812 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
813 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
814 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
815 if($_SESSION['UserID']==0||
$_SESSION['UserID']==null) {
816 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=login","&","=",$prexqstr['member'],$exqstr['member']);
817 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
818 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
819 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
820 $_SESSION['ViewingFile'] = $exfile['member']; }
821 $_SESSION['PreViewingTitle'] = "Act: ";
822 $_SESSION['ViewingTitle'] = "Logging in";
823 $membertitle = " ".$ThemeSet['TitleDivider']." Login";
824 $REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
825 $URL['REFERER'] = $REFERERurl['host'];
826 $URL['HOST'] = $_SERVER["SERVER_NAME"];
829 <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
>
830 <div
class="DivNavLinks"> 
;</div
>
831 <div
class="Table1Border">
832 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
833 <div
class="TableRow1">
834 <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
>
837 <table
class="Table1">
838 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
839 <tr
class="TableRow1">
840 <td
class="TableColumn1">
841 <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
>
844 <tr
class="TableRow2">
845 <th
class="TableColumn2" style
="width: 100%; text-align: left;"> 
;Login Message
: </th
>
847 <tr
class="TableRow3">
848 <td
class="TableColumn3">
849 <table style
="width: 100%; height: 25%; text-align: center;">
851 if (pre_strlen($_POST['userpass'])>"60") { $Error="Yes"; ?
>
853 <td
><span
class="TableMessage">
854 <br
/>Your password is too big
.<br
/>
857 <?php
} if (pre_strlen($_POST['username'])>"30") { $Error="Yes"; ?
>
859 <td
><span
class="TableMessage">
860 <br
/>Your user name is too big
.<br
/>
863 <?php
} if($_POST['fid']!=$_SESSION['UserFormID']) { $Error="Yes"; ?
>
865 <td
><span
class="TableMessage">
866 <br
/>Sorry the referering url dose not match our host name
.<br
/>
869 <?php
} if ($Settings['TestReferer']=="on") {
870 if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes"; ?
>
872 <td
><span
class="TableMessage">
873 <br
/>Sorry the referering url dose not match our host name
.<br
/>
876 <?php
} } $BanError = null;
878 redirect("refresh",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false),"4"); }
880 $YourName = stripcslashes(htmlspecialchars($_POST['username'], ENT_QUOTES
, $Settings['charset']));
881 //$YourName = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $YourName);
882 $YourName = remove_spaces($YourName);
884 if(!isset($_POST['loginemail'])) { $_POST['loginemail'] = "false"; }
885 if($_POST['loginemail']!="true") {
886 $querylog = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"Name\"='%s' LIMIT 1", array($YourName)); }
887 if($_POST['loginemail']=="true") {
888 $querylog = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"Email\"='%s' LIMIT 1", array($YourName)); }
889 $resultlog=sql_query($querylog,$SQLStat);
890 $numlog=sql_num_rows($resultlog);
893 $YourName=sql_result($resultlog,$i,"Name");
894 $YourPassTry=sql_result($resultlog,$i,"UserPassword");
895 $HashType=sql_result($resultlog,$i,"HashType");
896 $JoinedPass=sql_result($resultlog,$i,"Joined");
897 $HashSalt=sql_result($resultlog,$i,"Salt");
899 if($HashType=="ODFH") { $YourPassword = PassHash2x($_POST['userpass']); }
900 if($HashType=="IPB2") { $YourPassword = hash2xkey($_POST['userpass'],$HashSalt); }
901 if($HashType=="DF4H") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
902 if($HashType=="iDBH2") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"md2"); }
903 if($HashType=="iDBH4") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"md4"); }
904 if($HashType=="iDBH5") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"md5"); }
905 if($HashType=="iDBH") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
906 if($HashType=="iDBH224") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha224"); }
907 if($HashType=="iDBH256") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha256"); }
908 if($HashType=="iDBH384") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha384"); }
909 if($HashType=="iDBH512") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha512"); }
910 if($HashType=="iDBHRMD128") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd128"); }
911 if($HashType=="iDBHRMD160") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd160"); }
912 if($HashType=="iDBHRMD256") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd256"); }
913 if($HashType=="iDBHRMD320") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd320"); }
914 if($HashType=="iDBHSALSA10") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"salsa10"); }
915 if($HashType=="iDBHSALSA20") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"salsa20"); }
916 if($YourPassword!=$YourPassTry) { $passright = false; }
917 if($YourPassword==$YourPassTry) { $passright = true;
918 $YourIDM=sql_result($resultlog,$i,"id");
919 $YourNameM=sql_result($resultlog,$i,"Name");
920 $YourPassM=sql_result($resultlog,$i,"UserPassword");
921 $PostCount=sql_result($resultlog,$i,"PostCount");
922 $YourGroupM=sql_result($resultlog,$i,"GroupID");
923 $YourGroupIDM=$YourGroupM;
924 $YourLastPostTime=sql_result($resultlog,$i,"LastPostTime");
925 $YourBanTime=sql_result($resultlog,$i,"BanTime");
926 $CGMTime = GMTimeStamp();
927 if($YourBanTime!=0&&$YourBanTime!=null) {
928 if($YourBanTime>=$CGMTime) { $BanError = "yes"; }
929 if($YourBanTime<0) { $BanError = "yes"; } }
930 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($YourGroupM));
931 $gresult=sql_query($gquery,$SQLStat);
932 $YourGroupM=sql_result($gresult,0,"Name");
933 sql_free_result($gresult);
934 $YourTimeZoneM=sql_result($resultlog,$i,"TimeZone");
935 $YourDSTM=sql_result($resultlog,$i,"DST");
936 $JoinedDate=sql_result($resultlog,$i,"Joined");
937 $UseTheme=sql_result($resultlog,$i,"UseTheme");
938 $NewHashSalt = salt_hmac();
939 if($Settings['use_hashtype']=="md2") { $iDBHash = "iDBH2";
940 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"md2"); }
941 if($Settings['use_hashtype']=="md4") { $iDBHash = "iDBH4";
942 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"md4"); }
943 if($Settings['use_hashtype']=="md5") { $iDBHash = "iDBH5";
944 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"md5"); }
945 if($Settings['use_hashtype']=="sha1") { $iDBHash = "iDBH";
946 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha1"); }
947 if($Settings['use_hashtype']=="sha224") { $iDBHash = "iDBH224";
948 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha224"); }
949 if($Settings['use_hashtype']=="sha256") { $iDBHash = "iDBH256";
950 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha256"); }
951 if($Settings['use_hashtype']=="sha384") { $iDBHash = "iDBH384";
952 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha384"); }
953 if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
954 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha512"); }
955 if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
956 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"ripemd128"); }
957 if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
958 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"ripemd160"); }
959 if($Settings['use_hashtype']=="ripemd256") { $iDBHash = "iDBHRMD256";
960 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"ripemd256"); }
961 if($Settings['use_hashtype']=="ripemd320") { $iDBHash = "iDBHRMD320";
962 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"ripemd320"); }
963 if($Settings['use_hashtype']=="salsa10") { $iDBHash = "iDBHRMD320";
964 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"salsa10"); }
965 if($Settings['use_hashtype']=="salsa20") { $iDBHash = "iDBHRMD320";
966 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"salsa20"); }
967 $NewDay=GMTimeStamp();
968 $NewIP=$_SERVER['REMOTE_ADDR'];
969 if($BanError!="yes") {
970 $queryup = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"UserPassword\"='%s',\"HashType\"='%s',\"LastActive\"=%i,\"IP\"='%s',\"Salt\"='%s' WHERE \"id\"=%i", array($NewPassword,$iDBHash,$NewDay,$NewIP,$NewHashSalt,$YourIDM));
971 sql_query($queryup,$SQLStat);
972 sql_free_result($resultlog);
973 //session_regenerate_id();
974 $_SESSION['Theme']=$UseTheme;
975 $_SESSION['MemberName']=$YourNameM;
976 $_SESSION['UserID']=$YourIDM;
977 $_SESSION['UserIP']=$_SERVER['REMOTE_ADDR'];
978 $_SESSION['UserTimeZone']=$YourTimeZoneM;
979 $_SESSION['UserGroup']=$YourGroupM;
980 $_SESSION['UserGroupID']=$YourGroupIDM;
981 $_SESSION['UserDST']=$YourDSTM;
982 $_SESSION['UserPass']=$NewPassword;
983 $_SESSION['LastPostTime'] = $YourLastPostTime;
984 $_SESSION['DBName']=$Settings['sqldb'];
985 if($_POST['storecookie']=="true") {
986 if($cookieDomain==null) {
987 setcookie("MemberName", $YourNameM, time() +
(7 * 86400), $cbasedir);
988 setcookie("UserID", $YourIDM, time() +
(7 * 86400), $cbasedir);
989 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir); }
990 if($cookieDomain!=null) {
991 if($cookieSecure===true) {
992 setcookie("MemberName", $YourNameM, time() +
(7 * 86400), $cbasedir, $cookieDomain, 1);
993 setcookie("UserID", $YourIDM, time() +
(7 * 86400), $cbasedir, $cookieDomain, 1);
994 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain, 1); }
995 if($cookieSecure===false) {
996 setcookie("MemberName", $YourNameM, time() +
(7 * 86400), $cbasedir, $cookieDomain);
997 setcookie("UserID", $YourIDM, time() +
(7 * 86400), $cbasedir, $cookieDomain);
998 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain); } } } }
1000 //echo "Password was not right or user not found!! <_< ";
1002 <?php
if($passright===true&&$BanError!="yes") {
1003 redirect("refresh",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false),"3"); ?
>
1005 <td
><span
class="TableMessage">
1006 <br
/>Welcome to the Board
<?php
echo $_SESSION['MemberName']; ?
>. ^_^
<br
/>
1007 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
/> 
;
1010 <?php
} if($passright===false||
$BanError=="yes"||
$numlog<=0) { ?
>
1012 <td
><span
class="TableMessage">
1013 <br
/>Password was not right
or user not found
or user is banned
!! <
;_
<
;<br
/>
1014 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
/> 
;
1020 <tr
class="TableRow4">
1021 <td
class="TableColumn4"> 
;</td
>
1024 <?php
} } if($_GET['act']=="signup") {
1025 $membertitle = " ".$ThemeSet['TitleDivider']." Signing up";
1026 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
1027 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
1028 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
1029 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
1030 if($_SESSION['UserID']==0||
$_SESSION['UserID']==null) {
1031 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=signup","&","=",$prexqstr['member'],$exqstr['member']);
1032 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1033 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
1034 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
1035 $_SESSION['ViewingFile'] = $exfile['member']; }
1036 $_SESSION['PreViewingTitle'] = "Act: ";
1037 $_SESSION['ViewingTitle'] = "Signing up";
1038 $UFID = rand_uuid("rand");
1039 $_SESSION['UserFormID'] = $UFID;
1041 <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
>
1042 <div
class="DivNavLinks"> 
;</div
>
1043 <div
class="Table1Border">
1044 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
1045 <div
class="TableRow1">
1046 <span style
="text-align: left;">
1047 <?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
>
1050 <table
class="Table1">
1051 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
1052 <tr
class="TableRow1">
1053 <td
class="TableColumn1"><span style
="text-align: left;">
1054 <?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
>
1057 <tr
class="TableRow2">
1058 <th
class="TableColumn2" style
="width: 100%; text-align: left;"> 
;Inert your user info
: </th
>
1060 <tr
class="TableRow3">
1061 <td
class="TableColumn3">
1062 <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']); ?>">
1063 <table style
="text-align: left;">
1064 <tr style
="text-align: left;">
1065 <td style
="width: 30%;"><label
class="TextBoxLabel" for="Name">Insert a UserName
:</label
></td
>
1066 <?php
if(!isset($_SESSION['GuestName'])) { ?
>
1067 <td style
="width: 70%;"><input maxlength
="24" type
="text" class="TextBox" name
="Name" size
="20" id
="Name" /></td
>
1068 <?php
} if(isset($_SESSION['GuestName'])) { ?
>
1069 <td style
="width: 70%;"><input maxlength
="24" type
="text" class="TextBox" name
="Name" size
="20" id
="Name" value
="<?php echo $_SESSION['GuestName']; ?>" /></td
>
1072 <td style
="width: 30%;"><label
class="TextBoxLabel" for="Password">Insert a Password
:</label
></td
>
1073 <td style
="width: 70%;"><input maxlength
="30" type
="password" class="TextBox" name
="Password" size
="20" id
="Password" /></td
>
1075 <td style
="width: 30%;"><label
class="TextBoxLabel" for="RePassword">ReInsert a Password
:</label
></td
>
1076 <td style
="width: 70%;"><input maxlength
="30" type
="password" class="TextBox" name
="RePassword" size
="20" id
="RePassword" /></td
>
1078 <td style
="width: 30%;"><label
class="TextBoxLabel" for="Email">Insert Your Email
:</label
></td
>
1079 <td style
="width: 70%;"><input type
="text" class="TextBox" name
="Email" size
="20" id
="Email" /></td
>
1081 <td style
="width: 30%;"><label
class="TextBoxLabel" for="YourOffSet">Your TimeZone
:</label
></td
>
1082 <td style
="width: 70%;"><select id
="YourOffSet" name
="YourOffSet" class="TextBox"><?php
1083 $tsa_mem = explode(":",$Settings['DefaultTimeZone']);
1084 $TimeZoneArray = array("offset" => $Settings['DefaultTimeZone'], "hour" => $tsa_mem[0], "minute" => $tsa_mem[1]);
1085 $plusi = 1; $minusi = 12;
1086 $plusnum = 15; $minusnum = 0;
1087 while ($minusi > $minusnum) {
1088 if($TimeZoneArray['hour']==-$minusi) {
1089 echo "<option selected=\"selected\" value=\"-".$minusi."\">UTC - ".$minusi.":00 hours</option>\n"; }
1090 if($TimeZoneArray['hour']!=-$minusi) {
1091 echo "<option value=\"-".$minusi."\">UTC - ".$minusi.":00 hours</option>\n"; }
1093 if($TimeZoneArray['hour']==0) { ?
>
1094 <option selected
="selected" value
="0">UTC +
/- 0:00 hours
</option
>
1095 <?php
} if($TimeZoneArray['hour']!=0) { ?
>
1096 <option value
="0">UTC +
/- 0:00 hours
</option
>
1098 while ($plusi < $plusnum) {
1099 if($TimeZoneArray['hour']==$plusi) {
1100 echo "<option selected=\"selected\" value=\"".$plusi."\">UTC + ".$plusi.":00 hours</option>\n"; }
1101 if($TimeZoneArray['hour']!=$plusi) {
1102 echo "<option value=\"".$plusi."\">UTC + ".$plusi.":00 hours</option>\n"; }
1106 <td style
="width: 50%;"><label
class="TextBoxLabel" for="MinOffSet">Minute OffSet
:</label
></td
>
1107 <td style
="width: 50%;"><select id
="MinOffSet" name
="MinOffSet" class="TextBox"><?php
1108 $mini = 0; $minnum = 60;
1109 while ($mini < $minnum) {
1110 if(strlen($mini)==2) { $showmin = $mini; }
1111 if(strlen($mini)==1) { $showmin = "0".$mini; }
1112 if($mini==$TimeZoneArray['minute']) {
1113 echo "\n<option selected=\"selected\" value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
1114 if($mini!=$TimeZoneArray['minute']) {
1115 echo "<option value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
1119 <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
>
1120 <td style
="width: 70%;"><select id
="DST" name
="DST" class="TextBox"><?php
echo "\n" ?
>
1121 <?php
if($Settings['DefaultDST']=="off"||
$Settings['DefaultDST']!="on") { ?
>
1122 <option selected
="selected" value
="off">off
</option
><?php
echo "\n" ?
><option value
="on">on
</option
>
1123 <?php
} if($Settings['DefaultDST']=="on") { ?
>
1124 <option selected
="selected" value
="on">on
</option
><?php
echo "\n" ?
><option value
="off">off
</option
>
1125 <?php
} echo "\n" ?
></select
></td
>
1127 <td style
="width: 30%;"><label
class="TextBoxLabel" for="YourGender">Your Gender
:</label
></td
>
1128 <td style
="width: 70%;"><select id
="YourGender" name
="YourGender" class="TextBox">
1129 <option value
="Male">Male
</option
>
1130 <option value
="Female">Female
</option
>
1131 <option value
="Unknow">Unknown
</option
>
1134 <td style
="width: 30%;"><label
class="TextBoxLabel" for="Website">Insert your Website
:</label
></td
>
1135 <td style
="width: 70%;"><input type
="text" class="TextBox" name
="Website" size
="20" value
="http://" id
="Website" /></td
>
1137 <td style
="width: 30%;"><label
class="TextBoxLabel" for="Avatar">Insert a URL
for Avatar
:</label
></td
>
1138 <td style
="width: 70%;"><input type
="text" class="TextBox" name
="Avatar" size
="20" value
="http://" id
="Avatar" /></td
>
1140 <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
>
1141 <td style
="width: 70%;"><select id
="storecookie" name
="storecookie" class="TextBox">
1142 <option value
="true">Yes
</option
>
1143 <option value
="false">No
</option
>
1147 <table style
="text-align: left;">
1148 <tr style
="text-align: left;">
1149 <td style
="width: 100%;">
1150 <label
class="TextBoxLabel" for="TOSBox">TOS
- Please read fully
and check
'I agree' box ONLY
if you agree to terms
</label
><br
/>
1151 <textarea rows
="10" cols
="58" id
="TOSBox" name
="TOSBox" class="TextBox" readonly
="readonly" accesskey
="T"><?php
1152 echo file_get_contents("TOS"); ?
></textarea
><br
/>
1153 <input type
="checkbox" class="TextBox" name
="TOS" value
="Agree" id
="TOS" /><label
class="TextBoxLabel" for="TOS">I Agree
</label
>
1154 <?php
if($Settings['use_captcha']!="on") { ?
><br
/>
1155 <?php
} if($Settings['use_captcha']=="on") { ?
>
1157 <tr style
="text-align: left;">
1158 <td style
="width: 100%;">
1159 <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
/>
1160 <input maxlength
="25" type
="text" class="TextBox" name
="signcode" size
="20" id
="signcode" value
="Enter SignCode" /><br
/><?php
} ?
>
1161 <input type
="hidden" style
="display: none;" name
="act" value
="makemembers" />
1162 <input type
="hidden" style
="display: none;" name
="fid" value
="<?php echo $UFID; ?>" />
1163 <input type
="submit" class="Button" value
="Sign UP" />
1169 <tr
class="TableRow4">
1170 <td
class="TableColumn4"> 
;</td
>
1173 <?php
} } if($_GET['act']=="makemember") {
1174 if($_POST['act']=="makemembers") {
1175 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
1176 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
1177 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
1178 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
1179 if($_SESSION['UserID']==0||
$_SESSION['UserID']==null) {
1180 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=signup","&","=",$prexqstr['member'],$exqstr['member']);
1181 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1182 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
1183 if($Settings['file_ext']=="no+ext"||
$Settings['file_ext']=="no ext") {
1184 $_SESSION['ViewingFile'] = $exfile['member']; }
1185 $_SESSION['PreViewingTitle'] = "Act: ";
1186 $_SESSION['ViewingTitle'] = "Signing up";
1187 $membertitle = " ".$ThemeSet['TitleDivider']." Signing up";
1188 $REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
1189 $URL['REFERER'] = $REFERERurl['host'];
1190 $URL['HOST'] = $_SERVER["SERVER_NAME"];
1192 if(!isset($_POST['username'])) { $_POST['username'] = null; }
1193 if(!isset($_POST['TOS'])) { $_POST['TOS'] = null; }
1194 if($Settings['use_captcha']=="on") {
1195 require($SettDir['inc']."captcha.php"); }
1197 <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
>
1198 <div
class="DivNavLinks"> 
;</div
>
1199 <div
class="Table1Border">
1200 <?php
if($ThemeSet['TableStyle']=="div") { ?
>
1201 <div
class="TableRow1">
1202 <span style
="text-align: left;">
1203  
;<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
>
1205 <table
class="Table1">
1206 <?php
if($ThemeSet['TableStyle']=="table") { ?
>
1207 <tr
class="TableRow1">
1208 <td
class="TableColumn1"><span style
="text-align: left;">
1209  
;<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
>
1211 <tr
class="TableRow2">
1212 <th
class="TableColumn2" style
="width: 100%; text-align: left;"> 
;Signup Message
: </th
>
1214 <tr
class="TableRow3">
1215 <td
class="TableColumn3">
1216 <table style
="width: 100%; height: 25%; text-align: center;">
1217 <?php
if (pre_strlen($_POST['Password'])>"60") { $Error="Yes"; ?
>
1219 <td
><span
class="TableMessage">
1220 <br
/>Your password is too big
.<br
/>
1223 <?php
} if($_POST['fid']!=$_SESSION['UserFormID']) { $Error="Yes"; ?
>
1225 <td
><span
class="TableMessage">
1226 <br
/>Sorry the referering url dose not match our host name
.<br
/>
1229 <?php
} if (pre_strlen($_POST['username'])>"30") { $Error="Yes"; ?
>
1231 <td
><span
class="TableMessage">
1232 <br
/>Your user name is too big
.<br
/>
1235 <?php
} if ($_POST['Password']!=$_POST['RePassword']) { $Error="Yes"; ?
>
1237 <td
><span
class="TableMessage">
1238 <br
/>Your passwords did not match
.<br
/>
1241 <?php
} if($Settings['use_captcha']=="on") {
1242 if (PhpCaptcha
::Validate($_POST['signcode'])) {
1243 //echo 'Valid code entered';
1244 } else { $Error="Yes"; ?
>
1246 <td
><span
class="TableMessage">
1247 <br
/>Invalid code entered
<br
/>
1250 <?php
} } if ($Settings['TestReferer']=="on") {
1251 if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes"; ?
>
1253 <td
><span
class="TableMessage">
1254 <br
/>Sorry the referering url dose not match our host name
.<br
/>
1258 $Name = stripcslashes(htmlspecialchars($_POST['Name'], ENT_QUOTES
, $Settings['charset']));
1259 //$Name = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Name);
1260 $Name = remove_spaces($Name);
1261 $lonewolfqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."restrictedwords\" WHERE \"RestrictedUserName\"='yes'", array(null));
1262 $lonewolfrt=sql_query($lonewolfqy,$SQLStat);
1263 $lonewolfnm=sql_num_rows($lonewolfrt);
1264 $lonewolfs=0; $RMatches = null;
1265 while ($lonewolfs < $lonewolfnm) {
1266 $RWord=sql_result($lonewolfrt,$lonewolfs,"Word");
1267 $RCaseInsensitive=sql_result($lonewolfrt,$lonewolfs,"CaseInsensitive");
1268 if($RCaseInsensitive=="on") { $RCaseInsensitive = "yes"; }
1269 if($RCaseInsensitive=="off") { $RCaseInsensitive = "no"; }
1270 if($RCaseInsensitive!="yes"||
$RCaseInsensitive!="no") { $RCaseInsensitive = "no"; }
1271 $RWholeWord=sql_result($lonewolfrt,$lonewolfs,"WholeWord");
1272 if($RWholeWord=="on") { $RWholeWord = "yes"; }
1273 if($RWholeWord=="off") { $RWholeWord = "no"; }
1274 if($RWholeWord!="yes"||
$RWholeWord!="no") { $RWholeWord = "no"; }
1275 $RWord = preg_quote($RWord, "/");
1276 if($RCaseInsensitive!="yes"&&$RWholeWord=="yes") {
1277 $RMatches = preg_match("/\b(".$RWord.")\b/", $Name);
1278 if($RMatches==true) { break 1; } }
1279 if($RCaseInsensitive=="yes"&&$RWholeWord=="yes") {
1280 $RMatches = preg_match("/\b(".$RWord.")\b/i", $Name);
1281 if($RMatches==true) { break 1; } }
1282 if($RCaseInsensitive!="yes"&&$RWholeWord!="yes") {
1283 $RMatches = preg_match("/".$RWord."/", $Name);
1284 if($RMatches==true) { break 1; } }
1285 if($RCaseInsensitive=="yes"&&$RWholeWord!="yes") {
1286 $RMatches = preg_match("/".$RWord."/i", $Name);
1287 if($RMatches==true) { break 1; } }
1288 ++
$lonewolfs; } sql_free_result($lonewolfrt);
1289 $sql_email_check = sql_query(sql_pre_query("SELECT \"Email\" FROM \"".$Settings['sqltable']."members\" WHERE \"Email\"='%s'", array($_POST['Email'])),$SQLStat);
1290 $sql_username_check = sql_query(sql_pre_query("SELECT \"Name\" FROM \"".$Settings['sqltable']."members\" WHERE \"Name\"='%s'", array($Name)),$SQLStat);
1291 $email_check = sql_num_rows($sql_email_check);
1292 $username_check = sql_num_rows($sql_username_check);
1293 sql_free_result($sql_email_check); sql_free_result($sql_username_check);
1294 if ($_POST['TOS']!="Agree") { $Error="Yes"; ?
>
1296 <td
><span
class="TableMessage">
1297 <br
/>You need to agree to the tos
.<br
/>
1300 <?php
} if ($_POST['Name']==null) { $Error="Yes"; ?
>
1302 <td
><span
class="TableMessage">
1303 <br
/>You need to enter a name
.<br
/>
1306 <?php
} if ($_POST['Name']=="ShowMe") { $Error="Yes"; ?
>
1308 <td
><span
class="TableMessage">
1309 <br
/>You need to enter a name
.<br
/>
1312 <?php
} if ($_POST['Password']==null) { $Error="Yes"; ?
>
1314 <td
><span
class="TableMessage">
1315 <br
/>You need to enter a password
.<br
/>
1318 <?php
} if ($_POST['Email']==null) { $Error="Yes"; ?
>
1320 <td
><span
class="TableMessage">
1321 <br
/>You need to enter a email
.<br
/>
1324 <?php
} if($email_check > 0) { $Error="Yes"; ?
>
1326 <td
><span
class="TableMessage">
1327 <br
/>Email address is already used
.<br
/>
1330 <?php
} if($username_check > 0) { $Error="Yes"; ?
>
1332 <td
><span
class="TableMessage">
1333 <br
/>User Name is already used
.<br
/>
1336 <?php
} if($RMatches==true) { $Error="Yes"; ?
>
1338 <td
><span
class="TableMessage">
1339 <br
/>This User Name is restricted to
use.<br
/>
1342 <?php
} if ($Error=="Yes") {
1343 redirect("refresh",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],FALSE),"4"); ?
>
1345 <td
><span
class="TableMessage">
1346 <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
/> 
;
1349 <?php
} if ($Error!="Yes") {
1350 $_POST['UserIP'] = $_SERVER['REMOTE_ADDR'];
1351 $_POST['Group'] = $Settings['MemberGroup'];
1352 $_POST['Joined'] = GMTimeStamp(); $_POST['LastActive'] = GMTimeStamp();
1353 $_POST['Signature'] = ""; $_POST['Interests'] = "";
1354 $_POST['Title'] = ""; $_POST['PostCount'] = "0";
1355 if(!isset($Settings['AdminValidate'])) { $Settings['AdminValidate'] = "off"; }
1356 if($Settings['AdminValidate']=="on"||
$Settings['AdminValidate']!="off")
1357 { $ValidateStats="no"; $yourgroup=$Settings['ValidateGroup']; }
1358 if($Settings['AdminValidate']=="off"||
$Settings['AdminValidate']!="on")
1359 { $ValidateStats="yes"; $yourgroup=$Settings['MemberGroup']; }
1360 $HideMe = "no"; $HashSalt = salt_hmac();
1361 if($Settings['use_hashtype']=="md2") { $iDBHash = "iDBH2";
1362 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"md2"); }
1363 if($Settings['use_hashtype']=="md4") { $iDBHash = "iDBH4";
1364 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"md4"); }
1365 if($Settings['use_hashtype']=="md5") { $iDBHash = "iDBH5";
1366 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"md5"); }
1367 if($Settings['use_hashtype']=="sha1") { $iDBHash = "iDBH";
1368 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha1"); }
1369 if($Settings['use_hashtype']=="sha224") { $iDBHash = "iDBH224";
1370 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha224"); }
1371 if($Settings['use_hashtype']=="sha256") { $iDBHash = "iDBH256";
1372 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha256"); }
1373 if($Settings['use_hashtype']=="sha384") { $iDBHash = "iDBH384";
1374 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha384"); }
1375 if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
1376 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha512"); }
1377 if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
1378 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"ripemd128"); }
1379 if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
1380 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"ripemd160"); }
1381 if($Settings['use_hashtype']=="ripemd256") { $iDBHash = "iDBHRMD256";
1382 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"ripemd256"); }
1383 if($Settings['use_hashtype']=="ripemd320") { $iDBHash = "iDBHRMD320";
1384 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"ripemd320"); }
1385 if($Settings['use_hashtype']=="salsa10") { $iDBHash = "iDBHRMD320";
1386 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"salsa10"); }
1387 if($Settings['use_hashtype']=="salsa20") { $iDBHash = "iDBHRMD320";
1388 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"salsa20"); }
1389 $_GET['YourPost'] = $_POST['Signature'];
1390 //require( './'.$SettDir['misc'].'HTMLTags.php');
1391 $_GET['YourPost'] = htmlspecialchars($_GET['YourPost'], ENT_QUOTES
, $Settings['charset']);
1392 //$_GET['YourPost'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_GET['YourPost']);
1393 $NewSignature = $_GET['YourPost'];
1394 $_GET['YourPost'] = preg_replace("/\t+/"," ",$_GET['YourPost']);
1395 $_GET['YourPost'] = preg_replace("/\s\s+/"," ",$_GET['YourPost']);
1396 $_GET['YourPost'] = remove_bad_entities($_GET['YourPost']);
1397 $Avatar = stripcslashes(htmlspecialchars($_POST['Avatar'], ENT_QUOTES
, $Settings['charset']));
1398 //$Avatar = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Avatar);
1399 $Avatar = remove_spaces($Avatar);
1400 $Website = stripcslashes(htmlspecialchars($_POST['Website'], ENT_QUOTES
, $Settings['charset']));
1401 //$Website = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Website);
1402 $Website = remove_spaces($Website);
1403 $gquerys = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s' LIMIT 1", array($yourgroup));
1404 $gresults=sql_query($gquerys,$SQLStat);
1405 $yourgroup=sql_result($gresults,0,"id");
1406 sql_free_result($gresults);
1407 $_POST['Interests'] = remove_spaces($_POST['Interests']);
1408 $_POST['Title'] = remove_spaces($_POST['Title']);
1409 $_POST['Email'] = remove_spaces($_POST['Email']);
1410 if(!is_numeric($_POST['YourOffSet'])) { $_POST['YourOffSet'] = "0"; }
1411 if($_POST['YourOffSet']>12) { $_POST['YourOffSet'] = "12"; }
1412 if($_POST['YourOffSet']<-12) { $_POST['YourOffSet'] = "-12"; }
1413 if(!is_numeric($_POST['MinOffSet'])) { $_POST['MinOffSet'] = "00"; }
1414 if($_POST['MinOffSet']>59) { $_POST['MinOffSet'] = "59"; }
1415 if($_POST['MinOffSet']<0) { $_POST['MinOffSet'] = "00"; }
1416 $_POST['YourOffSet'] = $_POST['YourOffSet'].":".$_POST['MinOffSet'];
1417 $query = sql_pre_query("INSERT INTO \"".$Settings['sqltable']."members\" (\"Name\", \"UserPassword\", \"HashType\", \"Email\", \"GroupID\", \"Validated\", \"HiddenMember\", \"WarnLevel\", \"Interests\", \"Title\", \"Joined\", \"LastActive\", \"LastPostTime\", \"BanTime\", \"BirthDay\", \"BirthMonth\", \"BirthYear\", \"Signature\", \"Notes\", \"Avatar\", \"AvatarSize\", \"Website\", \"Gender\", \"PostCount\", \"Karma\", \"KarmaUpdate\", \"RepliesPerPage\", \"TopicsPerPage\", \"MessagesPerPage\", \"TimeZone\", \"DST\", \"UseTheme\", \"IP\", \"Salt\") VALUES\n".
1418 "('%s', '%s', '%s', '%s', '%s', '%s', '%s', %i, '%s', '%s', %i, %i, '0', '0', '0', '0', '0', '%s', '%s', '%s', '%s', '%s', '%s', %i, 0, 0, 10, 10, 10, '%s', '%s', '%s', '%s', '%s')", array($Name,$NewPassword,$iDBHash,$_POST['Email'],$yourgroup,$ValidateStats,$HideMe,"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));
1419 sql_query($query,$SQLStat);
1420 $yourid = sql_get_next_id($Settings['sqltable'],"members",$SQLStat);
1421 $querylogr = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"Name\"='%s' AND \"UserPassword\"='%s' LIMIT 1", array($Name,$NewPassword));
1422 $resultlogr=sql_query($querylogr,$SQLStat);
1423 $numlogr=sql_num_rows($resultlogr);
1426 $YourIDMr=sql_result($resultlogr,$ir,"id");
1427 $YourNameMr=sql_result($resultlogr,$ir,"Name");
1428 $YourGroupMr=sql_result($resultlogr,$ir,"GroupID");
1429 $YourGroupIDMr=$YourGroupMr;
1430 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($YourGroupMr));
1431 $gresult=sql_query($gquery,$SQLStat);
1432 $YourGroupMr=sql_result($gresult,0,"Name");
1433 sql_free_result($gresult);
1434 $YourTimeZoneMr=sql_result($resultlogr,$ir,"TimeZone");
1435 $YourDSTMr=sql_result($resultlogr,$ir,"DST"); }
1436 sql_free_result($resultlogr);
1437 session_regenerate_id(true);
1438 $_SESSION['Loggedin']=true;
1439 $_SESSION['MemberName']=$YourNameMr;
1440 $_SESSION['UserID']=$YourIDMr;
1441 $_SESSION['UserIP']=$_SERVER['REMOTE_ADDR'];
1442 $_SESSION['UserTimeZone']=$YourTimeZoneMr;
1443 $_SESSION['UserDST']=$YourDSTMr;
1444 $_SESSION['UserGroup']=$YourGroupMr;
1445 $_SESSION['UserGroupID']=$YourGroupIDMr;
1446 $_SESSION['UserPass']=$NewPassword;
1447 $_SESSION['DBName']=$Settings['sqldb'];
1448 if($_POST['storecookie']=="true") {
1449 if($cookieDomain==null) {
1450 setcookie("MemberName", $YourNameMr, time() +
(7 * 86400), $cbasedir);
1451 setcookie("UserID", $YourIDMr, time() +
(7 * 86400), $cbasedir);
1452 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir); }
1453 if($cookieDomain!=null) {
1454 if($cookieSecure===true) {
1455 setcookie("MemberName", $YourNameMr, time() +
(7 * 86400), $cbasedir, $cookieDomain, 1);
1456 setcookie("UserID", $YourIDMr, time() +
(7 * 86400), $cbasedir, $cookieDomain, 1);
1457 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain, 1); }
1458 if($cookieSecure===false) {
1459 setcookie("MemberName", $YourNameMr, time() +
(7 * 86400), $cbasedir, $cookieDomain);
1460 setcookie("UserID", $YourIDMr, time() +
(7 * 86400), $cbasedir, $cookieDomain);
1461 setcookie("SessPass", $NewPassword, time() +
(7 * 86400), $cbasedir, $cookieDomain); } } }
1462 redirect("refresh",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],FALSE),"3");
1465 <td
><span
class="TableMessage">
1466 <br
/>Welcome to the Board
<?php
echo $_SESSION['MemberName']; ?
>. ^_^
<br
/>
1467 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";
1468 if($Settings['AdminValidate']=="on"||
$Settings['AdminValidate']!="off") {
1469 echo "<br />The admin has to validate your account befoure you can post.\n";
1470 echo "<br />The admin has been notified of your registration.\n"; } ?
>
1477 <tr
class="TableRow4">
1478 <td
class="TableColumn4"> 
;</td
>
1482 if($pagenum<=1) { ?
>
1483 <div
class="DivMembers"> 
;</div
>