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


PHP systemmail函数代码示例

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


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

示例1: friendlist_unignore

function friendlist_unignore()
{
    global $session;
    $ac = httpget('ac');
    $ignored = rexplode(get_module_pref('ignored', 'friendlist', $ac));
    $iveignored = rexplode(get_module_pref('iveignored'));
    if (in_array($ac, $iveignored)) {
        $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);
            $info = sprintf_translate("%s`Q has been removed from your list.", $row['name']);
            require_once "lib/systemmail.php";
            $t = array("`\$Ignore List Removal");
            $mailmessage = array("%s`0`@ has removed you from %s ignore list.", $session['user']['name'], $session['user']['sex'] ? translate_inline("her") : translate_inline("his"));
            systemmail($ac, $t, $mailmessage);
        } else {
            $info = translate_inline("That user no longer exists...");
        }
    }
    $ignored = array_diff($ignored, array($session['user']['acctid']));
    $ignored = rimplode($ignored);
    set_module_pref('ignored', $ignored, 'friendlist', $ac);
    if (in_array($ac, $iveignored)) {
        $iveignored = array_diff($iveignored, array($ac));
        $iveignored = rimplode($iveignored);
        set_module_pref('iveignored', $iveignored);
    }
    output_notl($info);
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:friendlist_unignore.php

示例2: watcher_quests_dohook

function watcher_quests_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            require_once "lib/http.php";
            if ($session['user']['level'] > 2 && get_module_pref("plotpoint1") == 0) {
                addnav("", "runmodule.php?module=watcher_quests&plotpoint=1");
                redirect("runmodule.php?module=watcher_quests&plotpoint=1", "Watcher plot point 1");
            }
            if (get_module_pref("plotpoint3") && !get_module_pref("plotpoint3a")) {
                $body = "Thank you for talking to me.  It honestly meant a lot more than I let on.`n`nI would love to come and see you sometime soon, but I have to figure out when I can take the evening off.  It might be a while.`n`nMeanwhile, I hope you'll be okay with this, but I have to act around you the same way I would if we didn't know each other; I could get in a lot of trouble if I'm anything but my usual self while I'm on the Vessel.  I hope you understand.`n`nWith any luck, I'll talk to you properly again soon.`n`n-Watcher";
                require_once "lib/systemmail.php";
                systemmail($session['user']['acctid'], "Thank You", $body, 3517);
                set_module_pref("plotpoint3a", true);
            }
            if ($session['user']['dragonkills'] >= 3 && get_module_pref("plotpoint2") == 0 && $session['user']['gems'] > 1) {
                addnav("", "runmodule.php?module=watcher_quests&plotpoint=2");
                redirect("runmodule.php?module=watcher_quests&plotpoint=2", "Watcher plot point 2");
            }
            break;
        case "mausoleum":
            if ($session['user']['dragonkills'] >= 5 && get_module_pref("plotpoint2") == 1 && get_module_pref("plotpoint3") == 0) {
                output("`n`n`\$The Watcher`0's forehead looks rather shiny.  She tugs distractedly at the collar of her turtleneck.`n`n");
                addnav("That's a shiny, shiny Watcher.");
                addnav("Ask what the deal is with that turtleneck", "runmodule.php?module=watcher_quests&plotpoint=3");
            }
            break;
    }
    return $args;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:watcher_quests.php

示例3: wcgpoints_supporterpoints_dohook

