just one more step closer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    just one more step closer

    the above codings calls posts that have been posted by members also limits that should be showin in the page is also mentioned

    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&amp;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&amp;page=$page&amp;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&amp;sid=$sid&amp;tid=$tid\">Post reply</a>";
        
    $lastlink "<a href=\"index.php?action=$action&amp;tid=$tid&amp;sid=$sid&amp;go=last\">Last Page</a>";
        
    $firstlink "<a href=\"index.php?action=$action&amp;tid=$tid&amp;sid=$sid&amp;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&amp;sid=$sid&amp;tid=$tid\">Delete From Favourite list</a><br/>";
      }else{
      echo 
    "<a href=\"genproc.php?action=makefav&amp;sid=$sid&amp;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&amp;sid=$sid&amp;who=$ttext[0]\">$iml$unick</a>";
        
    $topt "<a href=\"index.php?action=tpcopt&amp;sid=$sid&amp;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&amp;sid=$sid&amp;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&amp;sid=$sid&amp;who=$post[2]\">$iml$unick</a>";
        
    $pst parsemsg($post[1], $sid);
        
    $topt "<a href=\"index.php?action=pstopt&amp;sid=$sid&amp;pid=$post[0]&amp;page=$page&amp;fid=$tinfo[5]\">*</a>";
        if(
    $post[4]>0)
        {
            
    $qtl "<large><i><a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$tid&amp;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&amp;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&amp;sid=$sid\">Inbox($umsg/$tmsg)</a><br/>";
      }
        if(
    $page>1)
        {
          
    $ppage $page-1;
          echo 
    "<a href=\"index.php?action=viewtpc&amp;page=$ppage&amp;sid=$sid&amp;tid=$tid\">«PREV</a> ";
        }
        if(
    $page<$num_pages)
        {
          
    $npage $page+1;
          echo 
    "<a href=\"index.php?action=viewtpc&amp;page=$npage&amp;sid=$sid&amp;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&amp;sid=$sid&amp;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&amp;sid=$sid\">";
    echo 
    "Home</a>&gt;";
        echo 
    "<a href=\"index.php?action=adahas&amp;sid=$sid\">";
    echo 
    "Forums</a>&gt;";

    $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&amp;sid=$sid&amp;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&amp;sid=$sid&amp;clid=$cid[0]\">";
        echo 
    "$cname Club</a><br/>";
      }
      
    $fname htmlspecialchars($fname);
        echo 
    "&gt;<<a href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a>&gt;$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 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!
    Nice Effects
Working...
X