Hello Enyone Can Help Me.............pls Reply

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

    Hello Enyone Can Help Me.............pls Reply

    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

    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=&#39;M&#39;"));
        }else{
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_gallery3 WHERE sex=&#39;M&#39;"));
        }
    
        $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=&#39;M&#39; 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=&#39;".$who."&#39;"));
            $lnk = "<a href=\"lists.php?action=viewuser&amp;who=$who&amp;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&amp;page=$ppage&amp;sid=$sid\">«PREV</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"lists.php?action=$action&amp;page=$npage&amp;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=&#39;1&#39; AND touid=&#39;".$uid."&#39;"));
            $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$uid."&#39;"));
            $unrd="".$unreadinbox[0]."";
            if ($unreadinbox[0]>0)
            {
            echo "<a href=\"inbox.php?action=main&amp;sid=$sid&amp;type=send\">$unrd new pm</a>";
          }
    echo "
    <a href=\"index.php?action=pkgal&amp;sid=$sid\">User Gallery</a>
    ";
    echo "<a href=\"index.php?action=main&amp;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=&#39;F&#39;"));
        }else{
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_gallery3 WHERE sex=&#39;F&#39;"));
        }
    
        $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=&#39;F&#39; 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=&#39;".$who."&#39;"));
            $lnk = "<a href=\"lists.php?action=viewuser&amp;who=$who&amp;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&amp;page=$ppage&amp;sid=$sid\">«PREV</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"lists.php?action=$action&amp;page=$npage&amp;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=&#39;1&#39; AND touid=&#39;".$uid."&#39;"));
            $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid=&#39;".$uid."&#39;"));
            $unrd="".$unreadinbox[0]."";
            if ($unreadinbox[0]>0)
            {
            echo "<a href=\"inbox.php?action=main&amp;sid=$sid&amp;type=send\">$unrd New MSG</a>";
          }
    echo "
    <a href=\"index.php?action=pkgal&amp;sid=$sid\">Users Gallery</a>
    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">";
    echo "Main</a>";
        echo "</p>";
        echo "</card>";
    }
Working...
X