how to get images like posts

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

    how to get images like posts

    hi these are the codings of calling images from user gallery


    //changable sql

    $sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='M' ORDER BY id DESC LIMIT $limit_start, $items_per_page";


    echo "<p>";
    $items = mysql_query($sql);

    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
    $sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
    $imginfo = mysql_query($sql);

    echo mysql_error();
    if(mysql_num_rows($imginfo)>0)
    {
    while ($imginfos = mysql_fetch_array($imginfo)){
    $ratingtotal = $ratingtotal + $imginfos[0];}
    }


    it calls the image with the sex if it is male M and female F like these in the forum topics are called as above



    {
    $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;ti d=$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;w ho=$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;pi d=$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;t id=$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/>";
    }


    i want the image calling code without the sex i want it to be called as common for example like posts are called in forums when you open and have a look on a topic many would have posted on it like that i want this image codings in the gallery also to be called as common without sex i didnt mean male and female both just want from a certain Ibwf_example to call images like every posts are called
    Nice Effects

    #2
    Remove WHERE sex='M'

    Comment


      #3
      and also can you sya me how to combine the image calling codes together with the posts calling ones? what i am trying to do is i am done with the rest of the codes on uploading images to forums now just need to do the image calling thing after the upload is done
      Nice Effects

      Comment

      Working...
      X