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
It might be like this
Create a file topplayer.php and paste in it the content. The file put in Templates/templatename/topplayer.php
What functions do it have?
+ Display top 5 exp
+ Display the status (on/off)
This time all credits goes to me. Rep me!!! or leave
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>';
?>
What functions do it have?
+ Display top 5 exp
+ Display the status (on/off)
This time all credits goes to me. Rep me!!! or leave