• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Box Top Level HELP-ME

Kramer2

New Member
Joined
Nov 21, 2014
Messages
9
Reaction score
0
I need to move the top 5 for the blue square , following the example
Acc maker : Modern Acc

wjIF3a.gif
 
try this?

Greetings.

This is not a injection.. This time its a SQL Query.

Tutorial where to place it?

enter the following direction \injections\home crate a new folder with a name Aleh-Table paste in it the code.. Save it as injection.php

How to display the content?

Add a line in your template file. Templates/templatename/index.tpl

PHP:
{include_php file='templates\Kavvson\topplayer.php'}

It might be like this
PHP:
<div class="top-box">
{include_php file='templates\Kavvson\css\topplayer.php'}          
</div>

Create a file topplayer.php and paste in it the content. The file put in Templates/templatename/topplayer.php

PHP:
<?PHP
//** Connection to the database **//
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = POT::getInstance()->getDBHandle();

//** Top Players + online status By Kavvson **//
                                $money_list = $SQL->query('SELECT name,level,experience FROM players ORDER BY experience DESC LIMIT 5')->fetchAll();
                                        $i = 1;
                                        foreach($money_list as $money_chr){
                                        echo '<center>';
                                            echo $i.'. <a href="?subtopic=characters&name='.urlencode($money_chr['name']).'">';
        $player = $ots->createObject('Player');
        $player->find($money_chr['name']);
                        echo '<font color="';
                        echo ($player->isOnline()) ? 'green' : 'red';
                        echo '">';  
                        echo '<b>'.$money_chr['name'].'</b></a></font>';
                        echo  '<br>Level: <B>'.$money_chr['level'].'</B><br>';
                                            $i++;
                                        }
                                        for( $i; $i <= 5; $i++ ){
                                            echo $i.'. <br><i>Empty</i><br /><br />';
                                        }
                                        echo '</center>';
                                      
?>
 
Yes however when I add { include_php file = ' templates \ DBKO \ topplayer.php '} in index.tpl show a error.
 
Last edited:
Back
Top