function iitems_dwelling_reconstructor_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "iitems-use-item":
            if ($args['player']['itemid'] == "dwelling_reconstructor") {
                require_once "modules/iitems/lib/lib.php";
                require_once "modules/staminasystem/lib/lib.php";
                iitems_give_item('toolbox_decorating');
                iitems_give_item('toolbox_carpentry');
                iitems_give_item('toolbox_masonry');
                addstamina(1.0E+27);
                set_module_pref("encounterchance", 0, "worldmapen");
                $session['user']['gems'] += 100;
                output("One octillion Stamina points added.  Toolboxes for masonry, carpentry and decorating added.  100 Cigarettes added.  World Map encounter rate reduced to zero.  Have fun with that.`n`n");
            }
            break;
    }
    return $args;
}
function iitems_worldmapdrop_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "iitems-show-inventory":
            //debug("Hook?");
            $drop = httpget('dropworldmap');
            if ($drop) {
                $squares = unserialize(get_module_setting("iitemsquares"));
                $ploc = get_module_pref("worldXYZ", "worldmapen");
                if (httpget('dropmapall')) {
                    $qty = iitems_discard_all_items(httpget('discard'));
                    output("`0You drop the items to your feet.  Maybe someone else will find a use for them.`n");
                } else {
                    iitems_discard_item(httpget('discard'));
                    $qty = 1;
                    output("`0You drop the item to your feet.  Maybe someone else will find a use for it.`n");
                }
                $squares[$ploc][$drop] += $qty;
                set_module_setting("iitemsquares", serialize($squares));
            }
            break;
        case "iitems-inventory":
            //debug($args);
            if ($args['master']['dropworldmap'] && httpget('from') == "worldnav") {
                rawoutput("<a href=\"runmodule.php?module=iitems&op=inventory&from=" . httpget('from') . "&dropworldmap=" . $args['player']['itemid'] . "&discard=" . $args['inventorykey'] . "\">Drop this item on the Map for someone else to pick up</a><br />");
                addnav("", "runmodule.php?module=iitems&op=inventory&from=" . httpget('from') . "&dropworldmap=" . $args['player']['itemid'] . "&discard=" . $args['inventorykey']);
                if ($args['player']['quantity'] > 1) {
                    rawoutput("<a href=\"runmodule.php?module=iitems&op=inventory&from=" . httpget('from') . "&dropworldmap=" . $args['player']['itemid'] . "&discard=" . $args['inventorykey'] . "&dropmapall=true\">Drop all of these items on the Map for someone else to pick up</a><br />");
                    addnav("", "runmodule.php?module=iitems&op=inventory&from=" . httpget('from') . "&dropworldmap=" . $args['player']['itemid'] . "&discard=" . $args['inventorykey'] . "&dropmapall=true");
                }
            }
            break;
        case "worldnav":
            $ploc = implode(",", $args);
            $squares = unserialize(get_module_setting("iitemsquares"));
            $itemid = httpget('iitem-pickup');
            if ($itemid) {
                require_once "modules/iitems/lib/lib.php";
                $itemdetails = iitems_get_item_details($itemid);
                //Pick up iitems
                if (httpget('alliitems')) {
                    //Pick up all iitems
                    output("`0You pick up the %s %s and put them in your backpack.`n", ${$squares}[$ploc][$itemid], $itemdetails['plural']);
                    for ($i = 0; $i < $squares[$ploc][$itemid]; $i++) {
                        iitems_give_item($itemid);
                    }
                    unset($squares[$ploc][$itemid]);
                } else {
                    //Pick up single iitem
                    if ($squares[$ploc][$itemid]) {
                        output("`0You pick up the %s and put it in your backpack.`n", $itemdetails['verbosename']);
                        iitems_give_item($itemid);
                        $squares[$ploc][$itemid]--;
                        if ($squares[$ploc][$itemid] === 0) {
                            unset($squares[$ploc][$itemid]);
                        }
                    } else {
                        output("`0You bend over to pick up the %s, but it's suddenly not there anymore!  Some crafty bastard has pinched it from right under your nose!`n", $itemdetails['verbosename']);
                    }
                }
                set_module_setting("iitemsquares", serialize($squares));
            }
            //Show iitems that can be picked up
            if (!is_array($squares)) {
                $squares = array();
                set_module_setting("iitemsquares", serialize($squares));
            }
            if (is_array($squares[$ploc])) {
                if (count($squares[$ploc])) {
                    //this square has something in it!
                    $iitems = $squares[$ploc];
                    addnav("Pick up items");
                    require_once "modules/iitems/lib/lib.php";
                    foreach ($iitems as $id => $qty) {
                        $item = iitems_get_item_details($id);
                        if ($qty < 1) {
                            unset($squares[$ploc][$id]);
                        }
                        $showwarn = 1;
                        addnav(array("Pick up %s", $item['verbosename']), "runmodule.php?module=worldmapen&op=continue&iitem-pickup=" . $id);
                        if ($qty > 1) {
                            output("`0There are %s %s here.`n`n", $qty, $item['plural']);
                            addnav(array("Pick up all %s", $item['plural']), "runmodule.php?module=worldmapen&op=continue&iitem-pickup=" . $id . "&alliitems=1");
                        } else {
                            if ($qty == 1) {
                                output("`0There is a %s here.`n`n", $item['verbosename']);
                            }
                        }
                    }
                    if ($showwarn && $session['user']['dragonkills'] < 1 && $session['user']['level'] < 10) {
                        output("`JLogs and stone are only really useful if you're building a Dwelling.  To build a Dwelling, you'll need a Land Claim stake from Improbable Central, which will set you back 100 Cigarettes.  If you're not building a Dwelling, then there's not much reason to pick them up (logs and stone are really heavy!).  This message will disappear once you've got a few more levels under your belt.`0`n");
                    }
                } else {
                    //this square is empty, unset it
                    unset($squares[$ploc]);
                    set_module_setting("iitemsquares", serialize($squares));
                }
            }
            break;
    }
    return $args;
}
function iitemcrates_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "donation":
            $amt = $args['amt'];
            $donationbonus = floor($args['amt'] / get_module_setting("donationaddition"));
            require_once "modules/iitems/lib/lib.php";
            $allitems = iitems_get_all_item_details();
            $items = array();
            $cratefind = array();
            foreach ($allitems as $localid => $data) {
                if ($data['cratefind']) {
                    $items[$localid] = $data;
                    for ($i = 0; $i < $data['cratefind']; $i++) {
                        $cratefind[] = $localid;
                    }
                }
            }
            $crates = unserialize(get_module_setting("crates"));
            for ($i = 0; $i < $donationbonus; $i++) {
                $crate = array();
                //set a random location
                $x = e_rand(1, get_module_setting("worldmapsizeX", "worldmapen"));
                $y = e_rand(1, get_module_setting("worldmapsizeY", "worldmapen"));
                $loc = array();
                $loc['x'] = $x;
                $loc['y'] = $y;
                $crate['loc'] = $loc;
                //set crate contents
                $numitems = e_rand(get_module_setting("minitems"), get_module_setting("maxitems"));
                for ($a = 0; $a < $numitems; $a++) {
                    $add = e_rand(1, count($cratefind));
                    $crate['contents'][] = $cratefind[$add - 1];
                }
                $crates[] = $crate;
            }
            set_module_setting("crates", serialize($crates));
            break;
        case "worldnav":
            $crates = unserialize(get_module_setting("crates"));
            //debug($crates);
            $ploc = get_module_pref("worldXYZ", "worldmapen");
            if (!is_array($crates)) {
                $crates = array();
            }
            foreach ($crates as $key => $vals) {
                if ($ploc == $vals['loc']['x'] . "," . $vals['loc']['y'] . ",1") {
                    require_once "modules/iitems/lib/lib.php";
                    output("`bYou found something!`b`nYou come across a wooden crate, with a small parachute attached.  You spend a few minutes prying it open.`n`n");
                    foreach ($vals['contents'] as $ckey => $content) {
                        $itemdetails = iitems_get_item_details($content);
                        output("You found a %s!`n", $itemdetails['verbosename']);
                        iitems_give_item($content);
                    }
                    increment_module_pref("cratesfound");
                    $found = get_module_pref("cratesfound");
                    if (is_module_active("medals")) {
                        if ($found > 250) {
                            require_once "modules/medals.php";
                            medals_award_medal("crate1000", "Supreme Crate Finder", "This player has found more than 1000 Supply Crates!", "medal_crategold.png");
                        }
                        if ($found > 50) {
                            require_once "modules/medals.php";
                            medals_award_medal("crate500", "Expert Crate Finder", "This player has found more than 500 Supply Crates!", "medal_cratesilver.png");
                        }
                        if ($found > 10) {
                            require_once "modules/medals.php";
                            medals_award_medal("crate100", "Supreme Crate Finder", "This player has found more than 100 Supply Crates!", "medal_cratebronze.png");
                        }
                    }
                    unset($crates[$key]);
                    set_module_setting("crates", serialize($crates));
                    modulehook("iitems_findcrate");
                    //Break operation - players cannot find more than one item crate in a single move.
                    break;
                }
            }
            break;
        case "newday-runonce":
            require_once "modules/iitems/lib/lib.php";
            $allitems = iitems_get_all_item_details();
            $items = array();
            $cratefind = array();
            foreach ($allitems as $localid => $data) {
                if ($data['cratefind']) {
                    $items[$localid] = $data;
                    for ($i = 0; $i < $data['cratefind']; $i++) {
                        $cratefind[] = $localid;
                    }
                }
            }
            $crates = unserialize(get_module_setting("crates"));
            for ($i = 0; $i < get_module_setting("dailyadditions"); $i++) {
                $crate = array();
                //set a random location
                $x = e_rand(1, get_module_setting("worldmapsizeX", "worldmapen"));
                $y = e_rand(1, get_module_setting("worldmapsizeY", "worldmapen"));
                $loc = array();
                $loc['x'] = $x;
                $loc['y'] = $y;
                $crate['loc'] = $loc;
                //set crate contents
                $numitems = e_rand(get_module_setting("minitems"), get_module_setting("maxitems"));
                for ($a = 0; $a < $numitems; $a++) {
                    $add = e_rand(1, count($cratefind));
                    $crate['contents'][] = $cratefind[$add - 1];
                }
                $crates[] = $crate;
            }
            set_module_setting("crates", serialize($crates));
            break;
    }
    return $args;
}
function iitems_mountaccessories_run()
{
    global $session;
    require_once "modules/iitems_mountaccessories/lib/lib.php";
    require_once "modules/iitems/lib/lib.php";
    $op = httpget('op');
    page_header("Mount Accessories");
    switch ($op) {
        case "browse":
            $text = array();
            $text['mountaccessores_starttext'] = "`0Merick directs you to a rack of accessories for your current Mount.`n`n\"Now, I have to be warnin' yer,\" says Merick, \"I'm quite happy to give yer a trade-in on any beasties ye might buy from me, but I don't be takin' no returns on the accessories.  There's nae market in pre-owned add-ons, y'see.\"`n`nHere are the accessories available for your Mount:`n`n";
            $text = modulehook("stabletext", $text);
            output("%s", $text['mountaccessories_starttext']);
            $mountid = $session['user']['hashorse'];
            $accs = iitems_mountaccessories_get_compatible_accessories($mountid);
            $playeraccs = iitems_mountaccessories_get_player_accessories();
            //debug($playeraccs);
            if (count($accs)) {
                //inventory-type display routine
                rawoutput("<table width=100% style='border: dotted 1px #000000;'>");
                $classcount = 0;
                foreach ($accs as $acc => $details) {
                    //debug($acc);
                    //debug($details);
                    $classcount++;
                    $class = $classcount % 2 ? "trdark" : "trlight";
                    rawoutput("<tr class='{$class}'><td>");
                    if ($details['image']) {
                        rawoutput("<table width=100% cellpadding=0 cellspacing=0><tr><td width=100px align=center><img src=\"images/iitems/" . $central['image'] . "\"></td><td>");
                    }
                    output("`b%s`b`n", stripslashes($details['verbosename']));
                    output("%s`n", stripslashes($details['description']));
                    if (is_module_active("iitems_weightandmass") && isset($details['weight'])) {
                        output("Weight: %s kg`n", $details['weight']);
                    }
                    output("`0Cost:`n");
                    if ($details['goldcost']) {
                        output("`0`b%s`b Requisition`n", $details['goldcost']);
                    }
                    if ($details['gemcost']) {
                        output("`0`b%s`b Cigarettes`n", $details['gemcost']);
                    }
                    //evaluate whether the player already has this accessory
                    if (!isset($playeraccs[$acc])) {
                        //evaluate whether the player can afford this accessory
                        if ($session['user']['gems'] >= $details['gemcost'] && $session['user']['gold'] >= $details['goldcost']) {
                            //purchase link
                            rawoutput("<a href=\"runmodule.php?module=iitems_mountaccessories&op=buy&acc={$acc}\">Purchase this Accessory</a><br />");
                            addnav("", "runmodule.php?module=iitems_mountaccessories&op=buy&acc={$acc}");
                        }
                    } else {
                        output("`0You already own this accessory.`n");
                    }
                    if ($details['image']) {
                        rawoutput("</td></tr></table>");
                    }
                    rawoutput("</td></tr>");
                }
                rawoutput("</table>");
            } else {
                output("`0There are no accessories available for your Mount.  Pah.`n`n");
            }
            addnav("Return to the Stables", "stables.php");
            break;
        case "buy":
            $acc = httpget("acc");
            iitems_give_item($acc);
            debug($acc);
            addnav("Return to the Stables", "stables.php");
            break;
    }
    page_footer();
    return true;
}
function iitems_superuser()
{
    global $session;
    $superop = httpget('superop');
    switch ($superop) {
        case "export":
            page_header("Export an IItem");
            $itemid = httpget("exportitemid");
            $sql = "SELECT id,localname,data FROM " . db_prefix("iitems") . " WHERE localname = '{$itemid}'";
            $result = db_query_cached($sql, "iitems-" . $localname);
            $row = db_fetch_assoc($result);
            $exportcode = $localname . "|BREAK|" . $data;
            rawoutput("<textarea>");
            rawoutput($exportcode);
            rawoutput("</textarea>");
            addnav("Back to the IItem Editor", "runmodule.php?module=iitems&op=superuser&superop=start");
            break;
        case "import":
            page_header("Import an IItem");
            $itemid = httpget("exportitemid");
            $sql = "SELECT id,localname,data FROM " . db_prefix("iitems") . " WHERE localname = '{$itemid}'";
            $result = db_query_cached($sql, "iitems-" . $localname);
            $row = db_fetch_assoc($result);
            $exportcode = $localname . "|BREAK|" . $data;
            rawoutput("<textarea>");
            rawoutput($exportcode);
            rawoutput("</textarea>");
            addnav("Back to the IItem Editor", "runmodule.php?module=iitems&op=superuser&superop=start");
            break;
        case "start":
            page_header("IItems");
            iitems_superuser_item_menu();
            addnav("Return to the Grotto", "superuser.php");
            addnav("Create a new Item", "runmodule.php?module=iitems&op=superuser&superop=create");
            break;
        case "give":
            page_header("Giving IItem");
            output("Giving the item.`n`n");
            $id = httpget('id');
            require_once "modules/iitems/lib/lib.php";
            $success = iitems_give_item($id);
            if (!$success) {
                output("Item could not be given.`n`n");
            } else {
                output("Item given successfully.`n`n");
            }
            iitems_superuser_item_menu();
            addnav("Back to the Item Editor", "runmodule.php?module=iitems&op=superuser&superop=start");
            break;
        case "edit":
            page_header("Editing Item");
            $id = httpget('id');
            if (httpget('subop') == "save") {
                $posted = httpallpost();
                debug($posted);
                $sarray = array();
                $prearray = array();
                foreach ($posted as $ele => $val) {
                    if (substr($ele, 0, 3) == "ele") {
                        $num = substr($ele, 3, 5);
                        // $sarray[$val]=$val;
                        $prearray[$num]['ele'] = $val;
                    } else {
                        if (substr($ele, 0, 3) == "val") {
                            $num = substr($ele, 3, 5);
                            $prearray[$num]['val'] = $val;
                        }
                    }
                }
                foreach ($prearray as $num => $vals) {
                    if ($vals['ele'] != "") {
                        $sarray[$vals['ele']] = $vals['val'];
                    }
                }
                debug($sarray);
                $data = serialize($sarray);
                $data = addslashes($data);
                $sql = "UPDATE " . db_prefix("iitems") . " SET data = '{$data}' WHERE id = {$id}";
                db_query($sql);
                output("Array has been reserialised and saved.");
            }
            $sql = "SELECT id,localname,data FROM " . db_prefix("iitems") . " WHERE id = {$id}";
            $result = db_query($sql);
            $row = db_fetch_assoc($result);
            debug($row['data']);
            $sarray = unserialize($row['data']);
            if (!is_array($sarray)) {
                $sarray = array();
            }
            output("`bEntries handled by IItems core:`b`n");
            output("`bverbosename`b (REQUIRED): A verbose name for the item that is shown to the player.`n");
            output("`btype`b (REQUIRED): normal, special or inventory.  A 'normal' item is a generic consumable item such as a grenade.  If a player has ten grenades, they will all do the same thing in the same way.  'special' items are disposable items that can have different stats assigned to them - a player might have five throwing knives, but some of them will be rustier than others.`nWhen giving a 'normal' item, the 'quantity' parameter in the player's Inventory array is increased by one for that item.  When giving a 'special' item, if an item of the same verbose name is present in the Inventory array, a fresh one is added with the name 'Verbose Name (x)', where 'x' is an incrementing number.`nWhere an item is given the 'inventory' type `iby an advanced admin`i, adding the item will give the player another Inventory in which to store things.  Use this for things like backpacks, bandoliers, saddle bags, quivers and so forth.`n");
            output("`bimage`b: Specify an image to use in the Inventory here.  All images are stored in images/iitems, so just give the filename.  Example: medkit.png (references yoursite.com/images/iitems/medkit.png)`n");
            output("`bdestroyafteruse`b: When set, the item will be destroyed after a single use.`n");
            output("`bdkpersist`b: When set, this item will be preserved in the player's Inventory across Dragon Kills.`n");
            output("`bdescription`b: Description of the item shown in the player's Inventory.`n");
            output("`busetext`b: Text shown when item is used.  Can be modified by a module when using an item if necessary.`n");
            output("`bdestroytext`b: Text shown when item is destroyed.`n");
            output("`buseatnewday`b: When true, iitem is automatically used at newday.  Useful for things that provide a buff each day.`n");
            output("`bcannotdiscard`b: When true, item cannot be discarded by the player.`n");
            output("`binventorylocation`b: Will place the item in the inventory specified (eg main (for bandolier), fight (for backpack)) upon giving the item.  When combined with an item type set to \"inventory,\" this determines the type of inventory (eg main or fight).  Setting this to \"mount\" has special handling.`n");
            output("`bvillagehooknav`b: When set, the item is usable from the player's Inventory link in the Village.`n");
            output("`bforesthooknav`b: When set, the item is usable from the player's Inventory link in the Forest.`n");
            output("`bworldnavhooknav`b: When set, the item is usable from the player's Inventory link on the World Map, if installed.`n");
            output("`bgoldcost`b: Cost in gold for whatever shop this item is available in.`n");
            output("`bgemcost`b: Cost in gems for whatever shop this item is available in.`n`n");
            output("`bHelp text supplied by other IItems support modules:`b`n");
            modulehook("iitems-superuser");
            output("`n`bInstructions:`b`nTo delete an entry, just blank the boxes.  You can use both single and double quotes in your values, but avoid doing so in your variable names.  Have fun!`n");
            rawoutput("<form action='runmodule.php?module=iitems&op=superuser&superop=edit&subop=save&id={$id}' method='POST'>");
            rawoutput("<table border='0' cellpadding='2' cellspacing='2'>");
            rawoutput("<tr><td>Variable Name</td><td>Value</td></tr>");
            $elementcount = 0;
            $valuecount = 0;
            foreach ($sarray as $element => $value) {
                $class = $elementcount % 2 ? "trlight" : "trdark";
                $elementcount++;
                $valuecount++;
                $element = stripslashes($element);
                $value = stripslashes($value);
                rawoutput("<tr class='{$class}'><td><input name=\"ele{$elementcount}\" value=\"{$element}\"></td><td><textarea class='input' name='val{$valuecount}' cols='20' rows='3'>{$value}</textarea></td></tr>");
            }
            rawoutput("</table>");
            output("`nNow add up to ten new parameters.  Parameters left blank will be ignored.  To add more, just save and you'll get another ten slots.");
            $extracount = $elementcount + 10;
            rawoutput("<table border='0' cellpadding='2' cellspacing='2'>");
            rawoutput("<tr><td>Variable Name</td><td>Value</td></tr>");
            for ($i = $elementcount; $i <= $extracount; $i++) {
                $class = $elementcount % 2 ? "trlight" : "trdark";
                $elementcount++;
                $valuecount++;
                rawoutput("<tr class='{$class}'><td><input name=\"ele{$elementcount}\" value=''></td><td><textarea class='input' name='val{$valuecount}' cols='20' rows='3'></textarea></td></tr>");
            }
            rawoutput("</table>");
            rawoutput("<input type='submit' class='button' value='" . translate_inline("Save") . "'");
            rawoutput("</form>");
            addnav("", "runmodule.php?module=iitems&op=superuser&superop=edit&subop=save&id={$id}");
            addnav("Item Editor Main Page", "runmodule.php?module=iitems&op=superuser&superop=start");
            addnav("Back to the Grotto", "superuser.php");
            break;
        case "create":
            page_header("Create a new Item");
            if (httpget('sub') == "insert") {
                $localname = httppost('localname');
                $sql = "INSERT INTO " . db_prefix("iitems") . " (localname,data) VALUES ('{$localname}','0')";
                db_query($sql);
                output("Item %s Created.`n`n", $localname);
                iitems_superuser_item_menu();
            } else {
                output("Enter a local ID for this item.  Keep it short, memorable, and absent of spaces or special characters.`n");
                rawoutput("<form action='runmodule.php?module=iitems&op=superuser&superop=create&sub=insert' method='POST'>");
                rawoutput("<input name='localname' value='localname'>");
                rawoutput("<input type='submit' class='button' value='" . translate_inline("Save") . "'");
                addnav("", "runmodule.php?module=iitems&op=superuser&superop=create&sub=insert");
            }
            addnav("Item Editor Main Page", "runmodule.php?module=iitems&op=superuser&superop=start");
            break;
        case "copy":
            page_header("Copying an Item");
            $original = httpget('id');
            output("This creates a copy of the previously-selected item, under a new itemid.`n`n");
            if (httpget('sub') == "copy") {
                $localname = httppost('localname');
                $sql = "SELECT data FROM " . db_prefix("iitems") . " WHERE id = {$original}";
                $result = db_query($sql);
                $row = db_fetch_assoc($result);
                $data = $row['data'];
                $data = addslashes($data);
                $sql = "INSERT INTO " . db_prefix("iitems") . " (localname,data) VALUES ('{$localname}','{$data}')";
                db_query($sql);
                output("Item %s Created.`n`n", $localname);
                iitems_superuser_item_menu();
            } else {
                output("Enter an itemid for this item.  Keep it short, memorable, and absent of spaces or special characters.`n");
                rawoutput("<form action='runmodule.php?module=iitems&op=superuser&superop=copy&sub=copy&id=" . $original . "' method='POST'>");
                rawoutput("<input name='localname' value='localname'>");
                rawoutput("<input type='submit' class='button' value='" . translate_inline("Save") . "'");
                addnav("", "runmodule.php?module=iitems&op=superuser&superop=copy&sub=copy&id=" . $original);
            }
            addnav("Item Editor Main Page", "runmodule.php?module=iitems&op=superuser&superop=start");
            break;
        case "delete":
            page_header("You sure about that?");
            $id = httpget('id');
            if (httpget('delete') == "delete") {
                $sql = "DELETE FROM " . db_prefix("iitems") . " WHERE id = '{$id}'";
                db_query($sql);
                output("The item in question has been fed to the Midgets.  I hope you really `iwere`i sure, 'cause it's gonna be a bastard to get it back.`n");
                addnav("Item Editor Main Page", "runmodule.php?module=iitems&op=superuser&superop=start");
                iitems_superuser_item_menu();
            } else {
                output("Now, are you really, really, `ireally`i sure you want to do that?  You're probably used to this sort of thing by now, but I'll still mention that there's no undo, and once an item is deleted it's `ideleted.`i  Like, forever.`n");
                addnav("Yes");
                addnav("Yes, I'm sure, get on with it", "runmodule.php?module=iitems&op=superuser&superop=delete&id=" . $id . "&delete=delete");
                addnav("No");
                addnav("No!  That's not what I wanted to do at all!", "runmodule.php?module=iitems&op=superuser&superop=start");
            }
            break;
    }
    page_footer();
    return true;
}