   <?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 5") 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'>Traer Amigos</h2> 
<p class='credits-countries-select'><br /><b>1. Enviar a tus amigos un vínculo</b><br />Esta opción es probablemente tan fácil como se pone, sino que básicamente hace el paso 2, pero automáticamente! Usted acaba de enviar una imagen con invitar a la dirección abajo indicada, a sus amigos, haga clic en el enlace, y si el registro completo, se obtiene créditos gratis! Esta es su vínculo de referencia para conseguir algunos créditos fáciles:<br /><br /> 
        <input type="text" size="60%" README value="<?php echo PATH; ?>/register?referral=<?php echo $user->id; ?>"><br /><br /> 
        2. Que se complete su nombre durante el registro Durante el proceso de registro, los usuarios de forma manual puede dar el nombre de usuario de la persona que los remitió al sitio. Si el registro completo, esa persona recibe créditos! Y esa persona podría ser usted, si usted tiene algunos amigos que son lo suficientemente bueno para llenar su nombre de usuario.</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 id="column2" class="column">
                         
                <div class="habblet-container ">        
                        <div class="cbb clearfix orange ">
<h2 class="title">Los Mas Millonarios Del Hotel</h2>

<TABLE width=100%>
<?php
while($row = mysql_fetch_array($get_cc)) {
printf (" 
<tr><th ROWSPAN=2 class='tablerow1' align='right'>
<img src='http://habbo.com.au/habbo-imaging/avatarimage?figure=%s&size=s&action=&direction=2&head_direction=2&gesture=spr&size=s'/>
<th COLSPAN=2 class='tablerow2' align='left' valign='bottom'><a href=\"home/%s\">%s</a>
<tr><th class='tablerow3' align='left' valign='top'><i>%s creditos</i>
", $row[figure], $row[name], $row[name], $row[credits]);
}
?>
</table>



</div>
</div>

                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>


</div>  </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'); ?>