Требование: PHP => 5.3, часть 2
[cswowd.git] / module / skills / show_prof_spells.php
blob2d6e9cf76e0ae5ccb447c43501dcffbde84498e8
1 <?php
2 include_once("conf.php");
3 include_once("include/info_table_generator.php");
4 include_once("include/report_generator.php");
6 $page = intval(@$_REQUEST['page']);
7 $skill = @$_REQUEST['skill'];
9 $baseLink = "?skill=$skill";
11 // Ãóèä óêàçàí åñëè ïåðåøëè èç ïîêàçà èãðîêà
12 if ($guid = intval(@$_REQUEST['guid']))
14 $baseLink.= "&guid=$guid";
17 $sort="";
19 if (intval($skill) == 0)
21 switch (strtolower($skill))
23 case "alchemy": $skillID = 171; break;
24 case "blacksmithing": $skillID = 164; break;
25 case "enchanting": $skillID = 333; break;
26 case "engineering": $skillID = 202; break;
27 case "herbalism": $skillID = 182; break;
28 case "jewelcrafting": $skillID = 755; break;
29 case "leatherworking": $skillID = 165; break;
30 case "mining": $skillID = 186; break;
31 case "skinning": $skillID = 393; break;
32 case "tailoring": $skillID = 197; break;
33 case "inscription": $skillID = 773; break;
34 case "first aid": $skillID = 129; break;
35 case "cooking": $skillID = 185; break;
36 case "fishing": $skillID = 356; break;
37 default: $skillID = 0; break;
40 else
41 $skillID = intval($skill);
43 $skillline = getSkillLine($skillID);
44 if (!$skillline)
46 echo 'No found';
48 else
50 $prof_list = array('SKILL_REPORT_LEVEL','SKILL_REPORT_ICON','SKILL_REPORT_NAME','SPELL_REPORT_REAGENTS');
51 $spell_list= array('SPELL_REPORT_LEVEL','SPELL_REPORT_ICON','SPELL_REPORT_NAME');
53 $skill =& new SpellReportGenerator('skill');
54 $skill->disable_mark = true;
55 if ($skillline['Category'] == 9 OR $skillline['Category'] == 11)
56 $skill->Init($prof_list, $baseLink, 'skillLIST', $config['skill_fade_limit'], 'skill_lvl');
57 else
58 $skill->Init($spell_list, $baseLink, 'skillLIST', $config['skill_fade_limit'], 'level');
60 $skill->doSkillList($skillID);
61 $skill->createReport($skillline['Name']);