Help Please

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

    Help Please

    please help i want to make the gallery to show the user pic infront of his username
    Code:
    ////////////////////////////////////////MALE GALLERY
    
     if($action=="males")
    
    {
    
      addonline(getuid_sid($sid),"Male Members gallery ","");
    
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://bollywoodjalwa.com/css/orkut_medium.css\">";
    
    echo "<div class=\"HTAB\" style=\"background:#FFFFFF\">";
    
      
    
       
    
     
    
    		echo "<div>";	
    
    		echo "$lightorangeh";
    
    			echo "<left>Male members gallery</left></div>";
    
    		echo "$lightorangeb";
    
    			echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"169\">";
    
    				echo "<tr>";
    
    					echo "<td class=\"IL-R\">";
    
    					    if($page=="" || $page<=0)$page=1;					
    
    					    if($who!="")
    
    					    {
     $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_usergallery WHERE sex='M'"));
    
    					    }else{
     $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid) FROM ibwf_usergallery WHERE sex='M'"));
      }
     $num_items = $noi[0]; //changable
     $items_per_page= 10;
     $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_usergallery` WHERE sex='M' ORDER BY `id` 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))
     {
    $who = $item[0];
    $user=getnick_uid($who);
    //////////////////////////////////////////////////////////HERE MUST BE THE CODE FOR THE USER PIC
    $avlink = getavatar($item[0]);
    if ($avlink!=""){
    echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
    }else{
    echo "<img src=\"/images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
    }
    //////////////////////////////////////////////////////////
    
    $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_usergallery WHERE uid='".$who."'"));
    $lnk = "<a href=\"gallery2.php?action=viewuserphoto&amp;who=$who&amp;sid=$sid\">$user($countpics[0])</a><br/>";
    
    					       echo "$lnk"; 
    
    					    }
    
    					    }
    
    					echo "</td>";
    
    				echo "</tr>";
    
    			echo "</table>";
    
    		echo "</div>";
    
    		echo "</div>";
    
    		
    
      echo "</div>";   
    
        
    
        echo "<p align=\"left\">";
    
        if($page>1)
    
        {
    
          $ppage = $page-1;
    
          echo "<a href=\"gallery2.php?action=$action&amp;page=$ppage&amp;sid=$sid\"><small>&#171; Prev</small></a> ";
    
        }
    
        echo "<small> $page/$num_pages </small>";
    
        if($page<$num_pages)
    
        {
    
          $npage = $page+1;
    
          echo "<a href=\"gallery2.php?action=$action&amp;page=$npage&amp;sid=$sid\"><small>Next &#187;</small></a>";
    
        }    
    
        if($num_pages>2)
    
        {     
    
            $rets = "<left><form action=\"gallery2.php\" method=\"get\">";
    
            $rets .= "Jump to page:<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
    
            $rets .= "<input type=\"submit\" value=\"GO\"/>";
    
            $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
    
            $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
    
            $rets .= "</form></left>";
    
            echo $rets;  
    
        }
    
        echo "</p>";    
    
        
    
      echo "<p><small>";
    
      echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    
      echo " &#62; ";
    
      echo "<a href=\"gallery2.php?action=main&amp;sid=$sid\">User's Photo gallery</a>";
    
      echo " &#62; ";
    
      echo "Male User's  Photo gallery";
    
      echo "</small></p>";  
    
            
     
    exit();
     
    
    }
    ive added the avatar code i have there but now it show the no pic icon please help
    ________________
    Jacques
    jacques@gw-designs.co.za
    http://coding.biz.tm
    Come join and lets make it a place to learn all the noobies how to code
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH
Working...
X