OSDN Git Service

Added TableStyle to iDB Theme System.
[idb/iDB.git.git] / inc / searchs.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-2008 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
13
14     $FileInfo: searchs.php - Last Update: 11/29/2008 SVN 193 - Author: cooldude2k $
15 */
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="searchs.php"||$File3Name=="/searchs.php") {
18         require('index.php');
19         exit(); }
20 if($Settings['enable_search']===false||
21         $GroupInfo['CanSearch']=="no") {
22 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
23 @header("Content-Type: text/plain; charset=".$Settings['charset']);
24 ob_clean(); echo "Sorry you do not have permission to do a search."; 
25 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
26 if($Settings['enable_search']===true||
27         $GroupInfo['CanSearch']=="yes") {
28 if($_GET['act']=="topics") {
29         if($_GET['search']==null&&$_GET['type']==null) {
30         ?>
31 <div class="NavLinks"><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php echo $ThemeSet['NavLinkIcon']; ?>Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['search'],$Settings['file_ext'],"act=topics",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search']); ?>">Search topics</a></div>
32 <div>&nbsp;</div>
33 <div class="Table1Border">
34 <table class="Table1">
35 <tr class="TableRow1">
36 <td class="TableColumn1"><span style="text-align: left;">
37 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['search'],$Settings['file_ext'],"act=topics",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search']); ?>">Topic Search</a>
38 </span></td>
39 </tr>
40 <tr class="TableRow2">
41 <th class="TableColumn2" style="width: 100%; text-align: left;">&nbsp;Search for topic: </th>
42 </tr>
43 <tr class="TableRow3">
44 <td class="TableColumn3">
45 <form style="display: inline;" method="post" action="<?php echo url_maker($exfile['search'],$Settings['file_ext'],"act=topics",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search']); ?>">
46 <table style="text-align: left;">
47 <tr style="text-align: left;">
48         <td style="width: 30%;"><label class="TextBoxLabel" for="search">Enter SearchTerm: </label></td>
49         <td style="width: 70%;"><input maxlength="35" class="TextBox" id="search" type="text" name="search" /></td>
50 </tr><tr style="text-align: left;">
51         <td style="width: 30%;"><label class="TextBoxLabel" for="msearch">Filter by Member (optional): </label></td>
52         <td style="width: 70%;"><input maxlength="25" class="TextBox" id="msearch" type="text" name="msearch" /></td>
53 </tr><tr style="text-align: left;">
54         <td style="width: 30%;"><label class="TextBoxLabel" title="Wildcard is %" for="type">Search Type: </label></td>
55         <td style="width: 70%;"><select id="type" name="type" class="TextBox">
56 <option value="normal">Normal Search</option>
57 <option value="wildcard">Wildcard Search</option>
58 </select></td>
59 </tr></table>
60 <table style="text-align: left;">
61 <tr style="text-align: left;">
62 <td style="width: 100%;">
63 <input type="hidden" name="act" value="topics" style="display: none;" />
64 <input class="Button" type="submit" value="Search" />
65 </td></tr></table>
66 </form>
67 </td>
68 </tr>
69 <tr class="TableRow4">
70 <td class="TableColumn4">&nbsp;</td>
71 </tr>
72 </table></div>
73 <?php } if($_GET['search']!=null&&$_GET['type']!=null) {
74 if(pre_strlen($_GET['msearch'])>="25") { 
75         $_GET['msearch'] = null; }
76 if($_GET['msearch']!=null) {
77 $memsiquery = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `Name`='%s' LIMIT 1", array($_GET['msearch']));
78 $memsiresult=mysql_query($memsiquery);
79 $memsinum=mysql_num_rows($memsiresult);
80 $memsi=0;
81 if($memsinum==0) { $_GET['msearch'] = null; }
82 if($memsinum!=0) {
83 $memsid=mysql_result($memsiresult,$memsi,"id"); 
84 @mysql_free_result($memsiresult); } }
85 //Get SQL LIMIT Number
86 $nums = $_GET['page'] * $Settings['max_topics'];
87 $PageLimit = $nums - $Settings['max_topics'];
88 if($PageLimit<0) { $PageLimit = 0; }
89 if($_GET['msearch']==null) {
90 if($_GET['type']!="wildcard") {
91 $query = query("SELECT SQL_CALC_FOUND_ROWS * FROM `".$Settings['sqltable']."topics` WHERE `TopicName`='%s' ORDER BY `Pinned` DESC, `LastUpdate` DESC LIMIT %i,%i", array($_GET['search'],$PageLimit,$Settings['max_topics'])); }
92 if($_GET['type']=="wildcard") {
93 $query = query("SELECT SQL_CALC_FOUND_ROWS * FROM `".$Settings['sqltable']."topics` WHERE `TopicName` LIKE '%s' ORDER BY `Pinned` DESC, `LastUpdate` DESC LIMIT %i,%i", array($_GET['search'],$PageLimit,$Settings['max_topics'])); } }
94 if($_GET['msearch']!=null) {
95 if($_GET['type']!="wildcard") {
96 $query = query("SELECT SQL_CALC_FOUND_ROWS * FROM `".$Settings['sqltable']."topics` WHERE `TopicName`='%s' AND `UserID`=%i ORDER BY `Pinned` DESC, `LastUpdate` DESC LIMIT %i,%i", array($_GET['search'],$memsid,$PageLimit,$Settings['max_topics'])); }
97 if($_GET['type']=="wildcard") {
98 $query = query("SELECT SQL_CALC_FOUND_ROWS * FROM `".$Settings['sqltable']."topics` WHERE `TopicName` LIKE '%s' AND `UserID`=%i ORDER BY `Pinned` DESC, `LastUpdate` DESC LIMIT %i,%i", array($_GET['search'],$memsid,$PageLimit,$Settings['max_topics'])); } }
99 $rnquery = query("SELECT FOUND_ROWS();", array(null));
100 $result=mysql_query($query);
101 $rnresult=mysql_query($rnquery);
102 $NumberTopics = mysql_result($rnresult,0);
103 @mysql_free_result($rnresult);
104 if($NumberTopics==null) { 
105         $NumberTopics = 0; }
106 $num = $NumberTopics;
107 //Start Topic Page Code
108 if(!isset($Settings['max_topics'])) { $Settings['max_topics'] = 10; }
109 if($_GET['page']==null) { $_GET['page'] = 1; } 
110 if($_GET['page']<=0) { $_GET['page'] = 1; }
111 $nums = $_GET['page'] * $Settings['max_topics'];
112 if($nums>$num) { $nums = $num; }
113 $numz = $nums - $Settings['max_topics'];
114 if($numz<=0) { $numz = 0; }
115 //$i=$numz;
116 if($nums<$num) { $nextpage = $_GET['page'] + 1; }
117 if($nums>=$num) { $nextpage = $_GET['page']; }
118 if($numz>=$Settings['max_topics']) { $backpage = $_GET['page'] - 1; }
119 if($_GET['page']<=1) { $backpage = 1; }
120 $pnum = $num; $l = 1; $Pages = null;
121 while ($pnum>0) {
122 if($pnum>=$Settings['max_topics']) { 
123         $pnum = $pnum - $Settings['max_topics']; 
124         $Pages[$l] = $l; ++$l; }
125 if($pnum<$Settings['max_topics']&&$pnum>0) { 
126         $pnum = $pnum - $pnum; 
127         $Pages[$l] = $l; ++$l; } }
128 //End Topic Page Code
129 $num=mysql_num_rows($result);
130 if($num<=0) { 
131 redirect("location",$basedir.url_maker($exfile['search'],$Settings['file_ext'],"act=topics",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search'],false));
132 @header("Content-Type: text/plain; charset=".$Settings['charset']);
133 ob_clean(); echo "Sorry could not find any search results."; @mysql_free_result($result);
134 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
135 $i=0;
136 //List Page Number Code Start
137 $pagenum=count($Pages);
138 if($_GET['page']>$pagenum) {
139         $_GET['page'] = $pagenum; }
140 $pagei=0; $pstring = "<div class=\"PageList\">Pages: ";
141 if($_GET['page']<4) { $Pagez[0] = null; }
142 if($_GET['page']>=4) { $Pagez[0] = "First"; }
143 if($_GET['page']>=3) {
144 $Pagez[1] = $_GET['page'] - 2; }
145 if($_GET['page']<3) {
146 $Pagez[1] = null; }
147 if($_GET['page']>=2) {
148 $Pagez[2] = $_GET['page'] - 1; }
149 if($_GET['page']<2) {
150 $Pagez[2] = null; }
151 $Pagez[3] = $_GET['page'];
152 if($_GET['page']<$pagenum) {
153 $Pagez[4] = $_GET['page'] + 1; }
154 if($_GET['page']>=$pagenum) {
155 $Pagez[4] = null; }
156 $pagenext = $_GET['page'] + 1;
157 if($pagenext<$pagenum) {
158 $Pagez[5] = $_GET['page'] + 2; }
159 if($pagenext>=$pagenum) {
160 $Pagez[5] = null; }
161 if($_GET['page']<$pagenum) { $Pagez[6] = "Last"; }
162 if($_GET['page']>=$pagenum) { $Pagez[6] = null; }
163 $pagenumi=count($Pagez);
164 if($num==0) {
165 $pagenumi = 0;
166 if($_GET['msearch']==null) { 
167 $pstring = $pstring."<a href=\"".url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search'])."\">1</a> "; }
168 if($_GET['msearch']!=null) {
169 $pstring = $pstring."<a href=\"".url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&msearch=".$_GET['msearch']."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search'])."\">1</a> "; }
170 }
171 while ($pagei < $pagenumi) {
172 if($Pagez[$pagei]!=null&&
173    $Pagez[$pagei]!="First"&&
174    $Pagez[$pagei]!="Last") {
175 if($_GET['msearch']==null) {
176 $pstring = $pstring."<a href=\"".url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&page=".$Pagez[$pagei],$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search'])."\">".$Pagez[$pagei]."</a> "; }
177 if($_GET['msearch']!=null) {
178 $pstring = $pstring."<a href=\"".url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&msearch=".$_GET['msearch']."&page=".$Pagez[$pagei],$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search'])."\">".$Pagez[$pagei]."</a> "; } }
179 if($Pagez[$pagei]=="First") {
180 if($_GET['msearch']==null) {
181 $pstring = $pstring."<a href=\"".url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search'])."\">&lt; First</a> ... "; }
182 if($_GET['msearch']!=null) {
183 $pstring = $pstring."<a href=\"".url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&msearch=".$_GET['msearch']."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search'])."\">&lt; First</a> ... "; } }
184 if($Pagez[$pagei]=="Last") {
185 if($_GET['msearch']==null) {
186 $pstring = $pstring."... <a href=\"".url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&page=".$pagenum,$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search'])."\">Last &gt;</a> "; }
187 if($_GET['msearch']!=null) {
188 $pstring = $pstring."... <a href=\"".url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&msearch=".$_GET['msearch']."&page=".$pagenum,$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search'])."\">Last &gt;</a> "; } }
189         ++$pagei; } $pstring = $pstring."</div>";
190 ?>
191 <div class="NavLinks"><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>"><?php echo $ThemeSet['NavLinkIcon']; ?>Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile['search'],$Settings['file_ext'],"act=topics",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search']); ?>">Search topics</a></div>
192 <div>&nbsp;</div>
193 <?php
194 echo $pstring;
195 //List Page Number Code end
196 ?>
197 <div class="Table1Border">
198 <table class="Table1" id="Search">
199 <tr id="SearchStart" class="TableRow1">
200 <td class="TableColumn1" colspan="6"><span style="text-align: left;">
201 <?php echo $ThemeSet['TitleIcon'];
202 if($_GET['msearch']==null) { ?>
203 <a href="<?php echo url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&page=".$_GET['page'],$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search']); ?>">Searching for <?php echo $_GET['search']; ?></a>
204 <?php } if($_GET['msearch']!=null) { ?>
205 <a href="<?php echo url_maker($exfile['search'],$Settings['file_ext'],"act=topics&search=".$_GET['search']."&type=".$_GET['type']."&msearch=".$_GET['msearch']."&page=".$_GET['page'],$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search']); ?>">Searching for <?php echo $_GET['search']; ?> by <?php echo $_GET['msearch']; ?></a>
206 <?php } ?></span>
207 </td>
208 </tr>
209 <tr id="SearchStatRow" class="TableRow2">
210 <th class="TableColumn2" style="width: 4%;">State</th>
211 <th class="TableColumn2" style="width: 36%;">Topic Name</th>
212 <th class="TableColumn2" style="width: 15%;">Author</th>
213 <th class="TableColumn2" style="width: 15%;">Time</th>
214 <th class="TableColumn2" style="width: 5%;">Replys</th>
215 <th class="TableColumn2" style="width: 25%;">Last Reply</th>
216 </tr>
217 <?php
218 while ($i < $num) {
219 $TopicID=mysql_result($result,$i,"id");
220 $ForumID=mysql_result($result,$i,"ForumID");
221 $prequery = query("SELECT * FROM `".$Settings['sqltable']."forums` WHERE `id`=%i LIMIT 1", array($ForumID));
222 $preresult=mysql_query($prequery);
223 $prenum=mysql_num_rows($preresult);
224 $HotTopicPosts = $Settings['hot_topic_num'];
225 if($prenum > 0) {
226 $HotTopicPosts = mysql_result($preresult,0,"HotTopicPosts"); }
227 @mysql_free_result($preresult);
228 if($HotTopicPosts!=0&&is_numeric($HotTopicPosts)) {
229         $Settings['hot_topic_num'] = $HotTopicPosts; }
230 if(!is_numeric($Settings['hot_topic_num'])) {
231         $Settings['hot_topic_num'] = 15; }
232 $CategoryID=mysql_result($result,$i,"CategoryID");
233 $UsersID=mysql_result($result,$i,"UserID");
234 $GuestName=mysql_result($result,$i,"GuestName");
235 $TheTime=mysql_result($result,$i,"TimeStamp");
236 $TheTime=GMTimeChange("F j, Y",$TheTime,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
237 $NumReply=mysql_result($result,$i,"NumReply");
238 $TopicName=mysql_result($result,$i,"TopicName");
239 $TopicDescription=mysql_result($result,$i,"Description");
240 $PinnedTopic=mysql_result($result,$i,"Pinned");
241 $TopicStat=mysql_result($result,$i,"Closed");
242 $UsersName = GetUserName($UsersID,$Settings['sqltable']);
243 if($UsersName=="Guest") { $UsersName=$GuestName;
244 if($UsersName==null) { $UsersName="Guest"; } }
245 if(isset($PermissionInfo['CanViewForum'][$ForumID])&&
246         $PermissionInfo['CanViewForum'][$ForumID]=="yes"&&
247         isset($CatPermissionInfo['CanViewCategory'][$CategoryID])&&
248         $CatPermissionInfo['CanViewCategory'][$CategoryID]=="yes") {
249 $glrquery = query("SELECT * FROM `".$Settings['sqltable']."posts` WHERE `TopicID`=%i ORDER BY `TimeStamp` DESC LIMIT 1", array($TopicID));
250 $glrresult=mysql_query($glrquery);
251 $glrnum=mysql_num_rows($glrresult);
252 if($glrnum>0){
253 $ReplyID1=mysql_result($glrresult,0,"id");
254 $UsersID1=mysql_result($glrresult,0,"UserID");
255 $GuestName1=mysql_result($glrresult,0,"GuestName");
256 $TimeStamp1=mysql_result($glrresult,0,"TimeStamp");
257 $TimeStamp1=GMTimeChange("F j, Y",$TimeStamp1,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
258 $UsersName1 = GetUserName($UsersID1,$Settings['sqltable']); }
259 $NumPages = null; $NumRPosts = $NumReply + 1;
260 if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; }
261 if($NumRPosts>$Settings['max_posts']) {
262 $NumPages = ceil($NumRPosts/$Settings['max_posts']); }
263 if($NumRPosts<=$Settings['max_posts']) {
264 $NumPages = 1; }
265 $Users_Name1 = pre_substr($UsersName1,0,20);
266 if($UsersName1=="Guest") { $UsersName1=$GuestName1;
267 if($UsersName1==null) { $UsersName1="Guest"; } }
268 if (pre_strlen($UsersName1)>20) { $Users_Name1 = $Users_Name1."...";
269 $oldusername=$UsersName1; $UsersName1=$Users_Name1; } $lul = null;
270 if($TimeStamp1!=null) { $lul = null;
271 if($UsersID1!="-1") {
272 $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID1,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']);
273 $luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."&#35;reply".$NumRPosts;
274 $LastReply = "User: <a href=\"".$lul."\" title=\"".$oldusername."\">".$UsersName1."</a><br />\nTime: <a href=\"".$luln."\">".$TimeStamp1."</a>"; }
275 if($UsersID1=="-1") {
276 $lul = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']);
277 $luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."&#35;reply".$NumRPosts;
278 $LastReply = "Guest: <span title=\"".$oldusername."\">".$UsersName1."</span><br />\nTime: <a href=\"".$luln."\">".$TimeStamp1."</a>"; } }
279 @mysql_free_result($glrresult);
280 if($TimeStamp1==null) { $LastReply = "&nbsp;<br />&nbsp;"; }
281 $PreTopic = $ThemeSet['TopicIcon'];
282 if ($PinnedTopic>1) { $PinnedTopic = 1; } 
283 if ($PinnedTopic<0) { $PinnedTopic = 0; }
284 if(!is_numeric($PinnedTopic)) { $PinnedTopic = 0; }
285 if ($TopicStat>1) { $TopicStat = 1; } 
286 if ($TopicStat<0) { $TopicStat = 0; }
287 if(!is_numeric($TopicStat)) { $TopicStat = 1; }
288 if ($PinnedTopic==1&&$TopicStat==0) {
289         if($NumReply>=$Settings['hot_topic_num']) {
290                 $PreTopic=$ThemeSet['HotPinTopic']; }
291         if($NumReply<$Settings['hot_topic_num']) {
292                 $PreTopic=$ThemeSet['PinTopic']; } }
293 if ($TopicStat==1&&$PinnedTopic==0) {
294         if($NumReply>=$Settings['hot_topic_num']) {
295                 $PreTopic=$ThemeSet['HotClosedTopic']; }
296         if($NumReply<$Settings['hot_topic_num']) {
297                 $PreTopic=$ThemeSet['ClosedTopic']; } }
298 if ($PinnedTopic==0&&$TopicStat==0) {
299                 if($NumReply>=$Settings['hot_topic_num']) {
300                         $PreTopic=$ThemeSet['HotTopic']; }
301                 if($NumReply<$Settings['hot_topic_num']) {
302                         $PreTopic=$ThemeSet['TopicIcon']; } }
303 if ($PinnedTopic==1&&$TopicStat==1) {
304                 if($NumReply>=$Settings['hot_topic_num']) {
305                         $PreTopic=$ThemeSet['HotPinClosedTopic']; }
306                 if($NumReply<$Settings['hot_topic_num']) {
307                         $PreTopic=$ThemeSet['PinClosedTopic']; } }
308 ?>
309 <tr class="TableRow3" id="Topic<?php echo $TopicID; ?>">
310 <td class="TableColumn3"><div class="topicstate">
311 <?php echo $PreTopic; ?></div></td>
312 <td class="TableColumn3"><div class="topicname">
313 <a href="<?php echo url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic']); ?>"><?php echo $TopicName; ?></a></div>
314 <div class="topicdescription"><?php echo $TopicDescription; ?></div></td>
315 <td class="TableColumn3" style="text-align: center;"><?php
316 if($UsersID!="-1") {
317 echo "<a href=\"";
318 echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']);
319 echo "\">".$UsersName."</a>"; }
320 if($UsersID=="-1") {
321 echo "<span>".$UsersName."</span>"; }
322 ?></td>
323 <td class="TableColumn3" style="text-align: center;"><?php echo $TheTime; ?></td>
324 <td class="TableColumn3" style="text-align: center;"><?php echo $NumReply; ?></td>
325 <td class="TableColumn3"><?php echo $LastReply; ?></td>
326 </tr>
327 <?php } ++$i; }
328 ?>
329 <tr id="SearchEnd" class="TableRow4">
330 <td class="TableColumn4" colspan="6">&nbsp;</td>
331 </tr>
332 </table></div>
333 <?php
334 @mysql_free_result($result); } } } 
335 ?>
336 <div>&nbsp;</div>