Hi,
I recently worked for Obbo hotel, and they had an online users page so i decided to edit it, and added it as a main page!!
Screen shot is below :')
Right,
Online Page PHP:
Save this as online.php
Comp-online.tplPHP Code:<?php
/*=======================================================================
| UberCMS - Advanced Website and Content Management System for uberEmu
| #######################################################################
| Copyright (c) 2010, Roy 'Meth0d' and updates by Matthew 'MDK'
| http://www.meth0d.org & http://www.sulake.biz
| #######################################################################
| This program is free software: you can redistribute it and/or modify
| it under the terms of the GNU General Public License as published by
| the Free Software Foundation, either version 3 of the License, or
| (at your option) any later version.
| #######################################################################
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
\======================================================================*/
define('TAB_ID', 5);
define('PAGE_ID', 20);
require_once "global.php";
$tpl->Init();
$tpl->AddGeneric('head-init');
$tpl->AddIncludeSet('generic');
$tpl->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/v2/styles/newcredits.css', 'stylesheet'));
$tpl->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/newcredits.js'));
$tpl->WriteIncludeFiles();
$tpl->AddGeneric('head-overrides-generic');
$tpl->AddGeneric('head-bottom');
$tpl->AddGeneric('generic-top');
$tpl->Write('<div id="column1" class="column">');
$tpl->AddGeneric('comp-online');
$tpl->Write('</div>');
$tpl->Write('<div id="column2" class="column">');
$tpl->AddGeneric('comp-online-info');
$tpl->Write('</div>');
$tpl->AddGeneric('generic-column3');
$tpl->AddGeneric('footer');
$tpl->SetParam('page_title', 'Online Users');
$tpl->SetParam('body_id', 'home');
$tpl->Output();
?>
Save this as comp-online.tpl
Comp-online-info.tplPHP Code:
<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title"><span style="float: left;">Online Users:</span> </h2>
<div align="left">
<?php
require_once "global.php";
if (!LOGGED_IN)
{
header("Location: ./index.html");
exit;
}
$getUsers = dbquery("SELECT id FROM users WHERE online = '1' ORDER BY ID");
if (mysql_num_rows($getUsers) > 0)
{
echo '<ul style="margin: 0;">';
while ($u = mysql_fetch_assoc($getUsers))
{
echo '<li style="margin-left: 20px;">';
echo $users->formatUsername($u['id']);
echo '</li>';
}
echo '</ul>';
}
else
{
echo '<br /><br /><i>There are currently no users online.</i>';
}
?>
</div>
</div>
</div>
Save this as comp-online.tpl
Or just download and replace the files from the ZIP below,PHP Code:<div class="habblet-container ">
<div class="cbb clearfix lightbrown ">
<h2 class="title">What does this mean?</h2>
<div id="habboclub-info" class="box-content">
All this page is, it's to show you who is online, so like if they're no on your friend list then you can get their name from here and add them!<br /><br />
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
Also, remember to add the page into the navigation on the database! but add it as online.php !! Or it will not work!
Cheers.
Download link;
comp-online-info.zip
Image Link;
http://img88.imageshack.us/img88/4397/onlineix.png
- Remember if this helps - Please do thank my post :'). -






