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(); }
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(); }
<?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)); }
<?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ñata!`n", true);
<?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='******' 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 = "";
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(); }
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(); }
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); } } } rawoutput("</td><td valign='top'>"); output("`0`bUnordered Points`b`nHit each of these World Map points in whatever order seems best to you:`n"); foreach ($data['current']['unorderedpoints'] as $order => $loc) { list($ux, $uy, $uz) = explode(",", $loc); if (@in_array($loc, $player['unorderedpoints'])) { rawoutput("<del>"); output("`@%s,%s`0`n", $ux, $uy); rawoutput("</del>"); } else { output("`\$%s,%s`0`n", $ux, $uy); } } rawoutput("</td><td valign='top'>"); $rankings = hundredpointrally_getrankings(); output("`bCurrent Rankings`b`n"); foreach ($rankings as $rank => $info) { if ($info['acctid'] == $session['user']['acctid']) { output("`J`b>>`b "); } output("#%s: %s`0 (%s points)`n", $rank + 1, $info['name'], $info['points']); } rawoutput("</td></tr></table>"); popup_footer(); break; } page_footer(); }
<?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");
<?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']);
<?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.");
<?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']) . "')");
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(); }
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(); }
<?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("•<a href='petition.php?op=primer'>%s</a><br/>", $t, true); $t = translate_inline("`@Frequently Asked Questions on Game Play (General)`0"); output_notl("•<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("•<a href='petition.php?op=faq2'>%s</a><br/>", $t, true); $t = translate_inline("`@Frequently Asked Questions on Technical Issues`0"); output_notl("•<a href='petition.php?op=faq3'>%s</a><br/>", $t, true); modulehook("faq-toc"); modulehook("faq-posttoc"); output("`nThank you,`nthe Management.`n");
<?php // translator ready // addnews ready // mail ready define("ALLOW_ANONYMOUS", true); define("OVERRIDE_FORCED_NAV", true); require_once "common.php"; require_once "lib/errorhandling.php"; require_once "lib/http.php"; tlschema("source"); $url = httpget('url'); if ($url) { popup_header("Source code for %s", $url); } else { popup_header("Source code"); } if (!($session['user']['loggedin'] && $session['user']['superuser'] & SU_VIEW_SOURCE) || !isset($session['user']['loggedin'])) { output("Due to the behaviour of people in the past, access to the source code online has been restricted."); output("You may download the entirety of the latest publically released stable version from <a href='http://www.dragonprime.net' target='_blank'>DragonPrime</a>.", true); output("You may then work with that code within the restrictions of its license."); output("`n`nHopefully this will help put an end to actions like the following:"); rawoutput("<ul><li>"); output("Releasing code which they do not own without permission."); rawoutput("</li><li>"); output("Removing valid copyright information from code and replacing it."); rawoutput("</li><li>"); output("Removing portions of the code required to be kept intact by licensing."); rawoutput("</li><li>"); output("Claiming copyright of items which they did not create."); rawoutput("</li></ul>");
function commentaryarchive_run() { global $session; popup_header("Commentary Export"); debug($args); if ($session['user']['donation'] >= 1000) { $sec = $session['user']['chatloc']; if ($sec) { output("This is a HTML output of the entire Commentary section you're currently viewing, complete with colour codes. Use it for archiving memorable roleplaying sessions, outputting on forums or blogs, or what-have-you.`n`nTo use it, copy-paste the output in the textarea below into your favourite plain-text editor (notepad will do in a pinch) and save the results as somefilenameoranother.html.`n`nIf you need help archiving, feel free to ask around for assistance in the Enquirer or Location Four.`n`n`bImportant`b - when trying to copy-paste (or even output) a commentary area with hundreds of commentary pages, your computer may hang for a while. If this happens, quit pressing buttons, go and have a cup of tea and let it get on with it.`n`nHave fun!`n`n"); $sql = "SELECT " . db_prefix("commentary") . ".*, " . db_prefix("accounts") . ".name, " . db_prefix("accounts") . ".acctid, " . db_prefix("accounts") . ".clanrank, " . db_prefix("clans") . ".clanshort FROM " . db_prefix("commentary") . " LEFT JOIN " . db_prefix("accounts") . " ON " . db_prefix("accounts") . ".acctid = " . db_prefix("commentary") . ".author LEFT JOIN " . db_prefix("clans") . " ON " . db_prefix("clans") . ".clanid=" . db_prefix("accounts") . ".clanid WHERE " . ($sec ? "section='{$sec}' AND " : '') . "( " . db_prefix("accounts") . ".locked=0 OR " . db_prefix("accounts") . ".locked is null ) " . "ORDER BY commentid ASC"; $result = db_query($sql); rawoutput("<textarea>"); rawoutput("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); rawoutput("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\""); rawoutput(" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"); rawoutput("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">"); rawoutput("<head>"); rawoutput("\t<title>Improbable Island Commentary Export from section " . $sec . "</title>"); rawoutput("\t<meta http-equiv=\"content-type\" "); rawoutput("\t\tcontent=\"text/html;charset=utf-8\" />"); rawoutput("\t<meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />"); rawoutput("\t<style type=\"text/css\">"); rawoutput("\t\tbody {background-color: #C9B18B; font-family: georgia, serif; font-size:smaller; color:#111111;}"); rawoutput("\t\t.colDkBlue { color: #000040; }"); rawoutput("\t\t.colDkGreen { color: #004000; }"); rawoutput("\t\t.colDkCyan { color: #004040; }"); rawoutput("\t\t.colDkRed { color: #400000; }"); rawoutput("\t\t.colDkMagenta { color: #400040; }"); rawoutput("\t\t.colDkYellow { color: #404000; }"); rawoutput("\t\t.colDkWhite { color: #303030; }"); rawoutput("\t\t.colLtBlue { color: #000060; }"); rawoutput("\t\t.colLtGreen { color: #006000; }"); rawoutput("\t\t.colLtCyan { color: #006060; }"); rawoutput("\t\t.colLtRed { color: #600000; }"); rawoutput("\t\t.colLtMagenta { color: #600060; }"); rawoutput("\t\t.colLtYellow { color: #606000; }"); rawoutput("\t\t.colLtWhite { color: #505050; }"); rawoutput("\t\t.colLtBlack { color: #222222; }"); rawoutput("\t\t.colDkOrange { color: #4a2100; }"); rawoutput("\t\t.colLtOrange { color: #994400; }"); rawoutput("\t\t.colBlue \t{ color: #0070FF; }"); rawoutput("\t\t.colLime \t{ color: #DDFFBB; }"); rawoutput("\t\t.colBlack \t{ color: #000000; }"); rawoutput("\t\t.colRose \t{ color: #9F819F; }"); rawoutput("\t\t.colblueviolet \t{ color: #9A5BEE; }"); rawoutput("\t\t.coliceviolet\t{ color: #6D7B9F; }"); rawoutput("\t\t.colLtBrown \t{ color: #8F7D47; }"); rawoutput("\t\t.colDkBrown \t{ color: #6b563f; }"); rawoutput("\t\t.colXLtGreen\t{ color: #009900; }"); rawoutput("\t\t.colAttention \t{ background-color: #00FF00; color: #FF0000; }"); rawoutput("\t\t.colWhiteBlack \t{ background-color: #FFFFFF; color: #000000; }"); rawoutput("\t\t.colbeige { color: #F5F5DC; }"); rawoutput("\t\t.colkhaki { color: #F0E68C; }"); rawoutput("\t\t.coldarkkhaki { color: #5F5B35; }"); rawoutput("\t\t.colaquamarine { color: #7FFFD4; }"); rawoutput("\t\t.coldarkseagreen { color: #8FBC8F; }"); rawoutput("\t\t.collightsalmon { color: #8F6859; }"); rawoutput("\t\t.colsalmon { color: #7F5D4F; }"); rawoutput("\t\t.colwheat { color: #F5DEB3; }"); rawoutput("\t\t.coltan { color: #D2B48C; }"); rawoutput("\t\t.colBack \t{ background-color: #00FFFF; color: #000000; }"); rawoutput("\t\t.colLtLinkBlue { color: #0069AF; }"); rawoutput("\t\t.colDkLinkBlue { color: #004C7F; }"); rawoutput("\t\t.colDkRust { color: #8D6060; }"); rawoutput("\t\t.colLtRust { color: #B07878; }"); rawoutput("\t\t.colMdBlue { color: #0000F0; }"); rawoutput("\t\t.colMdGrey { color: #444444; }"); rawoutput("\t\t.colburlywood { color: #DEB887; }"); rawoutput("\t</style>"); rawoutput("</head>"); rawoutput("<body>"); for ($i = 0; $i < db_num_rows($result); $i++) { $row = db_fetch_assoc($result); $row['comment'] = comment_sanitize($row['comment']); output("`0" . $row['postdate'] . ": " . $row['name'] . ": `#" . $row['comment'] . "</span><br />"); } rawoutput("</body>"); rawoutput("</html>"); rawoutput("</textarea>"); } else { output("You're not in any commentary area right now.`n`n"); } } else { output("Commentary Export is a pretty high-load deal - for that reason, we've restricted it to donators only. Sorry about that.`n`n"); } // array(9) { // 'commentid' = '103' // 'section' = 'village-Mutant' // 'author' = '1' // 'comment' = '1' // 'postdate' = '2009-09-24 10:52:29' // 'name' = 'Admin CavemanJoe' // 'acctid' = '1' // 'clanrank' = '0' // 'clanshort' = '' // } popup_footer(); }
} } $sql = "UPDATE " . db_prefix("translations") . " SET author='{$session['user']['login']}', version='{$logd_version}', uri='{$page}', outtext='{$trans}' WHERE tid IN (" . join(",", $rows) . ")"; } } db_query($sql); if (httppost("savenotclose") > "") { header("Location: translatortool.php?op=list&u={$page}"); exit; } else { popup_header("Updated"); rawoutput("<script language='javascript'>window.close();</script>"); popup_footer(); } } elseif ($op == "list") { popup_header("Translation List"); $sql = "SELECT uri,count(*) AS c FROM " . db_prefix("translations") . " WHERE language='" . LANGUAGE . "' GROUP BY uri ORDER BY uri ASC"; $result = db_query($sql); rawoutput("<form action='translatortool.php' method='GET'>"); rawoutput("<input type='hidden' name='op' value='list'>"); output("Known Namespaces:"); rawoutput("<select name='u'>"); while ($row = db_fetch_assoc($result)) { rawoutput("<option value=\"" . rawurlencode(htmlentities($row['uri'], ENT_COMPAT, getsetting("charset", "ISO-8859-1"))) . "\">" . htmlentities($row['uri'], ENT_COMPAT, getsetting("charset", "ISO-8859-1")) . " ({$row['c']})</option>", true); } rawoutput("</select>"); $show = translate_inline("Show"); rawoutput("<input type='submit' class='button' value=\"{$show}\">"); rawoutput("</form>"); $ops = translate_inline("Ops"); $from = translate_inline("From");
<?php tlschema("faq"); popup_header("Specific and Technical Questions"); $c = translate_inline("Return to Contents"); rawoutput("<a href='petition.php?op=faq'>{$c}</a><hr>"); output("`n`n`c`bSpecific and technical questions`b`c`n"); output("`^1.a. How can I have been killed by another player while I was currently playing?`n"); output("`@The biggest cause of this is someone who began attacking you while you were offline, and completed the fight while you were online."); output("This can even happen if you have been playing nonstop for the last hour."); output("When someone starts a fight, they are forced by the game to finish it at some point."); output("If they start a fight with you, and close their browser, the next time they log on, they will have to finish the fight."); output("You will lose the lesser of the gold you had on hand when they attacked you, or the gold on hand when they finished the fight."); output("So if you logged out with 1 gold on hand, they attack you, you log on, accumulate 2000 gold on hand, and they complete the fight, they will only come away from it with 1 gold."); output("The same is true if you logged out with 2000 gold, and when they completed killing you, you only had 1 gold.`n`n"); output("`^1.b. Why did it say I was killed in the fields when I slept in the inn?`n"); output("`@The same thing can happen where someone started attacking you when you were in the fields, and finished after you had retired to the inn for the day."); output("Keep in mind that if you are idle on the game for too long, you become a valid target for others to attack you in the fields."); output("If you're going to go away from your computer for a few minutes, it's a good idea to head to the inn for your room first so that you don't risk someone attacking you while you're idle.`n`n"); output("`^2. The game tells me that I'm not accepting cookies, what are they and what do I do?`n"); output("`@Cookies are little bits of data that websites store on your computer so they can distinguish you from other players."); output("Sometimes if you have a firewall it will block cookies, and some web browsers will let you block cookies."); output("Check the documentation for your browser or firewall, or look around in its preferences for settings to modify whether or not you accept cookies."); output("You need to at least accept session cookies to play the game, though all cookies are better.`n`n"); output("`^3. What do`n `iWarning: mysql_pconnect(): Lost connection to MySQL server during query in /home/lotgd/public_html/dbwrapper.php on line 82`i`nand`n `iWarning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/lotgd/public_html/dbwrapper.php on line 54`i`nmean?`n", true); output("`@It's a secret message from your computer telling you to stop staring at a screen and to go play outside.`n"); output("Actually, it's a common temporary error, usually having to do with server load."); output("Don't worry about it, just reload the page (it may take a few tries).`n`n"); output("`^4. Nothing is responding for hours now - what should I do ?`n"); output("`@Go outside play a bit in Real Life (tm). When you get back it will work again - if not it's a serious problem."); output("Any server problems are caught less then 5 minutes after occurring, so if there is a problem, it's known - and we are working on it.");
<?php popup_header("Your Stamina statistics"); $stamina = get_module_pref("stamina"); $daystamina = 1000000; $redpoint = get_module_pref("red"); $amberpoint = get_module_pref("amber"); $redpct = get_stamina(0); $amberpct = get_stamina(1); $greenpct = get_stamina(2); $greentotal = round(($daystamina - $redpoint - $amberpoint) / $daystamina * 100); $ambertotal = round(($daystamina - $redpoint) / $daystamina * 100 - $greentotal); $redtotal = 100 - $greentotal - $ambertotal; $greenwidth = $greentotal / 100 * $greenpct; $amberwidth = $ambertotal / 100 * $amberpct; $redwidth = $redtotal / 100 * $redpct; $colorgreen = "#00FF00"; $coloramber = "#FFA200"; $colorred = "#FF0000"; $colordarkgreen = "#003300"; $colordarkamber = "#2F1E00"; $colordarkred = "#330000"; $colorbackground = $colordarkgreen; if ($greenpct == 0) { $colorgreen = $colordarkamber; $colorbackground = $colordarkamber; } if ($amberpct == 0) { $colorgreen = $colordarkred; $coloramber = $colordarkred; $colorbackground = $colordarkred;
<? require_once "common.php"; addcommentary(); session_write_close(); popup_header("LoGD 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)); } } output("`n<input type='submit' class='button' value='Vote'>",true); output("</form>",true);
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); //output_notl("<table width='25%' border='0' cellpadding='0' cellspacing='2'><tr><td><a href='mail.php' class='motd'>$inbox</a></td><td><a href='mail.php?op=address' class='motd'>$write</a></td>", true); rawoutput("<table width='50%' border='0' cellpadding='0' cellspacing='2'>"); rawoutput("<tr>"); for ($i = 0; $i < count($mailfunctions); $i++) {
<?php popup_header("Marriage Questions"); $c = translate_inline("Contents"); output_notl("`#<strong><center><a href='petition.php?op=faq'>{$c}</a></center></strong>`0", true); addnav("", "petition.php?op=faq"); output("`n`c`&`bQuestions about Marriage`b`c`n"); output("`^1. What is Marriage?`n"); output("`@Don't go there... you don't want to know!`n`n"); output("`^2. Where can I get Married?`n"); if (get_module_setting('all') == 1 && get_module_setting('oc') == 0) { output("`@You can just enter a convenient Chapel."); } elseif (get_module_setting('oc') == 1) { output("`@Currently, only in the Old Church in %s", get_module_setting('oldchurchplace', 'oldchurch')); } else { output("`@Currently, only in the Chapel in %s", get_module_setting('chapelloc')); } if (get_module_setting("location") == 0) { $loc = "village"; } else { $loc = "garden"; } output("in the %s.", $loc); output("`nHowever, you do need to have been proposed to."); if (get_module_setting('flirttype')) { output("`nFind more information at your local `iLoveshack`i."); if (get_module_setting('lall')) { output("`nOne in every place.."); } else { output("`nThe closest loveshack to you is in `%%s`@.", get_module_setting('loveloc')); }