Jump to content
php.lv forumi

[palīdzat] IPB online lietotaju grupas


Snaip3Rs

Recommended Posts

Meginaju 2 stundas pielikt tas bildes pie savaeja online lista bet nu nekadigi nesanaca ja var kads ludzu pieliekat klat lai rada bildes

 

http://paste.php.lv/26f1910fa80813f920b4f7...40f5b5?lang=php

Edited by GeRik
Garus koda gabalus lūdzams likt http://paste.php.lv/
Link to comment
Share on other sites

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 months later...

Es tik tagad pamaniju vienu problemu bet nezinu kur ir vienads saja skripta ielogojos ar useru man radas user user ielogojos ar owner rada tikai owner

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

<? 
 $db=(object)array( 
   'host'=>'localhost', // Datubazes hosts 
   'user'=>'root', // Datubazes lietotajs 
   'pass'=>'1991jz9969470', // Datubazes lietotaja parole 
   'name'=>'db', // Datubazes nosaukums 
   'prefix'=>'ibf_members', // Bla, bla 
  ); 

$reg = mysql_query("SELECT * FROM ibf_members");
$reg = mysql_num_rows($reg);
$delay = "900";
$delay = time() - $delay;
$useri = mysql_query("SELECT * FROM ibf_sessions WHERE member_id != '0' and running_time >= ".$delay."");
$regon = mysql_num_rows($useri);
$viesi = mysql_query("SELECT * FROM ibf_sessions WHERE member_id = '0' and running_time >= ".$delay."");
$viesi = mysql_num_rows($viesi);
$kopa = $regon + $viesi;
echo '
ReДЈistrД“juЕЎies: '.$reg.'<br />
Online: '.$kopa.'<br />
Viesi: '.$viesi.'<br />
LietotДЃji: '.$regon.'<br />
<hr style="margin:2px 0;"/>
';
while ($users = mysql_fetch_array($useri)){
$group = $users['member_group'];
$q = mysql_query("SELECT * FROM ibf_groups WHERE g_id = '$group'");
       while($group = mysql_fetch_array($q)){
       if(empty($group['prefix'])){
       $prefix = "<span style=\"color:black\">";
       $suffix = "</span>";
       }
       else{
       $prefix = $group['prefix'];
       $suffix = $group['suffix'];
       }
echo "<a href='f/index.php?showuser=".$users['member_id']."' title='".$users['member_name']."'>".$prefix."".$users['member_name']."".$suffix."</a><br />";
}
}
?>

Problēma ir tāda ka useru rāda 2reiz nevis tik vienu!

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...