if ($aaref) { $name = getNameByID($aaref); $body->set('aaref', $aaref); $body->set('aarefname', $name ? $name : "Not Found"); } else { $body->set('aaref', null); $body->set('aarefname', null); } // Provide initial values for the aa vars to avoid not set notices $body->set('aa_vars', $defaultvalues); $body->set('aa_actions', null); $body->set('aa_effects', null); $body->set('aa_cost', null); $body->set('aa_prev', null); $body->set('aa_next', null); $vars = aa_info(); if ($vars) { foreach ($vars as $key => $value) { $body->set($key, $value); } } } else { $body = new Template("templates/aa/aa.default.tmpl.php"); } break; case 1: // Search AAs check_authorization(); $body = new Template("templates/aa/aa.searchresults.tmpl.php"); if (isset($_GET['aaid']) && $_GET['aaid'] != "ID") { $results = findByID($_GET['aaid']);
<?php $aa_category = array(-1 => "None", 1 => "UNK", 2 => "Progression", 3 => "Shroud Passive", 4 => "Shroud Active", 5 => "Veteran Reward", 6 => "Tradeskill", 7 => "Expendable", 8 => "Racial Innate", 9 => "UNK"); $aa_type = array(0 => "Not Applicable", 1 => "General", 2 => "Archetype", 3 => "Class", 4 => "PoP Advanced", 5 => "PoP Abilities", 6 => "Gates of Discord", 7 => "Omens of War", 8 => "Veteran", 9 => "Dragons of Norrath", 10 => "Depths of Darkhollow"); switch ($action) { case 0: //View AA check_authorization(); if (isset($aaid) && $aaid >= 0) { $body = new Template("templates/aa/aa.tmpl.php"); $aa_info = aa_info(); $body->set('yesno', $yesno); $body->set('eqexpansions', $eqexpansions); $body->set('sp_effects', $sp_effects); $body->set('sp_spelltypes', $sp_spelltypes); //This is still wrong $body->set('aa_type', $aa_type); $body->set('aa_category', $aa_category); if ($aa_info) { foreach ($aa_info as $key => $value) { $body->set($key, $value); } } } else { $body = new Template("templates/aa/aa.default.tmpl.php"); } break; case 1: //Search AAs //Search AAs case 2: