function onlineMapRenderCallback($data, $x, $y) { $imgX = 16; $imgY = 16; $x = round($x - $imgX / 2, 0); $y = round($y - $imgY / 2, 0); $gender = $data['gender']; $class = $data['class']; $race = $data['race']; $level = $data['level']; $faction = getPlayerFaction($race); $map_name = getMapName($data['map']); $area_name = getAreaNameFromPoint($data['map'], $data['position_x'], $data['position_y'], $data['position_z']); $img = $faction == 0 ? "gps_icon1.png" : "gps_icon.png"; $text = "<table class=online_map>"; $text .= "<tr><td class=" . ($faction == 0 ? "aname" : "hname") . ">" . $data['name'] . "</td></<tr>"; if ($area_name) { $text .= "<tr><td align=center>{$area_name}<br>"; } $text .= "<tr><td align=center>"; $text .= "<img width=20 src=" . getRaceImage($race, $gender) . "> <img width=20 src=" . getClassImage($class) . "><br>"; $text .= getRace($race) . "<br>"; $text .= getClass($class) . "<br>"; $text .= "Level - {$level}<br>"; $text .= "</td></tr>"; $text .= "</table>"; return '<img src="images/map_points/' . $img . '" class=point style="left: ' . $x . '; top: ' . $y . ';" ' . addTooltip($text) . '>' . "\n"; }
function renderRaceStat($list, $data, $total) { global $module_path; echo "<table class=stat cellSpacing=0 cellPadding=0><tbody><tr class=stat_top>"; foreach ($list as $r) { $pct = $total ? $data[$r] / $total * 100 : 0; $height = $pct * 4; $pct = sprintf("%0.2f%%", $pct); echo "<td class=st_data>{$pct}<br><img src=\"{$module_path}/img/column.gif\" width=\"79\" height=\"{$height}\" alt=\"{$pct}\"/></td>"; } echo "</tr><tr class=stat_bot>"; foreach ($list as $r) { echo "<td class=st_data><img src=" . getRaceImage($r, rand() % 2) . " width=32px><br>" . $data[$r] . "</td>"; } echo "</tr>"; echo "</tbody></table>"; }
$imgsize = 32; $char_data = explode(' ', $player['data']); $powerType = $char_data[UNIT_FIELD_BYTES_0] >> 24 & 255; $gender = $char_data[UNIT_FIELD_BYTES_0] >> 16 & 255; $class = $char_data[UNIT_FIELD_BYTES_0] >> 8 & 255; $race = $char_data[UNIT_FIELD_BYTES_0] >> 0 & 255; $level = $char_data[UNIT_FIELD_LEVEL]; $map_name = getMapNameFromPoint($player['map'], $player['position_x'], $player['position_y'], $player['position_z']); $area_name = getAreaNameFromPoint($player['map'], $player['position_x'], $player['position_y'], $player['position_z']); $extra_name = ""; if ($area_name) { $extra_name = "<br><font size=-2>" . $map_name . "</font>"; $map_name = "„" . str_replace(' ', ' ', $area_name) . "“"; } else { $map_name = "„" . str_replace(' ', ' ', $map_name) . "“"; } $map_name = "<a href=\"map/map.php?x={$player['position_x']}&y={$player['position_y']}&map={$player['map']}\">" . $map_name . "</a>" . $extra_name; echo "<TR>"; echo "<TD align=center>{$level}</TD>"; echo "<TD class=pfaction><img width={$imgsize} src=\"" . getFactionImage($race) . "\"></TD>"; echo "<TD class=player><A href=?player={$player['guid']}>{$player['name']}</a></TD>"; echo "<TD class=prace><img width={$imgsize} src=\"" . getRaceImage($race, $gender) . "\"></TD>"; echo "<TD class=pclass><img width={$imgsize} src=\"" . getClassImage($class) . "\"></TD>"; echo "<TD class=zone>{$map_name}</TD>"; echo "</TR>\n"; } } else { echo "<tr><td colSpan=6 align=center>" . $lang['user_no_char_present'] . "</td></tr>"; } echo "</TBODY></TABLE>"; }
function r_plRace($data) { echo '<img src="' . getRaceImage($data['race'], $data['gender']) . '">'; }
} $id = intval(@$_REQUEST['arenateam']); $arenateam_data = $cDB->selectRow("SELECT * FROM `arena_team` WHERE arenateamid = ?d", $id); $arenateam_stats = $cDB->selectRow("SELECT * FROM `arena_team_stats` WHERE arenateamid = ?d", $id); $arenateam_member = $cDB->selectPage($total_members, "SELECT * FROM `arena_team_member` WHERE arenateamid = ?d", $id); if (!$arenateam_data) { echo "{$lang['not_found']}"; } if ($arenateam_data and $arenateam_stats and $arenateam_member) { $losses_week = $arenateam_stats['games_week'] - $arenateam_stats['wins_week']; $winperc_week = $arenateam_stats['games_week'] ? round($arenateam_stats['wins_week'] / $arenateam_stats['games_week'] * 100) : 0; $losses_season = $arenateam_stats['games_season'] - $arenateam_stats['wins_season']; $winperc_season = $arenateam_stats['games_season'] ? round($arenateam_stats['wins_season'] / $arenateam_stats['games_season'] * 100) : 0; $type = $arenateam_data['type']; $back = $arenateam_data['BackgroundColor'] + 0 & 0xffffff; $emblem = $arenateam_data['EmblemStyle']; $ecolor = $arenateam_data['EmblemColor'] + 0 & 0xffffff; $border = $arenateam_data['BorderStyle']; $bcolor = $arenateam_data['BorderColor'] + 0 & 0xffffff; $emblem_image = "images/player_info/arena_ico.php?type={$type}&back={$back}&emblem={$emblem}&ecolor={$ecolor}&border={$border}&bcolor={$bcolor}"; echo "\n <table class=report width=100%>\n <tr>\n <td colspan=10 class=head>{$arenateam_data['name']} - {$arenateam_stats['rating']}</td>\n </tr>\n <tr>\n <td colspan=2>" . $lang['arena_this_week'] . "</td>\n <td colspan=2>" . $lang['arena_played'] . ": {$arenateam_stats['games_week']}</td>\n <td colspan=2>" . $lang['arena_wins'] . ": {$arenateam_stats['wins_week']}</td>\n <td colspan=2>" . $lang['arena_lose'] . ": {$losses_week}</td>\n <td colspan=2>" . $lang['arena_win_pct'] . ": {$winperc_week} %</td>\n </tr>\n <tr>\n <td colspan=2>" . $lang['arena_total_stat'] . "</td>\n <td colspan=2>" . $lang['arena_played'] . ": {$arenateam_stats['games_season']}</td>\n <td colspan=2>" . $lang['arena_wins'] . ": {$arenateam_stats['wins_season']}</td>\n <td colspan=2>" . $lang['arena_lose'] . ": {$losses_season}</td>\n <td colspan=2>" . $lang['arena_win_pct'] . ": {$winperc_season} %</td>\n </tr>\n <tr>\n <td colspan=5 align=center>" . $lang['arena_team_leader'] . ": " . getCharacterName($arenateam_data['captainguid']) . "</td>\n <td colspan=5 align=center>" . $lang['arena_members_count'] . ": {$total_members}</td>\n </tr>\n <tr>\n\t<th>" . $lang['player_level'] . "</th>\n\t<th>" . $lang['player_name'] . "</th>\n <th>" . $lang['player_race'] . "</th>\n\t<th>" . $lang['player_class'] . "</th>\n\t<th>" . $lang['last_login'] . "</th>\n\t<th>" . $lang['online'] . "</th>\n\t<th>" . $lang['arena_week_games'] . "</th>\n\t<th>" . $lang['arena_wins'] . "</th>\n\t<th>" . $lang['arena_season_games'] . "</th>\n\t<th>" . $lang['arena_wins'] . "</th>\n </tr>\n "; foreach ($arenateam_member as $player) { $fields = "`name`,\n `race`,\n `class`,\n `online`,\n `account`,\n `logout_time`,\n SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', " . (UNIT_FIELD_LEVEL + 1) . "), ' ', -1) AS level,\n (SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', " . (UNIT_FIELD_BYTES_0 + 1) . "),' ',-1)/(256*256)) & 255 AS gender"; if ($char = getCharacter($player['guid'], $fields)) { $llogin = count_days($char['logout_time'], time()); echo "\n <tr>\n <td align=center>{$char['level']}</td>\n <td><a href=\"?player={$player['guid']}\">{$char['name']}</a></td>\n <td class=prace><img width=32 src='" . getRaceImage($char['race'], $char['gender']) . "'/></td>\n <td class=pclass><img width=32 src='" . getClassImage($char['class']) . "'/></td>\n <td align=center>{$llogin}</td>\n <td align=center>" . ($char['online'] > 0 ? "+" : "-") . "</td>\n <td align=center>{$player['played_week']}</td>\n <td align=center>{$player['wons_week']}</td>\n <td align=center>{$player['played_season']}</td>\n <td align=center>{$player['wons_season']}</td>\n </tr>"; } } echo "</table>"; echo "\n <table width=100% border=0 cellspacing=0 cellpadding=0>\n <tr>\n <td> <img src={$emblem_image}></td>\n <td align=right><img src={$emblem_image}> </td>\n </tr>\n </table>"; }
$gender = $player['gender']; $class = $player['class']; $race = $player['race']; $level = $player['level']; $honor = $player['totalHonorPoints']; $kills = $player['totalKills']; // if (sizeof($char_data)!=PLAYER_FIELD_PADDING+2) // continue; echo "<tr>"; echo "<td align = center>{$count}</td>"; echo "<td><img width={$imgsize} height={$imgsize} src=\"" . getFactionImage($race) . "\"></td>"; echo "<td align=center>{$level}</td>"; echo "<td><a href=?player={$player['guid']}>{$player['name']}</a></td>"; echo "<td>" . $honor . "</td>"; echo "<td>" . $kills . "</td>"; echo "<td align=center><img width={$imgsize} height={$imgsize} src=\"" . getRaceImage($race, $gender) . "\"></td>"; echo "<td align=center><img width={$imgsize} height={$imgsize} src=\"" . getClassImage($class) . "\"></td>"; echo "</tr>\n"; $count++; } echo "</tbody></table>"; } } else { if ($output_mode == "TOP_ARENA") { $arena_type = 0; if ($type == "arena2") { $arena_type = 2; } if ($type == "arena3") { $arena_type = 3; }