mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
some fixed and new features
* added outfit shower, in characters, online, and highscores * updated database to version 2 * fixed item images (now using item-images.ots.me host by default) * fixed news ticket and posting long newses (https://otland.net/threads/myaac-v0-0-1.251454/page-5#post-2442026) * news body limit increased to 65535 (mysql text field) * removed some unused code from my old server * added spells & monsters to kathrine template
This commit is contained in:
@@ -696,137 +696,8 @@ echo "</div>";
|
||||
<img class="Title" src="<?php echo $headline; ?>" alt="Contentbox headline" />
|
||||
<div class="Border_2">
|
||||
<div class="Border_3">
|
||||
<?php
|
||||
if(PAGE == 'news' && $config['lua']['serverName'] == "SlaskiOTS" && !isset($_GET['archive']) && !isset($_GET['id']))
|
||||
{
|
||||
?>
|
||||
<div style="background-image:url(<?php echo $template_path; ?>/images/content/scroll.gif);">
|
||||
<table style="clear:both; font-family: Verdana, Arial, Times New Roman, sans-serif;font-size: 10pt; padding: 8px" border=0 cellpadding=0 cellspacing=0 width="100%">
|
||||
<tr><td>
|
||||
Witaj na Śląskim serwerze.<br>Przed rozpoczęciem gry zapoznaj z podstroną <a href="<?php echo internalLayoutLink('serverInfo')?>">Server Info</a>.<br>
|
||||
O pomoc w grze zawsze możesz poprosić na kanale <b>Help</b>.<br><br>
|
||||
|
||||
Ostatnio zarejestrował się:
|
||||
<?php
|
||||
$newestMember = $db->query('SELECT `name` FROM `players` ORDER BY `id` DESC LIMIT 1');
|
||||
$newestMember = $newestMember->fetch();
|
||||
echo getPlayerLink($newestMember['name']) . '. Witamy!';
|
||||
?>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
if(tableExist('wodz_exphistory'))
|
||||
{
|
||||
$top_enabled = true;
|
||||
function write_top($name, $list, $colspan = 2)
|
||||
{
|
||||
global $config;
|
||||
echo '
|
||||
<TD WIDTH=' . ($colspan == 2 ? '30' : '40') . '% VALIGN="TOP">'.
|
||||
'<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
|
||||
<TR BGCOLOR='.$config['vdarkborder'].'>
|
||||
<TD COLSPAN=' . $colspan . ' class="white"><B>TOP 5 - ' . $name . '</B></TD>
|
||||
</TR>';
|
||||
|
||||
$i = 1;
|
||||
foreach($list as $str)
|
||||
echo '<TR BGCOLOR='.getStyle($i++).'>' . $str . '</TR>';
|
||||
echo
|
||||
'</TABLE>
|
||||
</TD>';
|
||||
}
|
||||
?>
|
||||
<?php $hooks->trigger(HOOK_TIBIACOM_BORDER_3); ?>
|
||||
<div class="BoxContent" style="background-image:url(<?php echo $template_path; ?>/images/content/scroll.gif);">
|
||||
<TABLE BORDER=0 WIDTH=100%>
|
||||
<tr>
|
||||
<?php
|
||||
$vocation_name_short = array(
|
||||
array(
|
||||
1 => 'S',
|
||||
2 => 'D',
|
||||
3 => 'P',
|
||||
4 => 'K'
|
||||
),
|
||||
array(
|
||||
1 => 'MS',
|
||||
2 => 'ED',
|
||||
3 => 'RP',
|
||||
4 => 'EK'
|
||||
)
|
||||
);
|
||||
|
||||
//players
|
||||
$top_array = array();
|
||||
$top_players_query = $db->query(
|
||||
'SELECT `name`, `level`, `experience`, `vocation`, `promotion`, `online` FROM `players`' .
|
||||
' WHERE players.deleted = 0 AND players.group_id < '.$config['highscores_groups_hidden'] .
|
||||
' ORDER BY `experience` DESC' .
|
||||
' LIMIT 5');
|
||||
|
||||
$i = 0;
|
||||
foreach($top_players_query as $player)
|
||||
{
|
||||
$top_array[$i++] =
|
||||
'<TD>' . $i . '.</TD>
|
||||
<TD VALIGN=top>
|
||||
<a href="' . getPlayerLink($player['name'], false) . '">'.($player['online']>0 ? "<font color=\"green\">".$player['name']."</font>" : "<font color=\"red\">".$player['name']."</font>").'</a>
|
||||
<small>('.$player['level'].' '.$vocation_name_short[$player['promotion']][$player['vocation']].')</small>
|
||||
</TD>';
|
||||
}
|
||||
write_top('<a href="' . internalLayoutLink('highscores') . '" class="white">Players</a>', $top_array);
|
||||
|
||||
//powergamers
|
||||
$top_array = array();
|
||||
$today = getZeroDay();
|
||||
$top_powergamers_query = $db->query(
|
||||
'SELECT `wodz_exphistory`.`exp_change` as exp_change, `name`, `players`.`level`, `players`.`experience`, `vocation`, `promotion`, `online`' .
|
||||
' FROM `wodz_exphistory`, `players`' .
|
||||
' WHERE players.id = wodz_exphistory.player_id AND `date` = ' . $today . ' ORDER BY `exp_change` DESC LIMIT 5');
|
||||
|
||||
$i = 0;
|
||||
foreach($top_powergamers_query as $player)
|
||||
{
|
||||
$top_array[$i++] =
|
||||
'<TD>' . $i . '.</TD>
|
||||
<TD VALIGN=top>
|
||||
<a href="' . getPlayerLink($player['name'], false) . '">'.($player['online']>0 ? "<font color=\"green\">".$player['name']."</font>" : "<font color=\"red\">".$player['name']."</font>").'</a>
|
||||
<small>('.$player['level'].' '.$vocation_name_short[$player['promotion']][$player['vocation']].')</small>
|
||||
</TD>
|
||||
<TD><small>' . formatExperience($player['exp_change']) . '</small></TD>';
|
||||
}
|
||||
write_top('<a href="' . internalLayoutLink('powergamers') . '" class="white">Powergamers</a> (Today)', $top_array, 3);
|
||||
|
||||
//guilds
|
||||
$top_array = array();
|
||||
$top_guilds_query = $db->query(
|
||||
'SELECT `name`, `total_level`' .
|
||||
' FROM `guilds`' .
|
||||
' ORDER BY `total_level` DESC' .
|
||||
' LIMIT 5');
|
||||
|
||||
$i = 0;
|
||||
foreach($top_guilds_query as $guild)
|
||||
{
|
||||
$top_array[$i++] =
|
||||
'<TD>' . $i . '.</TD>
|
||||
<TD>' . getGuildLink($guild['name']) . '</TD>
|
||||
<TD><small>' . $guild['total_level'] . '</small></TD>';
|
||||
}
|
||||
write_top('<a href="' . internalLayoutLink('guilds') . '" class="white">Guilds</a>', $top_array, 3);
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<div class="BoxContent" style="background-image:url(<?php echo $template_path; ?>/images/content/scroll.gif);">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php echo template_place_holder('center_top') . $content; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user