function wcgpoints_supporterpoints_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "wcgpoints_increased":
            if (get_module_pref("gotfirst")) {
                $session['user']['donation'] += 5;
                output("`5`bYou have five extra Supporter Points!`b  Thank you for contributing to humanitarian research.`0`n`n");
            } else {
                if (get_module_pref("runtime", "wcgpoints") > get_module_setting("initialrequirement")) {
                    $session['user']['donation'] += get_module_setting("initialreward");
                    require_once "lib/systemmail.php";
                    $subj = "You've got Supporter Points!";
                    $body = "As a thank-you for helping us to support humanitarian research via grid computing, we've given you 500 Supporter Points completely free of charge.  Thank you so much!  Remember that you'll get five extra Supporter Points every time your World Community Grid points increase (which is usually every 24 hours, if you let the client run regularly).  Have fun!";
                    systemmail($session['user']['acctid'], $subj, $body);
                    set_module_pref("gotfirst", true);
                }
            }
            break;
        case "wcg-features-desc":
            output("`bFree Supporter Points`b: After you've run the World Community Grid client for at least 24 hours (it doesn't have to be all at once - an hour here and an hour there will soon add up), you'll get 500 Supporter Points completely free of charge.  After that, you'll get 5 Supporter Points every time World Community Grid reports that your Cobblestones have increased.`n`n");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:wcgpoints_supporterpoints.php

示例4: marriage_modifyflirtpoints

