function get_traptemplate() { global $mysql, $npcid; $ttid = get_trap_template(); $array = array(); $array['ttid'] = $ttid; $query = "SELECT ltt.* \n FROM ldon_trap_templates AS ltt\n INNER JOIN ldon_trap_entries lte ON lte.trap_id = ltt.id\n WHERE lte.id = {$ttid}"; $results = $mysql->query_mult_assoc($query); if ($results) { foreach ($results as $result) { $array['ldontrap'][$result['id']] = array("id" => $result['id'], "type" => $result['type'], "spell_id" => $result['spell_id'], "skill" => $result['skill'], "locked" => $result['locked']); } } return $array; }
$body->set('suggested_id', suggest_adventure_id()); break; case 30: // Update adventure id check_authorization(); update_adventure_id(); header("Location: index.php?editor=npc&z={$z}&zoneid={$zoneid}&npcid={$npcid}"); exit; case 31: // Edit Trap id check_authorization(); $body = new Template("templates/npc/traptemplate.edit.tmpl.php"); $body->set('currzone', $z); $body->set('currzoneid', $zoneid); $body->set('npcid', $npcid); $body->set('trap_id', get_trap_template()); $body->set('suggested_id', suggest_trap_template()); break; case 32: // Update trap id check_authorization(); update_trap_template(); header("Location: index.php?editor=npc&z={$z}&zoneid={$zoneid}&npcid={$npcid}"); exit; case 33: // Edit Tint id check_authorization(); $body = new Template("templates/npc/dyetemplate.edit.tmpl.php"); $body->set('currzone', $z); $body->set('currzoneid', $zoneid); $body->set('npcid', $npcid);