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&sid=$sid& who=$ttext[0]\">$iml$unick</a>";
$topt = "<a href=\"index.php?action=tpcopt&sid=$sid&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&sid=$sid&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&sid=$sid& who=$post[2]\">$iml$unick</a>";
$pst = parsemsg($post[1], $sid);
$topt = "<a href=\"index.php?action=pstopt&sid=$sid&pi d=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";
if($post[4]>0)
{
$qtl = "<large><i><a href=\"index.php?action=viewtpc&sid=$sid&t id=$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/>";
}
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
//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&sid=$sid& who=$ttext[0]\">$iml$unick</a>";
$topt = "<a href=\"index.php?action=tpcopt&sid=$sid&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&sid=$sid&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&sid=$sid& who=$post[2]\">$iml$unick</a>";
$pst = parsemsg($post[1], $sid);
$topt = "<a href=\"index.php?action=pstopt&sid=$sid&pi d=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";
if($post[4]>0)
{
$qtl = "<large><i><a href=\"index.php?action=viewtpc&sid=$sid&t id=$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/>";
}
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
Comment