Требование: PHP => 5.3, часть 2
[cswow.git] / module / armory / show_character.php
blob588ce32822b22af1e57eda37c7e4845a618ed83b
1 <?php
2 include_once("conf.php");
3 include_once("include/functions.php");
4 include_once("include/player_data.php");
6 $guid = intval(@$_REQUEST['player']);
7 $tab = @$_REQUEST['tab'];
8 $char = getCharacter($guid);
9 $char_stats = getCharacterStats($guid);
11 if (!$char)
14 else
16 $char_data = explode(' ',$char['equipmentCache']);
17 //$powerType =($char_data[UNIT_FIELD_BYTES_0]>>24)&255;
18 $genderId =$char['gender'];
19 $class =$char['class'];
20 $race =$char['race'];
22 if (!$ajaxmode){
23 echo '
24 <ul class=my_tabs><center>
25 <li><a onclick="return uploadFromHref(this, \'reportContainer\');" href=?player='.$guid.'>Персонаж</a></li>';
26 if ($config['show_player_3d']) echo '<li><a onclick="return uploadFromHref(this, \'reportContainer\');" href=?player='.$guid.'&tab=3d>Персонаж 3D</a></li>';
27 echo '
28 <li><a onclick="return uploadFromHref(this, \'reportContainer\');" href=?player='.$guid.'&tab=talents>Таланты</a></li>
29 <li><a onclick="return uploadFromHref(this, \'reportContainer\');" href=?player='.$guid.'&tab=skill>Умения</a></li>
30 <li><a onclick="return uploadFromHref(this, \'reportContainer\');" href=?player='.$guid.'&tab=achievements>Достижения</a></li>
31 <li><a onclick="return uploadFromHref(this, \'reportContainer\');" href=?player='.$guid.'&tab=reputation>Репутация</a></li>
32 <li><a onclick="return uploadFromHref(this, \'reportContainer\');" href=?player='.$guid.'&tab=quests>Квесты</a></li>';
33 //<li><a onclick="return uploadFromHref(this, \'reportContainer\');" href=?player='.$guid.'&tab=inventory>Инвентарь</a></li>
34 //<li><a onclick="return uploadFromHref(this, \'reportContainer\');" href=?player='.$guid.'&tab=guild>Гильдия</a></li>
35 echo '</ul></center>
36 <div id=reportContainer>';
39 if ($tab == '')
41 include ("show_char_equip.php");
42 showPlayerEquip($guid, $char, $char_data, $char_stats);
45 if ($config['show_player_3d'] &&
46 $tab=='3d')
48 include("show_char_3d.php");
49 showPlayer3d($char, $char_data);
52 if (//$config['show_player_fields'] &&
53 $tab=='data')
55 include("show_char_data.php");
56 showPlayerData($char_data);
59 if ($tab == 'inventory')
61 include ("show_char_inventory.php");
62 showPlayerInventory($guid, $char_data);
63 }*/
65 if ($tab == 'talents')
67 include("show_char_talents.php");
68 showPlayerTalents($guid, $class, $char['level'], $char['activeSpec']);
71 if ($tab == 'skill')
73 include("show_char_skill.php");
74 showPlayerSkills($guid);
77 if ($tab == 'achievements')
79 include("show_char_achievements.php");
80 showPlayerAchievements($guid, getPlayerFaction($race));
83 if ($tab == 'reputation')
85 include("show_char_reputation.php");
86 showPlayerReputation($guid, $class, $race);
89 if ($tab == 'guild')
91 include("show_char_guild.php");
92 $guildid = 0;
93 showPlayerGuild($guid, $char_data);
94 }*/
96 if ($tab == 'quests')
98 include("show_char_quest.php");
99 showPlayerQuests($guid);
102 if (!$ajaxmode)
103 echo '</div>';