• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_module_objpref函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_module_objpref函数的典型用法代码示例。如果您正苦于以下问题:PHP get_module_objpref函数的具体用法?PHP get_module_objpref怎么用?PHP get_module_objpref使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_module_objpref函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: dwshacks_dohook

function dwshacks_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "dwellings-list-type":
            addnav("Show Only Types");
            addnav(array("%s", translate_inline(ucfirst(get_module_setting("dwnameplural", "dwshacks")))), "runmodule.php?module=dwellings&op=list&showonly=dwshacks&ref={$args['ref']}&sortby={$args['sortby']}&order={$args['order']}");
            break;
        case "dwellings-list-interact":
            if ($args['type'] == "dwshacks" && $args['status'] == 1 && get_module_setting("maxkeys") == 123456789) {
                addnav("", "runmodule.php?module=dwellings&op=enter&dwid={$args['dwid']}");
                $tress = translate_inline("Tresspass");
                rawoutput("<a href='runmodule.php?module=dwellings&op=enter&dwid={$args['dwid']}'>{$tress}</a>");
            }
            break;
        case "dwellings-manage":
            $dwid = $args['dwid'];
            if (get_module_setting("maxkeys") == 123456789 && $args['type'] == "dwshacks") {
                blocknav("runmodule.php?module=dwellings&op=keys&dwid={$dwid}");
            }
            break;
        case "dwellings":
            if (get_module_objpref("city", $args['cityid'], "showdwshacks")) {
                output("  Along the narrow pathway, precariously placed wood planks are nailed and leaning on each other in a fashion that only leaves you to assume they are supposed to be %s.`0", translate_inline(get_module_setting("dwnameplural")));
                if ($args['allowbuy'] == 1 && $session['user']['dragonkills'] >= get_module_setting("dkreq")) {
                    $cityid = $args['cityid'];
                    addnav("Options");
                    addnav(array("Establish a %s", translate_inline(ucfirst(get_module_setting("dwname", "dwshacks")))), "runmodule.php?module=dwellings&op=buy&type=dwshacks&subop=presetup&cityid={$cityid}");
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:34,代码来源:dwshacks.php


示例2: creatureaddon_run

function creatureaddon_run()
{
    global $session, $args;
    $op = httpget('op');
    $header = $args['creaturename'] . " Description";
    popup_header($header);
    $description = get_module_objpref("creatures", $args['creatureid'], "description");
    output($description);
    popup_footer();
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:10,代码来源:creatureaddon.php


示例3: iitems_eboy_gypsy_run

function iitems_eboy_gypsy_run()
{
    global $session;
    page_header("eBoy's Price Chart");
    require_once "modules/iitems/lib/lib.php";
    $cost = get_module_setting("cost", "iitems_eboy_gypsy");
    if ($cost == 1) {
        $p = "Cigarette";
    } else {
        $p = "Cigarettes";
    }
    if ($session['user']['gems'] >= $cost) {
        $session['user']['gems'] -= $cost;
        output("`5You hand over the %s and the old man chuckles.  \"`!Aaah, thank ye kindly.  Now, here we are!  I'd recommend you write these down.  Now mark my words - these prices fluctuate by the `iminute`i!  That eBoy, he's a crafty bastard, y'see.  He sells things for whatever people are willing to buy them for, and not one penny less!  Even if that means putting his prices up the `isecond`i someone buys something!`5\"`n`nHe reaches under his desk and brings up a clattering rectangular machine made out of wood and brass, about the size of a fat telephone directory.  A radio antenna protrudes from one corner.`n`nTrue to his word, the spinning reels show the prices of every commodity in every outpost.  You spend a few minutes studying the readout.`n`n", $p);
        $sql = "select * from " . db_prefix("cityprefs");
        $result = db_query($sql);
        for ($i = 0; $i < db_num_rows($result); $i++) {
            $row = db_fetch_assoc($result);
            $cid = $row['cityid'];
            $name = $row['cityname'];
            $eboy = unserialize(get_module_objpref("city", $cid, "eboytrades-intelligent", "iitems_eboy_intelligent"));
            output("`b`0%s`b`n", $name);
            rawoutput("<table border=0 cellpadding=3 cellspacing=2><tr class=\"trdark\"><td>Item</td><td>Buying at</td><td>Selling at</td><td>Stock</td></tr>");
            $classcount = 1;
            foreach ($eboy as $key => $details) {
                $itemdetails = iitems_get_item_details($key);
                if ($details['price'] < 10) {
                    $details['price'] = 10;
                }
                $eboy[$key]['price'] = $details['price'];
                if ($details['stock'] < 3) {
                    $buy = round($details['price'] * 0.5);
                } else {
                    $buy = round($details['price'] * 0.7);
                }
                $classcount++;
                $class = $classcount % 2 ? "trdark" : "trlight";
                $dname = $itemdetails['verbosename'];
                $dsell = number_format($details['price']);
                $dbuy = number_format($buy);
                $dstock = number_format($details['stock']);
                rawoutput("<tr class='{$class}'><td>{$dname}</td><td align=\"center\">{$dbuy}</td><td align=\"center\">{$dsell}</td><td align=\"center\">{$dstock}</td></tr>");
            }
            rawoutput("</table>");
            output("`n`n");
        }
    } else {
        output("`5You enthusiastically agree to the price, before realising that you don't actually have that many cigarettes.  Whoops.");
    }
    addnav("Leave");
    addnav("Return to the Outpost", "village.php");
    page_footer();
    return true;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:54,代码来源:iitems_eboy_gypsy.php


示例4: dwellingscostsp_dohook

function dwellingscostsp_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "dwellings-buy-valuecheck":
            $typeid = get_module_setting("typeid", $args['type']);
            $paidsp = abs((int) httppost('paidsp'));
            if ($paidsp < 0) {
                $paidsp = 0;
            }
            $pointsavailable = $session['user']['donation'] - $session['user']['donationspent'];
            if ($pointsavailable < $paidsp) {
                $args['allowpay'] = 0;
                blocknav("runmodule.php?module=dwellings&op=build&type=" . $args['type'] . "&dwid=" . $args['dwid'] . "");
                output("`nYou do not have that many site points.");
            } elseif ($paidsp > get_module_objpref("dwellingtypes", $typeid, "spcost") - get_module_objpref("dwellings", $args['dwid'], "spspent")) {
                $args['allowpay'] = 0;
                blocknav("runmodule.php?module=dwellings&op=build&type=" . $args['type'] . "&dwid=" . $args['dwid'] . "");
                output("`nYou have tried to spend more site points than you need to.");
            }
            break;
        case "dwellings-buy-setup":
            $typeid = get_module_setting("typeid", $args['type']);
            $paidsp = abs((int) httppost('paidsp'));
            if ($paidsp < 0) {
                $paidsp = 0;
            }
            $spent = get_module_objpref("dwellings", $args['dwid'], "spspent") + $paidsp;
            set_module_objpref("dwellings", $args['dwid'], "spspent", $spent);
            $session['user']['donationspent'] += $paidsp;
            if ($spent != get_module_objpref("dwellingtypes", $typeid, "spcost")) {
                $args['finished'] = 0;
            }
            break;
        case "dwellings-pay-costs":
            $typeid = get_module_setting("typeid", $args['type']);
            $costsp = get_module_objpref("dwellingtypes", $typeid, "spcost") - get_module_objpref("dwellings", $args['dwid'], "spspent");
            if ($costsp) {
                output("`#%s Site Points`0`n", $costsp);
            }
            break;
        case "dwellings-pay-input":
            $typeid = get_module_setting("typeid", $args['type']);
            $costsp = get_module_objpref("dwellingtypes", $typeid, "spcost") - get_module_objpref("dwellings", $args['dwid'], "spspent");
            $sp = translate_inline("Site Points");
            if ($costsp) {
                rawoutput("{$sp}: <input id='input' name='paidsp' width=5><br>");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:52,代码来源:dwellingscostsp.php


示例5: uniqueforests_dohook

function uniqueforests_dohook($hookname, $args)
{
    global $session;
    require_once "modules/cityprefs/lib.php";
    $cityid = get_cityprefs_cityid("location", $session['user']['location']);
    switch ($hookname) {
        case "collect-events":
            if (get_module_objpref("city", $cityid, "use")) {
                foreach ($args as $index => $event) {
                    $event['rawchance'] = 0;
                    $events[$index] = $event;
                }
                $args = $events;
            }
            break;
        case "village":
            if (get_module_objpref("city", $cityid, "use")) {
                addnav($args['gatenav']);
                $name = get_module_objpref("city", $cityid, "name");
                blocknav("forest.php");
                addnav(array("%s", $name), "forest.php?location=uniqueforests");
            }
            break;
        case "header-forest":
            if (httpget('location') == "uniqueforests" || get_module_objpref("city", $cityid, "use")) {
                if (httpget('op') == "") {
                    global $block_new_output;
                    $block_new_output = true;
                }
                blocknav("runmodule.php", true);
                blocknav("healer.php", true);
                tlschema("module-uniqueforests");
            }
            break;
        case "footer-forest":
            if (httpget('location') == "uniqueforests" || get_module_objpref("city", $cityid, "use")) {
                $name = get_module_objpref("city", $cityid, "name");
                page_header(color_sanitize($name));
            }
            break;
        case "forest-desc":
            if (httpget('location') == "uniqueforests" || get_module_objpref("city", $cityid, "use")) {
                page_header(color_sanitize($name));
                global $block_new_output;
                $block_new_output = false;
                output(get_module_objpref("city", $cityid, "desc"));
                $block_new_output = true;
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:52,代码来源:uniqueforests.php


示例6: buildinghitpoints_get_data

function buildinghitpoints_get_data($cid)
{
    //Grab all the data from a particular Outpost
    if (!is_numeric($cid)) {
        require_once "modules/cityprefs/lib.php";
        $cid = get_cityprefs_cityid($cid);
    }
    $data = get_module_objpref("city", $cid, "buildinghitpoints");
    $ret = array();
    $ret['data'] = @unserialize($data);
    $ret['cid'] = $cid;
    return $data;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:13,代码来源:buildinghitpoints.php


示例7: mountrarity_dohook

function mountrarity_dohook($hookname, $args)
{
    switch ($hookname) {
        case "newday-runonce":
            $sql = "SELECT mountid FROM " . db_prefix("mounts") . " WHERE mountactive=1";
            $result = db_query($sql);
            while ($row = db_fetch_assoc($result)) {
                $id = $row['mountid'];
                $rarity = get_module_objpref("mounts", $id, "rarity");
                if (e_rand(1, 100) > $rarity) {
                    set_module_objpref("mounts", $id, "unavailable", 1);
                } else {
                    // You need to reset the availability if it's not unavailable
                    // otherwise, it never becomes available again!
                    set_module_objpref("mounts", $id, "unavailable", 0);
                }
            }
            break;
        case "mountfeatures":
            $rarity = get_module_objpref("mounts", $args['id'], "rarity");
            $args['features']['Rarity'] = $rarity;
            break;
        case "stables-desc":
            if (get_module_setting("showout")) {
                $sql = "SELECT mountid, mountname FROM " . db_prefix("mounts") . " WHERE mountactive=1";
                $result = db_query($sql);
                output("`nA sign by the door proclaims that the following mounts are out of stock for today:");
                while ($row = db_fetch_assoc($result)) {
                    $out = get_module_objpref("mounts", $row['mountid'], "unavailable");
                    if ($out) {
                        output("`n%s", $row['mountname']);
                    }
                }
            } else {
                output("`nIf you don't see something you like today, perhaps you should check again tomorrow.");
            }
            break;
        case "stables-nav":
            $sql = "SELECT mountid FROM " . db_prefix("mounts") . " WHERE mountactive=1";
            $result = db_query($sql);
            while ($row = db_fetch_assoc($result)) {
                $id = $row['mountid'];
                $out = get_module_objpref("mounts", $id, "unavailable");
                if ($out) {
                    blocknav("stables.php?op=examine&id={$id}");
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:51,代码来源:mountrarity.php


示例8: clanbuffs_dohook

function clanbuffs_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "footer-hof":
            if (get_module_setting("hof")) {
                addnav("Warrior Rankings");
                addnav("Clan Buffs", "runmodule.php?module=clanbuffs&op=hof");
            }
            break;
        case "footer-clan":
            if ($session['user']['clanid'] != 0 and httpget("op") == "") {
                if ($session['user']['clanrank'] > 0) {
                    addnav("Clan Buffs", "runmodule.php?module=clanbuffs&op=enter");
                }
            }
            break;
        case "village":
        case "forest":
        case "clanhall":
            if (get_module_pref("refreshbuff")) {
                set_module_pref("refreshbuff", 0);
                include_once "modules/clanbuffs/clanbuffs_func.php";
                apply_clan_buff_for_one();
                output("`n`n`c`b`!Your clan's aura has been upgraded and refreshed!`0`b`c`n`n");
            }
            break;
        case "newday":
            if ($session['user']['clanid'] != 0 && $session['user']['clanrank'] > 0) {
                if (get_module_objpref("clans", $session['user']['clanid'], "buffactive") == 1) {
                    include_once "modules/clanbuffs/clanbuffs_func.php";
                    apply_clan_buff_for_one();
                    output("`n`^Your clan's aura protects you!`n");
                }
            }
            break;
        case "changesetting":
            if ($args['setting'] == "remakecost" && $args['module'] == "clanbuffs") {
                include_once "modules/clanbuffs/clanbuffs_func.php";
                remake_costs();
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:45,代码来源:clanbuffs.php


示例9: staminamounts_dohook

function staminamounts_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "boughtmount":
        case "soldmount":
        case "stamina-newday":
            require_once "modules/staminasystem/lib/lib.php";
            $currentmount = $session['user']['hashorse'];
            for ($i = 1; $i <= 10; $i++) {
                if (get_module_objpref("mounts", $currentmount, "buff" . $i . "name", "staminamounts") || get_module_objpref("mounts", $currentmount, "buff" . $i . "costmod", "staminamounts") || get_module_objpref("mounts", $currentmount, "buff" . $i . "expmod", "staminamounts")) {
                    apply_stamina_buff("mountbuff" . $i, array("name" => get_module_objpref("mounts", $currentmount, "buff" . $i . "name", "staminamounts"), "action" => get_module_objpref("mounts", $currentmount, "buff" . $i . "action", "staminamounts"), "class" => get_module_objpref("mounts", $currentmount, "buff" . $i . "class", "staminamounts"), "costmod" => get_module_objpref("mounts", $currentmount, "buff" . $i . "costmod", "staminamounts"), "expmod" => get_module_objpref("mounts", $currentmount, "buff" . $i . "expmod", "staminamounts"), "rounds" => get_module_objpref("mounts", $currentmount, "buff" . $i . "rounds", "staminamounts"), "roundmsg" => get_module_objpref("mounts", $currentmount, "buff" . $i . "roundmsg", "staminamounts"), "wearoffmsg" => get_module_objpref("mounts", $currentmount, "buff" . $i . "wearoffmsg", "staminamounts")));
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:18,代码来源:staminamounts.php


示例10: descriptioncheck_run

function descriptioncheck_run()
{
    global $session;
    page_header("Creature Descriptions Checker Thing");
    output("This handy page shows all creature descriptions, win messages, lose messages, and failboat/jungle status, complete with colour codes.`n`nPlease use this page sparingly, as it's kinda resource-intensive.  Ta!`n`n");
    $sql = "SELECT * FROM " . db_prefix("creatures") . " ORDER BY creaturelevel,creaturename";
    $result = db_query($sql);
    $n = db_num_rows($result);
    for ($i = 0; $i < $n; $i++) {
        $row = db_fetch_assoc($result);
        $desc = stripslashes(get_module_objpref("creatures", $row['creatureid'], "description", "creatureaddon"));
        if ($desc == "") {
            $desc = "No Description!";
        }
        output("`0`bCreature: %s | Weapon: %s | Level: %s | Jungle: %s | FailBoat: %s`nDescription:`b`n-----`n%s`n-----`n`n", $row['creaturename'], $row['creatureweapon'], $row['creaturelevel'], $row['forest'], $row['graveyard'], $desc);
    }
    addnav("Back to the Grotto", "superuser.php");
    page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:19,代码来源:descriptioncheck.php


示例11: additionalkeys_run

function additionalkeys_run()
{
    global $session;
    $dwid = httpget('dwid');
    $type = httpget('type');
    $typeid = get_module_setting("typeid", $type);
    $op = httpget('op');
    $points = get_module_objpref("dwellingtypes", $typeid, "keydonationcost", "additionalkeys");
    $gem = get_module_objpref("dwellingtypes", $typeid, "keygemcost", "additionalkeys");
    $gold = get_module_objpref("dwellingtypes", $typeid, "keygoldcost", "additionalkeys");
    $pointsavailable = $session['user']['donation'] - $session['user']['donationspent'];
    addnav("Navigation");
    addnav("Return to Management", "runmodule.php?module=dwellings&op=manage&dwid={$dwid}");
    page_header("Keymaker");
    switch ($op) {
        case "buykeys":
            $type = httpget('type');
            $typeid = get_module_setting("typeid", $type);
            output("`n`0You enter the smithy and wait at the desk until a dwarf appears. \"`2Soso, you would like to buy more keys?`0\" he asks you and you nod. ");
            output("Then he tells you that this will cost you `^%s gold, %s gems `0and `^%s donationpoints`0. \"`2Still interested?`0\"", $gold, $gem, $points);
            addnav("Keymaker");
            addnav("Yes", "runmodule.php?module=additionalkeys&op=yes&dwid={$dwid}&type={$type}");
            break;
        case "yes":
            $type = httpget('type');
            $typeid = get_module_setting("typeid", $type);
            if ($session['user']['gold'] < $gold || $session['user']['gems'] < $gem || $pointsavailable < $points) {
                output("`n`n\"`2Did I not just tell you what it costs to get an extra key? So why do you waste my precious time?!`0\" the keymaker yells at you. ");
                output("Embarassed you just nod, what is apparently you can do best und leave the keymakers office.");
            } else {
                $add = get_module_objpref("dwellings", $dwid, "addkeys", "additionalkeys");
                $add++;
                set_module_objpref("dwellings", $dwid, "addkeys", $add, "additionalkeys");
                $session['user']['donationspent'] += $points;
                $session['user']['gems'] -= $gem;
                $session['user']['gold'] -= $gold;
                output("`n`n`0It takes a moment as the dwarf finally wipes away the sweat and returns to the desk, where you are still waiting for your key. He hands it over to you and says, \"`2Think about it carefully, whom you like to give it.`0\"");
            }
            break;
    }
    page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:42,代码来源:additionalkeys.php


示例12: farmhouses_dohook

function farmhouses_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "dwellings-list-type":
            addnav("Show Only Types");
            addnav(array("%s", ucfirst(get_module_setting("dwnameplural", "farmhouses"))), "runmodule.php?module=dwellings&op=list&showonly=farmhouses&ref={$args['ref']}&sortby={$args['sortby']}&order={$args['order']}");
            break;
        case "dwellings":
            if (get_module_objpref("city", $args['cityid'], "showfarmhouses")) {
                output("  Off in the distance, you can see smoke rising from chimneys of a few %s.`0", get_module_setting("dwnameplural"));
                if ($args['allowbuy'] == 1 && $session['user']['dragonkills'] >= get_module_setting("dkreq")) {
                    $cityid = $args['cityid'];
                    addnav("Options");
                    addnav(array("Establish a %s", ucfirst(get_module_setting("dwname", "farmhouses"))), "runmodule.php?module=dwellings&op=buy&type=farmhouses&subop=presetup&cityid={$cityid}");
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:21,代码来源:farmhouses.php


示例13: dwcastles_dohook

function dwcastles_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "dwellings-list-type":
            addnav("Show Only Types");
            addnav(array("%s", ucfirst(translate_inline(get_module_setting("dwnameplural", "dwcastles")))), "runmodule.php?module=dwellings&op=list&showonly=dwcastles&ref={$args['ref']}&sortby={$args['sortby']}&order={$args['order']}");
            break;
        case "dwellings":
            if (get_module_objpref("city", $args['cityid'], "showdwcastles")) {
                output("  High on the far hills, you see waving flags of the glorious %s`0 of the rich and fabulous.", translate_inline(get_module_setting("dwnameplural")));
                if ($args['allowbuy'] == 1 && $session['user']['dragonkills'] >= get_module_setting("dkreq")) {
                    $cityid = $args['cityid'];
                    addnav("Options");
                    addnav(array("Establish a %s", ucfirst(translate_inline(get_module_setting("dwname", "dwcastles")))), "runmodule.php?module=dwellings&op=buy&type=dwcastles&subop=presetup&cityid={$cityid}");
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:21,代码来源:dwcastles.php


示例14: darkhorse_dohook

function darkhorse_dohook($hookname, $args)
{
    switch ($hookname) {
        case "moderate":
            $args['darkhorse'] = get_module_setting("tavernname");
            break;
        case "mountfeatures":
            $tavern = get_module_objpref("mounts", $args['id'], "findtavern");
            $args['features']['Darkhorse'] = $tavern;
            break;
        case "forest":
            if (darkhorse_tavernmount()) {
                // add the nav
                addnav("Other");
                $iname = get_module_setting("tavernname");
                require_once "lib/mountname.php";
                list($name, $lcname) = getmountname();
                addnav(array("D?Take %s`0 to %s", $lcname, $iname), "runmodule.php?module=darkhorse&op=enter");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:23,代码来源:darkhorse.php


示例15: round

             $goldvalue = round($paidgold * get_module_setting("valueper") / 100);
             $gemvalue = round($paidgems * get_module_setting("valueper") / 100);
             $sql = "INSERT INTO " . db_prefix("dwellings") . " (gold,gems,goldvalue,gemvalue,ownerid,type,location,status) VALUES ({$paidgold},{$paidgems},{$goldvalue},{$gemvalue}," . $session['user']['acctid'] . ",'{$type}','" . $session['user']['location'] . "',2)";
             $result = db_query($sql);
             // Now, here comes the trick... really nice one... No additional queries needed...
             //						$sql = "SELECT dwid FROM ".db_prefix("dwellings")." WHERE location='".$session['user']['location']."' AND ownerid=".$session['user']['acctid']." ORDER BY dwid DESC LIMIT 1";
             //						db_query($sql);
             //						$result = db_query($sql);
             //						$row = db_fetch_assoc($result);
             $dwid = db_insert_id($result);
             $finished = 1;
             $buyargs = modulehook("dwellings-buy-setup", array('type' => $type, 'dwid' => $dwid, 'finished' => $finished));
             $finished = $buyargs['finished'];
             if ($paidgold == $costgold && $paidgems == $costgems && $finished == 1) {
                 output("You have paid for your dwelling in full!");
                 if (get_module_objpref("dwelling", $dwid, "buildturns") <= get_module_setting("turncost", $type)) {
                     output("Now it's time to build it!");
                     $status = 3;
                     addnav(array("Build your %s", $dwname), "runmodule.php?module=dwellings&op=build&type={$type}&dwid={$dwid}");
                 } else {
                     $status = 1;
                     addnav(array("Enter your %s", $dwname), "runmodule.php?module=dwellings&op=enter&type={$type}&dwid={$dwid}");
                 }
                 $sql = "UPDATE " . db_prefix("dwellings") . " SET status={$status} WHERE dwid={$dwid}";
                 db_query($sql);
             } else {
                 output("`@You are now one step closer to finishing the payments on your %s`@.", $dwname);
             }
         }
     }
 }
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:case_buy.php


示例16: date

    $loggedin = date("U") - strtotime($row['laston']) < getsetting("LOGINTIMEOUT", 900) && $row['loggedin'];
    output_notl("`&%s`0", $row['location']);
    if ($loggedin) {
        output_notl("%s", $online);
    }
    rawoutput("</td><td>");
    output_notl("%s", translate_inline($row['race'], "race"));
    rawoutput("</td><td>");
    $sex = translate_inline($row['sex'] ? "`%Female`0" : "`!Male`0");
    output_notl("%s", $sex);
    rawoutput("</td><td>");
    //$sql = "SELECT name FROM ".db_prefix("accounts")." WHERE acctid='".$row['marriedto']."' AND locked=0";
    //$res = db_fetch_assoc(db_query($sql));
    //output_notl("%s",$res['name']);
    output_notl("%s", $row['partnername']);
    rawoutput("</td><td>");
    $reg = get_module_objpref("marriage", $row['acctid'], "marriagedate");
    if ($reg == "0000-00-00 00:00:00" || $reg == 0) {
        $reg = $unlogged;
    }
    output_notl("%s", $reg);
    rawoutput("</td></tr>");
}
rawoutput("</table>");
output_notl("`n");
$search = translate_inline("Search by name: ");
$search2 = translate_inline("Search");
rawoutput("<form action='runmodule.php?module=marriage&op=newlyweds&action=search' method='POST'>{$search}<input name='name'><input type='submit' class='button' value='{$search2}'></form>");
addnav("", "runmodule.php?module=marriage&op=newlyweds&action=search");
output_notl("`c");
page_footer();
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:newlyweds.php


示例17: improbablestufftrading_run

function improbablestufftrading_run()
{
    global $session;
    $op = httpget("op");
    //city prefs
    //God this is gonna be a mess, would be much better with a serialized item system, perhaps for S3...
    require_once "modules/cityprefs/lib.php";
    $cityid = get_cityprefs_cityid("location", $session['user']['location']);
    $smallmedkitcurrent = get_module_objpref("city", $cityid, "smallmedkit-current");
    $smallmedkitmax = get_module_objpref("city", $cityid, "smallmedkit-max");
    $smallmedkitmin = get_module_objpref("city", $cityid, "smallmedkit-min");
    $smallmedkitbuypct = get_module_objpref("city", $cityid, "smallmedkit-buypct");
    $smallmedkitbuy = round($smallmedkitcurrent / 100 * $smallmedkitbuypct);
    $smallmedkitavail = get_module_objpref("city", $cityid, "smallmedkit-avail");
    $largemedkitcurrent = get_module_objpref("city", $cityid, "largemedkit-current");
    $largemedkitmax = get_module_objpref("city", $cityid, "largemedkit-max");
    $largemedkitmin = get_module_objpref("city", $cityid, "largemedkit-min");
    $largemedkitbuypct = get_module_objpref("city", $cityid, "largemedkit-buypct");
    $largemedkitbuy = round($largemedkitcurrent / 100 * $largemedkitbuypct);
    $largemedkitavail = get_module_objpref("city", $cityid, "largemedkit-avail");
    $energydrinkcurrent = get_module_objpref("city", $cityid, "energydrink-current");
    $energydrinkmax = get_module_objpref("city", $cityid, "energydrink-max");
    $energydrinkmin = get_module_objpref("city", $cityid, "energydrink-min");
    $energydrinkbuypct = get_module_objpref("city", $cityid, "energydrink-buypct");
    $energydrinkbuy = round($energydrinkcurrent / 100 * $energydrinkbuypct);
    $energydrinkavail = get_module_objpref("city", $cityid, "energydrink-avail");
    $nicotinegumcurrent = get_module_objpref("city", $cityid, "nicotinegum-current");
    $nicotinegummax = get_module_objpref("city", $cityid, "nicotinegum-max");
    $nicotinegummin = get_module_objpref("city", $cityid, "nicotinegum-min");
    $nicotinegumbuypct = get_module_objpref("city", $cityid, "nicotinegum-buypct");
    $nicotinegumbuy = round($nicotinegumcurrent / 100 * $nicotinegumbuypct);
    $nicotinegumavail = get_module_objpref("city", $cityid, "nicotinegum-avail");
    $powerpillcurrent = get_module_objpref("city", $cityid, "powerpill-current");
    $powerpillmax = get_module_objpref("city", $cityid, "powerpill-max");
    $powerpillmin = get_module_objpref("city", $cityid, "powerpill-min");
    $powerpillbuypct = get_module_objpref("city", $cityid, "powerpill-buypct");
    $powerpillbuy = round($powerpillcurrent / 100 * $powerpillbuypct);
    $powerpillavail = get_module_objpref("city", $cityid, "powerpill-avail");
    $teleportercurrent = get_module_objpref("city", $cityid, "teleporter-current");
    $teleportermax = get_module_objpref("city", $cityid, "teleporter-max");
    $teleportermin = get_module_objpref("city", $cityid, "teleporter-min");
    $teleporterbuypct = get_module_objpref("city", $cityid, "teleporter-buypct");
    $teleporterbuy = round($teleportercurrent / 100 * $teleporterbuypct);
    $teleporteravail = get_module_objpref("city", $cityid, "teleporter-avail");
    $banggrenadecurrent = get_module_objpref("city", $cityid, "banggrenade-current");
    $banggrenademax = get_module_objpref("city", $cityid, "banggrenade-max");
    $banggrenademin = get_module_objpref("city", $cityid, "banggrenade-min");
    $banggrenadebuypct = get_module_objpref("city", $cityid, "banggrenade-buypct");
    $banggrenadebuy = round($banggrenadecurrent / 100 * $banggrenadebuypct);
    $banggrenadeavail = get_module_objpref("city", $cityid, "banggrenade-avail");
    $whoomphgrenadecurrent = get_module_objpref("city", $cityid, "whoomphgrenade-current");
    $whoomphgrenademax = get_module_objpref("city", $cityid, "whoomphgrenade-max");
    $whoomphgrenademin = get_module_objpref("city", $cityid, "whoomphgrenade-min");
    $whoomphgrenadebuypct = get_module_objpref("city", $cityid, "whoomphgrenade-buypct");
    $whoomphgrenadebuy = round($whoomphgrenadecurrent / 100 * $whoomphgrenadebuypct);
    $whoomphgrenadeavail = get_module_objpref("city", $cityid, "whoomphgrenade-avail");
    $zapgrenadecurrent = get_module_objpref("city", $cityid, "zapgrenade-current");
    $zapgrenademax = get_module_objpref("city", $cityid, "zapgrenade-max");
    $zapgrenademin = get_module_objpref("city", $cityid, "zapgrenade-min");
    $zapgrenadebuypct = get_module_objpref("city", $cityid, "zapgrenade-buypct");
    $zapgrenadebuy = round($zapgrenadecurrent / 100 * $zapgrenadebuypct);
    $zapgrenadeavail = get_module_objpref("city", $cityid, "zapgrenade-avail");
    $repellentspraycurrent = get_module_objpref("city", $cityid, "repellentspray-current");
    $repellentspraymax = get_module_objpref("city", $cityid, "repellentspray-max");
    $repellentspraymin = get_module_objpref("city", $cityid, "repellentspray-min");
    $repellentspraybuypct = get_module_objpref("city", $cityid, "repellentspray-buypct");
    $repellentspraybuy = round($repellentspraycurrent / 100 * $repellentspraybuypct);
    $repellentsprayavail = get_module_objpref("city", $cityid, "repellentspray-avail");
    $rationpackcurrent = get_module_objpref("city", $cityid, "rationpack-current");
    $rationpackmax = get_module_objpref("city", $cityid, "rationpack-max");
    $rationpackmin = get_module_objpref("city", $cityid, "rationpack-min");
    $rationpackbuypct = get_module_objpref("city", $cityid, "rationpack-buypct");
    $rationpackbuy = round($rationpackcurrent / 100 * $rationpackbuypct);
    $rationpackavail = get_module_objpref("city", $cityid, "rationpack-avail");
    $improbabilitybombcurrent = get_module_objpref("city", $cityid, "improbabilitybomb-current");
    $improbabilitybombmax = get_module_objpref("city", $cityid, "improbabilitybomb-max");
    $improbabilitybombmin = get_module_objpref("city", $cityid, "improbabilitybomb-min");
    $improbabilitybombbuypct = get_module_objpref("city", $cityid, "improbabilitybomb-buypct");
    $improbabilitybombbuy = round($improbabilitybombcurrent / 100 * $improbabilitybombbuypct);
    $improbabilitybombavail = get_module_objpref("city", $cityid, "improbabilitybomb-avail");
    $kittencardcurrent = get_module_objpref("city", $cityid, "kittencard-current");
    $kittencardmax = get_module_objpref("city", $cityid, "kittencard-max");
    $kittencardmin = get_module_objpref("city", $cityid, "kittencard-min");
    $kittencardbuypct = get_module_objpref("city", $cityid, "kittencard-buypct");
    $kittencardbuy = round($kittencardcurrent / 100 * $kittencardbuypct);
    $kittencardavail = get_module_objpref("city", $cityid, "kittencard-avail");
    $bribe = get_module_objpref("city", $cityid, "bribe");
    $acceptingbribes = get_module_objpref("city", $cityid, "acceptingbribes");
    page_header("eBoy's Trading Station");
    switch (httpget("op")) {
        case "start":
            output("Already fearing the worst, you head into eBoy's Trading Station.`n`nYour fears are well-founded.  The place is packed with the heaving, sweaty bodies of the hardcore capitalist, shouting \"`iBuy, buy!`i\" and \"`iSell, sell!`i\" and \"`iPut down the chainsaw and let's talk about this!`i\"`n`neBoy himself - although you suspect that this place 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_module_path函数代码示例发布时间:2022-05-15
下一篇:
PHP get_module_metadata函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap