Help Please

Started on the old forum in July 2009 · view the original in the archive · old links redirect here

No replies · 282 views · started 17 years ago · 1 min read

riderz Lead · 975 posts #1

please help i want to make the gallery to show the user pic infront of his username

////////////////////////////////////////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&who=$who&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&page=$ppage&sid=$sid\"><small>« Prev</small></a> ";

    }

    echo "<small> $page/$num_pages </small>";

    if($page<$num_pages)

    {

      $npage = $page+1;

      echo "<a href=\"gallery2.php?action=$action&page=$npage&sid=$sid\"><small>Next »</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&sid=$sid\">Home</a>";

  echo " > ";

  echo "<a href=\"gallery2.php?action=main&sid=$sid\">User's Photo gallery</a>";

  echo " > ";

  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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close