function module_editor_navs($like, $linkprefix) { $sql = "SELECT formalname,modulename,active,category FROM " . db_prefix("modules") . " WHERE infokeys LIKE '%|{$like}|%' ORDER BY category,formalname"; $result = db_query($sql); $curcat = ""; while ($row = db_fetch_assoc($result)) { if ($curcat != $row['category']) { $curcat = $row['category']; addnav(array("%s Modules", $curcat)); } //I really think we should give keyboard shortcuts even if they're //susceptible to change (which only happens here when the admin changes //modules around). This annoys me every single time I come in to this page. addnav_notl(($row['active'] ? "" : "`)") . $row['formalname'] . "`0", $linkprefix . $row['modulename']); } }
<?php $act = httpget('act'); if ($act == "") { output("%s`0 looks at you sort-of sideways like.", $barkeep); output("He never was the sort who would trust a man any farther than he could throw them, which gave dwarves a decided advantage, except in provinces where dwarf tossing was made illegal."); output("%s`0 polishes a glass, holds it up to the light of the door as another patron opens it to stagger out into the street.", $barkeep); output("He then makes a face, spits on the glass and goes back to polishing it."); output("\"`%What d'ya want?`0\" he asks gruffly."); addnav_notl(sanitize($barkeep)); addnav("Bribe", "inn.php?op=bartender&act=bribe"); addnav("Drinks"); modulehook("ale", array()); } elseif ($act == "bribe") { $g1 = $session['user']['level'] * 10; $g2 = $session['user']['level'] * 50; $g3 = $session['user']['level'] * 100; $type = httpget('type'); if ($type == "") { output("While you know that you won't always get what you want, sometimes the way to a man's information is through your purse."); output("It's also always been said that more is better.`n`n"); output("How much would you like to offer him?"); addnav("1 gem", "inn.php?op=bartender&act=bribe&type=gem&amt=1"); addnav("2 gems", "inn.php?op=bartender&act=bribe&type=gem&amt=2"); addnav("3 gems", "inn.php?op=bartender&act=bribe&type=gem&amt=3"); addnav(array("%s gold", $g1), "inn.php?op=bartender&act=bribe&type=gold&amt={$g1}"); addnav(array("%s gold", $g2), "inn.php?op=bartender&act=bribe&type=gold&amt={$g2}"); addnav(array("%s gold", $g3), "inn.php?op=bartender&act=bribe&type=gold&amt={$g3}"); } else { $amt = httpget('amt'); if ($type == "gem") {