OSDN Git Service

Last update to Low View (Lo-Fi) for now.
[idb/iDB.git.git] / inc / lowreplies.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-2009 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/
13
14     $FileInfo: replies.php - Last Update: 5/04/2009 SVN 249 - Author: cooldude2k $
15 */
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="replies.php"||$File3Name=="/replies.php") {
18         require('index.php');
19         exit(); }
20 $pstring = null; $pagenum = null;
21 if(!is_numeric($_GET['id'])) { $_GET['id'] = null; }
22 if(!is_numeric($_GET['post'])) { $_GET['post'] = null; }
23 if(!is_numeric($_GET['page'])) { $_GET['page'] = null; }
24 if(!isset($_GET['modact'])) { $_GET['modact'] = null; }
25 if($_GET['modact']=="pin"||$_GET['modact']=="unpin"||$_GET['modact']=="open"||
26         $_GET['modact']=="close"||$_GET['modact']=="edit"||$_GET['modact']=="delete")
27                 { $_GET['act'] = $_GET['modact']; }
28 if(!isset($ForumCheck)) { $ForumCheck = null; }
29 $prequery = query("SELECT * FROM `".$Settings['sqltable']."topics` WHERE `id`=%i LIMIT 1", array($_GET['id']));
30 $preresult=mysql_query($prequery);
31 $prenum=mysql_num_rows($preresult);
32 if($prenum==0) { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); @mysql_free_result($preresult);
33 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
34 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
35 if($prenum>=1) {
36 $TopicName=mysql_result($preresult,0,"TopicName");
37 $TopicID=mysql_result($preresult,0,"id");
38 $TopicForumID=mysql_result($preresult,0,"ForumID");
39 $TopicCatID=mysql_result($preresult,0,"CategoryID");
40 $TopicClosed=mysql_result($preresult,0,"Closed");
41 $NumberReplies=mysql_result($preresult,0,"NumReply");
42 $ViewTimes=mysql_result($preresult,0,"NumViews");
43 @mysql_free_result($preresult);
44 $forumcheckx = query("SELECT * FROM `".$Settings['sqltable']."forums` WHERE `id`=%i  LIMIT 1", array($TopicForumID));
45 $fmckresult=mysql_query($forumcheckx);
46 $ForumName=mysql_result($fmckresult,0,"Name");
47 $ForumType=mysql_result($fmckresult,0,"ForumType");
48 $CanHaveTopics=mysql_result($fmckresult,0,"CanHaveTopics");
49 $ForumPostCountView=mysql_result($fmckresult,0,"PostCountView");
50 $ForumKarmaCountView=mysql_result($fmckresult,0,"KarmaCountView");
51 @mysql_free_result($fmckresult);
52 $catcheck = query("SELECT * FROM `".$Settings['sqltable']."categories` WHERE `id`=%i  LIMIT 1", array($TopicCatID));
53 $catresult=mysql_query($catcheck);
54 $CategoryName=mysql_result($catresult,0,"Name");
55 $CategoryType=mysql_result($catresult,0,"CategoryType");
56 $CategoryPostCountView=mysql_result($catresult,0,"PostCountView");
57 $CategoryKarmaCountView=mysql_result($catresult,0,"KarmaCountView");
58 @mysql_free_result($catresult);
59 if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
60 if($MyPostCountChk==null) { $MyPostCountChk = 0; }
61 if($MyKarmaCount==null) { $MyKarmaCount = 0; }
62 if($ForumPostCountView!=0&&$MyPostCountChk<$ForumPostCountView) {
63 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
64 if($CategoryPostCountView!=0&&$MyPostCountChk<$CategoryPostCountView) {
65 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
66 if($ForumKarmaCountView!=0&&$MyKarmaCount<$ForumKarmaCountView) {
67 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
68 if($CategoryKarmaCountView!=0&&$MyKarmaCount<$CategoryKarmaCountView) {
69 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
70 if($ForumCheck!="skip") {
71 ?>
72 <div style="font-size: 1.0em; font-weight: bold; margin-bottom: 10px; padding-top: 3px; width: auto;">Full Version: <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>
73 <div style="padding: 10px; border: 1px solid gray;"><a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">Board index</a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile[$CategoryType],$Settings['file_ext'],"act=lowview&id=".$TopicCatID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$CategoryType],$exqstr[$CategoryType]); ?>"><?php echo $CategoryName; ?></a><?php echo $ThemeSet['NavLinkDivider']; ?><a href="<?php echo url_maker($exfile[$ForumType],$Settings['file_ext'],"act=lowview&id=".$TopicForumID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>"><?php echo $ForumName; ?></a></div>
74 <div>&nbsp;</div>
75 <?php }
76 if(!isset($CatPermissionInfo['CanViewCategory'][$TopicCatID])) {
77         $CatPermissionInfo['CanViewCategory'][$TopicCatID] = "no"; }
78 if($CatPermissionInfo['CanViewCategory'][$TopicCatID]=="no"||
79         $CatPermissionInfo['CanViewCategory'][$TopicCatID]!="yes") {
80 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
81 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
82 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
83 if(!isset($PermissionInfo['CanViewForum'][$TopicForumID])) {
84         $PermissionInfo['CanViewForum'][$TopicForumID] = "no"; }
85 if($PermissionInfo['CanViewForum'][$TopicForumID]=="no"||
86         $PermissionInfo['CanViewForum'][$TopicForumID]!="yes") {
87 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
88 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
89 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
90 if($_GET['act']!="view") { 
91 $CanMakeReply = "no"; $CanMakeTopic = "no";
92 if($PermissionInfo['CanMakeTopics'][$TopicForumID]=="yes"&&$CanHaveTopics=="yes") { 
93         $CanMakeTopic = "yes"; }
94 if($TopicClosed==0&&$PermissionInfo['CanMakeReplys'][$TopicForumID]=="yes") {
95         $CanMakeReply = "yes"; }
96 if($TopicClosed==1&&$PermissionInfo['CanMakeReplysClose'][$TopicForumID]=="yes"
97         &&$PermissionInfo['CanMakeReplys'][$TopicForumID]=="yes") {
98                 $CanMakeReply = "yes"; } ?>
99 <div style="padding: 10px; border: 1px solid gray;">
100 <?php echo $pstring; ?></div>
101 <div>&nbsp;</div>
102 <div style="padding: 10px; border: 1px solid gray;">
103 <?php } if($_GET['act']=="lowview") {
104 if($NumberReplies==null) { 
105         $NumberReplies = 0; }
106 $num=$NumberReplies+1;
107 //Start Reply Page Code
108 if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; }
109 if($_GET['page']==null) { $_GET['page'] = 1; } 
110 if($_GET['page']<=0) { $_GET['page'] = 1; }
111 $nums = $_GET['page'] * $Settings['max_posts'];
112 if($nums>$num) { $nums = $num; }
113 $numz = $nums - $Settings['max_posts'];
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_posts']) { $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_posts']) { 
123         $pnum = $pnum - $Settings['max_posts']; 
124         $Pages[$l] = $l; ++$l; }
125 if($pnum<$Settings['max_posts']&&$pnum>0) { 
126         $pnum = $pnum - $pnum; 
127         $Pages[$l] = $l; ++$l; } }
128 $snumber = $_GET['page'] - 1;
129 $PageLimit = $Settings['max_posts'] * $snumber;
130 if($PageLimit<0) { $PageLimit = 0; }
131 //End Reply Page Code
132 $i=0;
133 $query = query("SELECT * FROM `".$Settings['sqltable']."posts` WHERE `TopicID`=%i ORDER BY `TimeStamp` ASC LIMIT %i,%i", array($_GET['id'],$PageLimit,$Settings['max_posts']));
134 $result=mysql_query($query);
135 $num=mysql_num_rows($result);
136 if($num==0) { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
137 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
138 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
139 if($num!=0) { 
140 if($ViewTimes==0||$ViewTimes==null) { $NewViewTimes = 1; }
141 if($ViewTimes!=0&&$ViewTimes!=null) { $NewViewTimes = $ViewTimes + 1; }
142 $viewsup = query("UPDATE `".$Settings['sqltable']."topics` SET `NumViews`='%s' WHERE `id`=%i", array($NewViewTimes,$_GET['id']));
143 mysql_query($viewsup); }
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($num==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['topic'],$Settings['file_ext'],"act=lowview&id=".$_GET['id']."&page=".$Pback,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."\">&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['topic'],$Settings['file_ext'],"act=lowview&id=".$_GET['id']."&page=".$Pagez[$pagei],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."\">".$Pagez[$pagei]."</a></span> "; }
187 if($pagei==3) { 
188 $pstring = $pstring."<span class=\"pagecurrent\"><a href=\"".url_maker($exfile['topic'],$Settings['file_ext'],"act=lowview&id=".$_GET['id']."&page=".$Pagez[$pagei],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."\">".$Pagez[$pagei]."</a></span> "; } }
189 if($Pagez[$pagei]=="First") {
190 $pstring = $pstring."<span class=\"pagelinklast\"><a href=\"".url_maker($exfile['topic'],$Settings['file_ext'],"act=lowview&id=".$_GET['id']."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."\">&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['topic'],$Settings['file_ext'],"act=lowview&id=".$_GET['id']."&page=".$Pnext,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."\">&gt;</a></span> ";
196 if($ptestnext<$pagenum) {
197 $pstring = $pstring."<span class=\"pagelinklast\"><a href=\"".url_maker($exfile['topic'],$Settings['file_ext'],"act=lowview&id=".$_GET['id']."&page=".$pagenum,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."\">&raquo;</a></span> "; } }
198         ++$pagei; } $pstring = $pstring."</div>"; }
199 //List Page Number Code end
200 $CanMakeReply = "no"; $CanMakeTopic = "no";
201 if($PermissionInfo['CanMakeTopics'][$TopicForumID]=="yes"&&$CanHaveTopics=="yes") { 
202         $CanMakeTopic = "yes"; }
203 if($TopicClosed==0&&$PermissionInfo['CanMakeReplys'][$TopicForumID]=="yes") {
204         $CanMakeReply = "yes"; }
205 if($TopicClosed==1&&$PermissionInfo['CanMakeReplysClose'][$TopicForumID]=="yes"
206         &&$PermissionInfo['CanMakeReplys'][$TopicForumID]=="yes") {
207                 $CanMakeReply = "yes"; }
208 if($pstring!=null||$CanMakeReply=="yes"||$CanMakeTopic=="yes") {
209 /* ?>
210 <div style="padding: 10px; border: 1px solid gray;">
211 <?php echo $pstring; ?></div>
212 <div>&nbsp;</div>
213 <div style="padding: 10px; border: 1px solid gray;">
214 <ul style="list-style-type: none;">
215 <?php */ } while ($i < $num) {
216 $MyPostID=mysql_result($result,$i,"id");
217 $MyTopicID=mysql_result($result,$i,"TopicID");
218 $MyPostIP=mysql_result($result,$i,"IP");
219 $MyForumID=mysql_result($result,$i,"ForumID");
220 $MyCategoryID=mysql_result($result,$i,"CategoryID");
221 $MyUserID=mysql_result($result,$i,"UserID");
222 $MyGuestName=mysql_result($result,$i,"GuestName");
223 $MyTimeStamp=mysql_result($result,$i,"TimeStamp");
224 $MyEditTime=mysql_result($result,$i,"LastUpdate");
225 $MyEditUserID=mysql_result($result,$i,"EditUser");
226 $MyTimeStamp=GMTimeChange("M j, Y, g:i a",$MyTimeStamp,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
227 $MyPost=mysql_result($result,$i,"Post");
228 $MyPost = preg_replace("/\<br\>/", "<br />\n", nl2br($MyPost));
229 $MyDescription=mysql_result($result,$i,"Description");
230 $requery = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `id`=%i LIMIT 1", array($MyUserID));
231 $reresult=mysql_query($requery);
232 $renum=mysql_num_rows($reresult);
233 $rei=0; $ipshow = "two";
234 $User1ID=$MyUserID; $GuestName = $MyGuestName;
235 $User1Name=mysql_result($reresult,$rei,"Name");
236 $User1IP=mysql_result($reresult,$rei,"IP");
237 if($User1IP==$MyPostIP) { $ipshow = "one"; }
238 $User1Email=mysql_result($reresult,$rei,"Email");
239 $User1Title=mysql_result($reresult,$rei,"Title");
240 $User1Joined=mysql_result($reresult,$rei,"Joined");
241 $User1Joined=GMTimeChange("M j Y",$User1Joined,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
242 $User1GroupID=mysql_result($reresult,$rei,"GroupID");
243 $gquery = query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i LIMIT 1", array($User1GroupID));
244 $gresult=mysql_query($gquery);
245 $User1Group=mysql_result($gresult,0,"Name");
246 $GroupNamePrefix=mysql_result($gresult,0,"NamePrefix");
247 $GroupNameSuffix=mysql_result($gresult,0,"NameSuffix");
248 @mysql_free_result($gresult);
249 $User1Signature=mysql_result($reresult,$rei,"Signature");
250 $User1Avatar=mysql_result($reresult,$rei,"Avatar");
251 $User1AvatarSize=mysql_result($reresult,$rei,"AvatarSize");
252 if ($User1Avatar=="http://"||$User1Avatar==null||
253         strtolower($User1Avatar)=="noavatar") {
254 $User1Avatar=$ThemeSet['NoAvatar'];
255 $User1AvatarSize=$ThemeSet['NoAvatarSize']; }
256 $AvatarSize1=explode("x", $User1AvatarSize);
257 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
258 $User1Website=mysql_result($reresult,$rei,"Website");
259 $User1PostCount=mysql_result($reresult,$rei,"PostCount");
260 $User1Karma=mysql_result($reresult,$rei,"Karma");
261 $User1IP=mysql_result($reresult,$rei,"IP");
262 @mysql_free_result($reresult);
263 if($User1Name=="Guest") { $User1Name=$GuestName;
264 if($User1Name==null) { $User1Name="Guest"; } }
265 if(isset($GroupNamePrefix)&&$GroupNamePrefix!=null) {
266         $User1Name = $GroupNamePrefix.$User1Name; }
267 if(isset($GroupNameSuffix)&&$GroupNameSuffix!=null) {
268         $User1Name = $User1Name.$GroupNameSuffix; }
269 $MySubPost = null;
270 if($MyEditTime!=$MyTimeStamp&&$MyEditUserID!=0) {
271 $euquery = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `id`=%i LIMIT 1", array($MyEditUserID));
272 $euresult = mysql_query($euquery);
273 $eunum = mysql_num_rows($euresult);
274 $eui=0; while ($eui < $eunum) {
275         $EditUserID = $MyEditUserID;
276         $EditUserName = mysql_result($euresult,$eui,"Name");
277         ++$eui; }
278         $MyEditTime = GMTimeChange("M j, Y, g:i a",$MyEditTime,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
279         $MySubPost = "<div class=\"EditReply\"><br />This post has been edited by <b>".$EditUserName."</b> on ".$MyEditTime."</div>"; }
280 $MyPost = text2icons($MyPost,$Settings['sqltable']);
281 if($MySubPost!=null) { $MyPost = $MyPost."\n".$MySubPost; }
282 $User1Signature = preg_replace("/\<br\>/", "<br />\n", nl2br($User1Signature));
283 $User1Signature = text2icons($User1Signature,$Settings['sqltable']);
284 $CanEditReply = false; $CanDeleteReply = false;
285 if($_SESSION['UserGroup']!=$Settings['GuestGroup']) {
286 if($PermissionInfo['CanEditReplys'][$MyForumID]=="yes"&&
287         $_SESSION['UserID']==$MyUserID) { $CanEditReply = true; }
288 if($PermissionInfo['CanDeleteReplys'][$MyForumID]=="yes"&&
289         $_SESSION['UserID']==$MyUserID) { $CanDeleteReply = true; }
290 if($PermissionInfo['CanModForum'][$MyForumID]=="yes") { 
291         $CanEditReply = true; $CanDeleteReply = true; } }
292 if($_SESSION['UserID']==0) { 
293         $CanEditReply = false; $CanDeleteReply = false; }
294 $ReplyNum = $i + $PageLimit + 1;
295 ?>
296 <div style="border: 1px solid #E6E3E4; padding:1px; margin-bottom: 15px; background-color: #E6E3E4; padding: 6px;">
297 <div style="font-weight: bold; font-size: 0.8em; width: auto; float: left;"><?php echo $User1Name; ?></div>
298 <div style="width:auto; font-size: 0.8em; color: gray; text-align:right;"><?php echo $MyTimeStamp; ?></div>
299 </div>
300 <div style="padding: 6px; font-size: 0.8em;"><?php echo $MyPost; ?></div>
301 <?php ++$i; } @mysql_free_result($result); 
302 ?></div><div>&nbsp;</div><?php
303 if($CanMakeReply=="yes") {  
304 $QuoteReply = null; $QuoteDescription = null;
305 $queryra = query("SELECT * FROM `".$Settings['sqltable']."posts` WHERE `TopicID`=%i ORDER BY `TimeStamp` ASC LIMIT 1", array($_GET['id']));
306 $resultra=mysql_query($queryra);
307 $numrose=mysql_num_rows($resultra);
308 $QuoteDescription=mysql_result($resultra,0,"Description"); 
309 $QuoteDescription = str_replace("Re: ","",$QuoteDescription);
310 $QuoteDescription = "Re: ".$QuoteDescription;
311 @mysql_free_result($resultra); } } } ?>