the above codings calls posts that have been posted by members also limits that should be showin in the page is also mentioned
same like that i want it to call images from a certain ibwf_Example
like above
i am searching for a code that can call images only the sql i mentioned finally is not enough it requires some kind of a code called "items"and make it fetch also can any one combine me the image calling code for this code in top.
i am almost done with the rest of the codings if you just can help me with this thing i can make it then and share it with all of you!
PHP 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("sithalawap",$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&sid=$sid\">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);
addonline(getuid_sid($sid),"xHTML-Viewing Topic $tnm ","index.php?action=viewtpc&page=$page&tid=$tid");
echo "<p align=\"center\">";
getalert($sid);
include("pop.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&sid=$sid&tid=$tid\">Post reply</a>";
$lastlink = "<a href=\"index.php?action=$action&tid=$tid&sid=$sid&go=last\">Last Page</a>";
$firstlink = "<a href=\"index.php?action=$action&tid=$tid&sid=$sid&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 "<large>Replies: $rpls[0] - Views: $vws</large><br/>";
echo "</p>";
echo "<p>";
///fm here
$vp = mysql_fetch_array(mysql_query("SELECT tid FROM ibwf_favtopic WHERE uid='".$uid."'"));
if($tid==$vp[0])
{
echo "<a href=\"genproc.php?action=delfav&sid=$sid&tid=$tid\">Delete From Favourite list</a><br/>";
}else{
echo "<a href=\"genproc.php?action=makefav&sid=$sid&tid=$tid\">Bookmark</a><br/>";
}
echo "<div class=\"mblock3\">";
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=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$usl = "<br/><a href=\"index.php?action=viewuser&sid=$sid&who=$ttext[0]\">$iml$unick</a>";
$topt = "<a href=\"index.php?action=tpcopt&sid=$sid&tid=$tid\">*</a>";
if($go==$tid)
{
$fli = "<img src=\"images/flag.gif\" alt=\"!\"/>";
}else{
$fli ="";
}
$pst = parsemsg($ttext[1],$sid);
$dtot = date("d/m/y - H:i:s",$ttext[2]);
echo "<large>$usl: $dtot</large><br/>$fli$pst $topt<br/>";
if($ttext[3]>0)
{
echo "<a href=\"index.php?action=viewtpl&sid=$sid&who=$tid\">POLL</a><br/>";
}
}
if($page>1)
{
$limit_start--;
}
$sql = "SELECT id, text, uid, dtpost, quote , imageurl 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=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$usl = "<br/><a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]\">$iml$unick</a>";
$pst = parsemsg($post[1], $sid);
$topt = "<a href=\"index.php?action=pstopt&sid=$sid&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";
if($post[4]>0)
{
$qtl = "<large><i><a href=\"index.php?action=viewtpc&sid=$sid&tid=$tid&pst=\">(quote:p=blaze,d=16-04-2006)</a></i></large>";
}
if($go==$post[0])
{
$fli = "<img src=\"images/flag.gif\" alt=\"!\"/>";
}else{
$fli ="";
}
$dtot = date("d/m/y - H:i:s",$post[3]);
echo "<large>$usl: $dtot</large><br/>$fli$pst $topt<br/>";
}
///to here
echo "</p>";
echo "</div>";
echo "<p align=\"center\">";
echo "<center>";
$qut = $_GET["qut"];
echo "<form method=\"post\" action=\"genproc.php?action=post&sid=$sid\">";
echo "Text:<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\" name=\"Submit\" value=\"Fast Reply\"/><br/>";
echo "</form>";
echo "<br /></center>";
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
if($umsg>0)
{
echo "<a href=\"liyum.php?action=main&sid=$sid\">Inbox($umsg/$tmsg)</a><br/>";
}
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"index.php?action=viewtpc&page=$ppage&sid=$sid&tid=$tid\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"index.php?action=viewtpc&page=$npage&sid=$sid&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 "<a href=\"index.php?action=post&sid=$sid&tid=$tid\">Post reply</a>";
echo "</p>";
echo "<p><large>";
$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&sid=$sid\">";
echo "Home</a>>";
echo "<a href=\"index.php?action=adahas&sid=$sid\">";
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&sid=$sid&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&sid=$sid&clid=$cid[0]\">";
echo "$cname Club</a><br/>";
}
$fname = htmlspecialchars($fname);
echo "><<a href=\"index.php?action=viewfrm&sid=$sid&fid=$fid\">$fname</a>>$tnm";
echo "</large></p></center>";
echo xhtmlfoot();
}
same like that i want it to call images from a certain ibwf_Example
like above
PHP Code:
$sql = "SELECT id, text, uid, dtpost, quote , imageurl FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page";
i am almost done with the rest of the codings if you just can help me with this thing i can make it then and share it with all of you!