nikijs Posted January 20, 2009 Report Share Posted January 20, 2009 <?php if (!defined("IN_FUSION")) { die("Access Denied"); } $result = dbquery("SELECT * FROM ".DB_ONLINE." WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'")); if (dbrows($result)) { $result = dbquery("UPDATE ".DB_ONLINE." SET online_lastactive='".time()."' WHERE online_user=".($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'").""); } else { $result = dbquery("INSERT INTO ".DB_ONLINE." (online_user, online_ip, online_lastactive) VALUES ('".($userdata['user_level'] != 0 ? $userdata['user_id'] : "0")."', '".USER_IP."', '".time()."')"); } $result = dbquery("DELETE FROM ".DB_ONLINE." WHERE online_lastactive<".(time()-60).""); openside($locale['global_010']); $result = dbquery( "SELECT ton.*, tu.user_id,user_name FROM ".DB_ONLINE." ton LEFT JOIN ".DB_USERS." tu ON ton.online_user=tu.user_id" ); $guests = 0; $members = array(); while ($data = dbarray($result)) { if ($data['online_user'] == "0") { $guests++; } else { array_push($members, array($data['user_id'], $data['user_name'])); } } echo THEME_BULLET." ".$locale['global_011'].": ".$guests."<br /><br />\n"; echo THEME_BULLET." ".$locale['global_012'].":".count($members)."<br /><br />\n"; if (count($members)) { $i = 1; while (list($key, $member) = each($members)) { echo "<a href='".BASEDIR."profile.php?lookup=".$member[0]."' class='side'>".$member[1]."</a>"; if ($i != count($members)) { echo ",\n"; } else { echo "<br />\n"; } $i++; } } echo "<br />\n".THEME_BULLET." ".$locale['global_014'].": ".number_format(dbcount("(user_id)", DB_USERS, "user_status<='1'"))."<br />\n"; if (iADMIN && checkrights("M") && $settings['admin_activation'] == "1") { echo THEME_BULLET." <a href='".ADMIN."members.php".$aidlink."&status=2' class='side'>".$locale['global_015']."</a>"; echo ": ".dbcount("(user_id)", DB_USERS, "user_status='2'")."<br />\n"; } $data = dbarray(dbquery("SELECT user_id,user_name FROM ".DB_USERS." WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1")); echo THEME_BULLET." ".$locale['global_016'].": <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a>\n"; closeside(); ?> Ka dabut nikam prieksha kadu iconu .. Un ta lai katris online lietotajs jauna rinda ,nevis viens aiz otra .. kads var to php kodu izlabot ? ludzu paliidziet Link to comment Share on other sites More sharing options...
Mikijs Posted January 20, 2009 Report Share Posted January 20, 2009 http://paste.php.lv/ed0453ced42e106ffa36af...681224?lang=php Link to comment Share on other sites More sharing options...
nikijs Posted January 21, 2009 Author Report Share Posted January 21, 2009 (edited) itka viss ir bet nicki nav kartiigas rindas bet izmeetati un iconas drusku no nika pa zemu :/ Edited January 21, 2009 by nikijs Link to comment Share on other sites More sharing options...
anonīms Posted January 21, 2009 Report Share Posted January 21, 2009 iconām izmanto padding/margin Lai niks būtu nākamajā rindā izmanto <br /> Link to comment Share on other sites More sharing options...
Recommended Posts