function marriage_modifyflirtpoints($who = 1, $amount = 0, $from = -1, $punish = true)
{
    //punish checks if flirting is with beloved one
    global $session;
    //now update the sent
    if ($from == -1) {
        $from = $session['user']['acctid'];
    }
    $list = get_module_pref('flirtssent', 'marriage', $from);
    $list = unserialize($list);
    if ($list == "") {
        $list = array();
    }
    if (array_key_exists("S" . $who, $list)) {
        $list["S" . $who] += $amount;
        //even when negative
    } else {
        $list = array_merge(array("S" . $who => $amount), $list);
    }
    //if ($list["S".$who]<1) $list=array_splice($list,"S".$who,1); //clean up, not working
    set_module_pref('flirtssent', serialize($list), 'marriage', $from);
    //now for the received ones
    $list = get_module_pref('flirtsreceived', 'marriage', $who);
    $list = unserialize($list);
    if ($list == "") {
        $list = array();
    }
    if (array_key_exists("S" . $from, $list)) {
        $list["S" . $from] += $amount;
        //even when negative
    } else {
        $list = array_merge(array("S" . $from => $amount), $list);
    }
    set_module_pref('flirtsreceived', serialize($list), 'marriage', $who);
    //if someone flirted not with the person married to
    if ($session['user']['marriedto'] != 0 && $session['user']['marriedto'] != 4294967295.0 && $who != $session['user']['marriedto'] && $from == $session['user']['acctid'] && $punish && $amount > 0) {
        $mailmessage = array("%s`0`@ has been unfaithful to you!", $session['user']['name']);
        $t = array("`%Uh oh!!");
        require_once "lib/systemmail.php";
        systemmail($session['user']['marriedto'], $t, $mailmessage);
        set_module_pref('flirtsfaith', get_module_pref('flirtsfaith') + 1);
        output("`n`@`c`bShame on you! Don't be unfaithful!`b`c");
        marriage_flirtdec();
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:45,代码来源:marriage_func.php

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

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

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

function timedcombat_teach_dohook($hookname, $args)
{
    global $session, $last_timestamp;
    switch ($hookname) {
        case "newday":
            set_module_pref("taughttoday", 0);
            break;
        case "biostat":
            if (httpget('op') == "teachtimedcombat") {
                set_module_pref("able", true, "timedcombat", $args['acctid']);
                debug(get_module_pref("able", "timedcombat", $args['acctid']));
                set_module_pref("taughttoday", 1);
                increment_module_pref("taught");
                output("`bYou have successfully taught this character how to do Timed Combat!`b`n");
                if (is_module_active("medals")) {
                    require_once "modules/medals.php";
                    medals_award_medal("timedcombat_teach", "Time Tutor", "This player taught another player how to do Timed Combat!", "medal_timeteacher.png");
                }
                require_once "lib/systemmail.php";
                $subj = $session['user']['name'] . " taught you a new skill!";
                $body = "You can now perform Timed Combat in fights!  If you time your fight commands correctly, you'll get a double-attack and double-defence bonus!  The bonus applies to everything you do in combat.  Try timing your five-round auto-fights - one correct hit wins you five rounds of extra power, and the same goes for ten-round auto-fighting too!  If you don't want to muck about with counting under your breath, you can ignore the new skill and carry on fighting as you've always done.  Get four perfect hits in a row and you can teach other players!  Have fun!";
                systemmail($args['acctid'], $subj, $body);
            }
            $ret = httpget('ret');
            if ($args['acctid'] != $session['user']['acctid'] && !get_module_pref("taughttoday") && get_module_pref("maxchain", "timedcombat") >= 4) {
                //get the players' chat locations from commentaryinfo.php - it's handy!
                $tloc = get_module_pref("loc", "commentaryinfo");
                $sloc = get_module_pref("loc", "commentaryinfo", $args['acctid']);
                if ($tloc == $sloc && !get_module_pref("able", "timedcombat", $args['acctid'])) {
                    output("This player doesn't know how to do Timed Combat.  You can teach one student per game day.`n`n");
                    addnav("Teach this player the Timed Combat skill", "bio.php?op=teachtimedcombat&char=" . $args['acctid'] . "&ret=" . urlencode($ret));
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:37,代码来源:timedcombat_teach.php

示例9: friendlist_request

function friendlist_request()
{
    global $session;
    $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) {
        $row = db_fetch_assoc($result);
        $info = translate_inline("You have successfully sent your request to %s`Q.");
        $info = str_replace('%s', $row['name'], $info);
        require_once "lib/systemmail.php";
        $t = array("`\$Friend Request Sent");
        $mailmessage = array("%s`0`@ has sent you a Friend Request.`nIf this user has been spamming you with this, ignore them from your search function.", $session['user']['name']);
        systemmail($ac, $t, $mailmessage);
    } else {
        $info = translate_inline("That user no longer exists...");
    }
    $request = get_module_pref('request', 'friendlist', $ac);
    $request = rexplode($request);
    $request[] = $session['user']['acctid'];
    $request = rimplode($request);
    set_module_pref('request', $request, 'friendlist', $ac);
    output_notl($info);
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:24,代码来源:friendlist_request.php

示例10: hundredpointrally_startnextrally

function hundredpointrally_startnextrally()
{
    $data = unserialize(get_module_setting("data", "hundredpointrally"));
    $data['last'] = $data['current'];
    $data['current'] = $data['next'];
    unset($data['next']);
    //set the current rally's points
    $xmax = get_module_setting("worldmapsizeX", "worldmapen");
    $ymax = get_module_setting("worldmapsizeY", "worldmapen");
    $pointstaken = array();
    //sequenced co-ordinates
    for ($i = 1; $i <= 50; $i++) {
        $proposedpoint = e_rand(1, $xmax) . "," . e_rand(1, $ymax) . ",1";
        //make sure we don't use the same point twice
        while ($pointstaken[$proposedpoint]) {
            debug("Point " . $proposedpoint . " already taken, choosing again");
            $proposedpoint = e_rand(1, $xmax) . "," . e_rand(1, $ymax) . ",1";
        }
        $pointstaken[$proposedpoint] = true;
        $data['current']['sequencedpoints'][$i] = $proposedpoint;
    }
    for ($i = 1; $i <= 50; $i++) {
        $proposedpoint = e_rand(1, $xmax) . "," . e_rand(1, $ymax) . ",1";
        //make sure we don't use the same point twice
        while ($pointstaken[$proposedpoint]) {
            debug("Point " . $proposedpoint . " already taken, choosing again");
            $proposedpoint = e_rand(1, $xmax) . "," . e_rand(1, $ymax) . ",1";
        }
        $pointstaken[$proposedpoint] = true;
        $data['current']['unorderedpoints'][$i] = $proposedpoint;
    }
    //unordered co-ordinates
    $data['current']['open'] = true;
    //notify the players lined up for the next rally that the rally has begun
    require_once "lib/systemmail.php";
    if (count($data['current']['competitors']) > 0) {
        foreach ($data['current']['competitors'] as $key => $vals) {
            $to = $key;
            $subj = "The next Hundred-Point Rally has begun!";
            $body = "This is just a quick message to let you know that the next Hundred-Point Rally has begun!  Head out into the wilderness to find the first Rally Point!";
            systemmail($to, $subj, $body);
            //set them up with the first point
            $player = array();
            $player['sequencedpoints'] = 1;
            $player['activecurrent'] = true;
            $player['activenext'] = false;
            set_module_pref("data", serialize($player), "hundredpointrally", $to);
        }
    }
    set_module_setting("data", serialize($data), "hundredpointrally");
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:51,代码来源:hundredpointrally.php

示例11: db_query

                         if ($su) {
                             // send a system message to admins regarding this failed attempt if it includes superusers.
                             $sql = "SELECT acctid FROM accounts WHERE superuser>=3";
                             $result2 = db_query($sql);
                             $subj = "`#{$_SERVER['REMOTE_ADDR']} failed to log in too many times!";
                             for ($i = 0; $i < db_num_rows($result2); $i++) {
                                 $row2 = db_fetch_assoc($result2);
                                 //delete old messages that
                                 $sql = "DELETE FROM mail WHERE msgto={$row2['acctid']} AND msgfrom=0 AND subject = '{$subj}' AND seen=0";
                                 db_query($sql);
                                 if (db_affected_rows() > 0) {
                                     $noemail = true;
                                 } else {
                                     $noemail = false;
                                 }
                                 systemmail($row2['acctid'], "{$subj}", "This message is generated as a result of one or more of the accounts having been a superuser account.  Log Follows:`n`n{$alert}", 0, $noemail);
                             }
                             //end for
                         }
                         //end if($su)
                     }
                     //end if($c>=10)
                 }
                 //end while
             } else {
             }
             //end if (db_num_rows)
             redirect("index.php");
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:dragonsaga-svn,代码行数:31,代码来源:login.php

示例12: pointstransfer_run

function pointstransfer_run()
{
    global $session;
    require_once "lib/systemmail.php";
    page_header("Hunter's Lodge");
    $op = httpget("op");
    $mint = get_module_setting("mint");
    addnav("L?Return to the Lodge", "lodge.php");
    if ($op == "") {
        $allowed = pointstransfer_pointscheck();
        if ($allowed < $mint) {
            output("`7.J. C. Petersen smiles at your generosity, but leaves the forms where they are.");
            $sallowed = ($allowed > 0 ? "`@" : "`\$") . $allowed;
            if (is_module_active("titlechange")) {
                output("`n`n\"`&I'm sorry, but counting any points used towards title changes, you have %s`& points available, which isn't enough for a transfer.", $sallowed);
            } else {
                output("`n`n\"`&I'm sorry, but you have %s`& points available, which isn't enough for a transfer.", $sallowed);
            }
            if ($mint) {
                output("You need at least `@%s`& points available.`7\"", $mint);
            } else {
                output_notl("`7\"");
            }
        } else {
            output("`7J. C. Petersen smiles at your generosity, and pulls out a form.");
            if (is_module_active("titlechange")) {
                output("`n`n\"`&Including any points used towards title changes, you have `@%s`& points available.", $allowed);
            } else {
                output("`n`n\"`&You have `@%s`& points available.", $allowed);
            }
            if ($mint) {
                output("You have the `@%s`& points needed for a minimum transfer.", $mint);
            }
            output("How many points would you like to transfer, and to whom?`7\"");
            $amount = get_module_pref("amount");
            $target = get_module_pref("target");
            $anon = get_module_pref("anon");
            $note = get_module_pref("note");
            $target = color_sanitize($target);
            rawoutput("<form action='runmodule.php?module=pointstransfer&op=confirm' method='POST'>");
            addnav("", "runmodule.php?module=pointstransfer&op=confirm");
            output("`n`nPoints: ");
            rawoutput("<input name='amount' width='8' value={$amount}>");
            output("`n`nRecipient: ");
            rawoutput("<input name='target' value={$target}>");
            output("`n`nAnonymous Transfer: ");
            rawoutput("<select name='anon'>");
            $no = translate_inline("No");
            $yes = translate_inline("Yes");
            rawoutput("<option value='0'" . ($anon == 0 ? " selected" : "") . ">{$no}</option>");
            rawoutput("<option value='1'" . ($anon == 1 ? " selected" : "") . ">{$yes}</option>");
            rawoutput("</select>");
            output("`n`nOptional Note:");
            rawoutput("<input size='75' name='note' value={$note}>");
            output_notl("`n`n");
            $click = translate_inline("Confirm");
            rawoutput("<input type='submit' class='button' value='{$click}'>");
            rawoutput("</form>");
        }
    } elseif ($op == "confirm") {
        $amount = abs((int) httppost("amount"));
        $target = httppost("target");
        $anon = httppost("anon");
        $note = preg_replace("/[`][bic]/", "", stripslashes(httppost("note")));
        set_module_pref("amount", $amount);
        set_module_pref("target", $target);
        set_module_pref("anon", $anon);
        set_module_pref("note", $note);
        if (!$amount) {
            output("`7J. C. Petersen gives you an odd look.");
            output("`n`n\"`&Why would you give someone zero points?");
            output("Perhaps you should try again when you're thinking more clearly?`7\"");
            addnav("Try Again", "runmodule.php?module=pointstransfer");
        } elseif ($amount < $mint) {
            output("`7J. C. Petersen gives you an odd look.");
            output("`n`n\"`&I'm sorry, but you need to donate at least `@%s`& points.", $mint);
            output("Perhaps you should try again, giving more?`7\"");
            addnav("Try Again", "runmodule.php?module=pointstransfer");
        } elseif ($amount > pointstransfer_pointscheck()) {
            output("`7J. C. Petersen gives you an odd look.");
            output("`n`n\"`&I'm sorry, but you don't have `@%s`& points to give.", $amount);
            output("Perhaps you should try again with less, or donate more?`7\"");
            addnav("Try Again", "runmodule.php?module=pointstransfer");
        } else {
            $newtarget = "";
            for ($x = 0; $x < strlen($target); $x++) {
                $newtarget .= substr($target, $x, 1) . "%";
                //Eric rocks.
            }
            $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE name LIKE '%" . addslashes($newtarget) . "' AND locked=0";
            $result = db_query($sql);
            if (!db_num_rows($result)) {
                output("`7J. C. Petersen gives you an odd lock.");
                output("`n`n\"`&I'm sorry, but I don't know anyone by that name.");
                output("Perhaps you should try again?`7\"");
                addnav("Try Again", "runmodule.php?module=pointstransfer");
            } elseif (db_num_rows($result) > 50) {
                output("`7J. C. Petersen gives you an odd lock.");
                output("`n`n\"`&I'm sorry, but there's way too many people who might go by that name.");
                output("Perhaps you should narrow it down, next time?`7\"");
//.........这里部分代码省略.........
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:101,代码来源:pointstransfer.php

示例13: systemmail

     systemmail($user, array("Your avatar has been validated!"), array("`^As of now, your avatar will be visible.`n`nRegards`n%s`^`n `&Staff", $session['user']['name']));
     debuglog(sprintf("Avatar was validated by %s - mailed", sanitize($session['user']['name'])), $user, $user);
     $text = "/me`3 validated the avatar of `%{$username}`3 located at " . get_module_pref('avatar', 'avatar', $user);
     require_once "lib/commentary.php";
     injectrawcomment("AvatarVal", $session['user']['acctid'], $text);
 } elseif (httpget('deny') && $ok) {
     $sql = "SELECT name FROM " . db_prefix('accounts') . "  WHERE acctid=" . (int) $user;
     $result = db_query($sql);
     $row = db_fetch_assoc($result);
     $username = $row['name'];
     output("`lAvatar has been set to default picture and user notified to provide a new link!`0`n`n");
     $text = "/me`3 denied the avatar of `%{$username}`3 located at " . get_module_pref('avatar', 'avatar', $user);
     set_module_pref("validated", 1, "avatar", $user);
     set_module_pref("avatar", "modules/avatar/default.jpg", "avatar", $user);
     require_once "./lib/systemmail.php";
     systemmail($user, array("`xYour avatar has `\$NOT`x been validated!"), array("`^Your picture is not within the local policies/rules. Please choose a new one and petition/mail the appropriate link to us. If you want to upload a new one and need the points back, please also do so.`n`nRegards`n%s`^`n `&Staff", $session['user']['name']));
     debuglog(sprintf("Avatar was not found suitable by %s - reset and mailed", sanitize($session['user']['name'])), $user, $user);
     require_once "lib/commentary.php";
     injectrawcomment("AvatarVal", $session['user']['acctid'], $text);
 } else {
     output_notl("`n`n");
 }
 $sql = "SELECT count(u.userid) AS counter FROM " . db_prefix("module_userprefs") . " AS u INNER JOIN " . db_prefix("module_userprefs") . " AS t ON u.userid=t.userid AND u.modulename='avatar' AND u.setting='avatar' AND u.value!='' AND t.modulename='avatar' AND t.setting='validated' AND t.value!='1';";
 $result = db_query($sql);
 $num = db_fetch_assoc($result);
 output("Currently there are %s avatars waiting for validation.`n`n", $num['counter']);
 addnav("Actions");
 if ($num['counter'] > 0) {
     addnav("Random Validate Avatars", "runmodule.php?module=avatar&op=validate&mode=validate");
     $sql = "SELECT a.login as login, u.userid as acctid ,a.name as name,a.emailaddress as email FROM " . db_prefix("module_userprefs") . " AS u INNER JOIN " . db_prefix("module_userprefs") . " AS t RIGHT JOIN " . db_prefix("accounts") . " AS a ON u.userid=t.userid AND a.acctid=u.userid WHERE u.modulename='avatar' AND u.setting='avatar' AND u.value!='' AND t.modulename='avatar' AND t.setting='validated' AND t.value!='1' ORDER BY a.login LIMIT 20;";
     $result = db_query($sql);
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:validate.php

示例14: foreach

 $i = "";
 foreach ($stuff as $val) {
     if ($val != "" && $val != $target && $val != $session['user']['acctid']) {
         $i .= "," . $val;
     }
 }
 set_module_pref('proposals', $i, 'marriage', $target);
 $mailmessage = array("%s`0`@ has rejected you as unfit for marriage! You lose some charm.", $session['user']['name']);
 $t = array("`@Rejection!");
 require_once "lib/systemmail.php";
 systemmail($target, $t, $mailmessage);
 if (get_module_setting('counsel') == 1) {
     $mailmessage = array(translate_inline("`@Hallo. I am Professor van Lipvig, and I haf been paid by.. benefactors, to counsel you due to your Mishap vith %s`@.`nPlease visit me in ze village."), $session['user']['name']);
     $t = array("`@Professor");
     require_once "lib/systemmail.php";
     systemmail($target, $t, $mailmessage);
     $allprefst = unserialize(get_module_pref('allprefs', 'marriage', $target));
     $allprefst['counsel'] = 1;
     set_module_pref('allprefs', serialize($allprefst), 'marriage', $target);
 }
 $sql = "SELECT name,sex,charm FROM " . db_prefix("accounts") . " WHERE acctid='{$target}' AND locked=0";
 $res = db_query($sql);
 $row = db_fetch_assoc($res);
 if (get_module_setting('flirtCharis') == 1 && $row['charm'] != 0) {
     $row['charm']--;
     $sql = "UPDATE " . db_prefix("accounts") . " SET charm=" . $row['charm'] . " WHERE acctid='{$target}'";
     db_query($sql);
 }
 addnews("`&%s`0`& got a marriage proposal from %s`0`&, which %s`0`& rejected, seeing %s`0`& as '`@Unfit for Marriage.`&'", $session['user']['name'], $row['name'], $session['user']['name'], $row['name']);
 addnews("`&%s`0`& is currently moping around the inn.", $row['name']);
 $x = $row['sex'] ? translate_inline("she's") : translate_inline("he's");
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:general.php

示例15: get_module_setting

 $typeid = get_module_setting("typeid", $row['type']);
 $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


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