当前位置: 首页>>代码示例>>PHP>>正文


PHP httppost函数代码示例

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


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

示例1: friendlist_search

function friendlist_search()
{
    global $session;
    $n = httppost("n");
    rawoutput("<form action='runmodule.php?module=friendlist&op=search' method='POST'>");
    addnav("", "runmodule.php?module=friendlist&op=search");
    if ($n != "") {
        $string = "%";
        for ($x = 0; $x < strlen($n); $x++) {
            $string .= substr($n, $x, 1) . "%";
        }
        $sql = "SELECT name,dragonkills,acctid FROM " . db_prefix("accounts") . " WHERE name LIKE '%{$string}%' AND acctid<>" . $session['user']['acctid'] . " AND locked=0 ORDER BY level,dragonkills";
        $result = db_query($sql);
        if (db_num_rows($result) > 0) {
            $ignored = rexplode(get_module_pref('ignored'));
            $friends = rexplode(get_module_pref('friends'));
            $request = rexplode(get_module_pref('request'));
            $iveignored = rexplode(get_module_pref('iveignored'));
            output("`@These users were found:`n");
            rawoutput("<table style='width:60%;text-align:center;' cellpadding='3' cellspacing='0' border='0'>");
            rawoutput("<tr class='trhead'><td>" . translate_inline("Name") . "</td><td>" . translate_inline("Operations") . "</td></tr>");
            for ($i = 0; $i < db_num_rows($result); $i++) {
                $row = db_fetch_assoc($result);
                rawoutput("<tr class='" . ($i % 2 ? "trlight" : "trdark") . "'><td>");
                output_notl($row['name']);
                rawoutput("</td><td>");
                if (in_array($row['acctid'], $ignored)) {
                    $info = translate_inline("This user has ignored you.");
                    $info .= " [<a href='runmodule.php?module=friendlist&op=ignore&ac=" . $row['acctid'] . "' class='colDkGreen'>" . translate_inline("Ignore") . "</a>]";
                    addnav("", "runmodule.php?module=friendlist&op=ignore&ac=" . $row['acctid']);
                } elseif (in_array($row['acctid'], $friends)) {
                    $info = translate_inline("This user is already in your list.");
                } elseif (in_array($row['acctid'], $request)) {
                    $info = translate_inline("This user has already requested to you.");
                } else {
                    if (in_array($row['acctid'], $iveignored)) {
                        $info = "[<a href='runmodule.php?module=friendlist&op=unignore&ac=" . $row['acctid'] . "' class='colLtRed'>" . translate_inline("Unignore") . "</a>]";
                        addnav("", "runmodule.php?module=friendlist&op=unignore&ac=" . $row['acctid']);
                    } else {
                        $info = "[<a href='runmodule.php?module=friendlist&op=ignore&ac=" . $row['acctid'] . "' class='colDkGreen'>" . translate_inline("Ignore") . "</a>]";
                        addnav("", "runmodule.php?module=friendlist&op=ignore&ac=" . $row['acctid']);
                        $info .= " - [<a href='runmodule.php?module=friendlist&op=request&ac=" . $row['acctid'] . "' class='colDkGreen'>" . translate_inline("Request") . "</a>]";
                        addnav("", "runmodule.php?module=friendlist&op=request&ac=" . $row['acctid']);
                    }
                }
                rawoutput("{$info}</td></tr>");
            }
            rawoutput("</table>");
        } else {
            output("`c`@`bA user was not found with that name.`b`c");
        }
        output_notl("`n");
    }
    output("`^`b`cFriend Search...`c`b");
    output("`n`nWho do you want to search for?");
    output("`n`nName of user: ");
    rawoutput("<input name='n' maxlength='50' value=\"" . htmlentities(stripslashes(httppost('n'))) . "\">");
    $apply = translate_inline("Search");
    rawoutput("<input type='submit' class='button' value='{$apply}'></form>");
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:60,代码来源:friendlist_search.php

示例2: hunterslodge_customarmour_run

function hunterslodge_customarmour_run()
{
    require_once "lib/sanitize.php";
    require_once "lib/names.php";
    global $session;
    $op = httpget("op");
    $free = httpget("free");
    page_header("Choose your Custom Armour");
    switch ($op) {
        case "change":
            output("Want to change your Custom Armour?  No problem.  Enter your desired armour in the box below.  You've got 25 characters to play around with.`n(leave this blank to disable custom armour naming and return to default, game-supplied armour names)`n`n");
            rawoutput("<form action='runmodule.php?module=hunterslodge_customarmour&op=confirm&free=" . $free . "' method='POST'>");
            $armour = get_module_pref("customarmour");
            rawoutput("<input id='input' name='newarmour' width='25' maxlength='25' value='" . htmlentities($armour, ENT_COMPAT, getsetting("charset", "ISO-8859-1")) . "'>");
            rawoutput("<input type='submit' class='button' value='Preview'>");
            rawoutput("</form>");
            addnav("", "runmodule.php?module=hunterslodge_customarmour&op=confirm&free=" . $free);
            addnav("Cancel");
            addnav("Don't set custom armour, just go back to the Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
        case "confirm":
            $newarmour = httppost("newarmour");
            $sub = httpget("sub");
            $newarmour = str_replace("`", "", $newarmour);
            $newarmour = comment_sanitize($newarmour);
            $newarmour = substr($newarmour, 0, 25);
            if ($newarmour) {
                output("Your new custom armour is:`n%s`nWould you like to set your new armour now?`n`n", $newarmour);
            } else {
                output("You've chosen to go back to the default, game-supplied armours.  Are you sure that's what you want?`n`n");
            }
            addnav("Confirm");
            addnav("Set custom armour", "runmodule.php?module=hunterslodge_customarmour&op=set&free={$free}&newarmour=" . rawurlencode($newarmour));
            addnav("Cancel");
            addnav("Don't set custom armour, just go back to the Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
        case "set":
            $newarmour = rawurldecode(httpget("newarmour"));
            if ($newarmour == "") {
                output("Your custom armour name has been removed.  The next time you change your armour, you'll return to game-supplied armour names.`n`n");
            } else {
                output("Your custom armour has been set to %s!`n`n", $newarmour);
                $session['user']['armor'] = $newarmour;
            }
            set_module_pref("customarmour", $newarmour);
            if (!$free) {
                require_once "modules/iitems/lib/lib.php";
                $id = has_item("hunterslodge_customarmour");
                delete_item($id);
            }
            addnav("Return");
            addnav("Return to the Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
    }
    page_footer();
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:56,代码来源:hunterslodge_customarmour.php

示例3: 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

示例4: hunterslodge_customtitle_run

function hunterslodge_customtitle_run()
{
    require_once "lib/sanitize.php";
    require_once "lib/names.php";
    global $session;
    $op = httpget("op");
    $free = httpget("free");
    page_header("Choose your Custom Title");
    switch ($op) {
        case "change":
            output("Ready to change your Title?  No problem.  Enter your desired Title in the box below.  You've got 25 characters to play with, including colour codes.`n`n");
            titlechange_form();
            addnav("Cancel");
            addnav("Don't change colours, just go back to the Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
        case "confirm":
            $ntitle = rawurldecode(httppost('newname'));
            $ntitle = newline_sanitize($ntitle);
            if ($ntitle == "") {
                $ntitle = "`0";
            }
            $ntitle = preg_replace("/[`][cHw]/", "", $ntitle);
            $ntitle = sanitize_html($ntitle);
            $nname = get_player_basename();
            output("`0Your new title will look like this: %s`0`n", $ntitle);
            output("`0Your entire name will look like: %s %s`0`n`n", $ntitle, $nname);
            output("Do you want to set the new title now?`n`n");
            output("`0Try a different title below, if you like.`n`n");
            titlechange_form();
            addnav("Confirm");
            addnav("Set the new Title", "runmodule.php?module=hunterslodge_customtitle&op=set&free={$free}&newname=" . rawurlencode($ntitle));
            addnav("Cancel");
            addnav("Don't change your Title, just go back to the Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
        case "set":
            $ntitle = rawurldecode(httpget('newname'));
            $fromname = $session['user']['name'];
            $newname = change_player_ctitle($ntitle);
            $session['user']['ctitle'] = $ntitle;
            $session['user']['name'] = $newname;
            output("You are now known as %s!`0`n`n", $session['user']['name']);
            if (!$free) {
                $id = has_item("hunterslodge_customtitle");
                delete_item($id);
            }
            addnav("Return");
            addnav("Return to the Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
    }
    page_footer();
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:51,代码来源:hunterslodge_customtitle.php

示例5: addcommentary

function addcommentary()
{
    global $session, $emptypost;
    $info = httpallpost();
    unset($info['section']);
    unset($info['talkline']);
    unset($info['schema']);
    unset($info['insertcommentary']);
    unset($info['counter']);
    unset($info['removecomment']);
    $section = httppost('section');
    $talkline = httppost('talkline');
    $schema = httppost('schema');
    $comment = trim(httppost('insertcommentary'));
    $counter = httppost('counter');
    $remove = URLDecode(httpget('removecomment'));
    if ($remove > 0) {
        $return = '/' . httpget('returnpath');
        $section = httpget('section');
        $sql = "SELECT " . db_prefix("commentary") . ".*," . db_prefix("accounts") . ".name," . db_prefix("accounts") . ".acctid, " . db_prefix("accounts") . ".clanrank," . db_prefix("clans") . ".clanshort FROM " . db_prefix("commentary") . " INNER JOIN " . db_prefix("accounts") . " ON " . db_prefix("accounts") . ".acctid = " . db_prefix("commentary") . ".author LEFT JOIN " . db_prefix("clans") . " ON " . db_prefix("clans") . ".clanid=" . db_prefix("accounts") . ".clanid WHERE commentid={$remove}";
        $row = db_fetch_assoc(db_query($sql));
        $sql = "INSERT LOW_PRIORITY INTO " . db_prefix("moderatedcomments") . " (moderator,moddate,comment) VALUES ('{$session['user']['acctid']}','" . date("Y-m-d H:i:s") . "','" . addslashes(serialize($row)) . "')";
        db_query($sql);
        $sql = "DELETE FROM " . db_prefix("commentary") . " WHERE commentid='{$remove}';";
        db_query($sql);
        invalidatedatacache("comments-{$section}");
        // *** DRAGONBG.COM CORE PATCH START ***
        invalidatedatacache("comments-");
        // *** DRAGONBG.COM CORE PATCH END ***
        $session['user']['specialinc'] == '';
        //just to make sure he was not in a special
        $return = cmd_sanitize($return);
        $return = substr($return, strrpos($return, "/") + 1);
        if (strpos($return, "?") === false && strpos($return, "&") !== false) {
            $x = strpos($return, "&");
            $return = substr($return, 0, $x - 1) . "?" . substr($return, $x + 1);
        }
        debug($return);
        redirect($return);
    }
    if (array_key_exists('commentcounter', $session) && $session['commentcounter'] == $counter) {
        if ($section || $talkline || $comment) {
            $tcom = color_sanitize($comment);
            if ($tcom == "" || $tcom == ":" || $tcom == "::" || $tcom == "/me") {
                $emptypost = 1;
            } else {
                injectcommentary($section, $talkline, $comment, $schema);
            }
        }
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:51,代码来源:newcommentary.php

示例6: settings_dohook

function settings_dohook($hook, $args)
{
    switch ($hook) {
        case 'footer-news':
        case 'village':
            if ($hook == 'village') {
                addnav($args['othernav']);
            } else {
                addnav('News');
            }
            addnav('*?Settings*', 'runmodule.php?module=settings');
            blocknav('prefs.php');
            break;
        case 'footer-modules':
            if (httpget('cat') != '' && httpget('module') != '' || is_array(httppost('module'))) {
                $userprefs = db_prefix('module_userprefs');
                $modules = db_prefix('modules');
                $sql = db_query("SELECT DISTINCT m.modulename AS fallback,\n                    mu.modulename, mu.setting, m.formalname\n                    FROM {$modules} AS m\n                    LEFT JOIN {$userprefs} AS mu ON m.modulename = mu.modulename\n                    WHERE (setting LIKE 'user_%' OR m.infokeys LIKE '%|prefs|%')");
                $fill = [];
                $rewrite = json_decode(get_module_setting('rewrite'), true);
                while ($row = db_fetch_assoc($sql)) {
                    if ($row['setting'] != '' && strpos($row['setting'], 'user_') !== false) {
                        $structuredKey = "{$row['modulename']}__{$row['setting']}";
                        if ($rewrite[$structuredKey] != $row['formalname']) {
                            $fill[$structuredKey] = $rewrite[$structuredKey];
                        } else {
                            $fill[$structuredKey] = $row['formalname'];
                        }
                    } else {
                        $possibleKeys = get_module_info($row['fallback'])['prefs'];
                        foreach ($possibleKeys as $key => $val) {
                            if (strpos($key, 'user_') !== false) {
                                $structuredKey = "{$row['fallback']}__{$key}";
                                if ($rewrite[$structuredKey] != $row['formalname'] && $rewrite[$structuredKey] != '') {
                                    $fill[$structuredKey] = $rewrite[$structuredKey];
                                } else {
                                    $fill[$structuredKey] = $row['formalname'];
                                }
                            }
                        }
                    }
                }
                if ($fill != $rewrite) {
                    set_module_setting('rewrite', json_encode($fill));
                    output("`QUpdating the 'Settings' module rewrite conditions...");
                }
            }
            break;
    }
    return $args;
}
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:51,代码来源:settings.php

示例7: translationwizard_run

function translationwizard_run()
{
    global $session, $logd_version, $coding;
    check_su_access(SU_IS_TRANSLATOR);
    //check again Superuser Access
    $op = httpget('op');
    page_header("Translation Wizard");
    //get some standards
    $languageschema = get_module_pref("language", "translationwizard");
    //these lines grabbed the local scheme, in 1.1.0 there is a setting for it
    $coding = getsetting("charset", "ISO-8859-1");
    $viewsimple = get_module_pref("view", "translationwizard");
    $mode = httpget('mode');
    $namespace = httppost('ns');
    $from = httpget('from');
    $page = get_module_setting(page);
    if (httpget('ns') != "" && $namespace == "") {
        $namespace = httpget('ns');
    }
    //if there is no post then there is maybe something to get
    $trans = httppost("transtext");
    if (is_array($trans)) {
        $transintext = $trans;
    } else {
        if ($trans) {
            $transintext = array($trans);
        } else {
            $transintext = array();
        }
    }
    $trans = httppost("transtextout");
    if (is_array($trans)) {
        $transouttext = $trans;
    } else {
        if ($trans) {
            $transouttext = array($trans);
        } else {
            $transouttext = array();
        }
    }
    //end of the header
    if ($op == "") {
        $op = "default";
    }
    require "./modules/translationwizard/errorhandler.php";
    require "./modules/translationwizard/{$op}.php";
    require_once "lib/superusernav.php";
    superusernav();
    require "./modules/translationwizard/build_nav.php";
    page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:51,代码来源:translationwizard.php

示例8: clanform

function clanform()
{
    rawoutput("<form action='clan.php?op=new&apply=1' method='POST'>");
    addnav("", "clan.php?op=new&apply=1");
    output("`b`cNew Clan Application Form`c`b");
    output("Clan Name: ");
    rawoutput("<input name='clanname' maxlength='50' value=\"" . htmlentities(stripslashes(httppost('clanname')), ENT_COMPAT, getsetting("charset", "ISO-8859-1")) . "\">");
    output("`nShort Name: ");
    rawoutput("<input name='clanshort' maxlength='5' size='5' value=\"" . htmlentities(stripslashes(httppost('clanshort')), ENT_COMPAT, getsetting("charset", "ISO-8859-1")) . "\">");
    output("`nNote, color codes are permitted in neither clan names nor short names.");
    output("The clan name is shown on player bios and on clan overview pages while the short name is displayed next to players' names in comment areas and such.`n");
    $apply = translate_inline("Apply");
    rawoutput("<input type='submit' class='button' value='{$apply}'></form>");
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:14,代码来源:clan.php

示例9: hunterslodge_namedmount_run

function hunterslodge_namedmount_run()
{
    require_once "lib/sanitize.php";
    require_once "lib/names.php";
    global $session;
    global $playermount;
    $op = httpget("op");
    $free = httpget("free");
    page_header("Name your Mount");
    switch ($op) {
        case "change":
            output("Want to change your Mount's name?  No problem.  Enter your desired name in the box below.  You've got 25 characters to play around with.`n(leave this blank to disable mount naming)`n`n");
            rawoutput("<form action='runmodule.php?module=hunterslodge_namedmount&op=confirm&free=" . $free . "' method='POST'>");
            rawoutput("<input id='input' name='newname' width='25' maxlength='25' value='" . htmlentities($race, ENT_COMPAT, getsetting("charset", "ISO-8859-1")) . "'>");
            rawoutput("<input type='submit' class='button' value='Preview'>");
            rawoutput("</form>");
            addnav("", "runmodule.php?module=hunterslodge_namedmount&op=confirm&free=" . $free);
            addnav("Cancel");
            addnav("Don't set a mount name, just go back to the Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
        case "confirm":
            $newname = httppost("newname");
            $sub = httpget("sub");
            $newname = comment_sanitize($newname);
            $newname = substr($newname, 0, 25);
            if ($newname) {
                output("Your Mount's name is now:`n%s`0 the %s`nWould you like to set your mount's name now?`n`n", $newname, $playermount['mountname']);
            } else {
                output("You've chosen to go back to having an unnamed Mount.  Are you sure that's what you want?`n`n");
            }
            addnav("Confirm");
            addnav("Set mount name", "runmodule.php?module=hunterslodge_namedmount&op=set&free={$free}&newname=" . rawurlencode($newname));
            addnav("Cancel");
            addnav("Don't set a custom mount name, just go back to the Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
        case "set":
            $newname = rawurldecode(httpget("newname"));
            output("You now ride %s`0 the %s!`n`n", $newname, $playermount['mountname']);
            set_module_pref("mountname", $newname);
            if (!$free) {
                $id = has_item("hunterslodge_namedmount");
                delete_item($id);
            }
            addnav("Return");
            addnav("Return to the Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
    }
    page_footer();
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:49,代码来源:hunterslodge_namedmount.php

示例10: changelog_dohook

function changelog_dohook($hook, $args)
{
    switch ($hook) {
        case 'header-modules':
            $module = httppost('module') ?: httpget('module');
            $op = httpget('op');
            if ($module != '') {
                if (substr($op, -1) == 'e') {
                    $op = substr($op, 0, -1);
                } else {
                    if ($op == 'mass') {
                        $method = array_keys(httpallpost())[1];
                        if (substr($method, -1) == 'e') {
                            $method = substr($method, 0, -1);
                        }
                        $op = "mass {$method}";
                        $plural = 's';
                    }
                }
                require_once 'lib/gamelog.php';
                if (is_array($module)) {
                    $lastModule = array_pop($module);
                    $module = implode(', ', $module);
                    $module .= ",`@ and `^{$lastModule}";
                }
                gamelog(sprintf_translate('`Q%sed`@ the `^%s`@ module%s.', $op, $module, $plural), get_module_setting('category'));
            }
            break;
        case 'village':
            if (get_module_setting('infonav')) {
                addnav($args['infonav']);
                addnav('View Changelog', 'runmodule.php?module=changelog&ret=village');
            }
            break;
        case 'header-about':
            addnav('About LoGD');
            addnav('View Changelog', 'runmodule.php?module=changelog&ret=about');
            break;
        case 'newday-runonce':
            $gamelog = db_prefix('gamelog');
            $date = date('Y-m-d H:i:s', strtotime('now'));
            $category = get_module_setting('category');
            db_query("UPDATE {$gamelog} SET date = '{$date}' WHERE category = '{$category}'");
            break;
    }
    return $args;
}
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:47,代码来源:changelog.php

示例11: marriage_pform

function marriage_pform($backoperation)
{
    global $session;
    $whom = httppost("whom");
    rawoutput("<form action='runmodule.php?module=marriage&op=" . $backoperation . "&op2=propose&stage=0' method='POST'>");
    addnav("", "runmodule.php?module=marriage&op=" . $backoperation . "&op2=propose&stage=0");
    if ($whom != "") {
        $string = "%";
        for ($x = 0; $x < strlen($whom); $x++) {
            $string .= substr($whom, $x, 1) . "%";
        }
        if (get_module_setting('sg') == 1) {
            $sql = "SELECT login,name,acctid FROM " . db_prefix("accounts") . " WHERE login LIKE '%{$whom}%' AND acctid<>" . $session['user']['acctid'] . " AND marriedto=0 ORDER BY level,login";
        } else {
            $sql = "SELECT login,name,acctid FROM " . db_prefix("accounts") . " WHERE name LIKE '%{$string}%' AND acctid<>" . $session['user']['acctid'] . " AND sex<>" . $session['user']['sex'] . " AND marriedto=0 ORDER BY level,login";
        }
        $result = db_query($sql);
        if (db_num_rows($result) != 0) {
            output("`@Please choose from the following people:`n`n`c");
            rawoutput("<table cellpadding='3' cellspacing='0' border='0'>");
            rawoutput("<tr class='trhead'><td><center>Name</center></td></tr>");
            for ($i = 0; $i < db_num_rows($result); $i++) {
                $n++;
                $row = db_fetch_assoc($result);
                rawoutput("<tr class='" . ($i % 2 ? "trlight" : "trdark") . "'><td><a href='runmodule.php?module=marriage&op2=propose&op=" . $backoperation . "&stage=1&target=" . $row['acctid'] . "'>");
                output_notl("`0[`^%s`0]", $row['name']);
                rawoutput("</td></tr>");
                addnav("", "runmodule.php?module=marriage&op2=propose&op=" . $backoperation . "&stage=1&target=" . $row['acctid']);
            }
            rawoutput("</table>");
            output_notl("`c");
        } else {
            output("`c`@`bA user was not found with that name.`b`c");
        }
        output_notl("`n");
    }
    if ($n == 0) {
        output("Who do you want to propose to?`n`n");
    } else {
        output("Would you like to look for someone else?`n`n");
    }
    rawoutput("<input name='whom' maxlength='50' value=\"" . htmlentities(stripslashes($whom)) . "\">");
    $apply = translate_inline("Search");
    rawoutput("<input type='submit' class='button' value='{$apply}'></form>");
    output("`c`@(Remember: They can't be married already!)`c");
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:46,代码来源:proposal.php

示例12: worldmapen_editor_manual

function worldmapen_editor_manual($op, $subop, $act)
{
    $vloc = array();
    $vname = getsetting("villagename", LOCATION_FIELDS);
    $vloc[$vname] = "village";
    $vloc = modulehook("validlocation", $vloc);
    ksort($vloc);
    if ($act == "save") {
        foreach ($vloc as $loc => $val) {
            $space_valx = preg_replace('/\\s/', '_', $loc . 'X');
            $space_valy = preg_replace('/\\s/', '_', $loc . 'Y');
            set_module_setting($loc . 'X', httppost($space_valx));
            set_module_setting($loc . 'Y', httppost($space_valy));
            set_module_setting($loc . 'Z', 1);
            // Eventually we'll do the Z coord too
            // set_module_setting($loc.'Z',
            //        httppost($loc."Z"));
        }
        output("`^`bSettings saved successfully.`b`n");
        reset($vloc);
    }
    output("`^Maximum X value is `b%s`b`n", get_module_setting("worldmapsizeX"));
    output("`^Maximum Y value is `b%s`b`n", get_module_setting("worldmapsizeY"));
    $worldarray = array("World Locations,title");
    foreach ($vloc as $loc => $val) {
        $mapx = get_module_setting("worldmapsizeX");
        $mapy = get_module_setting("worldmapsizeY");
        //Added to allow setting cities outside of the map. - Making cities inaccessible via normal travel.
        $myx = $mapx + 1;
        $worldarray[] = array("Locations for %s,title", $loc);
        $worldarray[$loc . 'X'] = array("X Coordinate,range,1,{$myx},1");
        $worldarray[$loc . 'Y'] = array("Y coordinate,range,1,{$mapy},1");
    }
    rawoutput("<form method='post' action='runmodule.php?module=worldmapen&op=edit&subop=manual&act=save&admin=true'>");
    require_once "lib/showform.php";
    global $module_settings;
    showform($worldarray, $module_settings['worldmapen']);
    rawoutput("</form>");
    addnav("", "runmodule.php?module=worldmapen&op=edit&subop=manual&act=save&admin=true");
    addnav("E?Return to World Map Editor", "runmodule.php?module=worldmapen&op=edit&admin=true");
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:41,代码来源:editor.php

示例13: httpget

        break;
    case "delbuff":
        $id = httpget('id');
        $sql = "DELETE FROM " . db_prefix("magicitembuffs") . " WHERE buffid = {$id} LIMIT 1";
        $result = db_query($sql);
        invalidatedatacache("magicitem-buff-{$id}");
        if (db_affected_rows($result)) {
            output("`^Buff has been succesfully deleted.`n`n");
        } else {
            output("`3While deleting this buff, an error occured. Probably someone else already deleted this buff.`n`n");
        }
        $sql = "UPDATE " . db_prefix("magicitems") . " SET buffid = 0 WHERE buffid = '{$id}'";
        db_query($sql);
        break;
    case "newitem":
        require_once "modules/mysticalshop_buffs/newitem.php";
        break;
    case "newitem2":
        $id = httppost('id');
        $buffid = httppost('buffid');
        if ($buffid == 0 or $buffid == "") {
            $buffid = 0;
        } else {
            $buffid = httppost('buffid');
        }
        $name = httppost('name');
        $sql = "UPDATE " . db_prefix("magicitems") . " SET buffid = {$buffid} WHERE id = '{$id}'";
        db_query($sql);
        output("`^Done!");
        break;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:editor.php

示例14: httpget

<?php

$apply = httpget('apply');
if ($apply == 1) {
    $ocn = httppost('clanname');
    $ocs = httppost('clanshort');
    $clanname = stripslashes($ocn);
    $clanname = full_sanitize($clanname);
    $clanname = preg_replace("'[^[:alpha:] \\'-]'", "", $clanname);
    $clanname = addslashes($clanname);
    httppostset('clanname', $clanname);
    $clanshort = full_sanitize($ocs);
    $clanshort = preg_replace("'[^[:alpha:]]'", "", $clanshort);
    httppostset('clanshort', $clanshort);
    $sql = "SELECT * FROM " . db_prefix("clans") . " WHERE clanname='{$clanname}'";
    $result = db_query($sql);
    $e = array(translate_inline("%s`7 looks over your form but informs you that your clan name must consist only of letters, spaces, apostrophes, or dashes.  Also, your short name can consist only of letters. She hands you a blank form."), translate_inline("%s`7 looks over your form but informs you that you must have at least 5 and no more than 50 characters in your clan's name (and they must consist only of letters, spaces, apostrophes, or dashes), then hands you a blank form."), translate_inline("%s`7 looks over your form but informs you that you must have at least 2 and no more than 5 characters in your clan's short name (and they must all be letters), then hands you a blank form."), translate_inline("%s`7 looks over your form but informs you that the clan name %s is already taken, and hands you a blank form."), translate_inline("%s`7 looks over your form but informs you that the short name %s is already taken, and hands you a blank form."), translate_inline("%s`7 asks for the %s gold to start the clan, but you seem to be unable to produce the fees."), translate_inline("%s`7 asks for the %s gold and %s gems to start the clan, but you seem to be unable to produce the fees."), translate_inline("%s`7 asks for the %s gems to start the clan, but you seem to be unable to produce the fees."), translate_inline("She takes your application, and stamps it \"`\$DENIED`7\"."));
    if ($clanname != $ocn || $clanshort != $ocs) {
        output_notl($e[0], $registrar);
        clanform();
        addnav("Return to the Lobby", "clan.php");
    } elseif (strlen($clanname) < 5 || strlen($clanname) > 50) {
        output_notl($e[1], $registrar);
        clanform();
        addnav("Return to the Lobby", "clan.php");
    } elseif (strlen($clanshort) < 2 || strlen($clanshort) > 5) {
        output_notl($e[2], $registrar);
        clanform();
        addnav("Return to the Lobby", "clan.php");
    } elseif (db_num_rows($result) > 0) {
        output_notl($e[3], $registrar, stripslashes($clanname));
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:31,代码来源:applicant_new.php

示例15: massmail_run

function massmail_run()
{
    global $session;
    $op = httpget('op');
    popup_header("Ye Olde Poste Office");
    rawoutput("<table width='50%' border='0' cellpadding='0' cellspacing='2'>");
    rawoutput("<tr><td>");
    $t = translate_inline("Back to the Ye Olde Poste Office");
    rawoutput("<a href='mail.php'>{$t}</a></td><td>");
    rawoutput("</td></tr></table>");
    output_notl("`n`n");
    $clanid = $session['user']['clanid'];
    $body = httppost('body');
    $subject = "`^Clan Mail";
    $time = date("Y-m-d H:i:s", strtotime("-" . getsetting("LOGINTIMEOUT", 900) . " sec"));
    $name = $session['user']['name'];
    require_once "lib/systemmail.php";
    switch ($op) {
        case "clanmail":
            //copied and modified from Chris Vorndrans Bulletin
            if ($body == "") {
                rawoutput("<form action='runmodule.php?module=massmail&op=clanmail' method='POST'>");
                output("`n`^Clan Mail:`n`n");
                rawoutput("<textarea name=\"body\" rows=\"10\" cols=\"60\" class=\"input\"></textarea>");
                rawoutput("<input type='submit' class='button' value='" . translate_inline("Send") . "'></form>");
                rawoutput("</form>");
            } else {
                $sql = "SELECT * FROM " . db_prefix("accounts") . " WHERE clanid = '{$clanid}'";
                $res = db_query($sql);
                for ($i = 0; $i < db_num_rows($res); $i++) {
                    $row = db_fetch_assoc($res);
                    systemmail($row['acctid'], $subject, $body);
                }
                output("`^Message has been sent.`0");
            }
            addnav("", "runmodule.php?module=massmail&op=clanmail");
            break;
        case "adminall":
            if ($body == "") {
                rawoutput("<form action='runmodule.php?module=massmail&op=adminall' method='POST'>");
                output("`n`^Send to All Players:`n`n");
                rawoutput("<textarea name=\"body\" rows=\"10\" cols=\"60\" class=\"input\"></textarea>");
                rawoutput("<input type='submit' class='button' value='" . translate_inline("Send") . "'></form>");
                rawoutput("</form>");
            } else {
                $sql = "SELECT * FROM " . db_prefix("accounts");
                $res = db_query($sql);
                for ($i = 0; $i < db_num_rows($res); $i++) {
                    $row = db_fetch_assoc($res);
                    systemmail($row['acctid'], "`^Server News from " . $name, $body);
                }
                output("Your mail was sent to all players");
            }
            addnav("", "runmodule.php?module=massmail&op=adminall");
            break;
        case "adminonline":
            if ($body == "") {
                rawoutput("<form action='runmodule.php?module=massmail&op=adminonline' method='POST'>");
                output("`n`^Send to all online:`n`n");
                rawoutput("<textarea name=\"body\" rows=\"10\" cols=\"60\" class=\"input\"></textarea>");
                rawoutput("<input type='submit' class='button' value='" . translate_inline("Send") . "'></form>");
                rawoutput("</form>");
            } else {
                $sql = "SELECT * FROM " . db_prefix("accounts") . " WHERE loggedin = 1 AND laston > '{$time}'";
                $res = db_query($sql);
                for ($i = 0; $i < db_num_rows($res); $i++) {
                    $row = db_fetch_assoc($res);
                    systemmail($row['acctid'], "`^Server News from " . $name, $body);
                }
                output("Your Mail was sent to all online");
            }
            addnav("", "runmodule.php?module=massmail&op=adminonline");
            break;
            //end of copied code
    }
    popup_footer();
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:77,代码来源:massmail.php


注:本文中的httppost函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。