-
-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
I need help to put flag in highscore table. I try but i cant understand this code. I fixed in all others pages the flag problem. But in Highscore, idk how to fix it.
How is my page:
And here is my code:
<table id="highscoresTable" cellpadding="4" class="stripped">
<tr>
<th colspan="7">Ranking for <?php echo skillName($type) .", ". (($vocation < 0) ? 'any vocation' : vocation_id_to_name($vocation)) ?></th>
</tr>
<tr>
<td width="8%"><center>#</center></td>
<td width="8%"><center><strong>outfit</strong></center></td>
<?php if ($config['country_flags'] === true) echo'<td width="5%"><center><strong>flag</strong></center></td>'; ?>
<td><strong>Name</strong></td>
<td><center><strong>Vocation</strong></center></td>
<td width="15%"><center><strong>Level</strong></center></td>
<?php if ($type === 7) echo "<td width=\"15%\"><center><strong>Points</strong></center></td>"; ?>
</tr>
<?php
for ($i = 0; $i < count($scores[$type]); $i++) {
if ($scores[$type] === false) {
?>
<tr>
<td colspan="7">Nothing to show here yet.</td>
</tr>
<?php
} else {
if (pageCheck($i, $page, $rowsPerPage)) {
$profile_data = user_character_data($scores[$type][$i]['id'], 'account_id');
$account_data = user_znote_account_data($profile_data['account_id'], 'flag');
if ($config['country_flags'] === true) $flag = '<td><center><img src="http://flag.znote.eu/' . $account_data['flag'] . '.png"></center></td>';
else $flag = '';
?>
<tr>
<td><center><?php echo $i+1; ?>.</center></td>
<td>
<?php
echo '<div style="position:relative; left:-32px; top:-32px;width: 32px;height:32px;">
<div style="background-image: url(layout/outfitter/outfit.php?id=134&head=78&body=106&legs=58&feet=95);
width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;">
</div>'; // background com variável para pegar do player. background-image: url(layout/outfitter/outfit.php?id='.$scores[$type][$i]['looktype'].'&head='.$scores[$type][$i]['lookhead'].'&body='.$scores[$type][$i]['lookbody'].'&legs='.$scores[$type][$i]['looklegs'].'&feet='.$scores[$type][$i]['lookfeet'].')
?>
</td>
<?php echo $flag; ?>
<td><strong><a href="characterprofile.php?name=<?php echo $scores[$type][$i]['name']; ?>"><?php echo $scores[$type][$i]['name']; ?></a></strong></td>
<td><center><?php echo vocation_id_to_name($scores[$type][$i]['vocation']); ?></center></td>
<td><center><?php echo $scores[$type][$i]['value']; ?></center></td>
<?php if ($type === 7) echo "<td><center>". $scores[$type][$i]['experience'] ."</center></td>"; ?>
</tr>
<?php
}
}
}
?>
</table>
<center><span class="pagination">
<?php
$pages = ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($scores[$type]) / $highscore['rowsPerPage'])));
for ($i = 0; $i < $pages; $i++) {
$x = $i + 1;
if ($x == $page) echo "<a href=\"?".$_SERVER['QUERY_STRING']."&pag=".$x."\" class=\"current\">".$x."</a>";
else echo "<a href=\"?".$_SERVER['QUERY_STRING']."&pag=".$x."\">".$x."</a>";
}
?>
</span></center>
<?php>
```
Metadata
Metadata
Assignees
Labels
No labels
