Ejemplo n.º 1
0
                 $Smarty->assign('Professions', $Professions);
                 $Smarty->assign('Page', Page::Info('community', array('bodycss' => 'professions_page', 'pagetitle' => $Smarty->GetConfigVars('Profile_Character_Professions') . ' - ' . $Smarty->GetConfigVars('Menu_Community') . ' - ')));
                 $Smarty->display('pages/character_no_professions');
             }
         }
         header('Location: //' . $_SERVER[HTTP_HOST] . str_replace('//', '/', $_SERVER['REQUEST_URI'] . $RedirectTo));
     }
 } else {
     $CharProfessions = array();
     foreach ($Professions as $Profession) {
         $CharProfessions[] = $Profession['name'];
     }
     if (in_array($_REQUEST['datatype'], $CharProfessions)) {
         $ProfessionInfo = $Professions[Text::MASearch($Professions, 'name', $_REQUEST['datatype'])];
         $AllRecipes = Characters::GetRecipesForProfession($ProfessionInfo['id']);
         $LearnedRecipes = Characters::GetLearnedRecipesForProfession($ProfessionInfo['id'], $CharacterData['guid']);
         $UnlearnedArray = array();
         foreach ($AllRecipes as $All) {
             $Searcher = Text::MASearch($LearnedRecipes, 'spell', $All['spellID']);
             if (!$Searcher) {
                 $UnlearnedArray[] = $All;
             }
         }
         $Smarty->assign('SelectedProfession', $_REQUEST['datatype']);
         $Smarty->assign('ProfessionInfo', $ProfessionInfo);
         $Smarty->assign('Professions', $Professions);
         $Smarty->assign('TotalRecipes', count($AllRecipes));
         $Smarty->assign('UnRecipes', $UnlearnedArray);
         $Smarty->assign('LearnedRecipes', $LearnedRecipes);
         $Smarty->assign('Page', Page::Info('community', array('bodycss' => 'professions_page', 'pagetitle' => $Smarty->GetConfigVars('Profile_Character_Professions') . ' - ' . $Smarty->GetConfigVars('Menu_Community') . ' - ')));
         $Smarty->display('pages/character_professions');