#1
|
||||
|
||||
Online Users Glitch
This isn't major, but is quite the eye sore. It seems my online.php page is a bit messed up...this is version 1.2.4, the only edit to this portion was changing cash to bits.
As you can see, it's a bit messed up XD Well, here's the online.php, notice anything that I can do to fix this little oops? Code:
<?php include("inc/bbcode.php"); include("inc/functions.php"); //***************// // START SCRIPT // //***************// // Convert the BBCODE to HTML $article_content = bbconvert($article_content); // Convert line breaks to <br> $article_content = nl2br($article_content); //header("refresh:300"); $article_title = "Who's Online"; $article_content = "<div style='text-align:left;'>This page shows you all online users within the last 5 minutes. After 5 minutes of inactivity they will be marked as offline and will not be shown here</div><br /><hr /><br /><p><span style='color: red; margin-left: 3%;'>Username</span><span style='color: purple; margin-left: 8%;'>Nickname</span><span style='color: green; margin-left: 8%;'>Pets Owned</span><span style='color: blue;margin-left:10%;'>Bits</span><span style='color: orange;margin-left:12%;'>Gender</span><br /><hr /><br /><p>"; $sql3="SELECT ".$GLOBALS['prefix']."online.username, ".$GLOBALS['prefix']."users.money,".$GLOBALS['prefix']."users.nickname ,".$GLOBALS['prefix']."users.gender FROM ".$GLOBALS['prefix']."online, ".$prefix."users WHERE ".$GLOBALS['prefix']."online.username = ".$prefix."users.username AND ".$GLOBALS['prefix']."online.username!='Visitor' ORDER BY ".$GLOBALS['prefix']."online.username"; $result3=runquery($sql3); $userarray = array(); while($row = mysql_fetch_array($result3)) { if($row['username'] != "Visitor") { $userarray[] = $row['username']; $article_content = $article_content."<a href='profile.php?user=".$row['username']."' class='onlinelist'><span class='onlinelistt'>".$row['username']."</span><span class='onlinelistn'>".$row['nickname']."</span><span class='onlinelistj'>".getadoptables()."</span><span class='onlinelistp'>".$row['money']."</span><span class='onlinelistg'>".$row['gender']."</span></a><br />"; } } $article_content = $article_content."</p></p><br /><hr /><br />"; $result = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username = 'Visitor'"); $total = mysql_num_rows($result); $article_content = $article_content."Total Visitors: ".$total; function getadoptables() { global $prefix; global $userarray; global $row; $res = runquery("SELECT COUNT(*) AS cnt FROM ".$GLOBALS['prefix']."owned_adoptables WHERE owner = '".$row['username']."'"); while($adopts = mysql_fetch_array($res)) { $cnt = $adopts['cnt']; } return $cnt; } //***************// // OUTPUT PAGE // //***************// echo showpage($article_title, $article_content, $date); ?> Iris
__________________
My Mods Site (1.3.4, 2020 Mods) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving 'Users Online' from sidebar to footer? | Kyttias | Questions and Supports | 0 | 02-21-2014 05:46 AM |
Online Users Glitch | Alaric | Questions and Supports | 1 | 04-28-2012 08:24 AM |
amount of users currently online | Tony | Suggestions and Feature Requests | 1 | 02-06-2011 10:20 PM |
Event Notices & Users Online | Missy Master | Addons/Mods Graveyard | 6 | 05-20-2010 07:20 AM |
Level up glitch | JayGatsby | Questions and Supports | 3 | 12-30-2008 09:44 AM |
What's New? |
What's Hot? |
What's Popular? |