Can't see the whole body of this page..Only the head View User's Photos
else if($action=="viewuserphoto") { addonline(getuid_sid($sid),"Viewing Users Photos",""); echo "<head>"; echo "<title>Users Photos</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; echo ""; echo "View User's Photos
"; echo ""; echo ""; $who = $_GET["who"]; $uid1 = getuid_sid($sid); $nick = getnick_uid($who); if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT() FROM ibwf_usergallery WHERE uid='".$who."'")); $num_items = $noi[0]; //changable $items_per_page= 1; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)$items_per_page;
//changable sql
$sql = "SELECT uid, id, imageurl, sex, descript FROM ibwf_usergallery WHERE uid='".$who."' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
$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];}
}
if($totalcomments<1){$totalcomments=0;}
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'"));
if ($norm[0]>0){
$rating = ceil($ratingtotal/$norm[0]);
}else{$rating=0;}
$rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$item[1]."'"));
$totalcomments = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid ='".$item[1]."' and commentsyn ='Y'"));
$userinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$item[0]."'"));
if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
{
echo "<a href=\"gallery.php?action=rate&sid=$sid&whoimage=$item[1]\">Rate Photo</a>";
}
if($uid1==$item[0])
{
echo "<a href=\"genproc.php?action=upavg&sid=$sid&avsrc=$item[2]\">Use as Avatar</a>";
}
if(($uid1=="1") or ($uid1==$item[0]))
{
echo " / <a href=\"gallery.php?action=del&sid=$sid&whoimage=$item[1]\">Delete</a>";
}
echo "
<a href="$item[2]"><img src="$item[2]" alt="$userinfo[0]: $page"/></a>
";
if($uid1==$item[0])
{
if(strlen($item[4])>1){
$edtlnk = "<a href="gallery.php?action=edtdescript&sid=$sid&whoimage=$item[1]">*</a>";
}else{
$edtlnk = "<a href="gallery.php?action=edtdescript&sid=$sid&whoimage=$item[1]">Add Description</a>";
}
echo "$item[4] $edtlnk
";
}
echo "Rating: $rating/10 (<a href="gallery.php?action=votes&sid=$sid&whoimage=$item[1]">$norm[0]</a> Votes)
<a href="gallery.php?action=comments&sid=$sid&whoimage=$item[1]">Comments</a>($totalcomments[0])";
echo "
";
$ratingtotal = 0;
$sex = $item[3];
}
}
echo "";
echo "";
if($page>1)
{
$ppage = $page-1;
echo "<a href="gallery.php?action=$action&sid=$sid&page=$ppage&who=$who">« Prev</a> ";
}
echo " $page/$num_pages ";
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href="gallery.php?action=$action&sid=$sid&page=$npage&who=$who">Next »</a>";
}
if($num_pages>2)
{
$rets = "
<form action=\"gallery.php\" method=\"get\">";
$rets .= "Jump to Photo:<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=\"sid\" value=\"$sid\"/>";
$rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
$rets .= "<input type=\"hidden\" name=\"page\" value=\"$pg\"/>";
$rets .= "</form>";
echo $rets;
}
echo "
";
echo "<a href=\"gallery.php?action=main&sid=$sid\">Gallery</a>
";
if ($sex=="M"){
echo "<a href=\"gallery.php?action=males&sid=$sid\">Male Gallery</a>";
}else{
echo "<a href=\"gallery.php?action=females&sid=$sid\">Female Gallery</a>";
}
echo "
---
";
echo "| <a href=\"inbox.php?action=main&sid=$sid\">Inbox</a> |";
echo " <a href=\"lists.php?action=buds&sid=$sid\">BuddyList</a> |";
echo " <a href=\"index.php?action=chat&sid=$sid\">Chatrooms</a> |";
echo " <a href=\"index.php?action=forumindx&sid=$sid\">Forums</a> |";
echo " <a href=\"index.php?action=main&sid=$sid\">Home</a> |";
echo "";
echo "</body>";
echo "</html>";
exit();
}
My Blog: http://jhommark.blogspot.com My Facebook: http://www.facebook.com/jhommark My Official Site: http://www.undergroundweb.tk My Community Site: http://undergroundwap.xtreemhost.com