Lanibox
Brutal1ty.com
- Joined
- Sep 21, 2010
- Messages
- 179
- Reaction score
- 4
Hey, got problems with this Top10 players php script...
Im getting this
Fatal error: Call to undefined function get_instance() in C:\xampp\htdocs\top10.php on line 8
Any help?
Im getting this
Fatal error: Call to undefined function get_instance() in C:\xampp\htdocs\top10.php on line 8
PHP:
<?php
// Configuration
$maxGroupValue = 2; // Maximum group id, players with higher group id than this won't be shown
$playersShowLimit = 10; // How much positions should be shown
// -------------
include('config.php');
$ci =& get_instance();
$ci->load->database();
$loadPlayers = $ci->db->query("SELECT `name`, `group_id`, `world_id`, `level`, `vocation` FROM `players` WHERE `group_id` <= ".$maxGroupValue." ORDER BY `level` DESC LIMIT ".$playersShowLimit."");
?>
<div>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<?php
$counter = 1;
foreach($loadPlayers->result() as $player):
?>
<tr>
<td width="19">
<div class="number"><strong><?php echo $counter; ?></strong></div>
</td>
<td>
<a href="<?php echo WEBSITE; ?>/index.php/character/view/<?php echo $player->name; ?>"><strong><?php echo $player->name; ?></strong></a><br />
<em style="color:#903;"><?php echo $config['worlds'][$player->world_id]; ?></em>
</td>
<td>
<strong style="color: #66c;"><?php echo $config['server_vocations'][$player->vocation]; ?></strong>
</td>
<td>
<?php echo $player->level; ?> lvl
</td>
</tr>
<?php
$counter++;
endforeach;
?>
</table>
</div>
Any help?