PHPRetro version.
Code:
<?php
/*================================================================+\
|| # PHPRetro - An extendable virtual hotel site and management
|+==================================================================
|| # Copyright (C) 2009 Yifan Lu. All rights reserved.
|| # http://www.yifanlu.com
|| # Parts Copyright (C) 2009 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|| # All images, scripts, and layouts
|| # Copyright (C) 2009 Sulake Ltd. All rights reserved.
|+==================================================================
|| # PHPRetro is provided "as is" and comes without
|| # warrenty of any kind. PHPRetro is free software!
|| # License: GNU Public License 3.0
|| # http://opensource.org/licenses/gpl-license.php
|+==================================================================
|| # Credits leaderboard by http://uber-cheese.co.uk/
\+================================================================*/
$page['allow_guests'] = true;
require_once('./includes/core.php');
require_once('./includes/session.php');
$lang->addLocale("credits.credits");
$page['id'] = "credits";
$page['name'] = $lang->loc['pagename.credits'];
$page['bodyid'] = "home";
$page['cat'] = "credits";
require_once('./templates/community_header.php');
$get_cc = mysql_query("SELECT * FROM users WHERE credits IS NOT NULL AND rank < 3 ORDER BY credits DESC LIMIT 10") or die(mysql_error());
?>
<div id='container'>
<div id='content'>
<div id='column1' class='column'><div class='habblet-container '>
<div class='cbb clearfix green '>
<h2 class='title'><?php echo $lang->loc['what.are.coins']; ?></h2>
<p class='credits-countries-select'><br /><?php echo $lang->loc['desc.of.coins']; ?><br /><br /></p>
</div>
</div>
<div class='habblet-container '>
<div class='cbb clearfix blue '>
<h2 class='title'>Refer Options</h2>
<p class='credits-countries-select'><br /><b>1. Send your friends a link</b><br />This option is probably as easy as it gets; it basicly does step 2, but automaticly! You just send your friends a invite with the link shown below, your friends click the link, and if they complete registration, you get free credits! This is your referal link to get some easy credits:<br /><br />
<input type="text" size="60%" README value="<?php echo PATH; ?>/register?referral=<?php echo $user->id; ?>"><br /><br />
<b>2. Let them fill in your name during registration</b><br />During the registration process, users can manually give the username of the person that referred them to the site. If they complete registration, that person gets credits! And that person could be you, if you have some friends that are nice enough to fill in your username.</p>
</div></div>
<script type='text/javascript'>if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<div id="column2" class="column">
<?php $lang->addLocale("redeem.voucher"); ?>
<div class="habblet-container ">
<div class="cbb clearfix brown ">
<h2 class="title"><?php echo $lang->loc['your.purse']; ?>
</h2>
<div id="purse-habblet">
<?php if($user->id > 0){ ?>
<form method="post" action="<?php echo PATH; ?>/credits" id="voucher-form">
<ul>
<li class="even icon-purse">
<div><?php echo $lang->loc['you.have']; ?>:</div>
<span class="purse-balance-amount"><?php echo $user->user("credits")." ".$lang->loc['coins'];?></span>
<div class="purse-tx"><a href="<?php echo PATH; ?>/credits/history"><?php echo $lang->loc['transactions']; ?></a></div>
</li>
<li class="odd">
<div class="box-content">
<div><?php echo $lang->loc['enter.voucher']; ?>:</div>
<input type="text" name="voucherCode" value="" id="purse-habblet-redeemcode-string" class="redeemcode" />
<a href="#" id="purse-redeemcode-button" class="new-button purse-icon" style="float:left"><b><span></span><?php echo $lang->loc['redeem']; ?></b><i></i></a>
</div>
</li>
</ul>
<div id="purse-redeem-result">
</div> </form>
<?php }else{ ?>
<div class="box-content"><?php echo $lang->loc['need.logon.purse']; ?></div>
<?php } ?>
</div>
<script type="text/javascript">
new PurseHabblet();
</script>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<div class="habblet-container ">
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<div class='habblet-container '>
<div class='cbb clearfix orange '>
<h2 class='title'>Leaderboard</h2>
<div id='credits-promo' class='box-content credits-info'>
<div class='credit-info-text clearfix'>
<div class='tableborder'>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<td class='tablesubheader' width='50%' align='center'><b>Username</b></td>
<td class='tablesubheader' width='50%' align='center'><b>Credits</b></td>
</tr>
<?php
while($row = mysql_fetch_assoc($get_cc)){
printf(" <tr>
<td class='tablerow1' align='center'><a href=\"home/%s\">%s</a></td>
<td class='tablerow2' align='center'>%s</td>
</tr>", $row['name'], $row['name'], $row['credits']);
}
?>
</table>
</div>
</div>
</div>
</div></div>
<script type='text/javascript'>if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<script type="text/javascript">
HabboView.run();
</script>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<?php require_once('./templates/community_footer.php'); ?>