viewtpc
post
pstopt
ok ive gotten it right when i click on the quote option it throw the block for the text but it dnt place the quote in there
when use the ndex.php?action=pstopt&pid option it suppose to give the text to fix but the box is emty in post option
THANK YOU FOR THE CODE
Code:
//////////////////////////////////View Topic else if($action=="viewtpc") { $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'")); $tnm = htmlspecialchars($tinfo[0]); addonline(getuid_sid($sid),"xHTML-Viewing Topic-$tnm ","index.php?action=viewtpc&page=$page&tid=$tid"); $tid = $_GET["tid"]; $go = $_GET["go"]; $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'")); if(!canaccess(getuid_sid($sid), $tfid[0])) { $pstyle = gettheme($sid); echo xhtmlhead("$stitle",$pstyle); echo "<p align=\"center\">"; echo "You Don't Have A Permission To View The Contents Of This Forum<br/><br/>"; echo "<a href=\"index.php?action=main\">Home</a>"; echo "</p>"; echo xhtmlfoot(); exit(); } $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'")); $tnm = htmlspecialchars($tinfo[0]); $pstyle = gettheme($sid); echo xhtmlhead($tnm,$pstyle); echo "<p align=\"center\">"; include ("pops.php"); $num_pages = getnumpages($tid); if($page==""||$page<1)$page=1; if($go!="")$page=getpage_go($go,$tid); $posts_per_page = 5; if($page>$num_pages)$page=$num_pages; $limit_start = $posts_per_page *($page-1); echo "<a href=\"index.php?action=post&tid=$tid\">Post reply</a>"; $tid = $_GET["tid"]; $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'")); $fid = $tfid[0]; $qut = $_GET["qut"]; echo "Fast Reply<br/>"; echo "<center><form action=\"genproc.php?action=post\" method=\"post\">"; echo "<input name=\"reptxt\" maxlength=\"500\"/><br/>"; echo "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>"; echo "<input type=\"hidden\" name=\"qut\" value=\"$qut\"/>"; echo "<input type=\"submit\" value=\"Reply\"/>"; echo "</form></center>"; $lastlink = "<a href=\"index.php?action=$action&tid=$tid&go=last\">Last Page</a>"; $firstlink = "<a href=\"index.php?action=$action&tid=$tid&page=1\">First Page</a> "; $golink = ""; if($page>1) { $golink = $firstlink; } if($page<$num_pages) { $golink .= $lastlink; } if($golink !="") { echo "<br/>$golink"; } echo "</p>"; echo "<p align=\"center\">"; $vws = $tinfo[4]+1; $rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$tid."'")); echo "<small>Replies: $rpls[0] - Views: $vws</small><br/>"; echo "</p>"; echo "<p>"; ///fm here echo "<div class=\"mblock2\">"; if($page==1) { $posts_per_page=4; mysql_query("UPDATE ibwf_topics SET views='".$vws."' WHERE id='".$tid."'"); $ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM ibwf_topics WHERE id='".$tid."'")); $unick = getnick_uid($ttext[0]); if(isonline($ttext[0])) { $iml = "<img src=\"http://coding-talk.com/images/onl.gif\" alt=\"+\"/>"; }else{ $iml = "<img src=\"http://coding-talk.com/images/ofl.gif\" alt=\"-\"/>"; } $usl = "<br/><a href=\"index.php?action=viewuser&who=$ttext[0]\">$iml$unick</a>"; $topt = "<a href=\"index.php?action=tpcopt&tid=$tid\">*</a>"; if($go==$tid) { $fli = "<img src=\"http://coding-talk.com/images/flag.gif\" alt=\"!\"/>"; }else{ $fli =""; } $pst = parsemsg($ttext[1],$sid); $dtot = date("d/m/y - H:i:s",$ttext[2]); echo "<small>$usl: $dtot</small><br/>$fli$pst $topt<br/>"; if($ttext[3]>0) { echo "<a href=\"index.php?action=viewtpl&who=$tid\">POLL</a><br/>"; } } if($page>1) { $limit_start--; } $sql = "SELECT id, text, uid, dtpost, quote FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page"; $posts = mysql_query($sql); while($post = mysql_fetch_array($posts)) { $unick = getnick_uid($post[2]); if(isonline($post[2])) { $iml = "<img src=\"http://coding-talk.com/images/onl.gif\" alt=\"+\"/>"; }else{ $iml = "<img src=\"http://coding-talk.com/images/ofl.gif\" alt=\"-\"/>"; } $usl = "<br/><a href=\"index.php?action=viewuser&who=$post[2]\">$iml$unick</a>"; $pst = parsemsg($post[1], $sid); //$topt = "<a href=\"index.php?action=pstopt&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>"; $topt = "<a href=\"index.php?action=post&tid=$tid&quid=$post[0]\">quote</a> <a href=\"index.php?action=pstopt&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>"; if($post[4]>0) { $qtl = "<small><i><a href=\"index.php?action=viewtpc&tid=$tid&pst=\">(quote:p=blaze,d=16-04-2006)</a></i></small>"; } if($go==$post[0]) { $fli = "<img src=\"http://coding-talk.com/images/flag.gif\" alt=\"!\"/>"; }else{ $fli =""; } $dtot = date("d/m/y - H:i:s",$post[3]); echo "<small>$usl: $dtot</small><br/>$fli$pst $topt<br/>"; } echo "</div>"; ///to here echo "</p>"; echo "<p align=\"center\">"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "<a href=\"inbox.php?action=main\">Inbox($umsg/$tmsg)</a><br/>"; } if($page>1) { $ppage = $page-1; echo "<a href=\"index.php?action=viewtpc&page=$ppage&tid=$tid\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"index.php?action=viewtpc&page=$npage&tid=$tid\">Next»</a>"; } echo "<br/>$page/$num_pages<br/>"; if($num_pages>2) { $rets = "<form action=\"index.php\" method=\"get\">"; $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>"; $rets .= "<input type=\"submit\" value=\"GO\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "</form>"; echo $rets; } echo "<br/>"; echo "<a href=\"index.php?action=post&tid=$tid\">Post reply</a>"; echo "</p>"; $tid = $_GET["tid"]; $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'")); $fid = $tfid[0]; $qut = $_GET["qut"]; echo "Fast Reply<br/>"; echo "<center><form action=\"genproc.php?action=post\" method=\"post\">"; echo "<input name=\"reptxt\" maxlength=\"500\"/><br/>"; echo "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>"; echo "<input type=\"hidden\" name=\"qut\" value=\"$qut\"/>"; echo "<input type=\"submit\" value=\"Reply\"/>"; echo "</form></center>"; echo "<p><small>"; $fid = $tinfo[5]; $fname = getfname($fid); $cid = mysql_fetch_array(mysql_query("SELECT cid FROM ibwf_forums WHERE id='".$fid."'")); $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_fcats WHERE id='".$cid[0]."'")); $cname = $cinfo[0]; echo "<a href=\"index.php?action=main\">"; echo "Home</a>>"; echo "<a href=\"index.php?action=formmenu\">"; echo "Forums</a>>"; $cid = mysql_fetch_array(mysql_query("SELECT cid FROM ibwf_forums WHERE id='".$fid."'")); if($cid[0]>0) { $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_fcats WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo "<a href=\"index.php?action=viewcat&cid=$cid[0]\">"; echo "$cname</a><br/>"; }else{ $cid = mysql_fetch_array(mysql_query("SELECT clubid FROM ibwf_forums WHERE id='".$fid."'")); $cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_clubs WHERE id='".$cid[0]."'")); $cname = htmlspecialchars($cinfo[0]); echo "<a href=\"index.php?action=gocl&clid=$cid[0]\">"; echo "$cname Club</a><br/>"; } $fname = htmlspecialchars($fname); echo "><a href=\"index.php?action=viewfrm&fid=$fid\">$fname</a>>$tnm"; echo "</small></p>"; echo xhtmlfoot(); exit(); }
Code:
else if($action=="post") { $tid = $_GET["tid"]; $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'")); $fid = $tfid[0]; $validated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE id='".$uid."' AND validated='0'")); if(($validated[0]>0)&&(validation())) { $pstyle = gettheme($sid); echo xhtmlhead("try again",$pstyle); echo "<p align=\"center\">"; $nickk = getnick_sid($sid); $whoo = getuid_nick($nickk); echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/><br/>"; echo "<b>Ur Account is Not Validated Yet</b><br/>"; $totaltimeonline = mysql_fetch_array(mysql_query("SELECT tottimeonl FROM ibwf_users WHERE id='".$whoo."'")); $num = $totaltimeonline[0]/86400; $days = intval($num); $num2 = ($num - $days)*24; $hours = intval($num2); $num3 = ($num2 - $hours)*60; $mins = intval($num3); $num4 = ($num3 - $mins)*60; $secs = intval($num4); echo "<b>Your online time:</b> "; if(($days==0) and ($hours==0) and ($mins==0)){ echo "$secs seconds<br/>"; }else if(($days==0) and ($hours==0)){ echo "$mins mins, "; echo "$secs seconds<br/>"; }else if(($days==0)){ echo "$hours hours, "; echo "$mins mins, "; echo "$secs seconds<br/>"; }else{ echo "$days days, "; echo "$hours hours, "; echo "$mins mins, "; echo "$secs seconds<br/>"; } echo "<br/>You have to Spend at least<u> 20 mins online</u> to get validated ur account. Plz be patient try again this option after 20 Minutes online here..Untill then Explorer and Enjoy other features in $stitle.<br/>thank you!<br/><br/>"; echo "<a href=\"index.php?action=formmenu\">Back To Forums</a><br/>"; echo "<a href=\"downloads/xindex.php?action=main\">Back To Downloads</a><br/>"; echo "<a href=\"index.php?action=main\">Back To Home</a><br/><br/>"; echo "</p>"; echo xhtmlfoot(); exit(); } if(!canaccess(getuid_sid($sid), $fid)) { $pstyle = gettheme($sid); echo xhtmlhead("$stitle",$pstyle); echo "<p align=\"center\">"; echo "You Don't Have A Permission To View The Contents Of This Forum<br/><br/>"; echo "<a href=\"index.php?action=main\">Home</a>"; echo "</p>"; echo xhtmlfoot(); exit(); } $tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'")); $tnm = htmlspecialchars($tinfo[0]); addonline(getuid_sid($sid),"xHTML-Posting Reply at $tnm",""); $pstyle = gettheme($sid); echo xhtmlhead("Post Reply",$pstyle); echo "<onevent type=\"onenterforward\">"; echo "<refresh> <setvar name=\"reptxt\" value=\"\"/> <setvar name=\"quid\" value=\"\"/> "; echo "</refresh></onevent>"; $quid = $_GET["quid"]; if(!empty($quid)) { $quidsql = mysql_fetch_array(mysql_query("SELECT text FROM ibwf_posts WHERE id='".$quid."'")); $quidtxt = " Quote:".$quidsql[0].""; } echo "<p align=\"center\">"; echo "<form method=\"post\" action=\"genproc.php?action=post\">"; echo "Text:<input name=\"reptxt\" maxlength=\"500\"/><br/>"; echo "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>"; echo "<input type=\"hidden\" name=\"quid\" value=\"$quid\"/>"; echo "<input type=\"submit\" name=\"Submit\" value=\"Reply\"/><br/>"; echo "</form>"; $fid = getfid($tid); $fname = getfname($fid); echo "<br/><br/><a href=\"index.php?action=viewtpc&tid=$tid\">"; echo "Back to topic</a>"; echo "<br/><a href=\"index.php?action=viewfrm&fid=$fid\">"; echo "$fname</a><br/>"; $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'")); $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'")); echo "<a href=\"index.php?action=main\"><img src=\"http://coding-talk.com/images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo xhtmlfoot(); exit(); }
Code:
//////////////////////////////////////////////Post Options else if($action=="pstopt") { $pid = $_GET["pid"]; $page = $_GET["page"]; $fid = $_GET["fid"]; addonline(getuid_sid($sid),"Post Options - xHTML",""); $pinfo= mysql_fetch_array(mysql_query("SELECT uid,tid, text FROM ibwf_posts WHERE id='".$pid."'")); $trid = $pinfo[0]; $tid = $pinfo[1]; $ptext = htmlspecialchars($pinfo[2]); $pstyle = gettheme($sid); echo xhtmlhead("Post Options",$pstyle); echo popup($sid); echo "<onevent type=\"onenterforward\">"; echo "<refresh> <setvar name=\"ptext\" value=\"$ptext\"/>"; echo "</refresh></onevent>"; echo "<p align=\"center\">"; echo "<b>Post Options</b>"; echo "</p>"; echo "<p>"; $trnick = getnick_uid($trid); echo ";<a href=\"inbox.php?action=sendpm&who=$trid\">»Send PM to $trnick</a><br/>"; echo "<a href=\"index.php?action=viewuser&who=$trid\">»View $trnick's Profile</a><br/>"; //echo "<a href=\"index.php?action=post&tid=$tid&qut=$pid\">»Quote</a><br/>"; echo "<a href=\"genproc.php?action=rpost&pid=$pid\">»Report</a><br/>"; echo "<a href=\"index.php?action=viewtpc&tid=$tid&page=$page\">«Back to topic</a><br/><br/>"; if(ismod(getuid_sid($sid))) { echo "<form method=\"post\" action=\"mprocpl.php?action=edtpst&pid=$pid\">"; // echo "Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> "; echo "Text:<input name=\"reptxt\" maxlength=\"500\" value=\"$quidtxt\"/><br/>"; echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>"; echo "</form>"; echo "<br/><a href=\"mprocpl.php?action=delp&pid=$pid\">»DELETE</a><br/>"; } else if($pinfo[0]==getuid_sid($sid)) { echo "<form method=\"post\" action=\"usertpc.php?action=edtpst&pid=$pid\">"; echo "Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> "; echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>"; echo "</form>"; } echo "</p>"; echo "<p align=\"center\">"; $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'")); $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'")); $unick = getnick_uid($who); echo "<a href=\"index.php?action=main\"><img src=\"http://coding-talk.com/images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo xhtmlfoot(); exit(); }
when use the ndex.php?action=pstopt&pid option it suppose to give the text to fix but the box is emty in post option
THANK YOU FOR THE CODE
Comment