Требование: PHP => 5.3, часть 2
[cswow.git] / module / armory / show_char_quest.php
blobe2ccf2508ec953788d4ca64d1bab21094b8da083
1 <?php
2 //==============================================================================
3 // Скрипт предназначен для вывода квестов игрока
4 //==============================================================================
5 include_once("include/report_generator.php");
7 function getCharacterQueststatus($character_id)
9 global $cDB;
10 return $cDB->select("-- CACHE: 1h
11 SELECT * FROM `character_queststatus` WHERE `guid` = ?d ORDER BY `quest`", $character_id);
14 function showPlayerQuests($guid)
16 global $lang;
17 $quests = getCharacterQueststatus($guid);
18 // Показ активных квестов
19 echo "<table class=report width=500><tbody>";
20 echo "<tr><td colspan=3 class=head>".$lang['player_active_quest']."</td></tr>";
22 if ($quests)
23 foreach ($quests as $quest)
25 $questId = $quest['quest'];
26 if ($questId AND $questinfo=getQuest($questId) AND
27 (($quest['status'] == 1 OR $quest['status'] == 3 OR $quest['status'] == 5) AND $quest['rewarded'] != 1))
29 echo '<tr>';
30 echo '<td>';r_questLvl($questinfo); echo '</td>';
31 echo '<td class=left>';r_questName($questinfo); echo '</td>';
32 echo '<td class=left>';r_questReward($questinfo);echo '</td>';
33 echo '</tr>';
36 echo "</tbody></table>";