OSDN Git Service

Add files via upload
[idb/iDB.git.git] / inc / members.php
1 <?php
2 /*
3     This program is free software; you can redistribute it and/or modify
4     it under the terms of the Revised BSD License.
5
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.
10
11     Copyright 2004-2017 iDB Support - http://idb.berlios.de/
12     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
13
14     $FileInfo: members.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
15 */
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="members.php"||$File3Name=="/members.php") {
18         require('index.php');
19         exit(); }
20 $pagenum = null;
21 if(!is_numeric($_GET['id'])) { $_GET['id'] = null; }
22 if(!is_numeric($_GET['page'])) { $_GET['page'] = 1; }
23 if($_GET['act']=="list"||$_GET['act']=="getactive") {
24 $orderlist = null;
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; }
67 $i=0;
68 if($_GET['act']=="list") {
69 if($_GET['groupid']==null) {
70 $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'])); 
71 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"<>%i AND \"id\">=0 AND \"HiddenMember\"='no'", array($GGroup)); }
72 if($_GET['groupid']!=null) {
73 $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'])); 
74 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"=%i AND \"GroupID\"<>%i AND \"id\">=0", array($_GET['groupid'],$GGroup)); } }
75 if($_GET['act']=="getactive") {
76 $active_month = $usercurtime->format("m");
77 $active_day = $usercurtime->format("d");
78 $active_year = $usercurtime->format("Y");
79 $active_start = mktime(0,0,0,$active_month,$active_day,$active_year);
80 $active_end = mktime(23,59,59,$active_month,$active_day,$active_year);
81 if($_GET['groupid']==null) {
82 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"<>%i AND \"id\">=0 AND \"HiddenMember\"='no' AND (\"LastActive\">=%i AND \"LastActive\"<=%i) ".$orderlist." ".$SQLimit, array($GGroup,$active_start,$active_end,$PageLimit,$Settings['max_memlist'])); 
83 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"<>%i AND \"id\">=0 AND \"HiddenMember\"='no' AND (\"LastActive\">=%i AND \"LastActive\"<=%i)", array($GGroup,$active_start,$active_end)); }
84 if($_GET['groupid']!=null) {
85 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"=%i AND \"GroupID\"<>%i AND \"id\">=0 AND (\"LastActive\">=%i AND \"LastActive\"<=%i) ".$orderlist." ".$SQLimit, array($_GET['groupid'],$GGroup,$active_start,$active_end,$PageLimit,$Settings['max_memlist'])); 
86 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."members\" WHERE \"GroupID\"=%i AND \"GroupID\"<>%i AND \"id\">=0 AND (\"LastActive\">=%i AND \"LastActive\"<=%i)", array($_GET['groupid'],$GGroup,$active_start,$active_end)); } }
87 $result=sql_query($query,$SQLStat);
88 $rnresult=sql_query($rnquery,$SQLStat);
89 $NumberMembers = sql_result($rnresult,0);
90 sql_free_result($rnresult);
91 if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
92 if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else { 
93          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
94             $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
95          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
96             $_SESSION['AncientViewingFile'] = $exfile['index']; } }
97 if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
98 if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
99 if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
100 if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
101 if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else { 
102          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
103             $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
104          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
105             $_SESSION['OldViewingFile'] = $exfile['index']; } }
106 if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
107 if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
108 if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
109 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=list&orderby=".$_GET['orderby']."&ordertype=".$_GET['ordertype']."&page=".$_GET['page'],"&","=",$prexqstr['member'],$exqstr['member']);
110 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
111 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
112 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
113 $_SESSION['ViewingFile'] = $exfile['member']; }
114 $_SESSION['PreViewingTitle'] = "Viewing";
115 $_SESSION['ViewingTitle'] = "Member List";
116 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
117 if($NumberMembers==null) { 
118         $NumberMembers = 0; }
119 $num = $NumberMembers;
120 //Start MemberList Page Code
121 if(!isset($Settings['max_memlist'])) { $Settings['max_memlist'] = 10; }
122 if($_GET['page']==null) { $_GET['page'] = 1; } 
123 if($_GET['page']<=0) { $_GET['page'] = 1; }
124 $nums = $_GET['page'] * $Settings['max_memlist'];
125 if($nums>$num) { $nums = $num; }
126 $numz = $nums - $Settings['max_memlist'];
127 if($numz<=0) { $numz = 0; }
128 //$i=$numz;
129 if($nums<$num) { $nextpage = $_GET['page'] + 1; }
130 if($nums>=$num) { $nextpage = $_GET['page']; }
131 if($numz>=$Settings['max_memlist']) { $backpage = $_GET['page'] - 1; }
132 if($_GET['page']<=1) { $backpage = 1; }
133 $pnum = $num; $l = 1; $Pages = null;
134 while ($pnum>0) {
135 if($pnum>=$Settings['max_memlist']) { 
136         $pnum = $pnum - $Settings['max_memlist']; 
137         $Pages[$l] = $l; ++$l; }
138 if($pnum<$Settings['max_memlist']&&$pnum>0) { 
139         $pnum = $pnum - $pnum; 
140         $Pages[$l] = $l; ++$l; } }
141 $nums = $_GET['page'] * $Settings['max_memlist'];
142 //End MemberList Page Code
143 $num=sql_num_rows($result);
144 //List Page Number Code Start
145 $pagenum=count($Pages);
146 if($_GET['page']>$pagenum) {
147         $_GET['page'] = $pagenum; }
148 $pagei=0; $pstring = null;
149 if($pagenum>1) {
150 $pstring = "<div class=\"PageList\"><span class=\"pagelink\">".$pagenum." Pages:</span> "; }
151 if($_GET['page']<4) { $Pagez[0] = null; }
152 if($_GET['page']>=4) { $Pagez[0] = "First"; }
153 if($_GET['page']>=3) {
154 $Pagez[1] = $_GET['page'] - 2; }
155 if($_GET['page']<3) {
156 $Pagez[1] = null; }
157 if($_GET['page']>=2) {
158 $Pagez[2] = $_GET['page'] - 1; }
159 if($_GET['page']<2) {
160 $Pagez[2] = null; }
161 $Pagez[3] = $_GET['page'];
162 if($_GET['page']<$pagenum) {
163 $Pagez[4] = $_GET['page'] + 1; }
164 if($_GET['page']>=$pagenum) {
165 $Pagez[4] = null; }
166 $pagenext = $_GET['page'] + 1;
167 if($pagenext<$pagenum) {
168 $Pagez[5] = $_GET['page'] + 2; }
169 if($pagenext>=$pagenum) {
170 $Pagez[5] = null; }
171 if($_GET['page']<$pagenum) { $Pagez[6] = "Last"; }
172 if($_GET['page']>=$pagenum) { $Pagez[6] = null; }
173 $pagenumi=count($Pagez);
174 if($NumberMembers==0) {
175 $pagenumi = 0;
176 $pstring = null; }
177 if($pagenum>1) {
178 while ($pagei < $pagenumi) {
179 if($_GET['page']!=1&&$pagei==1) {
180 $Pback = $_GET['page'] - 1;
181 $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'])."\">&lt;</a></span> "; }
182 if($Pagez[$pagei]!=null&&
183    $Pagez[$pagei]!="First"&&
184    $Pagez[$pagei]!="Last") {
185 if($pagei!=3) { 
186 $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> "; }
187 if($pagei==3) { 
188 $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> "; } }
189 if($Pagez[$pagei]=="First") {
190 $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'])."\">&laquo;</a></span> "; }
191 if($Pagez[$pagei]=="Last") {
192 $ptestnext = $pagenext + 1;
193 $paget = $pagei - 1;
194 $Pnext = $_GET['page'] + 1;
195 $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'])."\">&gt;</a></span> ";
196 if($ptestnext<$pagenum) {
197 $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'])."\">&raquo;</a></span> "; } }
198         ++$pagei; } $pstring = $pstring."</div>"; }
199 ?>
200 <div class="NavLinks"><?php echo $ThemeSet['NavLinkIcon']; ?><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php echo $Settings['board_name']; ?></a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Member list</a></div>
201 <div class="DivNavLinks">&nbsp;</div>
202 <?php
203 echo $pstring;
204 //List Page Number Code end
205 if($pagenum>1) {
206 ?>
207 <div class="DivPageLinks">&nbsp;</div>
208 <?php } ?>
209 <div class="Table1Border">
210 <?php if($ThemeSet['TableStyle']=="div") { ?>
211 <div class="TableRow1">
212 <span style="text-align: left;">
213 <?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>
214 </span></div>
215 <?php } ?>
216 <table class="Table1">
217 <?php if($ThemeSet['TableStyle']=="table") { ?>
218 <tr class="TableRow1">
219 <td class="TableColumn1" colspan="8"><span style="text-align: left;">
220 <?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>
221 </span></td>
222 </tr><?php } ?>
223 <tr id="Member" class="TableRow2">
224 <th class="TableColumn2" style="width: 28%;">Name</th>
225 <th class="TableColumn2" style="width: 10%;">Group</th>
226 <th class="TableColumn2" style="width: 5%;">Posts</th>
227 <th class="TableColumn2" style="width: 5%;">Karma</th>
228 <th class="TableColumn2" style="width: 20%;">Joined</th>
229 <th class="TableColumn2" style="width: 20%;">Last Active</th>
230 <th class="TableColumn2" style="width: 7%;">Website</th>
231 <th class="TableColumn2" style="width: 5%;">Message</th>
232 </tr>
233 <?php
234 while ($i < $num) {
235 $MemList['ID']=sql_result($result,$i,"id");
236 $MemList['Name']=sql_result($result,$i,"Name");
237 $MemList['Email']=sql_result($result,$i,"Email");
238 $MemList['GroupID']=sql_result($result,$i,"GroupID");
239 $MemList['HiddenMember']=sql_result($result,$i,"HiddenMember");
240 $MemList['WarnLevel']=sql_result($result,$i,"WarnLevel");
241 $MemList['Interests']=sql_result($result,$i,"Interests");
242 $MemList['Title']=sql_result($result,$i,"Title");
243 $MemList['Joined']=sql_result($result,$i,"Joined");
244 $tmpusrcurtime = new DateTime();
245 $tmpusrcurtime->setTimestamp($MemList['Joined']);
246 $tmpusrcurtime->setTimezone($usertz);
247 $MemList['Joined']=$tmpusrcurtime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']);
248 $MemList['LastActive']=sql_result($result,$i,"LastActive");
249 $tmpusrcurtime = new DateTime();
250 $tmpusrcurtime->setTimestamp($MemList['LastActive']);
251 $tmpusrcurtime->setTimezone($usertz);
252 $MemList['LastActive']=$tmpusrcurtime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']);
253 $MemList['Website']=sql_result($result,$i,"Website");
254 if($MemList['Website']=="http://") { 
255         $MemList['Website'] = $Settings['idburl']; }
256 $MemList['Website'] = urlcheck($MemList['Website']);
257 $BoardWWWChCk = parse_url($Settings['idburl']);
258 $MemsWWWChCk = parse_url($MemList['Website']);
259 $opennew = " onclick=\"window.open(this.href);return false;\"";
260 if($BoardWWWChCk['host']==$MemsWWWChCk['host']) {
261         $opennew = null; }
262 $MemList['Gender']=sql_result($result,$i,"Gender");
263 $MemList['PostCount']=sql_result($result,$i,"PostCount");
264 $MemList['Karma']=sql_result($result,$i,"Karma");
265 $MemList['TimeZone']=sql_result($result,$i,"TimeZone");
266 $MemList['IP']=sql_result($result,$i,"IP");
267 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($MemList['GroupID']));
268 $gresult=sql_query($gquery,$SQLStat);
269 $MemList['Group']=sql_result($gresult,0,"Name");
270 $GroupNamePrefix=sql_result($gresult,0,"NamePrefix");
271 $GroupNameSuffix=sql_result($gresult,0,"NameSuffix");
272 sql_free_result($gresult);
273 if(isset($GroupNamePrefix)&&$GroupNamePrefix!=null) {
274         $MemList['Name'] = $GroupNamePrefix.$MemList['Name']; }
275 if(isset($GroupNameSuffix)&&$GroupNameSuffix!=null) {
276         $MemList['Name'] = $MemList['Name'].$GroupNameSuffix; }
277 $membertitle = " ".$ThemeSet['TitleDivider']." Member List";
278 if($MemList['Group']!=$Settings['GuestGroup']) {
279 ?>
280 <tr class="TableRow3" id="Member<?php echo $MemList['ID']; ?>">
281 <td class="TableColumn3" style="text-align: center;">&nbsp;<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> <?php if($GroupInfo['CanViewIPAddress']=="yes") { ?> ( <a title="<?php echo $MemList['IP']; ?>" onclick="window.open(this.href);return false;" href="<?php echo sprintf($IPCheckURL,$MemList['IP']); ?>"><?php echo $MemList['IP']; ?></a> )<?php } ?></td>
282 <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>
283 <td class="TableColumn3" style="text-align: center;"><?php echo $MemList['PostCount']; ?></td>
284 <td class="TableColumn3" style="text-align: center;"><?php echo $MemList['Karma']; ?></td>
285 <td class="TableColumn3" style="text-align: center;"><?php echo $MemList['Joined']; ?></td>
286 <td class="TableColumn3" style="text-align: center;"><?php echo $MemList['LastActive']; ?></td>
287 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo $MemList['Website']; ?>"<?php echo $opennew; ?>>Website</a></td>
288 <?php if($MemList['ID']>0&&$MemList['HiddenMember']=="no") { ?>
289 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=create&id=".$MemList['ID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>"<?php echo $opennew; ?>>PM</a></td>
290 <?php } if($MemList['ID']<=0||$MemList['HiddenMember']=="yes") { ?>
291 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"<?php echo $opennew; ?>>PM</a></td>
292 <?php } ?>
293 </tr>
294 <?php }
295 ++$i; } sql_free_result($result);
296 ?>
297 <tr id="MemEnd" class="TableRow4">
298 <td class="TableColumn4" colspan="8">&nbsp;</td>
299 </tr>
300 </table></div>
301 <?php 
302 if($pagenum>1) {
303 ?>
304 <div class="DivMembers">&nbsp;</div>
305 <?php }
306 echo $pstring;
307 //List Page Number Code end
308 if($pagenum>1) {
309 ?>
310 <div class="DivPageLinks">&nbsp;</div>
311 <?php } }
312 if($_GET['act']=="online") {
313 if($_GET['list']!="all"&&$_GET['list']!="members"&&$_GET['list']!="guests") {
314         $_GET['list'] = "members"; }
315 //Get SQL LIMIT Number
316 $nums = $_GET['page'] * $Settings['max_memlist'];
317 $PageLimit = $nums - $Settings['max_memlist'];
318 if($PageLimit<0) { $PageLimit = 0; }
319 $i=0;
320 $uolcuttime = $utccurtime->getTimestamp();
321 $uoltime = $uolcuttime - ini_get("session.gc_maxlifetime");
322 if($_GET['list']=="members") {
323 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i AND \"serialized_data\" NOT LIKE '%s' ORDER BY \"expires\" DESC ".$SQLimit, array($uoltime,"%UserGroup|s:".strlen($Settings['GuestGroup']).":\"".$Settings['GuestGroup']."\";%",$PageLimit,$Settings['max_memlist'])); 
324 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i AND \"serialized_data\" NOT LIKE '%s'", array($uoltime,"%UserGroup|s:".strlen($Settings['GuestGroup']).":\"".$Settings['GuestGroup']."\";%")); }
325 if($_GET['list']=="guests") {
326 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i AND \"serialized_data\" LIKE '%s' ORDER BY \"expires\" DESC ".$SQLimit, array($uoltime,"%UserGroup|s:".strlen($Settings['GuestGroup']).":\"".$Settings['GuestGroup']."\";%",$PageLimit,$Settings['max_memlist'])); 
327 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i AND \"serialized_data\" LIKE '%s'", array($uoltime,"%UserGroup|s:".strlen($Settings['GuestGroup']).":\"".$Settings['GuestGroup']."\";%")); }
328 if($_GET['list']=="all") {
329 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i ORDER BY \"expires\" DESC ".$SQLimit, array($uoltime,$PageLimit,$Settings['max_memlist'])); 
330 $rnquery = sql_pre_query("SELECT COUNT(*) FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" >= %i", array($uoltime)); }
331 $result=sql_query($query,$SQLStat);
332 $rnresult=sql_query($rnquery,$SQLStat);
333 $NumberMembers = sql_result($rnresult,0);
334 sql_free_result($rnresult);
335 if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
336 if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else { 
337          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
338             $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
339          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
340             $_SESSION['AncientViewingFile'] = $exfile['index']; } }
341 if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
342 if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
343 if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
344 if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
345 if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else { 
346          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
347             $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
348          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
349             $_SESSION['OldViewingFile'] = $exfile['index']; } }
350 if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
351 if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
352 if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
353 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=online&list=".$_GET['list']."&page=".$_GET['page'],"&","=",$prexqstr['member'],$exqstr['member']);
354 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
355 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
356 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
357 $_SESSION['ViewingFile'] = $exfile['member']; }
358 $_SESSION['PreViewingTitle'] = "Viewing";
359 $_SESSION['ViewingTitle'] = "Online Member List";
360 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
361 if($NumberMembers==null) { 
362         $NumberMembers = 0; }
363 $num = $NumberMembers;
364 //Start MemberList Page Code
365 if(!isset($Settings['max_memlist'])) { $Settings['max_memlist'] = 10; }
366 if($_GET['page']==null) { $_GET['page'] = 1; } 
367 if($_GET['page']<=0) { $_GET['page'] = 1; }
368 $nums = $_GET['page'] * $Settings['max_memlist'];
369 if($nums>$num) { $nums = $num; }
370 $numz = $nums - $Settings['max_memlist'];
371 if($numz<=0) { $numz = 0; }
372 //$i=$numz;
373 if($nums<$num) { $nextpage = $_GET['page'] + 1; }
374 if($nums>=$num) { $nextpage = $_GET['page']; }
375 if($numz>=$Settings['max_memlist']) { $backpage = $_GET['page'] - 1; }
376 if($_GET['page']<=1) { $backpage = 1; }
377 $pnum = $num; $l = 1; $Pages = null;
378 while ($pnum>0) {
379 if($pnum>=$Settings['max_memlist']) { 
380         $pnum = $pnum - $Settings['max_memlist']; 
381         $Pages[$l] = $l; ++$l; }
382 if($pnum<$Settings['max_memlist']&&$pnum>0) { 
383         $pnum = $pnum - $pnum; 
384         $Pages[$l] = $l; ++$l; } }
385 $nums = $_GET['page'] * $Settings['max_memlist'];
386 //End MemberList Page Code
387 $num=sql_num_rows($result);
388 //List Page Number Code Start
389 $pagenum=count($Pages);
390 if($_GET['page']>$pagenum) {
391         $_GET['page'] = $pagenum; }
392 $pagei=0; $pstring = null;
393 if($pagenum>1) {
394 $pstring = "<div class=\"PageList\"><span class=\"pagelink\">".$pagenum." Pages:</span> "; }
395 if($_GET['page']<4) { $Pagez[0] = null; }
396 if($_GET['page']>=4) { $Pagez[0] = "First"; }
397 if($_GET['page']>=3) {
398 $Pagez[1] = $_GET['page'] - 2; }
399 if($_GET['page']<3) {
400 $Pagez[1] = null; }
401 if($_GET['page']>=2) {
402 $Pagez[2] = $_GET['page'] - 1; }
403 if($_GET['page']<2) {
404 $Pagez[2] = null; }
405 $Pagez[3] = $_GET['page'];
406 if($_GET['page']<$pagenum) {
407 $Pagez[4] = $_GET['page'] + 1; }
408 if($_GET['page']>=$pagenum) {
409 $Pagez[4] = null; }
410 $pagenext = $_GET['page'] + 1;
411 if($pagenext<$pagenum) {
412 $Pagez[5] = $_GET['page'] + 2; }
413 if($pagenext>=$pagenum) {
414 $Pagez[5] = null; }
415 if($_GET['page']<$pagenum) { $Pagez[6] = "Last"; }
416 if($_GET['page']>=$pagenum) { $Pagez[6] = null; }
417 $pagenumi=count($Pagez);
418 if($NumberMembers==0) {
419 $pagenumi = 0;
420 $pstring = null; }
421 if($pagenum>1) {
422 while ($pagei < $pagenumi) {
423 if($_GET['page']!=1&&$pagei==1) {
424 $Pback = $_GET['page'] - 1;
425 $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'])."\">&lt;</a></span> "; }
426 if($Pagez[$pagei]!=null&&
427    $Pagez[$pagei]!="First"&&
428    $Pagez[$pagei]!="Last") {
429 if($pagei!=3) { 
430 $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> "; }
431 if($pagei==3) { 
432 $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> "; } }
433 if($Pagez[$pagei]=="First") {
434 $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'])."\">&laquo;</a></span> "; }
435 if($Pagez[$pagei]=="Last") {
436 $ptestnext = $pagenext + 1;
437 $paget = $pagei - 1;
438 $Pnext = $_GET['page'] + 1;
439 $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'])."\">&gt;</a></span> ";
440 if($ptestnext<$pagenum) {
441 $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'])."\">&raquo;</a></span> "; } }
442         ++$pagei; } $pstring = $pstring."</div>"; }
443 ?>
444 <div class="NavLinks"><?php echo $ThemeSet['NavLinkIcon']; ?><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php echo $Settings['board_name']; ?></a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=online&list=all&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Online Member List</a></div>
445 <div class="DivNavLinks">&nbsp;</div>
446 <?php
447 echo $pstring;
448 //List Page Number Code end
449 if($pagenum>1) {
450 ?>
451 <div class="DivPageLinks">&nbsp;</div>
452 <?php } ?>
453 <div class="Table1Border">
454 <?php if($ThemeSet['TableStyle']=="div") { ?>
455 <div class="TableRow1">
456 <span style="text-align: left;">
457 <?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>
458 </span></div>
459 <?php } ?>
460 <table class="Table1">
461 <?php if($ThemeSet['TableStyle']=="table") { ?>
462 <tr class="TableRow1">
463 <td class="TableColumn1" colspan="8"><span style="text-align: left;">
464 <?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>
465 </span></td>
466 </tr><?php } ?>
467 <tr id="Member" class="TableRow2">
468 <th class="TableColumn2" style="width: 28%;">Member Name</th>
469 <th class="TableColumn2" style="width: 10%;">Group Name</th>
470 <th class="TableColumn2" style="width: 26%;">Location</th>
471 <th class="TableColumn2" style="width: 24%;">Time</th>
472 <th class="TableColumn2" style="width: 7%;">Website</th>
473 <th class="TableColumn2" style="width: 5%;">Message</th>
474 </tr>
475 <?php
476 while ($i < $num) {
477 $AmIHiddenUser = "no";
478 $get_session_id=sql_result($result,$i,"session_id");
479 $session_data=sql_result($result,$i,"session_data");
480 $serialized_data=sql_result($result,$i,"serialized_data");
481 $session_user_agent=sql_result($result,$i,"user_agent"); 
482 $session_ip_address=sql_result($result,$i,"ip_address"); 
483 $session_expires=sql_result($result,$i,"expires"); 
484 $tmpusrcurtime = new DateTime();
485 $tmpusrcurtime->setTimestamp($session_expires);
486 $tmpusrcurtime->setTimezone($usertz);
487 $session_expires = $tmpusrcurtime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']);
488 if(isset($UserSessInfo)) { $UserSessInfo = null; }
489 //$UserSessInfo = unserialize_session($session_data);
490 $UserSessInfo = unserialize($serialized_data);
491 if(!isset($UserSessInfo['ShowActHidden'])) { $UserSessInfo['ShowActHidden'] = "no"; }
492 if(!isset($UserSessInfo['UserGroup'])) { 
493         $UserSessInfo['UserGroup'] = $Settings['GuestGroup']; }
494 if(!isset($session_ip_address)) { 
495         $session_ip_address = "127.0.0.1"; }
496 $ViewSessMem['Website'] = $Settings['idburl'];
497 $opennew = null;
498 if($UserSessInfo['UserGroup']!=$Settings['GuestGroup']) {
499 $sess_query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_GET['id']));
500 $sess_result=sql_query($sess_query,$SQLStat);
501 $sess_num=sql_num_rows($sess_result);
502 $sess_i=0;
503 $ViewSessMem['ID']=sql_result($sess_result,$sess_i,"id");
504 $ViewSessMem['Name']=sql_result($sess_result,$sess_i,"Name");
505 $ViewSessMem['GroupID']=sql_result($sess_result,$sess_i,"GroupID");
506 $ViewSessMem['HiddenMember']=sql_result($sess_result,$sess_i,"HiddenMember");
507 $ViewSessMem['WarnLevel']=sql_result($sess_result,$sess_i,"WarnLevel");
508 $ViewSessMem['Joined']=sql_result($sess_result,$sess_i,"Joined");
509 $tmpusrcurtime = new DateTime();
510 $tmpusrcurtime->setTimestamp($ViewSessMem['Joined']);
511 $tmpusrcurtime->setTimezone($usertz);
512 $ViewSessMem['Joined']=$tmpusrcurtime->format("M j Y, ".$_SESSION['iDBTimeFormat']);
513 $ViewSessMem['LastActive']=sql_result($sess_result,$sess_i,"LastActive");
514 $tmpusrcurtime = new DateTime();
515 $tmpusrcurtime->setTimestamp($ViewSessMem['LastActive']);
516 $tmpusrcurtime->setTimezone($usertz);
517 $ViewSessMem['LastActive']=$tmpusrcurtime->format("M j Y, ".$_SESSION['iDBTimeFormat']);
518 $ViewSessMem['Website']=sql_result($sess_result,$sess_i,"Website");
519 if($ViewSessMem['Website']=="http://") { 
520         $ViewSessMem['Website'] = $Settings['idburl']; }
521 $ViewSessMem['Website'] = urlcheck($ViewSessMem['Website']);
522 $BoardWWWChCk = parse_url($Settings['idburl']);
523 $MemsWWWChCk = parse_url($ViewSessMem['Website']);
524 $opennew = " onclick=\"window.open(this.href);return false;\"";
525 if($BoardWWWChCk['host']==$MemsWWWChCk['host']) {
526         $opennew = null; }
527 $ViewSessMem['Gender']=sql_result($sess_result,$sess_i,"Gender");
528 $ViewSessMem['PostCount']=sql_result($sess_result,$sess_i,"PostCount");
529 $ViewSessMem['Karma']=sql_result($sess_result,$sess_i,"Karma");
530 $ViewSessMem['TimeZone']=sql_result($sess_result,$sess_i,"TimeZone");
531 $ViewSessMem['IP']=sql_result($sess_result,$sess_i,"IP");
532 $gsess_query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($ViewSessMem['GroupID']));
533 $gsess_result=sql_query($gsess_query,$SQLStat);
534 $ViewSessMem['Group']=sql_result($gsess_result,0,"Name");
535 $PreAmIHiddenUser = GetUserName($UserSessInfo['UserID'],$Settings['sqltable'],$SQLStat);
536 $AmIHiddenUser = $PreAmIHiddenUser['Hidden']; }
537 if(!isset($AmIHiddenUser)) { $AmIHiddenUser = "no"; }
538 if($AmIHiddenUser===null) { $AmIHiddenUser = "no"; }
539 if(!isset($UserSessInfo['ViewingPage'])) {
540         $UserSessInfo['ViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
541 if(!isset($UserSessInfo['ViewingFile'])) {
542         if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
543         $UserSessInfo['ViewingFile'] = $exfile['index'].$Settings['file_ext']; }
544         if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
545         $UserSessInfo['ViewingFile'] = $exfile['index']; } }
546 if(!isset($UserSessInfo['PreViewingTitle'])) {
547         $UserSessInfo['PreViewingTitle'] = "Viewing"; }
548 if(!isset($UserSessInfo['ViewingTitle'])) {
549         $UserSessInfo['ViewingTitle'] = "Board index"; }
550 $PreExpPage = explode("?",$UserSessInfo['ViewingPage']);
551 $PreFileName = $UserSessInfo['ViewingFile'];
552 $qstr = htmlentities("&", ENT_QUOTES, $Settings['charset']);
553 $qsep = htmlentities("=", ENT_QUOTES, $Settings['charset']);
554 $PreExpPage = preg_replace("/^\?/","",$UserSessInfo['ViewingPage']);
555 $PreExpPage = str_replace($qstr, "&", $PreExpPage);
556 $PreExpPage = str_replace($qsep, "=", $PreExpPage);
557 parse_str($PreExpPage,$ChkID);
558 if($PreFileName==$exfile['topic'].$Settings['file_ext']) {
559 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"]; 
560 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."topics\" WHERE \"id\"=%i LIMIT 1", array($ChkID));
561 $preresult=sql_query($prequery,$SQLStat);
562 $prenum=sql_num_rows($preresult);
563 if($prenum>=1) {
564 $TopicForumID=sql_result($preresult,0,"ForumID");
565 $TopicCatID=sql_result($preresult,0,"CategoryID"); }
566 if($prenum<1) {
567 $TopicForumID=0;
568 $TopicCatID=0; }
569 if($CatPermissionInfo['CanViewCategory'][$TopicCatID]=="no"||
570         $CatPermissionInfo['CanViewCategory'][$TopicCatID]!="yes") {
571         $PreFileName = $exfile['index'].$Settings['file_ext'];
572         $PreExpPage = "act=view";
573         $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
574         $UserSessInfo['PreViewingTitle'] = "Viewing";
575         $UserSessInfo['ViewingTitle'] = "Board index"; }
576 if($PermissionInfo['CanViewForum'][$TopicForumID]=="no"||
577         $PermissionInfo['CanViewForum'][$TopicForumID]!="yes") {
578         $PreFileName = $exfile['index'].$Settings['file_ext'];
579         $PreExpPage = "act=view";
580         $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
581         $UserSessInfo['PreViewingTitle'] = "Viewing";
582         $UserSessInfo['ViewingTitle'] = "Board index"; } } }
583 if($PreFileName==$exfile['forum'].$Settings['file_ext']) {
584 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"]; 
585 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"id\"=%i LIMIT 1", array($ChkID));
586 $preresult=sql_query($prequery,$SQLStat);
587 $prenum=sql_num_rows($preresult);
588 $ForumCatID=sql_result($preresult,0,"CategoryID");
589 sql_free_result($preresult);
590 if($CatPermissionInfo['CanViewCategory'][$ForumCatID]=="no"||
591         $CatPermissionInfo['CanViewCategory'][$ForumCatID]!="yes") {
592         $PreFileName = $exfile['index'].$Settings['file_ext'];
593         $PreExpPage = "act=view";
594         $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
595         $UserSessInfo['PreViewingTitle'] = "Viewing";
596         $UserSessInfo['ViewingTitle'] = "Board index"; }
597 if($PermissionInfo['CanViewForum'][$ChkID]=="no"||
598         $PermissionInfo['CanViewForum'][$ChkID]!="yes") {
599         $PreFileName = $exfile['index'].$Settings['file_ext'];
600         $PreExpPage = "act=view";
601         $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
602         $UserSessInfo['PreViewingTitle'] = "Viewing";
603         $UserSessInfo['ViewingTitle'] = "Board index"; } } }
604 if($PreFileName==$exfile['subforum'].$Settings['file_ext']) {
605 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"]; 
606 $prequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"id\"=%i LIMIT 1", array($ChkID));
607 $preresult=sql_query($prequery,$SQLStat);
608 $prenum=sql_num_rows($preresult);
609 $ForumCatID=sql_result($preresult,0,"CategoryID");
610 sql_free_result($preresult);
611 if($CatPermissionInfo['CanViewCategory'][$ForumCatID]=="no"||
612         $CatPermissionInfo['CanViewCategory'][$ForumCatID]!="yes") {
613         $PreFileName = $exfile['index'].$Settings['file_ext'];
614         $PreExpPage = "act=view";
615         $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
616         $UserSessInfo['PreViewingTitle'] = "Viewing";
617         $UserSessInfo['ViewingTitle'] = "Board index"; }
618 if($PermissionInfo['CanViewForum'][$ChkID]=="no"||
619         $PermissionInfo['CanViewForum'][$ChkID]!="yes") {
620         $PreFileName = $exfile['index'].$Settings['file_ext'];
621         $PreExpPage = "act=view";
622         $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
623         $UserSessInfo['PreViewingTitle'] = "Viewing";
624         $UserSessInfo['ViewingTitle'] = "Board index"; } } }
625 if($PreFileName==$exfile['category'].$Settings['file_ext']) {
626 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"]; 
627 if($CatPermissionInfo['CanViewCategory'][$ChkID]=="no"||
628         $CatPermissionInfo['CanViewCategory'][$ChkID]!="yes") {
629         $PreFileName = $exfile['index'].$Settings['file_ext'];
630         $PreExpPage = "act=view";
631         $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
632         $UserSessInfo['PreViewingTitle'] = "Viewing";
633         $UserSessInfo['ViewingTitle'] = "Board index"; } } }
634 if($PreFileName==$exfile['subcategory'].$Settings['file_ext']) {
635 if(isset($ChkID["id"])) { $ChkID = $ChkID["id"]; 
636 if($CatPermissionInfo['CanViewCategory'][$ChkID]=="no"||
637         $CatPermissionInfo['CanViewCategory'][$ChkID]!="yes") {
638         $PreFileName = $exfile['index'].$Settings['file_ext'];
639         $PreExpPage = "act=view";
640         $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
641         $UserSessInfo['PreViewingTitle'] = "Viewing";
642         $UserSessInfo['ViewingTitle'] = "Board index"; } } }
643 if($GroupInfo['HasAdminCP']!="yes"&&$UserSessInfo['ShowActHidden']=="yes") {
644         $PreFileName = $exfile['index'].$Settings['file_ext'];
645         $PreExpPage = "act=view";
646         $UserSessInfo['ViewingPage'] = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
647 if($_GET['list']=="all"||$_GET['list']=="members") {
648 if($UserSessInfo['UserGroup']!=$Settings['GuestGroup']) {
649 if($AmIHiddenUser=="no"&&$UserSessInfo['UserID']>0) { 
650 ?>
651 <tr id="Member<?php echo $i; ?>" class="TableRow3">
652 <td class="TableColumn3" style="text-align: center;"><a<?php if($GroupInfo['HasAdminCP']=="yes") { ?> title="<?php echo htmlentities($session_user_agent, ENT_QUOTES, $Settings['charset']); ?>"<?php } ?> 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>
653 <?php if($GroupInfo['CanViewIPAddress']=="yes") { ?> ( <a title="<?php echo $session_ip_address; ?>" onclick="window.open(this.href);return false;" href="<?php echo sprintf($IPCheckURL,$session_ip_address); ?>"><?php echo $session_ip_address; ?></a> )<?php } ?></td>
654 <td class="TableColumn3" style="text-align: center;"><?php echo $UserSessInfo['UserGroup']; ?></td>
655 <td class="TableColumn3" style="text-align: center;"><?php if($get_session_id!=session_id()) { ?><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><?php } if($get_session_id==session_id()) { ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=online&list=".$_GET['list']."&page=".$_GET['page'],"&","=",$prexqstr['member'],$exqstr['member']); ?>">Viewing Online Member List</a><?php } ?></td>
656 <td class="TableColumn3" style="text-align: center;"><?php echo $session_expires; ?></td>
657 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo $MemList['Website']; ?>"<?php echo $opennew; ?>>Website</a></td>
658 <?php if($UserSessInfo['UserID']>0&&$AmIHiddenUser=="no") { ?>
659 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=create&id=".$UserSessInfo['UserID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>"<?php echo $opennew; ?>>PM</a></td>
660 <?php } if($UserSessInfo['UserID']<=0||$AmIHiddenUser=="yes") { ?>
661 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">PM</a></td>
662 <?php } ?>
663 </tr>
664 <?php } } }
665 if($UserSessInfo['UserGroup']==$Settings['GuestGroup']) {
666 if(!isset($UserSessInfo['GuestName'])) { 
667         $UserSessInfo['GuestName'] = "Guest"; }
668 if(!isset($UserSessInfo['UserID'])) { 
669         $UserSessInfo['UserID'] = "0"; }
670 if($_GET['list']=="all"||$_GET['list']=="guests") {
671 if(user_agent_check($session_user_agent)) {
672         $UserSessInfo['GuestName'] = user_agent_check($session_user_agent); }
673 ?>
674 <tr id="Member<?php echo $i; ?>" class="TableRow3">
675 <td class="TableColumn3" style="text-align: center;"><span<?php if($GroupInfo['HasAdminCP']=="yes") { ?> title="<?php echo htmlentities($session_user_agent, ENT_QUOTES, $Settings['charset']); ?>"<?php } ?>><?php echo $UserSessInfo['GuestName']; ?></span>
676 <?php if($GroupInfo['CanViewIPAddress']=="yes") { ?> ( <a title="<?php echo $session_ip_address; ?>" onclick="window.open(this.href);return false;" href="<?php echo sprintf($IPCheckURL,$session_ip_address); ?>"><?php echo $session_ip_address; ?></a> )<?php } ?></td>
677 <td class="TableColumn3" style="text-align: center;"><?php echo $UserSessInfo['UserGroup']; ?></td>
678 <td class="TableColumn3" style="text-align: center;"><?php if($get_session_id!=session_id()) { ?><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><?php } if($get_session_id==session_id()) { ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=online&list=".$_GET['list']."&page=".$_GET['page'],"&","=",$prexqstr['member'],$exqstr['member']); ?>">Viewing Online Member List</a><?php } ?></td>
679 <td class="TableColumn3" style="text-align: center;"><?php echo $session_expires; ?></td>
680 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo $MemList['Website']; ?>"<?php echo $opennew; ?>>Website</a></td>
681 <?php if($UserSessInfo['UserID']>0&&$AmIHiddenUser=="no") { ?>
682 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=create&id=".$UserSessInfo['UserID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>"<?php echo $opennew; ?>>PM</a></td>
683 <?php } if($UserSessInfo['UserID']<=0||$AmIHiddenUser=="yes") { ?>
684 <td class="TableColumn3" style="text-align: center;"><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">PM</a></td>
685 <?php } ?>
686 </tr>
687 <?php } }
688 ++$i; }
689 ?>
690 <tr id="MemEnd" class="TableRow4">
691 <td class="TableColumn4" colspan="8">&nbsp;</td>
692 </tr>
693 </table></div>
694 <?php 
695 if($pagenum>1) {
696 ?>
697 <div class="DivMembers">&nbsp;</div>
698 <?php }
699 echo $pstring;
700 //List Page Number Code end
701 if($pagenum>1) {
702 ?>
703 <div class="DivPageLinks">&nbsp;</div>
704 <?php } }
705 if($_GET['act']=="view") { 
706 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_GET['id']));
707 $result=sql_query($query,$SQLStat);
708 $num=sql_num_rows($result);
709 $i=0;
710 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));
711 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
712 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
713 $ViewMem['ID']=sql_result($result,$i,"id");
714 $ViewMem['Name']=sql_result($result,$i,"Name");
715 $ViewMem['Signature']=sql_result($result,$i,"Signature");
716 $ViewMem['Avatar']=sql_result($result,$i,"Avatar");
717 $ViewMem['AvatarSize']=sql_result($result,$i,"AvatarSize");
718 $ViewMem['Email']=sql_result($result,$i,"Email");
719 $ViewMem['GroupID']=sql_result($result,$i,"GroupID");
720 $ViewMem['LevelID']=sql_result($result,$i,"LevelID");
721 $ViewMem['HiddenMember']=sql_result($result,$i,"HiddenMember");
722 $ViewMem['WarnLevel']=sql_result($result,$i,"WarnLevel");
723 $ViewMem['Interests']=sql_result($result,$i,"Interests");
724 $ViewMem['Title']=sql_result($result,$i,"Title");
725 $ViewMem['Joined']=sql_result($result,$i,"Joined");
726 $tmpusrcurtime = new DateTime();
727 $tmpusrcurtime->setTimestamp($ViewMem['Joined']);
728 $tmpusrcurtime->setTimezone($usertz);
729 $ViewMem['Joined']=$tmpusrcurtime->format("M j Y, ".$_SESSION['iDBTimeFormat']);
730 $ViewMem['LastActive']=sql_result($result,$i,"LastActive");
731 $tmpusrcurtime = new DateTime();
732 $tmpusrcurtime->setTimestamp($ViewMem['LastActive']);
733 $tmpusrcurtime->setTimezone($usertz);
734 $ViewMem['LastActive']=$tmpusrcurtime->format("M j Y, ".$_SESSION['iDBTimeFormat']);
735 $ViewMem['Website']=sql_result($result,$i,"Website");
736 if($ViewMem['Website']=="http://") { 
737         $ViewMem['Website'] = $Settings['idburl']; }
738 $ViewMem['Website'] = urlcheck($ViewMem['Website']);
739 $BoardWWWChCk = parse_url($Settings['idburl']);
740 $MemsWWWChCk = parse_url($ViewMem['Website']);
741 $opennew = " onclick=\"window.open(this.href);return false;\"";
742 if($BoardWWWChCk['host']==$MemsWWWChCk['host']) {
743         $opennew = null; }
744 $ViewMem['Gender']=sql_result($result,$i,"Gender");
745 $ViewMem['PostCount']=sql_result($result,$i,"PostCount");
746 $ViewMem['Karma']=sql_result($result,$i,"Karma");
747 $ViewMem['TimeZone']=sql_result($result,$i,"TimeZone");
748 $viewmemcurtime = new DateTime();
749 $viewmemcurtime->setTimezone(new DateTimeZone($ViewMem['TimeZone']));
750 $ViewMem['IP']=sql_result($result,$i,"IP");
751 $lquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."levels\" WHERE \"id\"=%i LIMIT 1", array($ViewMem['LevelID']));
752 $lresult=sql_query($lquery,$SQLStat);
753 $ViewMem['Level']=sql_result($lresult,0,"Name");
754 sql_free_result($lresult);
755 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($ViewMem['GroupID']));
756 $gresult=sql_query($gquery,$SQLStat);
757 $ViewMem['Group']=sql_result($gresult,0,"Name");
758 /*
759 $GroupNamePrefix=sql_result($gresult,0,"NamePrefix");
760 $GroupNameSuffix=sql_result($gresult,0,"NameSuffix");
761 */
762 sql_free_result($gresult);
763 if($ViewMem['Title']=="") { $ViewMem['Title'] = $ViewMem['Group']; }
764 /*
765 if(isset($GroupNamePrefix)&&$GroupNamePrefix!=null) {
766         $ViewMem['Name'] = $GroupNamePrefix.$ViewMem['Name']; }
767 if(isset($GroupNameSuffix)&&$GroupNameSuffix!=null) {
768         $ViewMem['Name'] = $ViewMem['Name'].$GroupNameSuffix; }
769 */
770 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));
771 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
772 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
773 $membertitle = " ".$ThemeSet['TitleDivider']." ".$ViewMem['Name'];      
774 if ($ViewMem['Avatar']=="http://"||$ViewMem['Avatar']==null||
775         strtolower($ViewMem['Avatar'])=="noavatar") {
776 $ViewMem['Avatar']=$ThemeSet['NoAvatar'];
777 $ViewMem['AvatarSize']=$ThemeSet['NoAvatarSize']; }
778 $AvatarSize1=explode("x", $ViewMem['AvatarSize']);
779 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
780 $ViewMem['Signature'] = text2icons($ViewMem['Signature'],$Settings['sqltable'],$SQLStat);
781 $ViewMem['Signature'] = url2link($ViewMem['Signature']);
782 if($_GET['view']==null) { $_GET['view'] = "profile"; }
783 if($_GET['view']!="profile"&&$_GET['view']!="avatar"&&
784         $_GET['view']!="website"&&$_GET['view']!="homepage") { $_GET['view'] = "profile"; }
785 if($_GET['view']=="avatar") { 
786         session_write_close(); $urlstatus = 302;
787         header("Location: ".$ViewMem['Avatar']);
788         gzip_page($Settings['use_gzip'],$GZipEncode['Type']); die(); }
789 if($_GET['view']=="website"||$_GET['view']=="homepage") { 
790         if ($ViewMem['Website']!="http://"&&$ViewMem['Website']!=null) {
791         session_write_close(); $urlstatus = 302;
792         header("Location: ".$ViewMem['Website']); 
793         gzip_page($Settings['use_gzip'],$GZipEncode['Type']); die(); }
794         if ($ViewMem['Website']=="http://"||$ViewMem['Website']==null||
795         strtolower($ViewMem['Avatar'])=="noavatar") {
796         session_write_close(); $urlstatus = 302;
797         header("Location: ".$BoardURL."index.php?act=view"); 
798         gzip_page($Settings['use_gzip'],$GZipEncode['Type']); die(); } }
799 if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
800 if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else { 
801          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
802             $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
803          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
804             $_SESSION['AncientViewingFile'] = $exfile['index']; } }
805 if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
806 if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
807 if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
808 if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
809 if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else { 
810          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
811             $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
812          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
813             $_SESSION['OldViewingFile'] = $exfile['index']; } }
814 if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
815 if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
816 if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
817 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=view&id=".$_GET['id'],"&","=",$prexqstr['member'],$exqstr['member']);
818 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
819 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
820 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
821 $_SESSION['ViewingFile'] = $exfile['member']; }
822 $_SESSION['PreViewingTitle'] = "Viewing Profile:";
823 $_SESSION['ViewingTitle'] = $ViewMem['Name'];
824 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:".$ViewMem['ID'].";";
825 ?>
826 <div class="NavLinks"><?php echo $ThemeSet['NavLinkIcon']; ?><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php echo $Settings['board_name']; ?></a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Viewing profile</a></div>
827 <div class="DivNavLinks">&nbsp;</div>
828 <div class="Table1Border">
829 <?php if($ThemeSet['TableStyle']=="div") { ?>
830 <div class="TableRow1">
831 <span style="text-align: left;">
832 <?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>
833 </span></div>
834 <?php } ?>
835 <table class="Table1">
836 <?php if($ThemeSet['TableStyle']=="table") { ?>
837 <tr class="TableRow1">
838 <td class="TableColumn1" colspan="2"><span style="text-align: left;">
839 <?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>
840 </span></td>
841 </tr><?php } ?>
842 <tr id="Member" class="TableRow2">
843 <th class="TableColumn2" style="width: 50%;">Avatar</th>
844 <th class="TableColumn2" style="width: 50%;">User Info</th>
845 </tr>
846 <tr class="TableRow3" id="MemberProfile">
847 <td class="TableColumn3">
848 <?php  // Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/  
849  ?>
850  <table class="AvatarTable" style="width: 100%; height: 100px; text-align: center;">
851         <tr class="AvatarRow" style="width: 100px; height: 100px;">
852                 <td class="AvatarRow" style="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
853                 <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;" />
854                 </td>
855         </tr>
856  </table>
857 <div style="text-align: center;">
858 Name: <?php echo $ViewMem['Name']; ?><br />
859 Title: <?php echo $ViewMem['Title']; ?>
860 <?php if($GroupInfo['CanViewIPAddress']=="yes") { ?>
861 <br />User IP: <a onclick="window.open(this.href);return false;" href="<?php echo sprintf($IPCheckURL,$ViewMem['IP']); ?>">
862 <?php echo $ViewMem['IP']; echo "</a>"; } ?></div>
863 </td>
864 <td class="TableColumn3">
865 &nbsp;User Name: <?php echo $ViewMem['Name']; ?><br />
866 &nbsp;User Title: <?php echo $ViewMem['Title']; ?><br />
867 &nbsp;User Group: <?php echo $ViewMem['Group']; ?><br />
868 &nbsp;User Level: <?php echo $ViewMem['Level']; ?><br />
869 &nbsp;User Joined: <?php echo $ViewMem['Joined']; ?><br />
870 &nbsp;Last Active: <?php echo $ViewMem['LastActive']; ?><br />
871 &nbsp;User Time: <?php echo $viewmemcurtime->format("M j Y, ".$_SESSION['iDBTimeFormat']); ?><br />
872 &nbsp;User Website: <a href="<?php echo $ViewMem['Website']; ?>"<?php echo $opennew; ?>>Website</a><br />
873 &nbsp;Post Count: <?php echo $ViewMem['PostCount']; ?><br />
874 &nbsp;Karma: <?php echo $ViewMem['Karma']; ?><br />
875 &nbsp;Interests: <?php echo $ViewMem['Interests']; ?><br />
876 &nbsp;Topics: <?php if($Settings['enable_search']=="on"&&$GroupInfo['CanSearch']=="yes") { ?>
877 <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>
878 <?php } ?>
879 </td>
880 </tr>
881 <tr class="TableRow4">
882 <td class="TableColumn4" colspan="2">&nbsp;</td>
883 </tr>
884 </table></div>
885 <?php sql_free_result($result); } 
886 if($_GET['act']=="logout") {
887 session_unset();
888 if($cookieDomain==null) {
889 setcookie("MemberName", null, $utccurtime->getTimestamp() - 3600, $cbasedir);
890 setcookie("UserID", null, $utccurtime->getTimestamp() - 3600, $cbasedir);
891 setcookie("SessPass", null, $utccurtime->getTimestamp() - 3600, $cbasedir);
892 setcookie(session_name(), "", $utccurtime->getTimestamp() - 3600, $cbasedir); }
893 if($cookieDomain!=null) {
894 if($cookieSecure===true) {
895 setcookie("MemberName", null, $utccurtime->getTimestamp() - 3600, $cbasedir, $cookieDomain, 1);
896 setcookie("UserID", null, $utccurtime->getTimestamp() - 3600, $cbasedir, $cookieDomain, 1);
897 setcookie("SessPass", null, $utccurtime->getTimestamp() - 3600, $cbasedir, $cookieDomain, 1);
898 setcookie(session_name(), "", $utccurtime->getTimestamp() - 3600, $cbasedir, $cookieDomain, 1); }
899 if($cookieSecure===false) {
900 setcookie("MemberName", null, $utccurtime->getTimestamp() - 3600, $cbasedir, $cookieDomain);
901 setcookie("UserID", null, $utccurtime->getTimestamp() - 3600, $cbasedir, $cookieDomain);
902 setcookie("SessPass", null, $utccurtime->getTimestamp() - 3600, $cbasedir, $cookieDomain);
903 setcookie(session_name(), "", $utccurtime->getTimestamp() - 3600, $cbasedir, $cookieDomain); } }
904 unset($_COOKIE[session_name()]);
905 $_SESSION = array();
906 //session_unset();
907 //session_destroy();
908 $temp_user_ip = $_SERVER['REMOTE_ADDR'];
909 $exptime = $utccurtime->getTimestamp() - ini_get("session.gc_maxlifetime");
910 sql_query(sql_pre_query("DELETE FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" < %i OR ip_address='%s'", array($exptime,$temp_user_ip)),$SQLStat);
911 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
912 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
913 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
914 if($_GET['act']=="login") {
915 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) { 
916 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
917 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
918 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
919 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
920 if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
921 if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else { 
922          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
923             $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
924          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
925             $_SESSION['AncientViewingFile'] = $exfile['index']; } }
926 if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
927 if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
928 if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
929 if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
930 if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else { 
931          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
932             $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
933          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
934             $_SESSION['OldViewingFile'] = $exfile['index']; } }
935 if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
936 if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
937 if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
938 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=login","&","=",$prexqstr['member'],$exqstr['member']);
939 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
940 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
941 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
942 $_SESSION['ViewingFile'] = $exfile['member']; }
943 $_SESSION['PreViewingTitle'] = "Act: ";
944 $_SESSION['ViewingTitle'] = "Logging in";
945 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
946 $membertitle = " ".$ThemeSet['TitleDivider']." Login";
947 $UFID = rand_uuid("rand");
948 $_SESSION['UserFormID'] = $UFID;
949 ?>
950 <div class="NavLinks"><?php echo $ThemeSet['NavLinkIcon']; ?><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php echo $Settings['board_name']; ?></a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Login</a></div>
951 <div class="DivNavLinks">&nbsp;</div>
952 <div class="Table1Border">
953 <?php if($ThemeSet['TableStyle']=="div") { ?>
954 <div class="TableRow1">
955 <span style="text-align: left;">
956 <?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>
957 </span></div>
958 <?php } ?>
959 <table class="Table1">
960 <?php if($ThemeSet['TableStyle']=="table") { ?>
961 <tr class="TableRow1">
962 <td class="TableColumn1"><span style="text-align: left;">
963 <?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>
964 </span></td>
965 </tr><?php } ?>
966 <tr class="TableRow2">
967 <th class="TableColumn2" style="width: 100%; text-align: left;">&nbsp;Inert your login info: </th>
968 </tr>
969 <tr class="TableRow3">
970 <td class="TableColumn3">
971 <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']); ?>">
972 <table style="text-align: left;">
973 <tr style="text-align: left;">
974         <td style="width: 30%;"><label class="TextBoxLabel" for="username">Enter UserName: </label></td>
975         <td style="width: 70%;"><input maxlength="256" class="TextBox" id="username" type="text" name="username" /></td>
976 </tr><tr style="text-align: left;">
977         <td style="width: 30%;"><label class="TextBoxLabel" for="userpass">Enter Password: </label></td>
978         <td style="width: 70%;"><input maxlength="30" class="TextBox" id="userpass" type="password" name="userpass" /></td>
979 </tr><tr style="text-align: left;">
980         <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>
981         <td style="width: 70%;"><select id="storecookie" name="storecookie" class="TextBox">
982 <option value="true">Yes</option>
983 <option value="false">No</option>
984 </select></td>
985 </tr><tr style="text-align: left;">
986         <td style="width: 30%;"><label class="TextBoxLabel" title="Use your Email address for username." for="loginemail">Login by Email?</label></td>
987         <td style="width: 70%;"><select id="loginemail" name="loginemail" class="TextBox">
988 <option value="false">No</option>
989 <option value="true">Yes</option>
990 </select></td>
991 </tr></table>
992 <table style="text-align: left;">
993 <tr style="text-align: left;">
994 <td style="width: 100%;">
995 <input type="hidden" name="act" value="loginmember" style="display: none;" />
996 <input type="hidden" style="display: none;" name="fid" value="<?php echo $UFID; ?>" />
997 <input type="hidden" style="display: none;" name="ubid" value="<?php echo $Settings['BoardUUID']; ?>" />
998 <input class="Button" type="submit" value="Log in" />
999 </td></tr></table>
1000 </form>
1001 </td>
1002 </tr>
1003 <tr class="TableRow4">
1004 <td class="TableColumn4">&nbsp;</td>
1005 </tr>
1006 </table></div>
1007 <?php } } if($_POST['act']=="loginmember"&&$_GET['act']=="login_now") {
1008 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) { 
1009 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
1010 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
1011 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
1012 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
1013 if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
1014 if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else { 
1015          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1016             $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
1017          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
1018             $_SESSION['AncientViewingFile'] = $exfile['index']; } }
1019 if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
1020 if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
1021 if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
1022 if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
1023 if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else { 
1024          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1025             $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
1026          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
1027             $_SESSION['OldViewingFile'] = $exfile['index']; } }
1028 if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
1029 if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
1030 if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
1031 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=login","&","=",$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'] = "Logging in";
1038 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
1039 $membertitle = " ".$ThemeSet['TitleDivider']." Login";
1040 $REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
1041 $URL['REFERER'] = $REFERERurl['host'];
1042 $URL['HOST'] = $_SERVER["SERVER_NAME"];
1043 $REFERERurl = null;
1044 ?>
1045 <div class="NavLinks"><?php echo $ThemeSet['NavLinkIcon']; ?><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php echo $Settings['board_name']; ?></a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Login</a></div>
1046 <div class="DivNavLinks">&nbsp;</div>
1047 <div class="Table1Border">
1048 <?php if($ThemeSet['TableStyle']=="div") { ?>
1049 <div class="TableRow1">
1050 <span style="text-align: left;">&nbsp;<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>
1051 </div>
1052 <?php } ?>
1053 <table class="Table1">
1054 <?php if($ThemeSet['TableStyle']=="table") { ?>
1055 <tr class="TableRow1">
1056 <td class="TableColumn1">
1057 <span style="text-align: left;">&nbsp;<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>
1058 </td>
1059 </tr><?php } ?>
1060 <tr class="TableRow2">
1061 <th class="TableColumn2" style="width: 100%; text-align: left;">&nbsp;Login Message: </th>
1062 </tr>
1063 <tr class="TableRow3">
1064 <td class="TableColumn3">
1065 <table style="width: 100%; height: 25%; text-align: center;">
1066 <?php
1067 if(!isset($_POST['loginemail'])) { $_POST['loginemail'] = "false"; }
1068 if (pre_strlen($_POST['userpass'])>"60") { $Error="Yes";  ?>
1069 <tr>
1070         <td><span class="TableMessage">
1071         <br />Your password is too big.<br />
1072         </span>&nbsp;</td>
1073 </tr>
1074 <?php } if (pre_strlen($_POST['username'])>"30") { $Error="Yes";  ?>
1075 <tr>
1076         <td><span class="TableMessage">
1077         <br />Your user name is too big.<br />
1078         </span>&nbsp;</td>
1079 </tr>
1080 <?php } if ($_POST['loginemail']=="true"&&filter_var($_POST['loginemail'], FILTER_VALIDATE_EMAIL)) { $Error="Yes";  ?>
1081 <tr>
1082         <td><span class="TableMessage">
1083         <br />Your email is not a valid email address.<br />
1084         </span>&nbsp;</td>
1085 </tr>
1086 <?php } if($_POST['fid']!=$_SESSION['UserFormID']) { $Error="Yes";  ?>
1087 <tr>
1088         <td><span class="TableMessage">
1089         <br />Sorry the referering url dose not match our host name.<br />
1090         </span>&nbsp;</td>
1091 </tr>
1092 <?php } if($_POST['ubid']!=$Settings['BoardUUID']) { $Error="Yes";  ?>
1093 <tr>
1094         <td><span class="TableMessage">
1095         <br />Sorry the referering url dose not match our host name.<br />
1096         </span>&nbsp;</td>
1097 </tr>
1098 <?php } if ($Settings['TestReferer']=="on") {
1099         if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes";  ?>
1100 <tr>
1101         <td><span class="TableMessage">
1102         <br />Sorry the referering url dose not match our host name.<br />
1103         </span>&nbsp;</td>
1104 </tr>
1105 <?php } } $BanError = null;
1106 if ($Error=="Yes") {
1107 redirect("refresh",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false),"4"); }
1108 if($Error!="Yes"){
1109 $YourName = stripcslashes(htmlspecialchars($_POST['username'], ENT_QUOTES, $Settings['charset']));
1110 //$YourName = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $YourName);
1111 $YourName = remove_spaces($YourName);
1112 $passtype="ODFH";
1113 if($_POST['loginemail']!="true") {
1114 $querylog = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"Name\"='%s' LIMIT 1", array($YourName)); }
1115 if($_POST['loginemail']=="true") {
1116 $querylog = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"Email\"='%s' LIMIT 1", array($YourName)); }
1117 $resultlog=sql_query($querylog,$SQLStat);
1118 $numlog=sql_num_rows($resultlog);
1119 if($numlog>=1) {
1120 $i=0;
1121 $YourName=sql_result($resultlog,$i,"Name");
1122 $YourPassTry=sql_result($resultlog,$i,"UserPassword");
1123 $HashType=sql_result($resultlog,$i,"HashType");
1124 $HashType=str_replace("IntDBH", "iDBH", $HashType);
1125 $JoinedPass=sql_result($resultlog,$i,"Joined");
1126 $HashSalt=sql_result($resultlog,$i,"Salt");
1127 $UpdateHash = false; $YourPassword = null;
1128 //Used if you forget your password will change on next login.
1129 if($HashType=="NoHash") { $YourPassword = $_POST['userpass']; }
1130 if($HashType=="NoHASH") { $YourPassword = $_POST['userpass']; }
1131 if($HashType=="PlainText") { $YourPassword = $_POST['userpass']; }
1132 //Used to not allow guest user number -1 to login.
1133 if($HashType=="NoPass") { $YourPassword = null; $UpdateHash = false; }
1134 if($HashType=="NoPassword") { $YourPassword = null; $UpdateHash = false; }
1135 if($HashType=="GuestPass") { $YourPassword = null; $UpdateHash = false; }
1136 if($HashType=="GuestPassword") { $YourPassword = null; $UpdateHash = false; }
1137 //iDB hashing system
1138 if($HashType=="ODFH") { $YourPassword = PassHash2x($_POST['userpass']); }
1139 if($HashType=="IPB2") { $YourPassword = hash2xkey($_POST['userpass'],$HashSalt); }
1140 if($HashType=="DF4H") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
1141 if($HashType=="iDBH2") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"md2"); }
1142 if($HashType=="iDBH4") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"md4"); }
1143 if($HashType=="iDBH5") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"md5"); }
1144 if($HashType=="iDBH") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
1145 if($HashType=="iDBH1") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
1146 if($HashType=="iDBH224") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha224"); }
1147 if($HashType=="iDBH256") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha256"); }
1148 if($HashType=="iDBH384") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha384"); }
1149 if($HashType=="iDBH512") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha512"); }
1150 if($HashType=="iDBH3224") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha3-224"); }
1151 if($HashType=="iDBH3256") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha3-256"); }
1152 if($HashType=="iDBH3384") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha3-384"); }
1153 if($HashType=="iDBH3512") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha3-512"); }
1154 if($HashType=="iDBHRMD128") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd128"); }
1155 if($HashType=="iDBHRMD160") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd160"); }
1156 if($HashType=="iDBHRMD256") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd256"); }
1157 if($HashType=="iDBHRMD320") { $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"ripemd320"); }
1158 if($HashType=="iDBCRYPT") { $YourPassword = neo_b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"bcrypt"); }
1159 if($HashType=="NoPass") { $YourPassword = "iDB"; $YourPassTry = "IntDB"; }
1160 if($HashType=="NoPassword") { $YourPassword = "iDB"; $YourPassTry = "IntDB"; }
1161 if($HashType=="GuestPass") { $YourPassword = "iDB"; $YourPassTry = "IntDB"; }
1162 if($HashType=="GuestPassword") { $YourPassword = "iDB"; $YourPassTry = "IntDB"; }
1163 if($YourPassword!=$YourPassTry) { $passright = false; } 
1164 if($YourPassword==$YourPassTry) { $passright = true;
1165 $YourIDM=sql_result($resultlog,$i,"id");
1166 $YourNameM=sql_result($resultlog,$i,"Name");
1167 $YourPassM=sql_result($resultlog,$i,"UserPassword");
1168 $PostCount=sql_result($resultlog,$i,"PostCount");
1169 $YourGroupM=sql_result($resultlog,$i,"GroupID");
1170 $YourGroupIDM=$YourGroupM;
1171 $YourLastPostTime=sql_result($resultlog,$i,"LastPostTime");
1172 $YourBanTime=sql_result($resultlog,$i,"BanTime");
1173 $CGMTime = $utccurtime->getTimestamp();
1174 if($YourBanTime!=0&&$YourBanTime!=null) {
1175 if($YourBanTime>=$CGMTime) { $BanError = "yes"; }
1176 if($YourBanTime<0) { $BanError = "yes"; } }
1177 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($YourGroupM));
1178 $gresult=sql_query($gquery,$SQLStat);
1179 $YourGroupM=sql_result($gresult,0,"Name");
1180 sql_free_result($gresult);
1181 $YourTimeZoneM=sql_result($resultlog,$i,"TimeZone");
1182 $JoinedDate=sql_result($resultlog,$i,"Joined");
1183 $UseTheme=sql_result($resultlog,$i,"UseTheme");
1184 $NewHashSalt = salt_hmac();
1185 if($Settings['use_hashtype']=="md2") { $iDBHash = "iDBH2";
1186 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"md2"); }
1187 if($Settings['use_hashtype']=="md4") { $iDBHash = "iDBH4";
1188 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"md4"); }
1189 if($Settings['use_hashtype']=="md5") { $iDBHash = "iDBH5";
1190 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"md5"); }
1191 if($Settings['use_hashtype']=="sha1") { $iDBHash = "iDBH";
1192 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha1"); }
1193 if($Settings['use_hashtype']=="sha224") { $iDBHash = "iDBH224";
1194 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha224"); }
1195 if($Settings['use_hashtype']=="sha256") { $iDBHash = "iDBH256";
1196 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha256"); }
1197 if($Settings['use_hashtype']=="sha384") { $iDBHash = "iDBH384";
1198 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha384"); }
1199 if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
1200 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha512"); }
1201 if($Settings['use_hashtype']=="sha3224") { $iDBHash = "iDBH3224";
1202 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha3-224"); }
1203 if($Settings['use_hashtype']=="sha3256") { $iDBHash = "iDBH3256";
1204 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha3-256"); }
1205 if($Settings['use_hashtype']=="sha3384") { $iDBHash = "iDBH3384";
1206 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha3-384"); }
1207 if($Settings['use_hashtype']=="sha3512") { $iDBHash = "iDBH3512";
1208 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha3-512"); }
1209 if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
1210 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"ripemd128"); }
1211 if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
1212 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"ripemd160"); }
1213 if($Settings['use_hashtype']=="ripemd256") { $iDBHash = "iDBHRMD256";
1214 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"ripemd256"); }
1215 if($Settings['use_hashtype']=="ripemd320") { $iDBHash = "iDBHRMD320";
1216 $NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"ripemd320"); }
1217 if($Settings['use_hashtype']=="bcrypt") { $iDBHash = "iDBCRYPT";
1218 $NewPassword = neo_b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"bcrypt"); }
1219 $NewDay=$utccurtime->getTimestamp();
1220 $NewIP=$_SERVER['REMOTE_ADDR'];
1221 if($BanError!="yes") {
1222 $queryup = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"UserPassword\"='%s',\"HashType\"='%s',\"LastActive\"=%i,\"LastLogin\"=%i,\"IP\"='%s',\"Salt\"='%s' WHERE \"id\"=%i", array($NewPassword,$iDBHash,$NewDay,$NewDay,$NewIP,$NewHashSalt,$YourIDM));
1223 sql_query($queryup,$SQLStat);
1224 sql_free_result($resultlog);
1225 //session_regenerate_id();
1226 $_SESSION['Theme']=$UseTheme;
1227 $_SESSION['MemberName']=$YourNameM;
1228 $_SESSION['UserID']=$YourIDM;
1229 $_SESSION['UserIP']=$_SERVER['REMOTE_ADDR'];
1230 $_SESSION['UserTimeZone']=$YourTimeZoneM;
1231 $usertz = new DateTimeZone($_SESSION['UserTimeZone']);
1232 $usercurtime->setTimestamp($defcurtime->getTimestamp());
1233 $usercurtime->setTimezone($usertz);
1234 $_SESSION['UserGroup']=$YourGroupM;
1235 $_SESSION['UserGroupID']=$YourGroupIDM;
1236 $_SESSION['UserPass']=$NewPassword;
1237 $_SESSION['LastPostTime'] = $YourLastPostTime;
1238 $_SESSION['DBName']=$Settings['sqldb'];
1239 if($_POST['storecookie']=="true") {
1240 if($cookieDomain==null) {
1241 setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir);
1242 setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir);
1243 setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir); }
1244 if($cookieDomain!=null) {
1245 if($cookieSecure===true) {
1246 setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
1247 setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
1248 setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain, 1); }
1249 if($cookieSecure===false) {
1250 setcookie("MemberName", $YourNameM, time() + (7 * 86400), $cbasedir, $cookieDomain);
1251 setcookie("UserID", $YourIDM, time() + (7 * 86400), $cbasedir, $cookieDomain);
1252 setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain); } } } }
1253 } } if($numlog<=0) {
1254 //echo "Password was not right or user not found!! <_< ";
1255 } ?>
1256 <?php if($passright===true&&$BanError!="yes") {
1257 redirect("refresh",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false),"3"); ?>
1258 <tr>
1259         <td><span class="TableMessage">
1260         <br />Welcome to the Board <?php echo $_SESSION['MemberName']; ?>. ^_^<br />
1261         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 />&nbsp;
1262         </span><br /></td>
1263 </tr>
1264 <?php } if($passright===false||$BanError=="yes"||$numlog<=0) { ?>
1265 <tr>
1266         <td><span class="TableMessage">
1267         <br />Password was not right or user not found or user is banned!! &lt;_&lt;<br />
1268         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 />&nbsp;
1269         </span><br /></td>
1270 </tr>
1271 <?php } } ?>
1272 </table>
1273 </td></tr>
1274 <tr class="TableRow4">
1275 <td class="TableColumn4">&nbsp;</td>
1276 </tr>
1277 </table></div>
1278 <?php } } if($_GET['act']=="signup") { 
1279 $membertitle = " ".$ThemeSet['TitleDivider']." Signing up"; 
1280 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) { 
1281 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
1282 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
1283 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
1284 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
1285 if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
1286 if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else { 
1287          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1288             $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
1289          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
1290             $_SESSION['AncientViewingFile'] = $exfile['index']; } }
1291 if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
1292 if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
1293 if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
1294 if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
1295 if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else { 
1296          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1297             $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
1298          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
1299             $_SESSION['OldViewingFile'] = $exfile['index']; } }
1300 if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
1301 if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
1302 if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
1303 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=signup","&","=",$prexqstr['member'],$exqstr['member']);
1304 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1305 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
1306 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
1307 $_SESSION['ViewingFile'] = $exfile['member']; }
1308 $_SESSION['PreViewingTitle'] = "Act: ";
1309 $_SESSION['ViewingTitle'] = "Signing up";
1310 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
1311 $UFID = rand_uuid("rand");
1312 $_SESSION['UserFormID'] = $UFID;
1313 $gettzinfofromjs = $Settings['DefaultTimeZone'];
1314 if(isset($_COOKIE['getusertz']) && in_array($_COOKIE['getusertz'], DateTimeZone::listIdentifiers())) {
1315    $gettzinfofromjs = $_COOKIE['getusertz']; }
1316 // http://www.tutorialspoint.com/php/php_function_timezone_identifiers_list.htm
1317 $timezone_identifiers = DateTimeZone::listIdentifiers();
1318 //$timezone_identifiers = timezone_identifiers_list();
1319 $zonelist['africa'] = array();
1320 $zonelist['america'] = array();
1321 $zonelist['antarctica'] = array();
1322 $zonelist['arctic'] = array();
1323 $zonelist['asia'] = array();
1324 $zonelist['atlantic'] = array();
1325 $zonelist['australia'] = array();
1326 $zonelist['europe'] = array();
1327 $zonelist['indian'] = array();
1328 $zonelist['pacific'] = array();
1329 $zonelist['etcetera'] = array();
1330 for ($i=0; $i < count($timezone_identifiers); $i++) {
1331     $zonelookup = explode("/", $timezone_identifiers[$i]);
1332     if(count($zonelookup)==1) { array_push($zonelist['etcetera'], array($timezone_identifiers[$i], $timezone_identifiers[$i])); }
1333     if(count($zonelookup)>1) { 
1334         if($zonelookup[0]=="Africa") {
1335             if(count($zonelookup)==2) {
1336                 array_push($zonelist['africa'], array($zonelookup[1], $timezone_identifiers[$i])); }
1337             if(count($zonelookup)==3) {
1338                 array_push($zonelist['africa'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1339         if($zonelookup[0]=="America") {
1340             if(count($zonelookup)==2) {
1341                 array_push($zonelist['america'], array($zonelookup[1], $timezone_identifiers[$i])); }
1342             if(count($zonelookup)==3) {
1343                 array_push($zonelist['america'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1344         if($zonelookup[0]=="Antarctica") {
1345             if(count($zonelookup)==2) {
1346                 array_push($zonelist['antarctica'], array($zonelookup[1], $timezone_identifiers[$i])); }
1347             if(count($zonelookup)==3) {
1348                 array_push($zonelist['antarctica'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1349         if($zonelookup[0]=="Arctic") {
1350             if(count($zonelookup)==2) {
1351                 array_push($zonelist['arctic'], array($zonelookup[1], $timezone_identifiers[$i])); }
1352             if(count($zonelookup)==3) {
1353                 array_push($zonelist['arctic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1354         if($zonelookup[0]=="Asia") {
1355             if(count($zonelookup)==2) {
1356                 array_push($zonelist['asia'], array($zonelookup[1], $timezone_identifiers[$i])); }
1357             if(count($zonelookup)==3) {
1358                 array_push($zonelist['asia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1359         if($zonelookup[0]=="Atlantic") {
1360             if(count($zonelookup)==2) {
1361                 array_push($zonelist['atlantic'], array($zonelookup[1], $timezone_identifiers[$i])); }
1362             if(count($zonelookup)==3) {
1363                 array_push($zonelist['atlantic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1364         if($zonelookup[0]=="Australia") {
1365             if(count($zonelookup)==2) {
1366                 array_push($zonelist['australia'], array($zonelookup[1], $timezone_identifiers[$i])); }
1367             if(count($zonelookup)==3) {
1368                 array_push($zonelist['australia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1369         if($zonelookup[0]=="Europe") {
1370             if(count($zonelookup)==2) {
1371                 array_push($zonelist['europe'], array($zonelookup[1], $timezone_identifiers[$i])); }
1372             if(count($zonelookup)==3) {
1373                 array_push($zonelist['europe'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1374         if($zonelookup[0]=="Indian") {
1375             if(count($zonelookup)==2) {
1376                 array_push($zonelist['indian'], array($zonelookup[1], $timezone_identifiers[$i])); }
1377             if(count($zonelookup)==3) {
1378                 array_push($zonelist['indian'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1379         if($zonelookup[0]=="Pacific") {
1380             if(count($zonelookup)==2) {
1381                 array_push($zonelist['pacific'], array($zonelookup[1], $timezone_identifiers[$i])); }
1382             if(count($zonelookup)==3) {
1383                 array_push($zonelist['pacific'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
1384     }
1385 }
1386 ?>
1387 <div class="NavLinks"><?php echo $ThemeSet['NavLinkIcon']; ?><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php echo $Settings['board_name']; ?></a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Signup</a></div>
1388 <div class="DivNavLinks">&nbsp;</div>
1389 <div class="Table1Border">
1390 <?php if($ThemeSet['TableStyle']=="div") { ?>
1391 <div class="TableRow1">
1392 <span style="text-align: left;">
1393 <?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>
1394 </span></div>
1395 <?php } ?>
1396 <table class="Table1">
1397 <?php if($ThemeSet['TableStyle']=="table") { ?>
1398 <tr class="TableRow1">
1399 <td class="TableColumn1"><span style="text-align: left;">
1400 <?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>
1401 </span></td>
1402 </tr><?php } ?>
1403 <tr class="TableRow2">
1404 <th class="TableColumn2" style="width: 100%; text-align: left;">&nbsp;Inert your user info: </th>
1405 </tr>
1406 <tr class="TableRow3">
1407 <td class="TableColumn3">
1408 <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']); ?>">
1409 <table style="text-align: left;">
1410 <tr style="text-align: left;">
1411         <td style="width: 30%;"><label class="TextBoxLabel" for="Name">Insert a UserName:</label></td>
1412         <?php if(!isset($_SESSION['GuestName'])) { ?>
1413         <td style="width: 70%;"><input maxlength="24" type="text" class="TextBox" name="Name" size="20" id="Name" /></td>
1414         <?php } if(isset($_SESSION['GuestName'])) { ?>
1415         <td style="width: 70%;"><input maxlength="24" type="text" class="TextBox" name="Name" size="20" id="Name" value="<?php echo $_SESSION['GuestName']; ?>" /></td>
1416         <?php } ?>
1417 </tr><tr>
1418         <td style="width: 30%;"><label class="TextBoxLabel" for="Password">Insert a Password:</label></td>
1419         <td style="width: 70%;"><input maxlength="30" type="password" class="TextBox" name="Password" size="20" id="Password" /></td>
1420 </tr><tr>
1421         <td style="width: 30%;"><label class="TextBoxLabel" for="RePassword">ReInsert a Password:</label></td>
1422         <td style="width: 70%;"><input maxlength="30" type="password" class="TextBox" name="RePassword" size="20" id="RePassword" /></td>
1423 </tr><tr>
1424         <td style="width: 30%;"><label class="TextBoxLabel" for="Email">Insert Your Email:</label></td>
1425         <td style="width: 70%;"><input type="email" class="TextBox" name="Email" size="20" id="Email" /></td>
1426 </tr><tr>
1427         <td style="width: 30%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
1428         <td style="width: 70%;"><select id="YourOffSet" name="YourOffSet" class="TextBox">
1429 <optgroup label="Africa">
1430 <?php
1431 $optsel="";
1432 for ($i=0; $i < count($zonelist['africa']); $i++) {
1433     if($gettzinfofromjs==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
1434     echo "<option".$optsel." value=\"".$zonelist['africa'][$i][1]."\">".str_replace("_", " ", $zonelist['africa'][$i][0])."</option>\n"; 
1435     $optsel=""; }
1436 ?>
1437 </optgroup>
1438 <optgroup label="America">
1439 <?php
1440 $optsel="";
1441 for ($i=0; $i < count($zonelist['america']); $i++) {
1442     if($gettzinfofromjs==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
1443     echo "<option".$optsel." value=\"".$zonelist['america'][$i][1]."\">".str_replace("_", " ", $zonelist['america'][$i][0])."</option>\n"; 
1444     $optsel=""; }
1445 ?>
1446 </optgroup>
1447 <optgroup label="Antarctica">
1448 <?php
1449 $optsel="";
1450 for ($i=0; $i < count($zonelist['antarctica']); $i++) {
1451     if($gettzinfofromjs==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
1452     echo "<option".$optsel." value=\"".$zonelist['antarctica'][$i][1]."\">".str_replace("_", " ", $zonelist['antarctica'][$i][0])."</option>\n"; 
1453     $optsel=""; }
1454 ?>
1455 </optgroup>
1456 <optgroup label="Arctic">
1457 <?php
1458 $optsel="";
1459 for ($i=0; $i < count($zonelist['arctic']); $i++) {
1460     if($gettzinfofromjs==$zonelist['arctic'][$i][1]) { $optsel = " selected=\"selected\""; }
1461     echo "<option".$optsel." value=\"".$zonelist['arctic'][$i][1]."\">".str_replace("_", " ", $zonelist['arctic'][$i][0])."</option>\n"; 
1462     $optsel=""; }
1463 ?>
1464 </optgroup>
1465 <optgroup label="Asia">
1466 <?php
1467 for ($i=0; $i < count($zonelist['asia']); $i++) {
1468     if($gettzinfofromjs==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
1469     echo "<option".$optsel." value=\"".$zonelist['asia'][$i][1]."\">".str_replace("_", " ", $zonelist['asia'][$i][0])."</option>\n"; 
1470     $optsel=""; }
1471 ?>
1472 </optgroup>
1473 <optgroup label="Atlantic">
1474 <?php
1475 $optsel="";
1476 for ($i=0; $i < count($zonelist['atlantic']); $i++) {
1477     if($gettzinfofromjs==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
1478     echo "<option".$optsel." value=\"".$zonelist['atlantic'][$i][1]."\">".str_replace("_", " ", $zonelist['atlantic'][$i][0])."</option>\n"; 
1479     $optsel=""; }
1480 ?>
1481 </optgroup>
1482 <optgroup label="Australia">
1483 <?php
1484 $optsel="";
1485 for ($i=0; $i < count($zonelist['australia']); $i++) {
1486     if($gettzinfofromjs==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
1487     echo "<option".$optsel." value=\"".$zonelist['australia'][$i][1]."\">".str_replace("_", " ", $zonelist['australia'][$i][0])."</option>\n"; 
1488     $optsel=""; }
1489 ?>
1490 </optgroup>
1491 <optgroup label="Europe">
1492 <?php
1493 $optsel="";
1494 for ($i=0; $i < count($zonelist['europe']); $i++) {
1495     if($gettzinfofromjs==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
1496     echo "<option".$optsel." value=\"".$zonelist['europe'][$i][1]."\">".str_replace("_", " ", $zonelist['europe'][$i][0])."</option>\n"; 
1497     $optsel=""; }
1498 ?>
1499 </optgroup>
1500 <optgroup label="Indian">
1501 <?php
1502 $optsel="";
1503 for ($i=0; $i < count($zonelist['indian']); $i++) {
1504     if($gettzinfofromjs==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
1505     echo "<option".$optsel." value=\"".$zonelist['indian'][$i][1]."\">".str_replace("_", " ", $zonelist['indian'][$i][0])."</option>\n"; 
1506     $optsel=""; }
1507 ?>
1508 </optgroup>
1509 <optgroup label="Pacific">
1510 <?php
1511 $optsel="";
1512 for ($i=0; $i < count($zonelist['pacific']); $i++) {
1513     if($gettzinfofromjs==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
1514     echo "<option".$optsel." value=\"".$zonelist['pacific'][$i][1]."\">".str_replace("_", " ", $zonelist['pacific'][$i][0])."</option>\n"; 
1515     $optsel=""; }
1516 ?>
1517 </optgroup>
1518 <optgroup label="Etcetera">
1519 <?php
1520 $optsel="";
1521 for ($i=0; $i < count($zonelist['etcetera']); $i++) {
1522     if($gettzinfofromjs==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
1523     echo "<option".$optsel." value=\"".$zonelist['etcetera'][$i][1]."\">".str_replace("_", " ", $zonelist['etcetera'][$i][0])."</option>\n"; 
1524     $optsel=""; }
1525 ?>
1526 </optgroup>
1527 </select></td>
1528 </tr><tr>
1529         <td style="width: 30%;"><label class="TextBoxLabel" for="YourGender">Your Gender:</label></td>
1530         <td style="width: 70%;"><select id="YourGender" name="YourGender" class="TextBox">
1531 <option value="Male">Male</option>
1532 <option value="Female">Female</option>
1533 <option value="Unknow">Unknown</option>
1534 </select></td>
1535 </tr><tr>
1536         <td style="width: 30%;"><label class="TextBoxLabel" for="Website">Insert your Website:</label></td>
1537         <td style="width: 70%;"><input type="url" class="TextBox" name="Website" size="20" value="" id="Website" /></td>
1538 </tr><tr>
1539         <td style="width: 30%;"><label class="TextBoxLabel" for="Avatar">Insert a URL for Avatar:</label></td>
1540         <td style="width: 70%;"><input type="url" class="TextBox" name="Avatar" size="20" value="" id="Avatar" /></td>
1541 </tr><tr>
1542         <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>
1543         <td style="width: 70%;"><select id="storecookie" name="storecookie" class="TextBox">
1544 <option value="true">Yes</option>
1545 <option value="false">No</option>
1546 </select></td>
1547 </tr>
1548 </table>
1549 <table style="text-align: left;">
1550 <tr style="text-align: left;">
1551 <td style="width: 100%;">
1552 <label class="TextBoxLabel" for="TOSBox">TOS - Please read fully and check 'I agree' box ONLY if you agree to terms</label><br />
1553 <textarea rows="10" cols="58" id="TOSBox" name="TOSBox" class="TextBox" readonly="readonly" accesskey="T"><?php 
1554         echo file_get_contents("TOS");  ?></textarea><br />
1555 <input type="checkbox" class="TextBox" name="TOS" value="Agree" id="TOS" /><label class="TextBoxLabel" for="TOS">I Agree</label>
1556 <?php if($Settings['use_captcha']!="on") { ?><br />
1557 <?php } if($Settings['use_captcha']=="on") { ?>
1558 </td></tr>
1559 <tr style="text-align: left;">
1560 <td style="width: 100%;">
1561 <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 />
1562 <input maxlength="25" type="text" class="TextBox" name="signcode" size="20" id="signcode" value="Enter SignCode" /><br /><?php } ?>
1563 <input type="hidden" style="display: none;" name="act" value="makemembers" />
1564 <input type="hidden" style="display: none;" name="fid" value="<?php echo $UFID; ?>" />
1565 <input type="hidden" style="display: none;" name="ubid" value="<?php echo $Settings['BoardUUID']; ?>" />
1566 <?php if(isset($_GET['referrerid'])&&is_numeric($_GET['referrerid'])) { ?>
1567 <input type="hidden" style="display: none;" name="referrerid" value="<?php echo $_GET['referrerid']; ?>" />
1568 <?php } ?>
1569 <input type="submit" class="Button" value="Sign UP" />
1570 </td></tr>
1571 </table>
1572 </form>
1573 </td>
1574 </tr>
1575 <tr class="TableRow4">
1576 <td class="TableColumn4">&nbsp;</td>
1577 </tr>
1578 </table></div>
1579 <?php } } if($_GET['act']=="makemember") {
1580         if($_POST['act']=="makemembers") {
1581 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) { 
1582 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
1583 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
1584 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
1585 if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
1586 if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
1587 if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else { 
1588          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1589             $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
1590          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
1591             $_SESSION['AncientViewingFile'] = $exfile['index']; } }
1592 if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
1593 if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
1594 if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
1595 if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
1596 if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else { 
1597          if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1598             $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
1599          if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
1600             $_SESSION['OldViewingFile'] = $exfile['index']; } }
1601 if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
1602 if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
1603 if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
1604 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=signup","&","=",$prexqstr['member'],$exqstr['member']);
1605 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
1606 $_SESSION['ViewingFile'] = $exfile['member'].$Settings['file_ext']; }
1607 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
1608 $_SESSION['ViewingFile'] = $exfile['member']; }
1609 $_SESSION['PreViewingTitle'] = "Act: ";
1610 $_SESSION['ViewingTitle'] = "Signing up";
1611 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
1612 $membertitle = " ".$ThemeSet['TitleDivider']." Signing up";
1613 $REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
1614 $URL['REFERER'] = $REFERERurl['host'];
1615 $URL['HOST'] = $_SERVER["SERVER_NAME"];
1616 $REFERERurl = null;
1617 if(!isset($_POST['username'])) { $_POST['username'] = null; }
1618 if(!isset($_POST['TOS'])) { $_POST['TOS'] = null; }
1619 if($Settings['use_captcha']=="on") {
1620 require($SettDir['inc']."captcha.php"); }
1621 ?>
1622 <div class="NavLinks"><?php echo $ThemeSet['NavLinkIcon']; ?><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php echo $Settings['board_name']; ?></a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Signup</a></div>
1623 <div class="DivNavLinks">&nbsp;</div>
1624 <div class="Table1Border">
1625 <?php if($ThemeSet['TableStyle']=="div") { ?>
1626 <div class="TableRow1">
1627 <span style="text-align: left;">
1628 &nbsp;<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>
1629 <?php } ?>
1630 <table class="Table1">
1631 <?php if($ThemeSet['TableStyle']=="table") { ?>
1632 <tr class="TableRow1">
1633 <td class="TableColumn1"><span style="text-align: left;">
1634 &nbsp;<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>
1635 </tr><?php } ?>
1636 <tr class="TableRow2">
1637 <th class="TableColumn2" style="width: 100%; text-align: left;">&nbsp;Signup Message: </th>
1638 </tr>
1639 <tr class="TableRow3">
1640 <td class="TableColumn3">
1641 <table style="width: 100%; height: 25%; text-align: center;">
1642 <?php if (pre_strlen($_POST['Password'])>"60") { $Error="Yes";  
1643 if($_POST['Website']=="") { $_POST['Website'] = "http://"; }
1644 if($_POST['Avatar']=="") { $_POST['Avatar'] = "http://"; }
1645 ?>
1646 <tr>
1647         <td><span class="TableMessage">
1648         <br />Your password is too big.<br />
1649         </span>&nbsp;</td>
1650 </tr>
1651 <?php } if (!filter_var($_POST['Email'], FILTER_VALIDATE_EMAIL)) { $Error="Yes";  ?>
1652 <tr>
1653         <td><span class="TableMessage">
1654         <br />Your email is not a valid email address.<br />
1655         </span>&nbsp;</td>
1656 </tr>
1657 <?php } if (!filter_var($_POST['Website'], FILTER_VALIDATE_URL)&&($_POST['Website']!="http://"||$_POST['Website']!="https://")) { $Error="Yes";  ?>
1658 <tr>
1659         <td><span class="TableMessage">
1660         <br />Your website url is not a valid web url.<br />
1661         </span>&nbsp;</td>
1662 </tr>
1663 <?php } if (!filter_var($_POST['Avatar'], FILTER_VALIDATE_URL)&&($_POST['Avatar']!="http://"||$_POST['Avatar']!="https://")) { $Error="Yes";  ?>
1664 <tr>
1665         <td><span class="TableMessage">
1666         <br />Your avatar url is not a valid web url.<br />
1667         </span>&nbsp;</td>
1668 </tr>
1669 <?php } if($_POST['fid']!=$_SESSION['UserFormID']) { $Error="Yes";  ?>
1670 <tr>
1671         <td><span class="TableMessage">
1672         <br />Sorry the referering url dose not match our host name.<br />
1673         </span>&nbsp;</td>
1674 </tr>
1675 <?php } if($_POST['ubid']!=$Settings['BoardUUID']) { $Error="Yes";  ?>
1676 <tr>
1677         <td><span class="TableMessage">
1678         <br />Sorry the referering url dose not match our host name.<br />
1679         </span>&nbsp;</td>
1680 </tr>
1681 <?php } if (pre_strlen($_POST['username'])>"30") { $Error="Yes";  ?>
1682 <tr>
1683         <td><span class="TableMessage">
1684         <br />Your user name is too big.<br />
1685         </span>&nbsp;</td>
1686 </tr>
1687 <?php } if ($_POST['Password']!=$_POST['RePassword']) { $Error="Yes";  ?>
1688 <tr>
1689         <td><span class="TableMessage">
1690         <br />Your passwords did not match.<br />
1691         </span>&nbsp;</td>
1692 </tr>
1693 <?php } if($Settings['use_captcha']=="on") {
1694 if (PhpCaptcha::Validate($_POST['signcode'])) {
1695 //echo 'Valid code entered';
1696 } else { $Error="Yes"; ?>
1697 <tr>
1698         <td><span class="TableMessage">
1699         <br />Invalid code entered<br />
1700         </span>&nbsp;</td>
1701 </tr>
1702 <?php } } if ($Settings['TestReferer']=="on") {
1703         if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes";  ?>
1704 <tr>
1705         <td><span class="TableMessage">
1706         <br />Sorry the referering url dose not match our host name.<br />
1707         </span>&nbsp;</td>
1708 </tr>
1709 <?php } }
1710 $Name = stripcslashes(htmlspecialchars($_POST['Name'], ENT_QUOTES, $Settings['charset']));
1711 //$Name = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Name);
1712 $Name = remove_spaces($Name);
1713 $lonewolfqy=sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."restrictedwords\" WHERE \"RestrictedUserName\"='yes'", array(null));
1714 $lonewolfrt=sql_query($lonewolfqy,$SQLStat);
1715 $lonewolfnm=sql_num_rows($lonewolfrt);
1716 $lonewolfs=0; $RMatches = null;
1717 while ($lonewolfs < $lonewolfnm) {
1718 $RWord=sql_result($lonewolfrt,$lonewolfs,"Word");
1719 $RCaseInsensitive=sql_result($lonewolfrt,$lonewolfs,"CaseInsensitive");
1720 if($RCaseInsensitive=="on") { $RCaseInsensitive = "yes"; }
1721 if($RCaseInsensitive=="off") { $RCaseInsensitive = "no"; }
1722 if($RCaseInsensitive!="yes"||$RCaseInsensitive!="no") { $RCaseInsensitive = "no"; }
1723 $RWholeWord=sql_result($lonewolfrt,$lonewolfs,"WholeWord");
1724 if($RWholeWord=="on") { $RWholeWord = "yes"; }
1725 if($RWholeWord=="off") { $RWholeWord = "no"; }
1726 if($RWholeWord!="yes"||$RWholeWord!="no") { $RWholeWord = "no"; }
1727 $RWord = preg_quote($RWord, "/");
1728 if($RCaseInsensitive!="yes"&&$RWholeWord=="yes") {
1729 $RMatches = preg_match("/\b(".$RWord.")\b/", $Name);
1730         if($RMatches==true) { break 1; } }
1731 if($RCaseInsensitive=="yes"&&$RWholeWord=="yes") {
1732 $RMatches = preg_match("/\b(".$RWord.")\b/i", $Name);
1733         if($RMatches==true) { break 1; } }
1734 if($RCaseInsensitive!="yes"&&$RWholeWord!="yes") {
1735 $RMatches = preg_match("/".$RWord."/", $Name);
1736         if($RMatches==true) { break 1; } }
1737 if($RCaseInsensitive=="yes"&&$RWholeWord!="yes") {
1738 $RMatches = preg_match("/".$RWord."/i", $Name);
1739         if($RMatches==true) { break 1; } }
1740 ++$lonewolfs; } sql_free_result($lonewolfrt);
1741 $sql_email_check = sql_query(sql_pre_query("SELECT \"Email\" FROM \"".$Settings['sqltable']."members\" WHERE \"Email\"='%s'", array($_POST['Email'])),$SQLStat);
1742 $sql_username_check = sql_query(sql_pre_query("SELECT \"Name\" FROM \"".$Settings['sqltable']."members\" WHERE \"Name\"='%s'", array($Name)),$SQLStat);
1743 $email_check = sql_num_rows($sql_email_check); 
1744 $username_check = sql_num_rows($sql_username_check);
1745 sql_free_result($sql_email_check); sql_free_result($sql_username_check);
1746 if ($_POST['TOS']!="Agree") { $Error="Yes";  ?>
1747 <tr>
1748         <td><span class="TableMessage">
1749         <br />You need to  agree to the tos.<br />
1750         </span>&nbsp;</td>
1751 </tr>
1752 <?php } if ($_POST['Name']==null) { $Error="Yes"; ?>
1753 <tr>
1754         <td><span class="TableMessage">
1755         <br />You need to enter a name.<br />
1756         </span>&nbsp;</td>
1757 </tr>
1758 <?php } if ($_POST['Name']=="ShowMe") { $Error="Yes"; ?>
1759 <tr>
1760         <td><span class="TableMessage">
1761         <br />You need to enter a name.<br />
1762         </span>&nbsp;</td>
1763 </tr>
1764 <?php } if ($_POST['Password']==null) { $Error="Yes"; ?>
1765 <tr>
1766         <td><span class="TableMessage">
1767         <br />You need to enter a password.<br />
1768         </span>&nbsp;</td>
1769 </tr>
1770 <?php } if (!filter_var($_POST['Email'], FILTER_VALIDATE_EMAIL)) { $Error="Yes";  ?>
1771 <tr>
1772         <td><span class="TableMessage">
1773         <br />Your email is not a valid email address.<br />
1774         </span>&nbsp;</td>
1775 </tr>
1776 <?php } if ($_POST['Email']==null) { $Error="Yes"; ?>
1777 <tr>
1778         <td><span class="TableMessage">
1779         <br />You need to enter a email.<br />
1780         </span>&nbsp;</td>
1781 </tr>
1782 <?php } if($email_check > 0) { $Error="Yes"; ?>
1783 <tr>
1784         <td><span class="TableMessage">
1785         <br />Email address is already used.<br />
1786         </span>&nbsp;</td>
1787 </tr>
1788 <?php } if($username_check > 0) { $Error="Yes"; ?>
1789 <tr>
1790         <td><span class="TableMessage">
1791         <br />User Name is already used.<br />
1792         </span>&nbsp;</td>
1793 </tr>
1794 <?php } if($RMatches==true) { $Error="Yes"; ?>
1795 <tr>
1796         <td><span class="TableMessage">
1797         <br />This User Name is restricted to use.<br />
1798         </span>&nbsp;</td>
1799 </tr>
1800 <?php } if ($Error=="Yes") {
1801 redirect("refresh",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],FALSE),"4"); ?>
1802 <tr>
1803         <td><span class="TableMessage">
1804         <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 />&nbsp;
1805         </span><br /></td>
1806 </tr>
1807 <?php } if ($Error!="Yes") {
1808 $_POST['UserIP'] = $_SERVER['REMOTE_ADDR'];
1809 $_POST['Group'] = $Settings['MemberGroup'];
1810 $_POST['Joined'] = $utccurtime->getTimestamp(); $_POST['LastActive'] = $utccurtime->getTimestamp();
1811 $_POST['Signature'] = ""; $_POST['Interests'] = "";
1812 $_POST['Title'] = ""; $_POST['PostCount'] = "0";
1813 if(!isset($Settings['AdminValidate'])) { $Settings['AdminValidate'] = "off"; }
1814 if($Settings['AdminValidate']=="on"||$Settings['AdminValidate']!="off")
1815 { $ValidateStats="no"; $yourgroup=$Settings['ValidateGroup']; }
1816 if($Settings['AdminValidate']=="off"||$Settings['AdminValidate']!="on")
1817 { $ValidateStats="yes"; $yourgroup=$Settings['MemberGroup']; }
1818 $HideMe = "no"; $HashSalt = salt_hmac();
1819 if($Settings['use_hashtype']=="md2") { $iDBHash = "iDBH2";
1820 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"md2"); }
1821 if($Settings['use_hashtype']=="md4") { $iDBHash = "iDBH4";
1822 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"md4"); }
1823 if($Settings['use_hashtype']=="md5") { $iDBHash = "iDBH5";
1824 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"md5"); }
1825 if($Settings['use_hashtype']=="sha1") { $iDBHash = "iDBH";
1826 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha1"); }
1827 if($Settings['use_hashtype']=="sha224") { $iDBHash = "iDBH224";
1828 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha224"); }
1829 if($Settings['use_hashtype']=="sha256") { $iDBHash = "iDBH256";
1830 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha256"); }
1831 if($Settings['use_hashtype']=="sha384") { $iDBHash = "iDBH384";
1832 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha384"); }
1833 if($Settings['use_hashtype']=="sha512") { $iDBHash = "iDBH512";
1834 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha512"); }
1835 if($Settings['use_hashtype']=="sha3224") { $iDBHash = "iDBH3224";
1836 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha3-224"); }
1837 if($Settings['use_hashtype']=="sha3256") { $iDBHash = "iDBH3256";
1838 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha3-256"); }
1839 if($Settings['use_hashtype']=="sha3384") { $iDBHash = "iDBH3384";
1840 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha3-384"); }
1841 if($Settings['use_hashtype']=="sha3512") { $iDBHash = "iDBH3512";
1842 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha3-512"); }
1843 if($Settings['use_hashtype']=="ripemd128") { $iDBHash = "iDBHRMD128";
1844 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"ripemd128"); }
1845 if($Settings['use_hashtype']=="ripemd160") { $iDBHash = "iDBHRMD160";
1846 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"ripemd160"); }
1847 if($Settings['use_hashtype']=="ripemd256") { $iDBHash = "iDBHRMD256";
1848 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"ripemd256"); }
1849 if($Settings['use_hashtype']=="ripemd320") { $iDBHash = "iDBHRMD320";
1850 $NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"ripemd320"); }
1851 if($Settings['use_hashtype']=="bcrypt") { $iDBHash = "iDBCRYPT";
1852 $NewPassword = neo_b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"bcrypt"); }
1853 $_GET['YourPost'] = $_POST['Signature'];
1854 //require( './'.$SettDir['misc'].'HTMLTags.php');
1855 $_GET['YourPost'] = htmlspecialchars($_GET['YourPost'], ENT_QUOTES, $Settings['charset']);
1856 //$_GET['YourPost'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_GET['YourPost']);
1857 $NewSignature = $_GET['YourPost'];
1858 $_GET['YourPost'] = preg_replace("/\t+/"," ",$_GET['YourPost']);
1859 $_GET['YourPost'] = preg_replace("/\s\s+/"," ",$_GET['YourPost']);
1860 $_GET['YourPost'] = remove_bad_entities($_GET['YourPost']);
1861 $Avatar = stripcslashes(htmlspecialchars($_POST['Avatar'], ENT_QUOTES, $Settings['charset']));
1862 //$Avatar = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Avatar);
1863 $Avatar = remove_spaces($Avatar);
1864 $Website = stripcslashes(htmlspecialchars($_POST['Website'], ENT_QUOTES, $Settings['charset']));
1865 //$Website = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Website);
1866 $Website = remove_spaces($Website);
1867 $gquerys = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"Name\"='%s' LIMIT 1", array($yourgroup));
1868 $gresults=sql_query($gquerys,$SQLStat);
1869 $yourgroup=sql_result($gresults,0,"id");
1870 $PreUserPer['CanViewBoard']=sql_result($gresults,0,"CanViewBoard");
1871 $PreUserPer['CanViewOffLine']=sql_result($gresults,0,"CanViewOffLine");
1872 $PreUserPer['CanEditProfile']=sql_result($gresults,0,"CanEditProfile");
1873 $PreUserPer['CanAddEvents']=sql_result($gresults,0,"CanAddEvents");
1874 $PreUserPer['CanPM']=sql_result($gresults,0,"CanPM");
1875 $PreUserPer['CanSearch']=sql_result($gresults,0,"CanSearch");
1876 $PreUserPer['CanExecPHP']=sql_result($gresults,0,"CanExecPHP");
1877 $PreUserPer['CanDoHTML']=sql_result($gresults,0,"CanDoHTML");
1878 $PreUserPer['CanUseBBTags']=sql_result($gresults,0,"CanUseBBTags");
1879 $PreUserPer['CanModForum']=sql_result($gresults,0,"CanModForum");
1880 $PreUserPer['FloodControl']=sql_result($gresults,0,"FloodControl");
1881 $PreUserPer['SearchFlood']=sql_result($gresults,0,"SearchFlood");
1882 $PreUserPer['HasModCP']=sql_result($gresults,0,"HasModCP");
1883 $PreUserPer['HasAdminCP']=sql_result($gresults,0,"HasAdminCP");
1884 $PreUserPer['ViewDBInfo']=sql_result($gresults,0,"ViewDBInfo");
1885 sql_free_result($gresults);
1886 $_POST['Interests'] = remove_spaces($_POST['Interests']);
1887 $_POST['Title'] = remove_spaces($_POST['Title']);
1888 $_POST['Email'] = remove_spaces($_POST['Email']);
1889 $query = sql_pre_query("INSERT INTO \"".$Settings['sqltable']."members\" (\"Name\", \"UserPassword\", \"HashType\", \"Email\", \"GroupID\", \"LevelID\", \"Validated\", \"HiddenMember\", \"WarnLevel\", \"Interests\", \"Title\", \"Joined\", \"LastActive\", \"LastLogin\", \"LastPostTime\", \"BanTime\", \"BirthDay\", \"BirthMonth\", \"BirthYear\", \"Signature\", \"Notes\", \"Avatar\", \"AvatarSize\", \"Website\", \"Gender\", \"PostCount\", \"Karma\", \"KarmaUpdate\", \"RepliesPerPage\", \"TopicsPerPage\", \"MessagesPerPage\", \"TimeZone\", \"DateFormat\", \"TimeFormat\", \"UseTheme\", \"IP\", \"Salt\") VALUES\n". 
1890 "('%s', '%s', '%s', '%s', '%s', '1', '%s', '%s', %i, '%s', '%s', %i, %i, %i, '0', '0', '0', '0', '0', '%s', '%s', '%s', '%s', '%s', '%s', %i, 0, 0, 10, 10, 10, '%s', '%s', '%s', '%s', '%s', '%s')", array($Name,$NewPassword,$iDBHash,$_POST['Email'],$yourgroup,$ValidateStats,$HideMe,"0",$_POST['Interests'],$_POST['Title'],$_POST['Joined'],$_POST['LastActive'],$_POST['LastActive'],$NewSignature,'Your Notes',$Avatar,"100x100",$Website,$_POST['YourGender'],$_POST['PostCount'],$_POST['YourOffSet'],$Settings['idb_date_format'],$Settings['idb_time_format'],$Settings['DefaultTheme'],$_POST['UserIP'],$HashSalt));
1891 sql_query($query,$SQLStat);
1892 $yourid = sql_get_next_id($Settings['sqltable'],"members",$SQLStat);
1893 $idquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"Name\"='%s' AND \"UserPassword\"='%s' AND \"Email\"='%s' AND \"IP\"='%s' AND \"Salt\"='%s' LIMIT 1", array($Name,$NewPassword,$_POST['Email'],$_POST['UserIP'],$HashSalt));
1894 $idresult=sql_query($idquery,$SQLStat);
1895 $idnum=sql_num_rows($idresult);
1896 $idcheck = $yourid;
1897 if($idnum>=1) {
1898 $idncheck = sql_result($idresult,0,"id"); 
1899 $idncheck = intval($idncheck); }
1900 sql_free_result($idresult);
1901 if($yourid!=$idncheck) { $yourid = $idncheck; }
1902 $query = sql_pre_query("INSERT INTO \"".$Settings['sqltable']."mempermissions\" (\"id\", \"PermissionID\", \"CanViewBoard\", \"CanViewOffLine\", \"CanEditProfile\", \"CanAddEvents\", \"CanPM\", \"CanSearch\", \"CanExecPHP\", \"CanDoHTML\", \"CanUseBBTags\", \"CanModForum\", \"CanViewIPAddress\", \"CanViewUserAgent\", \"FloodControl\", \"SearchFlood\", \"HasModCP\", \"HasAdminCP\", \"ViewDBInfo\") VALUES\n". 
1903 "(%i, %i, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %i, %i, '%s', '%s', '%s')", array($yourid, 0, "group", "group", "group", "group", "group", "group", "group", "group", "group", "group", "group", "group", -1, -1, "group", "group", "group"));
1904 //"(%i, %i, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %i, %i, '%s', '%s', '%s')", array($yourid, 0, $PreUserPer['CanViewBoard'], $PreUserPer['CanViewOffLine'], $PreUserPer['CanEditProfile'], $PreUserPer['CanAddEvents'], $PreUserPer['CanPM'], $PreUserPer['CanSearch'], $PreUserPer['CanExecPHP'], $PreUserPer['CanDoHTML'], $PreUserPer['CanUseBBTags'], $PreUserPer['CanModForum'], $PreUserPer['FloodControl'], $PreUserPer['SearchFlood'], $PreUserPer['HasModCP'], $PreUserPer['HasAdminCP'], $PreUserPer['ViewDBInfo']));
1905 sql_query($query,$SQLStat);
1906 if(isset($_POST['referrerid'])&&is_numeric($_POST['referrerid'])) {
1907         $rfidquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_POST['referrerid']));
1908         $rfidresult=sql_query($rfidquery,$SQLStat);
1909         $rfidnum=sql_num_rows($rfidresult);
1910         if($rfidnum>=1) {
1911                 $rfidKarma=sql_result($rfidresult,0,"Karma");
1912                 sql_free_result($rfidresult);
1913                 if(!is_numeric($rfidKarma)) { $rfidKarma = 0; }
1914                 $rfidKarma = $rfidKarma + 1;
1915                 $querykup = sql_pre_query("UPDATE \"".$Settings['sqltable']."members\" SET \"Karma\"=%i WHERE \"id\"=%i", array($rfidKarma,$_POST['referrerid']));
1916                 sql_query($querykup,$SQLStat); } }
1917 $querylogr = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"Name\"='%s' AND \"UserPassword\"='%s' LIMIT 1", array($Name,$NewPassword));
1918 $resultlogr=sql_query($querylogr,$SQLStat);
1919 $numlogr=sql_num_rows($resultlogr);
1920 if($numlogr>=1) {
1921 $ir=0;
1922 $YourIDMr=sql_result($resultlogr,$ir,"id");
1923 $YourNameMr=sql_result($resultlogr,$ir,"Name");
1924 $YourGroupMr=sql_result($resultlogr,$ir,"GroupID");
1925 $YourGroupIDMr=$YourGroupMr;
1926 $gquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE \"id\"=%i LIMIT 1", array($YourGroupMr));
1927 $gresult=sql_query($gquery,$SQLStat);
1928 $YourGroupMr=sql_result($gresult,0,"Name");
1929 sql_free_result($gresult);
1930 $YourTimeZoneMr=sql_result($resultlogr,$ir,"TimeZone"); }
1931 sql_free_result($resultlogr);
1932 session_regenerate_id(true);
1933 $_SESSION['Loggedin']=true;
1934 $_SESSION['MemberName']=$YourNameMr;
1935 $_SESSION['UserID']=$YourIDMr;
1936 $_SESSION['UserIP']=$_SERVER['REMOTE_ADDR'];
1937 $_SESSION['UserTimeZone']=$YourTimeZoneMr;
1938 $usertz = new DateTimeZone($_SESSION['UserTimeZone']);
1939 $usercurtime->setTimestamp($defcurtime->getTimestamp());
1940 $usercurtime->setTimezone($usertz);
1941 $_SESSION['UserGroup']=$YourGroupMr;
1942 $_SESSION['UserGroupID']=$YourGroupIDMr;
1943 $_SESSION['UserPass']=$NewPassword;
1944 $_SESSION['DBName']=$Settings['sqldb'];
1945 if($_POST['storecookie']=="true") {
1946 if($cookieDomain==null) {
1947 setcookie("MemberName", $YourNameMr, time() + (7 * 86400), $cbasedir);
1948 setcookie("UserID", $YourIDMr, time() + (7 * 86400), $cbasedir);
1949 setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir); }
1950 if($cookieDomain!=null) {
1951 if($cookieSecure===true) {
1952 setcookie("MemberName", $YourNameMr, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
1953 setcookie("UserID", $YourIDMr, time() + (7 * 86400), $cbasedir, $cookieDomain, 1);
1954 setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain, 1); }
1955 if($cookieSecure===false) {
1956 setcookie("MemberName", $YourNameMr, time() + (7 * 86400), $cbasedir, $cookieDomain);
1957 setcookie("UserID", $YourIDMr, time() + (7 * 86400), $cbasedir, $cookieDomain);
1958 setcookie("SessPass", $NewPassword, time() + (7 * 86400), $cbasedir, $cookieDomain); } } }
1959 redirect("refresh",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],FALSE),"3");
1960 ?>
1961 <tr>
1962         <td><span class="TableMessage">
1963         <br />Welcome to the Board <?php echo $_SESSION['MemberName']; ?>. ^_^<br />
1964         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"; 
1965         if($Settings['AdminValidate']=="on"||$Settings['AdminValidate']!="off") {
1966         echo "<br />The admin has to validate your account befoure you can post.\n";
1967         echo "<br />The admin has been notified of your registration.\n"; } ?>
1968         <br />&nbsp;
1969         </span><br /></td>
1970 </tr>
1971 <?php } ?>
1972 </table>
1973 </td></tr>
1974 <tr class="TableRow4">
1975 <td class="TableColumn4">&nbsp;</td>
1976 </tr>
1977 </table></div>
1978 <?php } } }
1979 if($pagenum<=1) { ?>
1980 <div class="DivMembers">&nbsp;</div>
1981 <?php } ?>