hello pls can anyone help me wth this gallery????/i need fixed random photos from this gallery from boys and girls pls help me
im really noob.......thnx
im really noob.......thnx
Code:
/////////////////////////////////////Gwapos else if($action=="boys") { addonline(getuid_sid($sid),"Viewing Boys Gallery","lists.php?action=$action"); addplace(getuid_sid($sid),"lists.php?action=$action","lists.php?action=$action"); echo "<card id=\"main\" title=\"Boys Gallery\">"; $uid = getuid_sid($sid); //////ALL gallery SCRIPT << if($page=="" || $page<=0)$page=1; if($who!="") { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_gallery3 WHERE sex='M'")); }else{ $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_gallery3 WHERE sex='M'")); } $num_items = $noi[0]; //changable $items_per_page= 8; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; $sql = "SELECT DISTINCT uid FROM ibwf_gallery3 WHERE sex='M' ORDER BY uid ASC LIMIT $limit_start, $items_per_page"; echo " "; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $who = $item[0]; $user=getnick_uid($who); $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery3 WHERE uid='".$who."'")); $lnk = "<a href=\"lists.php?action=viewuser&who=$who&sid=$sid\">$user($countpics[0])</a> "; echo "$lnk"; } }else{ echo "Boys gallery is empty"; } echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>"; $rets .= "<anchor>[GO]"; $rets .= "<go href=\"lists.php?type=send\" method=\"get\">"; $rets .= "<postfield name=\"action\" value=\"$action\"/>"; $rets .= "<postfield name=\"who\" value=\"$who\"/>"; $rets .= "<postfield name=\"sid\" value=\"$sid\"/>"; $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>"; $rets .= "</go></anchor>"; echo $rets; } $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'")); $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'")); $unrd="".$unreadinbox[0].""; if ($unreadinbox[0]>0) { echo "<a href=\"inbox.php?action=main&sid=$sid&type=send\">$unrd new pm</a>"; } echo " <a href=\"index.php?action=pkgal&sid=$sid\">User Gallery</a> "; echo "<a href=\"index.php?action=main&sid=$sid\">"; echo "Main menu</a>"; echo "</p>"; echo "</card>"; } /////////////////////////////////////Gwapas else if($action=="girls") { addonline(getuid_sid($sid),"Viewing Girls Gallery","lists.php?action=$action"); addplace(getuid_sid($sid),"lists.php?action=$action","lists.php?action=$action"); echo "<card id=\"main\" title=\"Girls Gallery\">"; $uid = getuid_sid($sid); //////ALL gallery SCRIPT << if($page=="" || $page<=0)$page=1; if($who!="") { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_gallery3 WHERE sex='F'")); }else{ $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_gallery3 WHERE sex='F'")); } $num_items = $noi[0]; //changable $items_per_page= 8; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; $sql = "SELECT DISTINCT uid FROM ibwf_gallery3 WHERE sex='F' ORDER BY uid ASC LIMIT $limit_start, $items_per_page"; echo " "; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $who = $item[0]; $user=getnick_uid($who); $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery3 WHERE uid='".$who."'")); $lnk = "<a href=\"lists.php?action=viewuser&who=$who&sid=$sid\">$user($countpics[0])</a> "; echo "$lnk"; } }else{ echo "Girls gallery is empty"; } echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "Jump to page: <input name=\"pg\" format=\"*N\" size=\"3\"/>"; $rets .= "<anchor>[GO]"; $rets .= "<go href=\"lists.php?type=send\" method=\"get\">"; $rets .= "<postfield name=\"action\" value=\"$action\"/>"; $rets .= "<postfield name=\"who\" value=\"$who\"/>"; $rets .= "<postfield name=\"sid\" value=\"$sid\"/>"; $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>"; $rets .= "</go></anchor>"; echo $rets; } $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'")); $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'")); $unrd="".$unreadinbox[0].""; if ($unreadinbox[0]>0) { echo "<a href=\"inbox.php?action=main&sid=$sid&type=send\">$unrd New MSG</a>"; } echo " <a href=\"index.php?action=pkgal&sid=$sid\">Users Gallery</a> "; echo "<a href=\"index.php?action=main&sid=$sid\">"; echo "Main</a>"; echo "</p>"; echo "</card>"; }