Exemplo n.º 1
0
<img id="ContentBoxHeadline" class="Title" src="layouts/tibiacom/images/header/headline-killstatistics.gif" alt="Contentbox headline">
<?php 
if (!defined('INITIALIZED')) {
    exit;
}
$players_deaths = new DatabaseList('PlayerDeath');
$players_deaths->setFilter(new SQL_Filter(new SQL_Field('id', 'players'), SQL_Filter::EQUAL, new SQL_Field('player_id', 'player_deaths')));
$players_deaths->addOrder(new SQL_Order(new SQL_Field('time'), SQL_Order::DESC));
$players_deaths->setLimit(50);
$players_deaths_count = 0;
foreach ($players_deaths as $death) {
    $bgcolor = $players_deaths_count++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
    $players_rows .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH="30"><center>' . $players_deaths_count . '.</center></TD><TD WIDTH="125"><small>' . date("j.m.Y, G:i:s", $death->getTime()) . '</small></TD><TD><a href="index.php?subtopic=characters&name=' . urlencode($death->data['name']) . '">' . htmlspecialchars($death->data['name']) . '</a> at level ' . $death->getLevel() . ' by ' . $death->getKillerString();
    if ($death->getMostDamageString() != '' && $death->getKillerString() != $death->getMostDamageString()) {
        $players_rows .= ' and ' . $death->getMostDamageString();
    }
    $players_rows .= '</TD></TR>';
}
if ($players_deaths_count == 0) {
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="' . $config['site']['vdarkborder'] . '"><TD CLASS=white><B>Last Deaths</B></TD></TR><TR BGCOLOR=' . $config['site']['darkborder'] . '><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>No one died on ' . htmlspecialchars($config['server']['serverName']) . '.</TD></TR></TABLE></TD></TR></TABLE><BR>';
} else {
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="' . $config['site']['vdarkborder'] . '"><TD CLASS=white><B>Last Deaths</B></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>' . $players_rows . '</TABLE>';
}
Exemplo n.º 2
0
         $number_of_quests++;
         $main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=95%>' . $questName . '</TD>';
         if ($player->getStorage($storageID) === null) {
             $main_content .= '<TD><img src="images/false.png"/></TD></TR>';
         } else {
             $main_content .= '<TD><img src="images/true.png"/></TD></TR>';
         }
     }
     $main_content .= '</TABLE></td></tr></table><br />';
 }
 $deads = 0;
 //deaths list
 $player_deaths = new DatabaseList('PlayerDeath');
 $player_deaths->setFilter(new SQL_Filter(new SQL_Filter(new SQL_Field('player_id'), SQL_Filter::EQUAL, $player->getId()), SQL_Filter::CRITERIUM_AND, new SQL_Filter(new SQL_Field('id', 'players'), SQL_Filter::EQUAL, new SQL_Field('player_id', 'player_deaths'))));
 $player_deaths->addOrder(new SQL_Order(new SQL_Field('time'), SQL_Order::DESC));
 $player_deaths->setLimit(20);
 foreach ($player_deaths as $death) {
     $bgcolor = $number_of_rows++ % 2 == 1 ? $config['site']['darkborder'] : $config['site']['lightborder'];
     $deads++;
     $dead_add_content .= "<tr bgcolor=\"" . $bgcolor . "\"><td width=\"20%\" align=\"center\">" . date("j M Y, H:i", $death->getTime()) . "</td><td>Died at level " . $death->getLevel() . " by " . $death->getKillerString();
     if ($death->getMostDamageString() != '' && $death->getKillerString() != $death->getMostDamageString()) {
         $dead_add_content .= ' and ' . $death->getMostDamageString();
     }
     $dead_add_content .= "</td></tr>";
 }
 if ($deads > 0) {
     $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="' . $config['site']['vdarkborder'] . '"><TD COLSPAN=2 CLASS=white><B>Character Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />';
 }
 if (!$player->getHideChar()) {
     $main_content .= '<TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="' . $config['site']['vdarkborder'] . '"><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR>';
     if ($account->getRLName()) {