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


PHP popup_header函数代码示例

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


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

示例1: creatureaddon_run

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

示例2: friends_run

function friends_run()
{
    global $session;
    popup_header("Who's Online");
    //Output online characters list
    $sql = "SELECT name,laston,loggedin FROM " . db_prefix("accounts") . " WHERE locked=0 AND loggedin=1 AND laston>'" . date("Y-m-d H:i:s", strtotime("-" . getsetting("LOGINTIMEOUT", 900) . " seconds")) . "' ORDER BY laston DESC";
    $result = db_query($sql);
    rawoutput("<table>");
    while ($row = db_fetch_assoc($result)) {
        rawoutput("<tr><td>");
        output("%s", $row['name']);
        rawoutput("</td><td>");
        output("%s", $row['laston']);
        rawoutput("</td></tr>");
    }
    rawoutput("</table>");
    popup_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:18,代码来源:friends.php

示例3: addcommentary

<?php

require_once "common.php";
addcommentary();
session_write_close();
popup_header("TDS Message of the Day (MoTD)");
output($session['user']['superuser'] >= 3 ? " [<a href='motd.php?op=add'>Add MoTD</a>|<a href='motd.php?op=addpoll'>Add Poll</a>]`n" : "", true);
function motditem($subject, $body)
{
    output("`b{$subject}`b`n", true);
    output("{$body}");
    output("<hr>", true);
}
function pollitem($id, $subject, $body)
{
    global $session;
    $sql = "SELECT count(resultid) AS c, MAX(choice) AS choice FROM pollresults WHERE motditem='{$id}' AND account='{$session['user']['acctid']}'";
    $result = db_query($sql);
    $row = db_fetch_assoc($result);
    $choice = $row['choice'];
    $body = unserialize($body);
    if ($row['c'] == 0 && 0) {
        output("<form action='motd.php?op=vote' method='POST'>", true);
        output("<input type='hidden' name='motditem' value='{$id}'>", true);
        output("`bPoll: {$subject}`b`n", true);
        output(stripslashes($body['body']));
        while (list($key, $val) = each($body['opt'])) {
            if (trim($val) != "") {
                output("`n<input type='radio' name='choice' value='{$key}'>", true);
                output(stripslashes($val));
            }
开发者ID:BackupTheBerlios,项目名称:dragonsaga-svn,代码行数:31,代码来源:motd.php

示例4: tlschema

<?php

tlschema("faq");
popup_header("General Questions with Spoilers");
$c = translate_inline("Return to Contents");
rawoutput("<a href='petition.php?op=faq'>{$c}</a><hr>");
output("`n`n`&(Warning, the FAQs below might contain some spoilers, so if you really want to discover things on your own, you'd be better off not reading too far.");
output("This is not a manual.  It's a self-help pamphlet.)`n`n`n`n`n`n`n`n`n`n`n`n`n");
output("`^1. What are gems for?`n");
output("`@Gems are magical portals into the future. Gaze into the depths of a gem and you can see that which is to come.`n");
output("Gullible? We sure hope not!`n");
output("Lots of people love those little gemstones and are willing to trade things for them.");
output("Your local bartender is something of a gemologist.`n`n");
output("`^2. How do you get gems?`n");
output("`@To the mines with you!!`n");
output("Actually, you can't mine them.  (Well, you can, but only if you get lucky and find the mine. Warning though, mines can be dangerous.)");
output("Gems can be found in the forest during 'special events' that happen randomly - if you play often enough, you're bound to stumble across one at some point.");
output("Gems can also be gained very occasionally from a forest fight.`n`n");
output("`^3. Why do some people seem to have so many hitpoints at a low level?`n");
output("`@Cause they're bigger than you.`n");
output("No, really, they *are* bigger than you. You'll be big too someday.`n`n");
output("`^4. Does that have something to do with the titles that people have?`n");
output("`@But of course!`n");
output("Indeed, every time you kill the dragon, you return to level one.");
output("If you kill the dragon enough times, you get a new title.");
output("So low level players with titles have had opportunities to embiggen themselves. (see Hall of Fame)`n`n");
output("`^5. What's a buff?`n");
output("`@It's what we use to shine our shoes.`n");
output("Did you think it was some sort of temporary or permanent effect which affects your stats in a positive or negative manner? Hah!`n`n");
output("`^6. Why does that old man keep hitting me with an ugly/pretty stick in the forest?`n");
output("`@You look like a pi&ntilde;ata!`n", true);
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:31,代码来源:petition_faq2.php

示例5: popup_header

<?php

popup_header("Look up user ID");
$query = httppost('q');
output("Who would you like to assign this dwelling to?`n");
require_once "lib/showform.php";
rawoutput("<form action='runmodule.php?module=dwellingseditor&op=lookup' method='POST'>");
rawoutput("<input name='q' id='q'>");
$se = translate_inline("Search");
rawoutput("<input type='submit' class='button' value='{$se}'>");
rawoutput("</form>");
rawoutput("<script language='JavaScript'>document.getElementById('q').focus();</script>");
addnav("", "runmodule.php?module=dwellingseditor&op=lookup");
$searchresult = false;
$where = "";
$sql = "SELECT acctid,login,name FROM " . db_prefix("accounts");
if ($query != "") {
    $where = "WHERE login='{$query}' OR name='{$query}'";
    $searchresult = db_query($sql . " {$where}  ORDER BY '{$order}' LIMIT 2");
}
if ($query !== false || $searchresult) {
    if (db_num_rows($searchresult) != 1) {
        $where = "WHERE login LIKE '%{$query}%' OR acctid LIKE '%{$query}%' OR name LIKE '%{$query}%' OR emailaddress LIKE '%{$query}%' OR lastip LIKE '%{$query}%' OR uniqueid LIKE '%{$query}%' OR gentimecount LIKE '%{$query}%' OR level LIKE '%{$query}%'";
        $searchresult = db_query($sql . " {$where}  ORDER BY '{$order}' LIMIT 101");
    }
    if (db_num_rows($searchresult) <= 0) {
        output("`\$No results found`0");
        $where = "";
    } elseif (db_num_rows($searchresult) > 100) {
        output("`\$Too many results found, narrow your search please.`0");
        $op = "";
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:case_lookup.php

示例6: cities_faq

function cities_faq()
{
    global $session;
    tlschema("faq");
    popup_header("Multi-Village Questions");
    $c = translate_inline("Return to Contents");
    rawoutput("<a href='petition.php?op=faq'>{$c}</a><hr>");
    output("`n`n`c`bQuestions about the multiple village system`b`c`n");
    output("`^1. Why, oh why did you activate such a (choose one [wondrous, horrible]) feature?`n");
    output("`@For kicks, of course. We like to mess with your head.`n");
    output("But seriously, have you looked at the user list?  On lotgd.net, we've got over 6,000 people cramming themselves into the Village Square and trying to get their voices heard! Too much! Too much!`n");
    output("In the interests of sanity, we've made more chat boards. And in the interests of game continuity, we've put them into separate villages with many cool new features.`n`n");
    output("If you are a smaller server, this might not be right for you, but we think it works okay there too.`n`n");
    output("`^2. How do I go to other villages?`n");
    output("`@Walk, skate, take the bus...`n");
    output("Or press the Travel link (in the City Gates or Village Gates category) in the navigation bar.`n`n");
    output("`^3. How does travelling work?`n");
    output("`@Pretty well, actually. Thanks for asking.`n");
    output("You get some number of  free travels per day (%s on this server) in which you can travel to any other village you want.", get_module_setting("allowance"));
    output("Also, it is possible for the admin to give additional free travels with some mounts.");
    output("After that, you use up one forest fight per travel.");
    output("After that...well, we hope you like where you end up.");
    output("Since all major economic transactions come through %s (the capital of the region), the roads to and from there have been fortified to protect against monsters from wandering onto them.", getsetting("villagename", LOCATION_FIELDS));
    output("That was a while back though, and the precautions are no longer perfect.`n");
    output("Travel between the other villages have no such precautions.`n");
    output("In either case, you might want to heal yourself before travelling.");
    output("You have been warned.`n`n");
    output("`^4. Where's (the Inn, the forest, my training master, etc.)?`n");
    output("`@Look around. Do you see it? No? Then it's not here.`n");
    output("The problem's usually:`n");
    output("a) It's actually there, you just missed it the first time around.`n");
    output("b) It's in another village, try travelling.`n");
    output("c) It's not on this server, check out the LoGD Net link on the login page.`n");
    output("d) Are you sure you didn't just see that feature in a dream?`n`n");
    output("`^5. I've used up my free travels and forest fights. How do I travel now?`n");
    output("`@We hope you like where you've ended up, because you're stuck there until the next new day.`n`n");
    output("`^6. Can I pay for more travels?`n");
    output("`@No, but you can just plain pay us.");
    if (file_exists("lodge.php")) {
        output("Check out the Hunter's Lodge.");
    } else {
        output("Speak to an admin about donating money.");
    }
    output("Actually, we are considering it.`n");
    if (is_module_active("newbieisland")) {
        $newbieisland = get_module_setting("villagename", "newbieisland");
        if ($session['user']['location'] == $newbieisland) {
            $newbieisland = translate_inline($newbieisland);
            output("`^7. I'm on %s.", $newbieisland);
            output("Why can't I see the Travel link or any of the other stuff this section talks about?`n");
            output("`@You need at least 5 levels in search, or a Ring of Finding +2 to see any of this stuff.`n");
            output("If you haven't figured it out by now, this second answer is always the real one.");
            output("You'll only be able to see Travel once you leave %s.", $newbieisland);
            output("Feel free to skip the rest of this section and come back to it later.`n`n");
        }
    }
    rawoutput("<hr><a href='petition.php?op=faq'>{$c}</a>");
    popup_footer();
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:59,代码来源:cities.php

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

示例8: hundredpointrally_run

function hundredpointrally_run()
{
    global $session;
    page_header("Rally Headquarters");
    $op = httpget('op');
    //load settings
    $joincost = get_module_setting("joincost", "hundredpointrally");
    $data = @unserialize(get_module_setting("data", "hundredpointrally"));
    if (!is_array($data)) {
        $data = array();
        set_module_setting("data", serialize($data), "hundredpointrally");
    }
    //load pref
    $player = @unserialize(get_module_pref("data", "hundredpointrally"));
    if (!is_array($player)) {
        $player = array();
        set_module_pref("data", serialize($player), "hundredpointrally");
    }
    switch ($op) {
        case "start":
            do_forced_nav(false, false);
            require_once "lib/datetime.php";
            $nextstarttime = reltime($data['next']['starttime'], false);
            if (!$data['next']['starttime']) {
                $nextstarttime = "Undetermined amount of time";
            }
            $seed = get_module_setting("jackpotseed", "hundredpointrally");
            if (!isset($data['next']['jackpot']) || $data['next']['jackpot'] < $seed) {
                $data['next']['jackpot'] = $seed;
                set_module_setting("data", serialize($data), "hundredpointrally");
            }
            output("You head into a building decked out with chequered flags.  It smells of petrol and burning rubber, although there are no cars or motorbikes to be seen.  Noticing that the receptionist is a Robot, you surmise that she must be pumping the scent in artificially in order to create atmosphere.  Which figures, really.`n`n\"`7Hello!`0\" she says in a tinny, cheery warble.  \"`7Are you here to sign up for the Hundred-Point Rally?  The next one starts in -`0\" her voice becomes stilted and mechanical for a moment - \"`&%s TO RACE START JACKPOT VALUE OF %s CIGARETTES ENTRY FEE OF %s CIGARETTES`7.`0\"`n`n", strtoupper($nextstarttime), $data['next']['jackpot'], $joincost);
            if ($data['current']['open']) {
                $currentstarttime = reltime($data['current']['starttime'], false);
                output("\"`7Or, if you prefer, the current Rally is still open.  It started -`0\" the same mechanical, halting tone - \"`&%s AGO CURRENT JACKPOT %s CIGARETTES`7.  You'd have a better chance if you waited for the next one, but you can join this one if you're impatient.  It'll cost you the same either way.\"`n`n", strtoupper($currentstarttime), $data['current']['jackpot']);
            }
            addnav("Join a Rally");
            if ($session['user']['gems'] >= $joincost) {
                if (!$player['activenext']) {
                    addnav("Join the `bnext`b Hundred-Point Rally", "runmodule.php?module=hundredpointrally&op=joinnext");
                }
                if (!$player['activecurrent'] && $data['current']['open']) {
                    addnav("Join the `bcurrent`b Hundred-Point Rally", "runmodule.php?module=hundredpointrally&op=joincurrent");
                }
            }
            addnav("What?");
            addnav("Explain this Rally business to me.", "runmodule.php?module=hundredpointrally&op=explain");
            addnav("Exit");
            villagenav();
            break;
        case "explain":
            do_forced_nav(false, false);
            output("\"`7It's very simple,`0\" says the Robot.  \"`7The Hundred-Point Rally is a race around the World Map.  The winner takes the jackpot - the more people signed up for the Rally, the bigger the Jackpot.  You'll be given a series of fifty co-ordinates that you have to visit in sequence, and you'll also be given another fifty co-ordinates that can be visited in any order you like.  The challenge is not only in speed, but also in your ability to determine the most efficient path to hit all one hundred co-ordinates.  Because the race can be quite long, and because the co-ordinates are only revealed once the race has begun, it may or may not be a good idea to spend some time plotting out your route before heading to the first Rally Point.  Each new Rally starts exactly twenty-four hours `&WARNING SYSTEM CLOCK ERROR WHAT THE HELL WHY IS 24 HOURS THE SAME AS SIX DAYS`7 after the last one ends, and a Rally can last for up to 48 hours.`0\"`n`nYou nod.  \"`#Could you explain that part about the system clock error again?`0\"`n`n\"`&What part?`0\"`n`n\"`#Ah.`0\"`n`n`JTo ensure that players from different time zones have a fair shake every now and then, Rallies aren't tied to game time.  When the Robot says \"24 hours,\" she means 24 hours of your time, not game time (which runs six times faster).  If you're signing up for the next Rally and a start time isn't determined yet, you'll get a Distraction exactly 24 hours before the race begins, and another one at the drop of the chequered flag.  We highly recommend that you have Distractions sent to your E-mail if you're a Rally fan, and you can find the relevant option in your Preferences menu in any Outpost.`n`nRallies end as soon as someone hits all one hundred points - so, for example, if a Rally starts at midnight and ends at 2am, the next Rally will start at 2am the next day - and if `ithat`i Rally takes three hours to complete, then the Rally ends at 5am and the next Rally begins at 5am the next day.  This way, we eventually end up going all the way around the clock, giving players in different timezones a chance to compete in the Rally.`0");
            addnav("Okay, then.");
            addnav("Back to Reception", "runmodule.php?module=hundredpointrally&op=start");
            break;
        case "joinnext":
            do_forced_nav(false, false);
            output("You hand over your Cigarettes.  \"`7Very well.  Your entry has been accepted and you will be notified via Distraction when the race starts.  In the meantime, I suggest you buy a very, very fast Mount.`0\"  The Robot tries to smile.  It doesn't come out too well.");
            $data['next']['competitors'][$session['user']['acctid']]['points'] = 0;
            $data['next']['competitors'][$session['user']['acctid']]['name'] = $session['user']['name'];
            $player['activenext'] = true;
            $session['user']['gems'] -= $joincost;
            $data['next']['jackpot'] += floor($joincost * 0.75);
            set_module_pref("data", serialize($player), "hundredpointrally");
            set_module_setting("data", serialize($data), "hundredpointrally");
            addnav("Exit");
            villagenav();
            break;
        case "joincurrent":
            do_forced_nav(false, false);
            output("You hand over your Cigarettes.  \"`7Very well.  Your entry has been accepted.  Now you had better get out there and race!`0\"  The Robot tries to smile.  It doesn't come out too well.");
            $data['current']['competitors'][$session['user']['acctid']]['points'] = 0;
            $data['current']['competitors'][$session['user']['acctid']]['name'] = $session['user']['name'];
            $session['user']['gems'] -= $joincost;
            $data['current']['jackpot'] += floor($joincost * 0.75);
            $player['activecurrent'] = true;
            set_module_pref("data", serialize($player), "hundredpointrally");
            set_module_setting("data", serialize($data), "hundredpointrally");
            addnav("Exit");
            villagenav();
            break;
        case "showpoints":
            popup_header("Rally Points");
            rawoutput("<table cellpadding=5 cellspacing=5 border=0><tr><td valign='top'>");
            output("`0`bSequenced Points`b`nHit each of these World Map points in the prescribed order:`n");
            foreach ($data['current']['sequencedpoints'] as $order => $loc) {
                list($sx, $sy, $sz) = explode(",", $data['current']['sequencedpoints'][$order]);
                if ($player['sequencedpoints'] > $order) {
                    rawoutput("<del>");
                    output("Point %s: `@%s,%s`0`n", $order, $sx, $sy);
                    rawoutput("</del>");
                } else {
                    if ($player['sequencedpoints'] < $order) {
                        output("Point %s: `\$%s,%s`0`n", $order, $sx, $sy);
                    } else {
                        output(">> Point %s: `Q%s,%s`0`n", $order, $sx, $sy);
                    }
                }
            }
//.........这里部分代码省略.........
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:101,代码来源:hundredpointrally.php

示例9: tlschema

<?php

tlschema("faq");
popup_header("General Questions");
$c = translate_inline("Return to Contents");
rawoutput("<a href='petition.php?op=faq'>{$c}</a><hr>");
output("`n`n`c`bGeneral questions`b`c`n");
output("`^1. What is the purpose of this game?`n");
output("`@To get chicks.`n");
output("Seriously, though. The purpose is to slay the green dragon.`n`n");
output("`^2. How do I find the green dragon?`n");
output("`@You can't.`n");
output("Well, sort of.");
output("You can't find her until you've reached a certain level.");
output("When you're at that level, it will be immediately obvious.`n`n");
output("`^3. How do I increase my level?`n");
output("`@Send us money.`n");
output("No, don't send money - you increase your experience by fighting creatures in the forest.");
output("Once you've gotten enough experience, you can challenge your master in the village.`n`n");
output("Well, you can send us money if you want (see PayPal link).`n`n");
output("`^4. Why can't I beat my master?`n");
output("`@He's far too wily for the likes of you.`n");
output("Did you ask him if you have enough experience?`n");
output("Have you tried purchasing some armor or weapons in the village?`n`n");
output("`^5. I used up all my turns. How do I get more?`n");
output("`@Send money.`n");
output("No, put your wallet away.");
output("There *are* a few ways to get an extra turn or two, but by and large you just have to wait for tomorrow.");
output("When a new day comes you'll have more energy.`n");
output("Don't bother asking us what those few ways are - some things are fun to find on your own.`n`n");
output("`^6. When does a new day start?`n");
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:petition_faq1.php

示例10: tlschema

<?php

tlschema("petition");
popup_header("Petition for Help");
$post = httpallpost();
if (count($post) > 0) {
    //debug($post,true);
    if (strpos($post['description'], "[link=") || strpos($post['description'], "bitcomet") || strpos($post['description'], "<a href=")) {
        output("Petition rejected as spam.  If you think this was in error, Petition again - without the links this time.`n`nHere's what you typed:`n`n%s", $post['description']);
    } else {
        $ip = explode(".", $_SERVER['REMOTE_ADDR']);
        array_pop($ip);
        $ip = join($ip, ".") . ".";
        $sql = "SELECT count(petitionid) AS c FROM " . db_prefix("petitions") . " WHERE (ip LIKE '{$ip}%' OR id = '" . addslashes($_COOKIE['lgi']) . "') AND date > '" . date("Y-m-d H:i:s", strtotime("-1 day")) . "'";
        $result = db_query($sql);
        $row = db_fetch_assoc($result);
        if ($row['c'] < 5 || isset($session['user']['superuser']) && $session['user']['superuser'] & ~SU_DOESNT_GIVE_GROTTO) {
            if (!isset($session['user']['acctid'])) {
                $session['user']['acctid'] = 0;
            }
            if (!isset($session['user']['password'])) {
                $session['user']['password'] = "";
            }
            $p = $session['user']['password'];
            unset($session['user']['password']);
            $date = date("Y-m-d H:i:s");
            $post['cancelpetition'] = false;
            $post['cancelreason'] = 'The admins here decided they didn\'t like something about how you submitted your petition.  They were also too lazy to give a real reason.';
            $post = modulehook("addpetition", $post);
            if (!$post['cancelpetition']) {
                unset($post['cancelpetition'], $post['cancelreason']);
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:petition_default.php

示例11: tlschema

<?php

tlschema("faq");
popup_header("New Player Primer");
$c = translate_inline("Return to Contents");
rawoutput("<a href='petition.php?op=faq'>{$c}</a><hr>");
output("`n`n`^Welcome to the Legend of the Green Dragon New Player Primer`n`n");
output("`^`bThe village square`b`n");
output("`@Legend of the Green Dragon (LotGD) is turning out to be a fairly expansive game, with a lot of areas to explore.");
output("It's easy to get lost with all that there is to do out there, so keep in mind that the village square is pretty much the center of the village you start in.");
output("This area will give you access to most other areas that you can get to, with a few exceptions (we'll talk about those in a little while).");
output("If you ever get lost, or are not sure what's going on, head to the village square and regain your bearings.`n`n");
output("`^`bYour first day`b`n");
output("`@Your first day in the world can be very confusing!");
output("You're presented with a lot of information, and you don't need almost any of it!  It's true!");
output("One thing you should probably keep an eye on though, are your hit points.  This is found under \"Vital Info.\"");
output("No matter what profession you choose, in the end, you are some kind of warrior or fighter, and so you need to learn how to do battle.");
output("The best way to do this is to look for creatures to kill in the forest.");
output("When you find one, check it out, and make sure that it's not a higher level than you, because if it is, you might not live through the fight.");
output("Keep in mind that you can always try to run away from something that you encountered, but sometimes it might take several tries before you get away.");
output("You might want to buy armor and weapons in the village square in order to give yourself a better chance against these creatures out in the forest.`n`n");
output("Once you have defeated a creature, you'll notice that you're probably a little hurt.");
output("Head on over to the Healer's Hut, and you can get patched up in short order.");
output("While you're level 1, healing is free, but as you advance, it becomes more and more expensive.");
output("Also keep in mind that it's more expensive to heal 1 point, then later heal 1 point again than it is to heal 2 in one shot.");
output("So if you're trying to save up some money, and you're barely hurt, you might risk a fight or two while you're a little hurt, and heal the damage from several fights in one shot.`n`n");
output("After you've killed a few creatures, you should head back to the village, into Bluspring's Warrior Training, and talk to your master.");
output("Your master will tell you when you are ready to challenge him, and when you are ready, you should give him a shot (make sure you're healed up first though!).");
output("Your master won't kill you if you lose, instead he'll give you a complimentary healing potion and send you on your way.");
if (getsetting("multimaster", 1) == 0) {
    output(" You can only challenge your master once a day.");
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:31,代码来源:petition_primer.php

示例12: tlschema

<?php

tlschema('petition');
popup_header('Petition for Help');
$post = httpallpost();
$petitions = db_prefix('petitions');
if (!$session['user']['loggedin']) {
    $session['user']['lastip'] = $_SERVER['REMOTE_ADDR'];
}
$sessionJson = json_encode($session, JSON_PRETTY_PRINT);
$petitionHeader = "`^Please make sure to read the `b`4FAQ`b`^ before sending in a petition. Most common answers can be found there and will save both you and the administration time!";
$petitionForm = "\n    <form action='petition.php' method='POST'>\n    <label for='name'>Username: {$session['user']['name']}</label>\n    <input type='" . ($session['user']['loggedin'] ? 'hidden' : 'text') . "' name='name' value=\"{$session['user']['name']}\" />\n    <br />\n    <label for='emailaddress'>Email: {$session['user']['emailaddress']}</label>\n    <input type='" . ($session['user']['loggedin'] ? 'hidden' : 'email') . "' name='emailaddress' value='{$session['user']['emailaddress']}' />\n    <br />\n    <label for='body'>Reason for contacting us:</label>\n    <br />\n    <textarea name='body' class='input' cols='30' rows='5'></textarea>\n    <br />\n    <input type='submit' value='Submit' />\n    </form>\n";
$petitionFootNote = "If there is an issue, please be as descriptive as possible! The administration will have a much easier time when you give more info, resulting in faster response times.";
$petition = modulehook('petition-form', ['header' => $petitionHeader, 'form' => $petitionForm, 'footnote' => $petitionFootNote]);
if (empty($post)) {
    output("`^%s `n`n`@%s`0 `n`Q%s`0", $petition['header'], $petition['form'], $petition['footnote'], true);
} else {
    $ip = substr($session['user']['lastip'], 0, -2);
    $sql = db_query("SELECT count(petitionid) AS count FROM {$petitions}\n        WHERE (ip LIKE '{$ip}%' OR id = '" . addslashes($_COOKIE['lgi']) . "')\n        AND date > '" . date('Y-m-d H:i:s', strtotime('-1 day')) . "'\n        AND status != '0'");
    $row = db_fetch_assoc($sql);
    if ($row['count'] >= 5 && !($session['user']['superuser'] & SU_EDIT_PETITIONS)) {
        output("`4We are sorry, but in an effort to keep spamming of the petitions to a minimum, we ask that users limit themselves to five petitions a day. Please try again tomorrow, or when one of your current issues is resolved.");
    } else {
        $date = date('Y-m-d H:i:s');
        $post['cancelpetition'] = false;
        $post['cancelreason'] = '';
        $post = modulehook('addpetition', $post);
        if ($post['cancelpetition'] == true) {
            output($post['cancelreason']);
        } else {
            db_query("INSERT INTO {$petitions} (author, date, body, pageinfo, ip, id)\n                VALUES ('{$session['user']['acctid']}', '{$date}', '" . addslashes($post['body']) . "', '" . addslashes($sessionJson) . "', '{$ip}', '" . addslashes($_COOKIE['lgi']) . "')");
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:31,代码来源:petition_default.php

示例13: donationextend_run

function donationextend_run()
{
    popup_header("Extended Play");
    $ext1 = get_module_setting("extend1amt");
    $ext2 = $ext1 + get_module_setting("extend2amt");
    $ext1pct = $ext1 / 10000;
    $ext2pct = $ext2 / 10000;
    output("Improbable Island exists ad-free thanks to the generous donations of its players.  Because we don't have any advertisers or corporate sponsors, we can enjoy the sort of content that large businesses wouldn't like to be associated with - McDonald's would withdraw funding if they ever found out about our thousand-eyed Mutant Steaks, and Sony's PR department would faint if they came across the Saga of Budget Horse.`n`nWhen you donate money to Improbable Island, you get:`n`nPoints to spend on fabulous advantages in the Hunter's Lodge - including name colourization and custom titles, cigarettes, Requisition, extra New Days and more`nThe satisfaction of supporting indie game development`nBonus Supply Crates dropped on the World Map`nThe warm squishy feeling you get when you know that a few thousand players have some extra Stamina thanks to you!  Which brings us nicely to...`n`n`bExtended Play!`b`nThe Extended Play feature replaces the old Donations Status bar, which simply gave a readout of how much money the Island had taken in over the calendar month (expressed as a percentage of a fast-food checkout worker's wages, because quite frankly I was pretty skint at the time and kind of pessimistic that this crazy run-a-game-as-a-living thing was even gonna work, but that's a different story).  It had some problems.  Because it took into account only the current calendar month, it'd go from, say, 120%% to -20%% overnight when the month changed (starting off in the red because of the server bill), which was a bit jarring.  Also, nothing happened when the bar was full up!  You didn't get any reward!  Boo.`n`n`bThe new Extended Play readout works differently`b - it's always counting down, at a rate roughly equal to what the Island really needs to bring in so that we can pay the server costs, advertise for new players, and so that I can keep doing this as my day job.  It goes up whenever someone makes a donation, and declines smoothly rather than dropping to zero at the start of a new month.`n`n(yes, to program this I had to add up my rent and food bills and such and work out how much money I needed to live on per second - try it sometime, it's an eye-opener)`n`nWhenever the display says \"`bExtended Play Active`b,\" `bevery player on the Island`b gets an extra %s Stamina points (about %s%%) at each and every New Day (yes, even days triggered by Chronospheres and Instant New Days).  Should we ever do so well that we get the \"`bSpecial Extend`b\" message, `beveryone`b gets a %s-point Stamina bonus (about %s%%).  `bIt doesn't matter if you've never donated before`b - it doesn't matter if you ever do.  Every player gets the bonus, donator or not.`n`nHowever, if you've ever accumulated any Supporter Points at all, the Stamina bonus awarded by Extended Play will be `bdoubled.`b`n`n`bDoubled?`b`nFor the avoidance of doubt:`nYes, if you recruited even `ione`i new player who stuck around long enough to get you some referral points, you get the double bonus.  Even if this new player decided they weren't into text adventures after all.`nYes, if you had even one monster idea accepted, you get the double bonus.  Even if you also sent me twenty-odd terrible monster suggestions that made me want to reach through the screen and take away your keyboard so that you would stop.`nYes, if you've never given any money to the site but still did that monster rating thing, you get the bonus.  Even if you said \"screw it\" and just rated every monster at a 3 until you'd sorted out a hundred ratings.`nYes, if one gloomy day back in 2008 you let the moths out of your wallet and grudgingly donated `ione stinkin' dollar`i to support the server from which you sucked half a gigabyte of text every day for the past six months, you get the double bonus.  Even if you shed tears over that dollar while you spent all the points.`nThe double bonus is a permanent thing.  It doesn't go away, even if you've spent all your Supporter Points - you'll get double the benefit from Extended Play if you `iever had`i any Supporter Points.`n`n`bSo when's a good time to donate?`b`nAha, yes!  If the Extended Play readout is always counting down, but new game days happen at specific times, then some times might be better to donate than others!`n`nWell, sort of.  Maybe.  In very specific situations.  It depends on what the readout's at, and how much you plan to donate.  If it's at zero, and you plan to donate a fiver, then it really doesn't matter when the New Day arrives.  If it says we need nine dollars more for Extended Play, but the New Day just started, then donating a tenner will only really do any good for the people who activate their New Days shortly after you donate (for example, by using a Chronosphere or by logging in after the system-wide New Day has already started) - if no more donations come in before the next system-wide New Day, then the Extended Play will have expired by then.  But then, if the meter says we only need a few more dollars for an Extended Play, and the system-wide New Day is only minutes away, someone else will probably step up and put the extra couple of bucks in the hat - and the meter will have been close to Extended Play in part because of your donation.  So it's all swings and roundabouts, really!`n`n`bCan I opt-out of having my name shown as the last donation?  I'm shy.`b`nYes, check your Preferences.`n`nHave fun!", $ext1, $ext1pct, $ext2, $ext2pct);
    popup_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:10,代码来源:donationextend.php

示例14: friendlist_run

function friendlist_run()
{
    global $session;
    $op = httpget('op');
    if ($op == 'faq') {
        popup_header("Frequently Asked Questions on Friend Lists");
    } else {
        popup_header("Ye Olde Poste Office");
        output_notl("`c`^[`@");
        $t = translate_inline("Friend List");
        rawoutput("<a href='runmodule.php?module=friendlist&op=list'>{$t}</a>");
        addnav('', 'runmodule.php?module=friendlist&op=list');
        output_notl("`^] - [`@");
        $t = translate_inline("Friend Search");
        rawoutput("<a href='runmodule.php?module=friendlist&op=search'>{$t}</a>");
        addnav('', 'runmodule.php?module=friendlist&op=search');
        output_notl("`^] - [`%");
        $t = translate_inline("Back to the Ye Olde Poste Office");
        rawoutput("<a href='mail.php'>{$t}</a>");
        output_notl("`^]`c`Q`n");
    }
    require_once "modules/friendlist/friendlist_{$op}.php";
    if ($op == 'deny') {
        friendlist_deny();
        $op = "list";
        require_once "modules/friendlist/friendlist_list.php";
    }
    $fname = "friendlist_" . $op;
    $fname();
    popup_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:friendlist.php

示例15: tlschema

<?php

tlschema("faq");
popup_header("Frequently Asked Questions (FAQ)");
output("`^Welcome to Legend of the Green Dragon.`n`n");
output("`@You wake up one day, and you're in a village for some reason.");
output("You wander around, bemused, until you stumble upon the main village square.");
output("Once there you start asking lots of stupid questions.");
output("People (who are mostly naked for some reason) throw things at you.");
output("You escape by ducking into a nearby building and find a rack of pamphlets by the door.");
output("The title of the pamphlet reads: `&\"Everything You Wanted to Know About the LotGD, but Were Afraid to Ask.\"");
output("`@Looking furtively around to make sure nobody's watching, you open one and read:`n`n");
output("\"`#So, you're a Newbie.  Welcome to the club.");
output("Here you will find answers to the questions that plague you.");
output("Well, actually you will find answers to the questions that plagued US.");
output("So, here, read and learn, and leave us alone!`@\"`n`n");
output("`^`bContents:`b`0`n");
modulehook("faq-pretoc");
output("`^`bNew Player & FAQ`b`0`n");
$t = translate_inline("`@New Player Primer`0");
output_notl("&#149;<a href='petition.php?op=primer'>%s</a><br/>", $t, true);
$t = translate_inline("`@Frequently Asked Questions on Game Play (General)`0");
output_notl("&#149;<a href='petition.php?op=faq1'>%s</a><br/>", $t, true);
$t = translate_inline("`@Frequently Asked Questions on Game Play (with spoilers)`0");
output_notl("&#149;<a href='petition.php?op=faq2'>%s</a><br/>", $t, true);
$t = translate_inline("`@Frequently Asked Questions on Technical Issues`0");
output_notl("&#149;<a href='petition.php?op=faq3'>%s</a><br/>", $t, true);
modulehook("faq-toc");
modulehook("faq-posttoc");
output("`nThank you,`nthe Management.`n");
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:petition_faq.php


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