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

PHP invalidatedatacache函数代码示例

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

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



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

示例1: funddrive_dohook

function funddrive_dohook($hookname, $args)
{
    if ($hookname == "donation") {
        invalidatedatacache("mod_funddrive_totals");
    } elseif ($hookname == "funddrive_getpercent") {
        $prog = funddrive_getpercent();
        $args['percent'] = $prog['percent'];
    } elseif ($hookname == "everyfooter") {
        if (!array_key_exists('paypal', $args) || !is_array($args['paypal'])) {
            $args['paypal'] = array();
        }
        $prog = funddrive_getpercent();
        $out = "{$prog['percent']}%";
        $goal = $prog['goal'];
        $pct = $prog['percent'];
        $current = $prog['current'];
        if (get_module_setting("usetext")) {
            $res = "" . str_replace(' ', '&nbsp;', get_module_setting("indicatorText")) . "Improbable Island coffer status: <font color=#AF5E00>{$out}</font> of McDonald's Cashier Wages! :D" . (get_module_setting("showdollars") ? " (\${$current}/\${$goal})" : "");
        }
        switch (get_module_setting("usebar")) {
            case 1:
                $nonpct = 100 - $pct;
                if ($pct < 100) {
                    $res = "<div align='center'><table align='center' style='border: solid 1px #000000;' bgcolor='#FF0000' cellpadding='0' cellspacing='0' width='100' height='8'><caption align='bottom'>{$res}</caption><tr><td width='{$pct}%' bgcolor='#FFFF00'></td><td width='{$nonpct}%'></td></tr></table></div>";
                } else {
                    $res = "<div align='center'><table align='center' style='border: solid 1px #000000;' bgcolor='#00FF00' cellpadding='0' cellspacing='0' width='100' height='8'><caption align='bottom'>{$res}</caption><tr><td width='100%'></td></tr></table></div>";
                }
                break;
            case 2:
                $nonpct = 100 - $pct;
                $imgwidth = 140;
                $imgheight = 140;
                $topheight = round($imgheight * $nonpct / 100);
                $bottomheight = $imgheight - $topheight;
                if ($pct < 100) {
                    $res = "<table border='0' cellpadding='0' cellspacing='0' width='{$imgwidth}' height='{$imgheight}'>" . "<tr>" . "<td style=\"background-image: url(images/Medallion-Red.gif); background-position: top left; background-repeat: no-repeat;\" height='{$topheight}'><img src='images/trans.gif' width='{$imgwidth}' height='{$topheight}' alt=''></td>" . "</tr><tr>" . "<td style=\"background-image: url(images/Medallion-Yellow.gif); background-position: bottom left; background-repeat: no-repeat;\" height='{$bottomheight}'><img src='images/trans.gif' width='{$imgwidth}' height='{$bottomheight}' alt=''></td>" . "</tr>" . "</table><br><div align='center'>{$res}</div>";
                } else {
                    $res = "<table border='0' cellpadding='0' cellspacing='0' width='{$imgwidth}' height='{$imgheight}'>" . "<tr>" . "<td style=\"background-image: url(images/Medallion-Green.gif); background-position: top left; background-repeat: no-repeat;\" height='{$topheight}'><img src='images/trans.gif' width='{$imgwidth}' height='{$imgheight}' alt=''></td>" . "</tr>" . "</table><br><div align='center'>{$res}</div>";
                }
        }
        if ($res) {
            array_push($args['paypal'], $res);
        }
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:46,代码来源:funddrive.php


示例2: statue_dohook

function statue_dohook($hookname, $args)
{
    global $REQUEST_URI;
    global $session;
    $capital = getsetting("villagename", LOCATION_FIELDS);
    $hero = get_module_setting("hero");
    switch ($hookname) {
        case "village-desc":
            if ($session['user']['location'] != $capital) {
                break;
            }
            if ($hero == 0) {
                output("`n`@The people wandering past periodically stop to admire a statue of the ancient hero, `&MightyE`@.`0`n");
            } else {
                $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid='{$hero}'";
                $result = db_query_cached($sql, "lasthero");
                $row = db_fetch_assoc($result);
                output("`0The inhabitants of %s are busy erecting a statue for their newest hero, `&%s`0, on the only statue pedestal around.  The remains of the statue that had stood there before lie in such ruins around the pedestal that it is no longer recognizable.`0`n`n", $session['user']['location'], $row['name']);
            }
            break;
        case "index":
            if (!get_module_setting("showonindex")) {
                break;
            }
            $heroname = "MightyE";
            if ($hero != 0) {
                $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid='{$hero}'";
                $result = db_query_cached($sql, "lasthero");
                $row = db_fetch_assoc($result);
                $heroname = $row['name'];
            }
            output("`@The most recent hero of the realm is: `&%s`0`n`n", $heroname);
            break;
        case "dragonkill":
            set_module_setting("hero", $session['user']['acctid']);
            invalidatedatacache("lasthero");
            break;
        case "namechange":
            if ($hero == $session['user']['acctid']) {
                invalidatedatacache("lasthero");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:45,代码来源:statue.php


示例3: mysticalshop_massinvalidate

function mysticalshop_massinvalidate($name)
{
    if (getsetting('usedatacache', false)) {
        $name = DATACACHE_FILENAME_PREFIX . $name;
        global $datacachefilepath;
        if ($datacachefilepath == '') {
            $datacachefilepath = getsetting('datacachepath', '/tmp');
        }
        if (@is_dir($datacachefilepath)) {
            $dir = dir($datacachefilepath);
            while (($file = $dir->read()) !== false) {
                if (strpos($file, $name) !== false) {
                    invalidatedatacache(str_replace(DATACACHE_FILENAME_PREFIX, '', $file));
                }
            }
            $dir->close();
        }
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:19,代码来源:libcoredup.php


示例4: innchat_dohook

function innchat_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "innchatter":
            $id = $session['user']['acctid'];
            if (e_rand(1, 2) == 1) {
                $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE locked=0 AND acctid != '{$id}' ORDER BY rand(" . e_rand() . ") LIMIT 1";
            } else {
                $sql = "SELECT creaturename AS name FROM " . db_prefix("masters") . " WHERE 1 ORDER BY rand(" . e_rand() . ") LIMIT 1";
            }
            // Only let this hit the database once every 10 minute if we're
            // using data caching.  Otherwise it could be expensive.  If they
            // hit it multiple times within ten minutes, it'll use the same
            // random name of player or master.  We'll invalidate the name when someone's name changes
            // for any reason.
            $res = db_query_cached($sql, "innchat-names");
            $row = db_fetch_assoc($res);
            // Give 2 out of X (currently 7 (5+these 2)) chances of hearing about
            // a player.
            $noplayers = translate_inline("loneliness in town");
            if ($row['name'] == "") {
                $row['name'] = $noplayers;
            }
            $args[] = $row['name'];
            $args[] = $row['name'];
            $args[] = translate_inline("Frequently Asked Questions");
            $args[] = translate_inline("dwarf tossing");
            $args[] = translate_inline("YOU");
            $args[] = getsetting("villagename", LOCATION_FIELDS);
            $args[] = translate_inline("today's weather");
            $args[] = translate_inline("the elementary discord of being");
            // "Das elementare Zerwürfnis des Seins" no idea if that makes any sense in english. (Ok, it doesn't make sense in german too.) It's from a "Jägermeister" commercial spot :)
            break;
        case "namechange":
        case "dragonkill":
            // Someone just did a dragonkill or had their name changed.  Since it
            // it could have been this person, we'll just invalidate the cache
            invalidatedatacache("innchat-names");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:43,代码来源:innchat.php


示例5: friendlist_ignore

function friendlist_ignore()
{
    global $session;
    $iveignored = rexplode(get_module_pref('iveignored'));
    $friends = rexplode(get_module_pref('friends'));
    $request = rexplode(get_module_pref('request'));
    $ac = httpget('ac');
    $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid={$ac} AND locked=0";
    $result = db_query($sql);
    if (db_num_rows($result) > 0 && in_array($ac, $friends)) {
        $row = db_fetch_assoc($result);
        require_once "lib/systemmail.php";
        $t = "`\$Friend List Ignore";
        $mailmessage = array("%s`0`@ has added you to %s ignore list.", $session['user']['name'], $session['user']['sex'] ? translate_inline("her") : translate_inline("his"));
        systemmail($ac, $t, $mailmessage);
        $friends = array_diff($friends, array($ac));
        invalidatedatacache("friendliststat-" . $session['user']['acctid']);
        invalidatedatacache("friendliststat-" . $ac);
    }
    $friends = rimplode($friends);
    set_module_pref('friends', $friends);
    $ignored = rexplode(get_module_pref('ignored', 'friendlist', $ac));
    $ignored[] = $session['user']['acctid'];
    $ignored = rimplode($ignored);
    set_module_pref('ignored', $ignored, 'friendlist', $ac);
    $act = $session['user']['acctid'];
    $friends = rexplode(get_module_pref('friends', 'friendlist', $ac));
    $friends = array_diff($friends, array($act));
    $friends = rimplode($friends);
    set_module_pref('friends', $friends, 'friendlist', $ac);
    if (in_array($ac, $request)) {
        $request = array_diff($request, array($ac));
        $request = rimplode($request);
        set_module_pref('request', $request);
    }
    $iveignored[] = $ac;
    $iveignored = rimplode($iveignored);
    set_module_pref('iveignored', $iveignored);
    output("You have ignored that user, they can no longer YoM you");
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:40,代码来源:friendlist_ignore.php


示例6: friendlist_deny

function friendlist_deny()
{
    global $session;
    $ignored = rexplode(get_module_pref('ignored'));
    $friends = rexplode(get_module_pref('friends'));
    $request = rexplode(get_module_pref('request'));
    $ac = httpget('ac');
    $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid={$ac} AND locked=0";
    $result = db_query($sql);
    if (in_array($ac, $friends)) {
        $info = translate_inline("That user has been removed.");
        require_once "lib/systemmail.php";
        $t = "`\$Friend List Removal";
        $mailmessage = array("%s`0`@ has deleted you from %s Friend List.", $session['user']['name'], $session['user']['sex'] ? translate_inline("her") : translate_inline("his"));
        $friends = array_diff($friends, array($ac));
        $friends = rimplode($friends);
        set_module_pref('friends', $friends);
        $act = $session['user']['acctid'];
        $friends = rexplode(get_module_pref('friends', 'friendlist', $ac));
        $friends = array_diff($friends, array($act));
        $friends = rimplode($friends);
        set_module_pref('friends', $friends, 'friendlist', $ac);
        invalidatedatacache("friendliststat-" . $session['user']['acctid']);
        invalidatedatacache("friendliststat-" . $ac);
    } else {
        $info = translate_inline("That user has been denied.");
        require_once "lib/systemmail.php";
        $t = "`\$Friend Request Denied";
        $mailmessage = array("%s`0`@ has denied you your Friend Request.", $session['user']['name']);
        $request = array_diff($request, array($ac));
        $request = rimplode($request);
        set_module_pref('request', $request);
    }
    if (db_num_rows($result) > 0) {
        systemmail($ac, $t, $mailmessage);
        $row = db_fetch_assoc($result);
        $info = sprintf_translate("%s has been removed", $row['name']);
    }
    output_notl($info);
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:40,代码来源:friendlist_deny.php


示例7: friendlist_accept

function friendlist_accept()
{
    global $session;
    $ignored = rexplode(get_module_pref('ignored'));
    $request = rexplode(get_module_pref('request'));
    $friends = rexplode(get_module_pref('friends'));
    $ac = httpget('ac');
    if (in_array($ac, $ignored)) {
        $info = translate_inline("This user has ignored you.");
    } elseif (in_array($ac, $friends)) {
        $info = translate_inline("This user is already in your list.");
    } elseif (in_array($ac, $request)) {
        $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid={$ac} AND locked=0";
        $result = db_query($sql);
        if (db_num_rows($result) > 0) {
            $row = db_fetch_assoc($result);
            invalidatedatacache("friendliststat-" . $session['user']['acctid']);
            invalidatedatacache("friendliststat-" . $ac);
            $friends[] = $ac;
            $info = sprintf_translate("%s`Q has been added to your list.", $row['name']);
            require_once "lib/systemmail.php";
            $t = "`\$Friend Request Accepted";
            $mailmessage = array("%s`0`@ has accepted your Friend Request.", $session['user']['name']);
            systemmail($ac, $t, $mailmessage);
            $friends = rimplode($friends);
            set_module_pref('friends', $friends);
            $friends = rexplode(get_module_pref('friends', 'friendlist', $ac));
            $friends[] = $session['user']['acctid'];
            $friends = rimplode($friends);
            set_module_pref('friends', $friends, 'friendlist', $ac);
            $request = array_diff($request, array($ac));
            $request = rimplode($request);
            set_module_pref('request', $request);
        } else {
            $info = translate_inline("That user no longer exists...");
        }
    }
    output_notl($info);
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:39,代码来源:friendlist_accept.php


示例8: savesetting

function savesetting(string $settingname, $value)
{
    global $settings;
    $table = db_prefix('settings');
    loadsettings();
    if (!isset($settings[$settingname])) {
        $sql = db_query("INSERT INTO {$table} (setting, value)\n                VALUES ('" . addslashes($settingname) . "', '" . addslashes($value) . "')");
    } else {
        if (isset($settings[$settingname])) {
            $sql = db_query("UPDATE {$table} SET value = '" . addslashes($value) . "' WHERE setting = '" . addslashes($settingname) . "'");
        } else {
            return false;
        }
    }
    $settings[$settingname] = $value;
    invalidatedatacache('game-settings');
    if (db_affected_rows() > 0) {
        return true;
    } else {
        return false;
    }
}
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:22,代码来源:settings.php


示例9: savesetting

function savesetting($settingname, $value)
{
    global $settings;
    loadsettings();
    if (!isset($settings[$settingname]) && $value) {
        $sql = "INSERT INTO " . db_prefix("settings") . " (setting,value) VALUES (\"" . addslashes($settingname) . "\",\"" . addslashes($value) . "\")";
    } else {
        if (isset($settings[$settingname])) {
            $sql = "UPDATE " . db_prefix("settings") . " SET value=\"" . addslashes($value) . "\" WHERE setting=\"" . addslashes($settingname) . "\"";
        } else {
            return false;
        }
    }
    db_query($sql);
    $settings[$settingname] = $value;
    invalidatedatacache("game-settings");
    if (db_affected_rows() > 0) {
        return true;
    } else {
        return false;
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:22,代码来源:settings.php


示例10: elseif

    require_once "lib/newday/dragonpointspend.php";
} elseif (!$session['user']['race'] || $session['user']['race'] == RACE_UNKNOWN) {
    require_once "lib/newday/setrace.php";
} elseif ($session['user']['specialty'] == "") {
    require_once "lib/newday/setspecialty.php";
} else {
    page_header("It is a new day!");
    rawoutput("<font size='+1'>");
    output("`c`b`#It is a New Day!`0`b`c");
    rawoutput("</font>");
    $resurrection = httpget('resurrection');
    if ($session['user']['alive'] != true) {
        $session['user']['resurrections']++;
        output("`@You are resurrected!  This is resurrection number %s.`0`n", $session['user']['resurrections']);
        $session['user']['alive'] = true;
        invalidatedatacache("list.php-warsonline");
    }
    $session['user']['age']++;
    $session['user']['seenmaster'] = 0;
    output("You open your eyes to discover that a new day has been bestowed upon you. It is day number `^%s.`0", $session['user']['age']);
    output("You feel refreshed enough to take on the world!`n");
    output("`2Turns for today set to `^%s`2.`n", $turnsperday);
    $turnstoday = "Base: {$turnsperday}";
    $args = modulehook("pre-newday", array("resurrection" => $resurrection, "turnstoday" => $turnstoday));
    $turnstoday = $args['turnstoday'];
    $interestrate = e_rand($mininterest * 100, $maxinterest * 100) / (double) 100;
    if ($session['user']['turns'] > getsetting("fightsforinterest", 4) && $session['user']['goldinbank'] >= 0) {
        $interestrate = 1;
        output("`2Today's interest rate: `^0% (Bankers in this village only give interest to those who work for it)`2.`n");
    } elseif (getsetting("maxgoldforinterest", 100000) && $session['user']['goldinbank'] >= getsetting("maxgoldforinterest", 100000)) {
        $interestrate = 1;
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:31,代码来源:newday.php


示例11: elseif

} elseif ($op == "process") {
    $msg = httppost('msg');
    if (!is_array($msg) || count($msg) < 1) {
        $session['message'] = "`\$`bYou cannot delete zero messages!  What does this mean?  You pressed \"Delete Checked\" but there are no messages checked!  What sort of world is this that people press buttons that have no meaning?!?`b`0";
        header("Location: mail.php");
    } else {
        $sql = "DELETE FROM " . db_prefix("mail") . " WHERE msgto='" . $session['user']['acctid'] . "' AND messageid IN ('" . join("','", $msg) . "')";
        db_query($sql);
        invalidatedatacache("mail/mail-{$session['user']['acctid']}");
        header("Location: mail.php");
        exit;
    }
} elseif ($op == "unread") {
    $sql = "UPDATE " . db_prefix("mail") . " SET seen=0 WHERE msgto='" . $session['user']['acctid'] . "' AND messageid='{$id}'";
    db_query($sql);
    invalidatedatacache("mail/mail-{$session['user']['acctid']}");
    header("Location: mail.php");
    exit;
}
popup_header("Ye Olde Poste Office");
$inbox = translate_inline("Inbox");
$write = translate_inline("Write");
// Build the initial args array
$args = array();
array_push($args, array("mail.php", $inbox));
array_push($args, array("mail.php?op=address", $write));
// to use this hook,
// just call array_push($args, array("pagename", "functionname"));,
// where "pagename" is the name of the page to forward the user to,
// and "functionname" is the name of the mail function to add
$mailfunctions = modulehook("mailfunctions", $args);
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:mail.php


示例12: httppost

     $claninfo['motdauthor'] = $session['user']['acctid'];
 }
 $clandesc = httppost('clandesc');
 if (httppostisset('clandesc') && stripslashes($clandesc) != $claninfo['clandesc'] && $claninfo['descauthor'] != 4294967295) {
     $sql = "UPDATE " . db_prefix("clans") . " SET clandesc='" . addslashes(substr(stripslashes($clandesc), 0, 4096)) . "',descauthor={$session['user']['acctid']} WHERE clanid={$claninfo['clanid']}";
     db_query($sql);
     invalidatedatacache("clandata-{$claninfo['clanid']}");
     output("Updating description`n");
     $claninfo['clandesc'] = stripslashes($clandesc);
     $claninfo['descauthor'] = $session['user']['acctid'];
 }
 $customsay = httppost('customsay');
 if (httppostisset('customsay') && $customsay != $claninfo['customsay'] && $session['user']['clanrank'] >= CLAN_LEADER) {
     $sql = "UPDATE " . db_prefix("clans") . " SET customsay='{$customsay}' WHERE clanid={$claninfo['clanid']}";
     db_query($sql);
     invalidatedatacache("clandata-{$claninfo['clanid']}");
     output("Updating custom say line`n");
     $claninfo['customsay'] = stripslashes($customsay);
 }
 $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid={$claninfo['motdauthor']}";
 $result = db_query($sql);
 $row = db_fetch_assoc($result);
 $motdauthname = $row['name'];
 $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid={$claninfo['descauthor']}";
 $result = db_query($sql);
 $row = db_fetch_assoc($result);
 $descauthname = $row['name'];
 output("`&`bCurrent MoTD:`b `#by %s`2`n", $motdauthname);
 output_notl(nltoappon($claninfo['clanmotd']) . "`n");
 output("`&`bCurrent Description:`b `#by %s`2`n", $descauthname);
 output_notl(nltoappon($claninfo['clandesc']) . "`n");
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:31,代码来源:clan_motd.php


示例13: httppost

 $uri = httppost('uri');
 $text = httppost('text');
 $trans = httppost('trans');
 $page = $uri;
 if (strpos($page, "?") !== false) {
     $page = substr($page, 0, strpos($page, "?"));
 }
 if ($trans == "") {
     $sql = "DELETE ";
 } else {
     $sql = "SELECT * ";
 }
 $sql .= "\r\n\t\tFROM " . db_prefix("translations") . "\r\n\t\tWHERE language='" . LANGUAGE . "'\r\n\t\t\tAND intext='{$text}'\r\n\t\t\tAND (uri='{$page}' OR uri='{$uri}')";
 if ($trans > "") {
     $result = db_query($sql);
     invalidatedatacache("translations/translations-" . $namespace . "-" . $language);
     if (db_num_rows($result) == 0) {
         $sql = "INSERT INTO " . db_prefix("translations") . " (language,uri,intext,outtext,author,version) VALUES ('" . LANGUAGE . "','{$uri}','{$text}','{$trans}','{$session['user']['login']}','{$logd_version} ')";
         $sql1 = "DELETE FROM " . db_prefix("untranslated") . " WHERE intext='{$text}' AND language='" . LANGUAGE . "' AND namespace='{$url}'";
         db_query($sql1);
     } elseif (db_num_rows($result) == 1) {
         $row = db_fetch_assoc($result);
         // MySQL is case insensitive so we need to do it here.
         if ($row['intext'] == $text) {
             $sql = "UPDATE " . db_prefix("translations") . " SET author='{$session['user']['login']}', version='{$logd_version}', uri='{$uri}', outtext='{$trans}' WHERE tid={$row['tid']}";
         } else {
             $sql = "INSERT INTO " . db_prefix("translations") . " (language,uri,intext,outtext,author,version) VALUES ('" . LANGUAGE . "','{$uri}','{$text}','{$trans}','{$session['user']['login']}','{$logd_version} ')";
             $sql1 = "DELETE FROM " . db_prefix("untranslated") . " WHERE intext='{$text}' AND language='" . LANGUAGE . "' AND namespace='{$url}'";
             db_query($sql1);
         }
     } elseif (db_num_rows($result) > 1) {
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:translatortool.php


示例14: motd_del

function motd_del($id)
{
    $sql = "DELETE FROM " . db_prefix("motd") . " WHERE motditem=\"{$id}\"";
    db_query($sql);
    invalidatedatacache("motd");
    invalidatedatacache("lastmotd");
    invalidatedatacache("motddate");
    header("Location: motd.php");
    exit;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:10,代码来源:motd.php


示例15: get_module_objpref

    $gold_cost = get_module_objpref("dwellingtypes", $typeid, "cost-gold", "dwellings_pvp");
    $gems_cost = get_module_objpref("dwellingtypes", $typeid, "cost-gems", "dwellings_pvp");
    $daysleft = get_module_objpref("dwellings", $dwid, "run-out", "dwellings_pvp");
    $isauto = get_module_objpref("dwellings", $dwid, "isauto", "dwellings_pvp");
    set_module_objpref("dwellings", $dwid, "run-out", $daysleft - 1, "dwellings_pvp");
    $subj = translate_inline("Concerning Dwellings Guard");
    if ($daysleft == 1) {
        if ($gold_coffer >= $gold_cost && $gems_coffer >= $gems_cost && (get_module_setting("whatif") && $isauto)) {
            $extra = translate_inline("However, you have enough gold and gems inside of your coffers to purchase another Guard. So, we will go ahead and place a guard order when they expire.");
        } else {
            $extra = "";
        }
        $body = sprintf("`@We are sorry to inform you, but your establishment, %s`@, in `^%s`@ will lose the usage of it's personal guard in `\$1 day`@. This is due to the rental time running out. %s`n`nDwellings Commission.", $row['name'], $row['location'], $extra);
        require_once "lib/systemmail.php";
        systemmail($row['ownerid'], $subj, $body);
    } elseif ($daysleft <= 0) {
        if ($gold_coffer >= $gold_cost && $gems_coffer >= $gems_cost && (get_module_setting("whatif") && $isauto)) {
            require_once "modules/dwellings/lib.php";
            dwellings_modify_coffers($dwid, "gold", "-" . $gold_cost);
            dwellings_modify_coffers($dwid, "gems", "-" . $gems_cost);
            $days = get_module_objpref("dwellingtypes", $typeid, "guard-length", "dwellings_pvp");
            invalidatedatacache("objpref-dwellings-{$dwid}-run-out-dwellings_pvp");
            invalidatedatacache("objpref-dwellings-{$dwid}-bought-dwellings_pvp");
            set_module_objpref("dwellings", $dwid, "run-out", $days, "dwellings_pvp");
            set_module_objpref("dwellings", $dwid, "bought", 1, "dwellings_pvp");
        } else {
            invalidatedatacache("objpref-dwellings-{$dwid}-bought-dwellings_pvp");
            set_module_objpref("dwellings", $dwid, "bought", 0, "dwellings_pvp");
        }
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:newday-runonce.php


示例16: debug

     }
     debug("Moving companions");
     $sql = "UPDATE " . db_prefix("companions") . " SET companionlocation = '" . httppost("villagename") . "' WHERE companionlocation = '" . addslashes($settings['villagename']) . "'";
     db_query($sql);
 }
 $tmp = stripslashes(httppost("innname"));
 if ($tmp && $tmp != $settings['innname']) {
     debug("Updating inn name -- moving players");
     $sql = "UPDATE " . db_prefix("accounts") . " SET location='" . httppost("innname") . "' WHERE location='" . addslashes($settings['innname']) . "'";
     db_query($sql);
     if ($session['user']['location'] == $settings['innname']) {
         $session['user']['location'] = stripslashes(httppost('innname'));
     }
 }
 if (stripslashes(httppost("motditems")) != $settings['motditems']) {
     invalidatedatacache("motd");
 }
 $post = httpallpost();
 reset($post);
 $old = $settings;
 while (list($key, $val) = each($post)) {
     if (!isset($settings[$key]) || stripslashes($val) != $settings[$key]) {
         if (!isset($old[$key])) {
             $old[$key] = "";
         }
         savesetting($key, stripslashes($val));
         output("Setting %s to %s`n", $key, stripslashes($val));
         gamelog("`@changed core setting `^{$key}`@ from `3{$old[$key]}`@ to `#{$val}`0", "settings");
         // Notify every module
         modulehook("changesetting", array("module" => "core", "setting" => $key, "old" => $old[$key], "new" => $val), true);
     }
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:31,代码来源:configuration.php


示例17: db_prefix

        $sql = "UPDATE " . db_prefix("clans") . " SET clanname='{$clanname}',clanshort='{$clanshort}' WHERE clanid='{$detail}'";
        output("Updating clan names`n");
        db_query($sql);
        invalidatedatacache("clandata-{$detail}");
    }
    if (httppost('block') > "") {
        $blockdesc = translate_inline("Description blocked for inappropriate usage.");
        $sql = "UPDATE " . db_prefix("clans") . " SET descauthor=4294967295, clandesc='{$blockdesc}' where clanid='{$detail}'";
        output("Blocking public description`n");
        db_query($sql);
        invalidatedatacache("clandata-{$detail}");
    } elseif (httppost('unblock') > "") {
        $sql = "UPDATE " . db_prefix("clans") . " SET descauthor=0, clandesc='' where clanid='{$detail}'";
        output("UNblocking public description`n");
        db_query($sql);
        invalidatedatacache("clandata-{$detail}");
    }
}
$sql = "SELECT * FROM " . db_prefix("clans") . " WHERE clanid='{$detail}'";
$result1 = db_query_cached($sql, "clandata-{$detail}", 3600);
$row1 = db_fetch_assoc($result1);
if ($session['user']['superuser'] & SU_EDIT_COMMENTS) {
    rawoutput("<div id='hidearea'>");
    rawoutput("<form action='clan.php?detail={$detail}' method='POST'>");
    addnav("", "clan.php?detail={$detail}");
    output("Superuser / Moderator renaming:`n");
    output("Long Name: ");
    rawoutput("<input name='clanname' value=\"" . htmlentities($row1['clanname'], ENT_COMPAT, getsetting("charset", "ISO-8859-1")) . "\" maxlength=50 size=50>");
    output("`nShort Name: ");
    rawoutput("<input name='clanshort' value=\"" . htmlentities($row1['clanshort'], ENT_COMPAT, getsetting("charset", "ISO-8859-1")) . "\" maxlength=5 size=5>");
    output_notl("`n");
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:31,代码来源:detail.php


示例18: reset

         reset($mount['mountbuff']);
         while (list($key, $val) = each($mount['mountbuff'])) {
             if ($val > "") {
                 $buff[$key] = stripslashes($val);
             }
         }
         $buff['schema'] = "mounts";
         httppostset('mount', $buff, 'mountbuff');
         list($sql, $keys, $vals) = postparse(false, 'mount');
         if ($id > "") {
             $sql = "UPDATE " . db_prefix("mounts") . " SET {$sql} WHERE mountid='{$id}'";
         } else {
             $sql = "INSERT INTO " . db_prefix("mounts") . " ({$keys}) VALUES ({$vals})";
         }
         db_query($sql);
         invalidatedatacache("mountdata-{$id}");
         if (db_affected_rows() > 0) {
             output("`^Mount saved!`0`n");
         } else {
             output("`^Mount `\$not`^ saved: `\$%s`0`n", $sql);
         }
     }
 } elseif ($subop == "module") {
     // Save modules settings
     $module = httpget("module");
     $post = httpallpost();
     reset($post);
     while (list($key, $val) = each($post)) {
         set_module_objpref("mounts", $id, $key, $val, $module);
     }
     output("`^Saved!`0`n");
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:31,代码来源:mounts.php


示例19: rawoutput

         rawoutput("<tr class='" . ($i % 2 ? "trlight" : "trdark") . "'>");
         $row = db_fetch_assoc($result);
         $buffid = $row['buffid'];
         $sqla = "SELECT buffid, buffname FROM " . db_prefix("magicitembuffs") . "  WHERE buffid = {$buffid} ORDER BY buffid ASC";
         $resulta = db_query($sqla);
         $rowa = db_fetch_assoc($resulta);
         output("<td>%s.) `2%s</td><td>`3%s</td>", $i, $row['name'], $rowa['buffname'], true);
         rawoutput("</tr>");
     }
     rawoutput("</table>");
     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 == "") {
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:editor.php


示例20: translate_inline

			if($owner==1){
				$kickout = translate_inline("`$(Kick out)");
				rawoutput("<a href='runmodule.php?module=dwellings&op=kickout&who={$row['acctid']}&dwid=$dwid>$kickout</a>");
				addnav("","runmodule.php?module=dwellings&op=kickout&who={$row['acctid']}&dwid=$dwid");
			}
			rawoutput("</td><td>");
			output_notl("%s",$row['level']);
			rawoutput("</td><td>");
			output_notl("%s",$row['dragonkills']);
			rawoutput("</td><td>");
			$laston = relativedate($row['laston']);
			output_notl("%s", $laston);
			rawoutput("</td></tr>");
			$i++;
		}
		rawoutput("</table>");
	}else{
		$loc = get_module_setting("logoutlocation");
		if ($session['user']['loggedin']){
			$session['user']['restorepage'] = "runmodule.php?module=dwellings&op=enter&dwid=$dwid";
			$sql = "UPDATE " . db_prefix("accounts") 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP invert函数代码示例发布时间:2022-05-15
下一篇:
PHP invalidate_user_cache函数代码示例发布时间: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