Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
Online Users Page [RevCMS/UberCMS/IlluminiaCMS]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="zMagenta" data-source="post: 212729" data-attributes="member: 4512"><p>Hi there!</p><p> </p><p>As you may know, I owned my hotels with a good online users page. It shows the users, changing their username colour depending on their rank, and then also, for rank x+ (x = whatever you choose it to be), it will show the IP Registered and IP Last used - so it's easy to identify what users are multi accounting.</p><p> </p><p>This is the page, sorry, I can't put this online therefore I cannot show you the username feature.</p><p> </p><p> </p><p> </p><p>All you need to do is run these SQL queries.</p><p>[CODE]DROP TABLE IF EXISTS `site_user_color`;</p><p>CREATE TABLE `site_user_color` (</p><p> `id` int(11) NOT NULL AUTO_INCREMENT,</p><p> `rankid` int(11) NOT NULL,</p><p> `color` varchar(6) DEFAULT NULL,</p><p> `is_bold` enum('0','1') DEFAULT NULL,</p><p> PRIMARY KEY (`id`)</p><p>) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;</p><p> </p><p>-- ----------------------------</p><p>-- Records of site_user_color</p><p>-- ----------------------------</p><p>INSERT INTO `site_user_color` VALUES ('1', '1', '000000', '0');</p><p>INSERT INTO `site_user_color` VALUES ('2', '2', 'F6D8CE', '1');</p><p>INSERT INTO `site_user_color` VALUES ('3', '3', '3971A8', '1');</p><p>INSERT INTO `site_user_color` VALUES ('4', '4', 'B404AE', '1');</p><p>INSERT INTO `site_user_color` VALUES ('5', '5', '40FF00', '1');</p><p>INSERT INTO `site_user_color` VALUES ('6', '6', 'B40431', '1');</p><p>INSERT INTO `site_user_color` VALUES ('7', '7', 'B40431', '1');</p><p>INSERT INTO `site_user_color` VALUES ('8', '8', '0404B4', '1');</p><p>INSERT INTO `site_user_color` VALUES ('9', '9', '3B240B', '1');</p><p>INSERT INTO `site_user_color` VALUES ('10', '10', 'FF0000', '1');</p><p>INSERT INTO `site_user_color` VALUES ('11', '11', '000000', '1');</p><p>INSERT INTO `site_user_color` VALUES ('12', '12', '0404B4', '1');</p><p>INSERT INTO `site_user_color` VALUES ('13', '13', '000000', '0');</p><p>[/CODE]</p><p> </p><p>Then, just add this PHP into any page.</p><p> </p><p>[PHP]<div id="container"></p><p> <div id="content"></p><p> <div id="column2" class="column"></p><p><div class="habblet-container "></p><p> <div class="box-content1"></p><p> <div class="cbb clearfix blue "></p><p> </p><p> <h2 class="title">What is this page?</p><p> </h2></p><p> <div style="padding:5px"></p><p> <p>This page shows all of the online users; with a colour code next to their name. Below are what the colour means;<br></br></p><p> Normal User - <font color="#000000">This colour</font><br></p><p> Low VIP - <font color="#F6D8CE"><b>This colour</font></b><br></p><p> High VIP - <font color="#3971A8"><b>This colour</font></b><br></p><p> Legend VIP - <font color="#B404AE"><b>This colour</font></b><br></p><p> eXpert - <font color="#40FF00"><b>This colour</font></b><br></p><p> Moderator - <font color="#B40431"><b>This colour</font></b><br></p><p> Manager - <font color="#0404B4"><b>This colour</font></b><br></p><p> Owner - <b>This colour</b><br></p><p> </p><p></div></div></div></div></p><p> </p><p> </p><p></div></p><p> </p><p> <div id="column1" class="column"></p><p> </p><p> </p><p><div class="habblet-container "></p><p><div class="cbb clearfix red "></p><p> </p><p> </p><p><h2 class="title">All Online Users</h2></p><p><div style="padding:5px;"></p><p> </p><p>Average users: {average}<br /></p><p>{online} user(s) online!, the users are;<br /></p><p><?php</p><p>$queryUserList = mysql_query("SELECT * FROM users WHERE online = '1' ORDER BY id ASC");</p><p> </p><p>$allowedRank = '7';</p><p>$queryRank = mysql_query("SELECT rank FROM users WHERE id = '".$_SESSION['user']['id']."'");</p><p>$currentRank = mysql_result($queryRank, 0);</p><p>?></p><p> </p><p><table <?php if($currentRank >= $allowedRank){ echo "border=\"1\""; }?>></p><p> </p><p><?php</p><p>while($row = mysql_fetch_array($queryUserList))</p><p>{</p><p> echo "<tr>";</p><p> </p><p> $queryColor = mysql_query("SELECT color,is_bold FROM site_user_color WHERE rankid = '".$row['rank']."'");</p><p> while($rowRank = mysql_fetch_array($queryColor))</p><p> {</p><p> if ($rowRank['is_bold'] == 1)</p><p> {</p><p> $isBold = "font-weight: bold;";</p><p> }</p><p> else</p><p> {</p><p> $isBold= "";</p><p> }</p><p> echo "<td><font style=\"color:#".$rowRank['color']."; ".$isBold."\">". $row['username'] . "</font></td>";</p><p> }</p><p> if ($currentRank >= $allowedRank)</p><p> {</p><p> echo "<td><b>IP Last:</b> " . $row['ip_last'] . "</td>";</p><p> echo "<td><b>IP on registration:</b> " . $row['ip_reg'] . "</td>";</p><p> }</p><p> </p><p> echo "</tr>";</p><p>}</p><p>?></p><p></table>[/PHP]</p><p> </p><p>Also, quick note, [PHP]$allowedRank = '7';[/PHP] 7 = the rank+ that an see the IP's, enjoy!</p><p> </p><p>(Thanks <a href="http://devbest.com/members/sherlock.9520/" target="_blank">Sherlock</a> for helping out with this)</p></blockquote><p></p>
[QUOTE="zMagenta, post: 212729, member: 4512"] Hi there! As you may know, I owned my hotels with a good online users page. It shows the users, changing their username colour depending on their rank, and then also, for rank x+ (x = whatever you choose it to be), it will show the IP Registered and IP Last used - so it's easy to identify what users are multi accounting. This is the page, sorry, I can't put this online therefore I cannot show you the username feature. All you need to do is run these SQL queries. [CODE]DROP TABLE IF EXISTS `site_user_color`; CREATE TABLE `site_user_color` ( `id` int(11) NOT NULL AUTO_INCREMENT, `rankid` int(11) NOT NULL, `color` varchar(6) DEFAULT NULL, `is_bold` enum('0','1') DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of site_user_color -- ---------------------------- INSERT INTO `site_user_color` VALUES ('1', '1', '000000', '0'); INSERT INTO `site_user_color` VALUES ('2', '2', 'F6D8CE', '1'); INSERT INTO `site_user_color` VALUES ('3', '3', '3971A8', '1'); INSERT INTO `site_user_color` VALUES ('4', '4', 'B404AE', '1'); INSERT INTO `site_user_color` VALUES ('5', '5', '40FF00', '1'); INSERT INTO `site_user_color` VALUES ('6', '6', 'B40431', '1'); INSERT INTO `site_user_color` VALUES ('7', '7', 'B40431', '1'); INSERT INTO `site_user_color` VALUES ('8', '8', '0404B4', '1'); INSERT INTO `site_user_color` VALUES ('9', '9', '3B240B', '1'); INSERT INTO `site_user_color` VALUES ('10', '10', 'FF0000', '1'); INSERT INTO `site_user_color` VALUES ('11', '11', '000000', '1'); INSERT INTO `site_user_color` VALUES ('12', '12', '0404B4', '1'); INSERT INTO `site_user_color` VALUES ('13', '13', '000000', '0'); [/CODE] Then, just add this PHP into any page. [PHP]<div id="container"> <div id="content"> <div id="column2" class="column"> <div class="habblet-container "> <div class="box-content1"> <div class="cbb clearfix blue "> <h2 class="title">What is this page? </h2> <div style="padding:5px"> <p>This page shows all of the online users; with a colour code next to their name. Below are what the colour means;<br></br> Normal User - <font color="#000000">This colour</font><br> Low VIP - <font color="#F6D8CE"><b>This colour</font></b><br> High VIP - <font color="#3971A8"><b>This colour</font></b><br> Legend VIP - <font color="#B404AE"><b>This colour</font></b><br> eXpert - <font color="#40FF00"><b>This colour</font></b><br> Moderator - <font color="#B40431"><b>This colour</font></b><br> Manager - <font color="#0404B4"><b>This colour</font></b><br> Owner - <b>This colour</b><br> </div></div></div></div> </div> <div id="column1" class="column"> <div class="habblet-container "> <div class="cbb clearfix red "> <h2 class="title">All Online Users</h2> <div style="padding:5px;"> Average users: {average}<br /> {online} user(s) online!, the users are;<br /> <?php $queryUserList = mysql_query("SELECT * FROM users WHERE online = '1' ORDER BY id ASC"); $allowedRank = '7'; $queryRank = mysql_query("SELECT rank FROM users WHERE id = '".$_SESSION['user']['id']."'"); $currentRank = mysql_result($queryRank, 0); ?> <table <?php if($currentRank >= $allowedRank){ echo "border=\"1\""; }?>> <?php while($row = mysql_fetch_array($queryUserList)) { echo "<tr>"; $queryColor = mysql_query("SELECT color,is_bold FROM site_user_color WHERE rankid = '".$row['rank']."'"); while($rowRank = mysql_fetch_array($queryColor)) { if ($rowRank['is_bold'] == 1) { $isBold = "font-weight: bold;"; } else { $isBold= ""; } echo "<td><font style=\"color:#".$rowRank['color']."; ".$isBold."\">". $row['username'] . "</font></td>"; } if ($currentRank >= $allowedRank) { echo "<td><b>IP Last:</b> " . $row['ip_last'] . "</td>"; echo "<td><b>IP on registration:</b> " . $row['ip_reg'] . "</td>"; } echo "</tr>"; } ?> </table>[/PHP] Also, quick note, [PHP]$allowedRank = '7';[/PHP] 7 = the rank+ that an see the IP's, enjoy! (Thanks [URL='http://devbest.com/members/sherlock.9520/']Sherlock[/URL] for helping out with this) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Online Users Page [RevCMS/UberCMS/IlluminiaCMS]
Top