Jump to content
php.lv forumi

IPB lietotaj scripts!


suport

Recommended Posts

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
<?php
       define('WWW','http://kaut kads webs/'); //Tavas web lapas adrese
       include_once('forums/conf_global.php'); //Celš uz foruma config failu
       $link = mysql_connect($INFO['sql_host'],$INFO['sql_user'],$INFO['sql_pass']);
       mysql_query('use '.$INFO['sql_database'].';');

       $page = '<div id="userlist">';
       $result = mysql_query('select t1.id,t1.members_display_name,t2.avatar_location from '.$INFO['sql_tbl_prefix'].'members t1 join '.$INFO['sql_tbl_prefix'].'member_extra t2 on (t1.id = t2.id);');
       if (!empty($result)) {
               while ($r = mysql_fetch_array($result)) {

					if ($r[2] == "")
					{
						$avatars = "forums/uploads/default.jpg" ;
					}
					else
					{
						$avatars = "forums/uploads/$r[2]" ;
					}
                        $page .='<p>
                                       <a href="'.WWW.'forums/index.php?showuser='.$r[0].'">
                                       <img class="avatar" src="'. WWW .''. $avatars .'" alt="'.$r[1].'" />
                                       '.$r[1].'</a>
                               </p>';
               }
       }
       $page .='</div>';
       mysql_close($link);
       echo $page;
?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...