本文整理汇总了PHP中viewcommentary函数的典型用法代码示例。如果您正苦于以下问题:PHP viewcommentary函数的具体用法?PHP viewcommentary怎么用?PHP viewcommentary使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了viewcommentary函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: mapchat_run
function mapchat_run()
{
global $session;
$xyz = httpget('xyz');
page_header("Tent!");
output("There's a tent here!");
require_once "lib/commentary.php";
addcommentary();
viewcommentary("worldmap" . $xyz, "Map Chat!", 25);
addnav("Go Back", "runmodule.php?module=worldmapen&op=continue");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:12,代码来源:mapchat.php
示例2: fourthwall_run
function fourthwall_run()
{
global $session;
page_header("The Place Behind the Fourth Wall");
output("Much like the pleasant gardens of Common Ground, The Place Behind the Fourth Wall has an entry point from every Outpost on the Island. Contestants may enter The Place Behind the Fourth Wall, or Location Four as it is officially known, from any Outpost - but may only return to the Outpost from which they came in.`n`nIt is a bright, blurry place, where it's rather difficult to focus on anything other than the other contestants - and even then, some find it easier to shut their eyes and simply talk and listen.`n`nIn contrast to Common Ground, The Place Behind the Fourth Wall is an area for out-of-character conversations, real-life chat, giving and receiving help with the game, and so on. As always, official bug reports may be posted in the Enquirer - this isn't the place for them, as conversations can go too quickly for staff to find bug reports.`n`nPlease, no roleplaying in Location Four - the whole rest of the Island is a better place for that.`n`nHave fun!");
require_once "lib/commentary.php";
addcommentary();
viewcommentary("fourthwall", "Chatty Chat Chat");
addnav("Return");
addnav("Back to the Outpost", "village.php");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:12,代码来源:fourthwall.php
示例3: forestchat_run
function forestchat_run()
{
global $session;
page_header("Who is here?");
output("You look around yourself to see if there are any warriors nearby who you can chinwag with.`n`n");
require_once "lib/commentary.php";
addcommentary();
$loc = substr($session['user']['location'], 0, 10);
viewcommentary("forest-" . $loc, "Chat with others who walk this path...", 25);
addnav("Continue");
addnav("Back to the Jungle", "forest.php");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:13,代码来源:forestchat.php
示例4: worldmapchat_run
function worldmapchat_run()
{
global $session;
page_header("Who is here?");
output("Because the more out-of-the-way areas of Improbable Island can provide a shred more privacy than the town squares, you can sometimes find people hanging around and just chatting. If, that is, they've not hidden themselves too well.`n`nYou look around yourself to see if there are any travellers nearby who you can chinwag with.`n`n");
require_once "lib/commentary.php";
addcommentary();
$loc = get_module_pref("worldXYZ", "worldmapen");
viewcommentary("worldmap-" . $loc, "Chat with others who walk this path...", 25);
addnav("Continue your Journey");
addnav("Back to the World Map", "runmodule.php?module=worldmapen&op=continue");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:13,代码来源:worldmapchat.php
示例5: biochat_dohook
function biochat_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "bioend":
require_once "lib/commentary.php";
output("`n`n`0%s`0's Natter feed:`n", $args['name']);
addcommentary();
$section = "bio-" . $args['acctid'];
viewcommentary($section, "Natter!", 25);
if (!strpos(httpget('ret'), "bio.php")) {
set_module_pref("lastplace", httpget('ret'));
}
$sql = "SELECT COUNT(commentid) AS totalcomments FROM " . db_prefix("commentary") . " WHERE section='{$section}'";
$result = db_query($sql);
$row = db_fetch_assoc($result);
$all = $row['totalcomments'];
set_module_pref("total", $all, "biochat", $args['acctid']);
if ($args['acctid'] == $session['user']['acctid']) {
//this is the player looking at his or her own bio
set_module_pref("seen", $all);
}
$return = get_module_pref("lastplace");
if ($return) {
$return = substr($return, strrpos($return, "/") + 1);
addnav("Been clicking around Bios and Nattering for a while?");
addnav("Go `iright`i back to where you came from", $return);
}
debug($return);
break;
case "commentaryoptions":
if (!strpos($_SERVER['REQUEST_URI'], "char=" . $session['user']['acctid'] . "&")) {
$link = "bio.php?char=" . $session['user']['acctid'] . "&ret=" . URLEncode($_SERVER['REQUEST_URI']);
$total = get_module_pref("total");
$seen = get_module_pref("seen");
output("<a href=\"{$link}\">View my Bio</a> ", true);
if ($seen != $total) {
$new = $total - $seen;
if ($new == 1) {
output("(1 unread Natter) ");
} else {
output("(%s unread Natters) ", $new);
}
}
addnav("", $link);
}
break;
}
return $args;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:50,代码来源:biochat.php
示例6: output
}
//remove this before going live!
//addnav("Cheat","runmodule.php?module=improbablehousing&op=cheat&hid=$hid&rid=$rid");
} else {
output("This dwelling is not yet completed, and doesn't have any rooms to speak of.`n`n");
}
improbablehousing_show_build_jobs($house, $rid);
addnav("Building Materials");
addnav("Examine materials stock", "runmodule.php?module=improbablehousing&op=store&sub=start&hid={$hid}&rid={$rid}");
improbablehousing_list_occupants($house, $rid);
//Handle interior nav links in a function (kitchens etc)
$hook = array("hid" => $hid, "rid" => $rid, "house" => $house);
$hook = modulehook("improbablehousing_interior", $hook);
$house = $hook['house'];
if (!$house['data']['rooms'][$rid]['blockchat']) {
require_once "lib/commentary.php";
addcommentary();
if (improbablehousing_getkeytype($house, $rid) >= 100) {
viewcommentary("dwelling-" . $hid . "-" . $rid, "Chat with others in this room", 25, "says", false, false, false, false, true);
} else {
viewcommentary("dwelling-" . $hid . "-" . $rid, "Chat with others in this room");
}
}
}
if ($rid != 0) {
improbablehousing_bottomnavs($house);
} else {
addnav("Leave");
addnav("M?Back to the Island Map", "runmodule.php?module=improbablehousing&op=exit&hid={$hid}");
}
page_footer();
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:interior.php
示例7: addcommentary
addcommentary();
$cost = $session['user']['level'] * 20;
if (!isset($_GET['op'])) {
$_GET['op'] = '';
}
if ($_GET['op'] == "pay") {
if ($session['user']['gold'] >= $cost) {
$session['user']['gold'] -= $cost;
debuglog("spent {$cost} gold to speak to the dead");
redirect("gypsy.php?op=talk");
} else {
page_header("Gypsy Seer's tent");
addnav("Return to the village", "village.php");
output("`5You offer the old gypsy woman your `^{$session['user']['gold']}`5 gold for your gen-u-wine say-ance, however she informs you that the dead \n\t\tmay be dead, but they ain't cheap.");
}
} elseif ($_GET['op'] == "talk") {
page_header("In a deep trance, you talk with the shades");
output("`5While in a deep trance, you are able to talk with the dead:`n");
viewcommentary("shade", "Project", 25, "projects");
addnav("Snap out of your trance", "village.php");
} else {
checkday();
page_header("Gypsy Seer's tent");
output("`5You duck in to a gypsy tent behind `%Pegasus'`5 wagon which promises to let you talk with the deceased. In typical gypsy style, the old woman sitting behind\n\ta somewhat smudgy crystal ball informs you that the dead only speak with the paying. Your price is `^{$cost}`5 gold.");
addnav("Pay to talk to the dead", "gypsy.php?op=pay");
addnav("Forget it", "village.php");
if ($session['user']['superuser'] > 1) {
addnav("Superuser Entry", "gypsy.php?op=talk");
}
}
page_footer();
开发者ID:BackupTheBerlios,项目名称:dragonsaga-svn,代码行数:31,代码来源:gypsy.php
示例8: output
if ($ft == 0) {
output("You haven't flirted with anyone today, but you can flirt a total of");
} else {
output("You've flirted `%%s`@ time%s today out of a possible", $ft, translate_inline($ft > 1 ? "s" : ""));
}
output("`%%s`@ time%s.`n`n", $max, translate_inline($max > 1 ? "s" : ""));
require_once "./modules/marriage/flirtlist.php";
marriage_flist($items);
break;
case "bar":
addnav("Drinks");
modulehook("ale", array());
require_once "lib/commentary.php";
addcommentary();
output("`@As you sit down at the bar, %s`@ inquires as to if you would like a drink.`nLooking around, you nod and talk to other patrons.`n", $bartender);
viewcommentary("loveshack", "`#Discourse?`@", 25, "discourses");
break;
}
addnav("Navigation");
if (get_module_setting("location") == 1) {
addnav("Return to the Gardens", "gardens.php");
} else {
villagenav();
}
addnav("Actions");
if (get_module_pref("user_option") == 0 && get_module_pref("supernoflirt") == 0) {
addnav("`\$No Flirting", $link . "&op2=noflirt");
addnav("Rules of Flirting", $link . "&op2=rules");
addnav("Point Values", $link . "&op2=pointvalue");
addnav(array("`^Talk to %s `@`i(Your Flirt Status)`i", $bartender), $link . "&op2=talk");
addnav("The Bar", $link . "&op2=bar");
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:loveshack.php
示例9: output
output("`b`c`2The Gardens`0`c`b");
output("`n`n`@You walk through a gate and on to one of the many winding paths that makes its way through the well-tended gardens. From the flowerbeds that bloom even in darkest winter, to the hedges whose shadows promise forbidden secrets, these gardens provide a refuge for those seeking out the Green Dragon; a place where they can forget their troubles for a while and just relax.`n`n");
output("`^A large pond is here that looks to hold many types of fish. Perhaps you would like to try your luck at some fishing?");
output("`n`n`^You have `&" . $session['user']['fishturns'] . " `^fishing turns left for today.`n");
addnav("Things to do");
addnav("Fish in the pond", "gardens.php?op=fishcheck");
addnav("Return to the Village", "village.php");
viewcommentary("gardens", "Chat Here:", 30, "whispers");
} else {
output("`b`c`2The Gardens`0`c`b");
output("`n`n`@You walk through a gate and on to one of the many winding paths that makes its way through the well-tended gardens. From the flowerbeds that bloom even in darkest winter, to the hedges whose shadows promise forbidden secrets, these gardens provide a refuge for those seeking out the Green Dragon; a place where they can forget their troubles for a while and just relax.`n`n");
output("`^A large pond is here that looks to hold many types of fish.");
output("`n`n`%You are too tired to fish anymore today`&...`n");
addnav("Things to do");
addnav("Return to the Village", "village.php");
viewcommentary("gardens", "Chat Here:", 30, "whispers");
}
} elseif ($_GET['op'] == "fishcheck") {
output("`b`c`2The Gardens`0`c`b");
if ($session['user']['fishingpole'] != 1) {
output("`nYou need a fishing pole to go fishing in the pond. Buy one at the general store.`n");
}
if ($session['user']['worms'] < 1 && $session['user']['minnows'] < 1 && $session['user']['lures'] < 1) {
output("`nYou need some kind of bait or lure to fish with. Buy some at the general store.`n");
addnav("Continue", "gardens.php");
addnav("Return to the Village", "village.php");
} else {
redirect("gardens.php?op=gofishing");
}
} elseif ($_GET[op] == "gofishing") {
output("`b`c`2The Gardens`0`c`b");
开发者ID:BackupTheBerlios,项目名称:dragonsaga-svn,代码行数:31,代码来源:gardens.php
示例10: addnav
addnav("Actions");
addnav("Buy a Ring", "runmodule.php?module=marriage&op=" . $op . "&op2=ringbuy&stage=1");
} elseif ($session['user']['gold'] < $ringcost) {
output("`n`nYou show `^%s `3your gold pouch and says, \"`&You haven't got enough for this ring.`3\"", $vicar);
} else {
output("`n`nAfter taking a look at your gold pouch, `^%s `3 says \"`&You've got enough for this ring.`3\"", $vicar);
addnav("Actions");
addnav("Buy a Ring", "runmodule.php?module=marriage&op=" . $op . "&op2=ringbuy&stage=1");
}
}
break;
case "talk":
require_once "lib/commentary.php";
addcommentary();
output("`@You hear people whispering...`n`0");
viewcommentary("marriage", "Whisper?", 25);
break;
case "marry":
$allprefs = unserialize(get_module_pref('allprefs'));
$allprefs['flirtsfaith'] = 0;
set_module_pref('allprefs', serialize($allprefs));
$stuff = explode(',', get_module_pref('proposals'));
$i = "";
foreach ($stuff as $val) {
if ($val != "" && $val != $target && $val != $session['user']['acctid']) {
$i .= "," . $val;
}
}
set_module_pref('proposals', $i);
$stuff = explode(',', get_module_pref('proposals', 'marriage', $target));
$i = "";
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:general.php
示例11: output_notl
output_notl("%s%s%s", $pre, $row1['name'], $suf);
$i++;
}
}
/*
Removed for aesthetic purposes.
$city_link = urlencode(get_module_pref("location_saver","dwellings"));
if (is_module_active("cities"))
$link = "runmodule.php?module=cities&op=travel&city=$city_link&su=1";
}else {
$link = "village.php";
}
addnav("Leave");
addnav(array("Return to %s",get_module_pref("location_saver","dwellings")),$link);
*/
$session['user']['location'] = get_module_setting("logoutlocation");
addnav("Dwellings Extras");
modulehook("dwellings-inside", array("type" => $type, "dwid" => $dwid, "owner" => $row['ownerid']));
if (get_module_setting("enablecof") && get_module_setting("enablecof", $type) == 1) {
addnav("The Coffers", "runmodule.php?module=dwellings&op=coffers&dwid={$dwid}");
}
if ($session['user']['acctid'] != $row['ownerid']) {
addnav("Turn in Key", "runmodule.php?module=dwellings&op=keys&subop=giveback&dwid={$dwid}");
} else {
addnav("Dwelling Management", "runmodule.php?module=dwellings&op=manage&dwid={$dwid}");
}
require_once "lib/commentary.php";
addcommentary();
$tl = get_module_objpref("dwellings", $dwid, "dwidtalkline");
viewcommentary("dwellings-" . $dwid, "The walls echo past comments", 20, $tl);
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:case_enter.php
示例12: wcgpoints_run
function wcgpoints_run()
{
global $session;
page_header("Cobblestone Cottage");
$submit = translate_inline("Carry On");
switch (httpget('op')) {
case "enter":
$uid_ok = get_module_pref("uidok");
output("`4`bWARNING: Cobblestone Cottage is currently in BETA, and a little shaky.`b Please don't send Petitions about this feature - use the chat area below, or the Enquirer.`0`n`n");
if (get_module_pref("wcgid") && $uid_ok) {
if (!get_module_pref("fail")) {
$points = wcgpoints_getpoints();
output("`0Jake greets you with a broad smile. \"`@Welcome back, man. You've got %s cobblestones waiting to spend. Have fun!`0\"`n`n", number_format($points));
modulehook("wcg-features");
} else {
//WCG ID present but not verified
debug("WCG ID not verified");
output("Jake greets you with a concerned look. \"`@Man, I've been wondering where you've been. I asked the Cosmos how many Cobblestones to give you, and it wouldn't answer. Something about a messed-up Verification Code, whatever that means.`0\"`n`nIt looks like your Verification Code needs to be re-checked - you can find it via your Profile page on the World Community Grid website, and change our record of it via your Preferences in any Outpost.`n`n");
addnav("Let's do that, then", "runmodule.php?module=wcgpoints&op=verify");
}
} else {
debug("No WCG ID entered");
output("`0You head into a beautiful stone cottage. A long-haired young man sits behind a desk at the entrance, idly smoking a cigarette. As you catch his eye, he grins and rests his cigarette in an ashtray. It smells kinda funny.`n`n\"`@Hey, man. Welcome to Cobblestone Cottage!`0\" He shakes your hand. \"`@The name's Jake. It doesn't look like you're hooked up yet. Here, let me fix that for you, and you'll be rolling in cobblestones in no time.`0\"`n`n\"`#Cobblestones?`0\" you ask.`n`n\"`@Cobblestones, man, cobblestones!`0\" exclaims the hippy. \"`@Whole new local currency - you saw the mess the banks made of the last one! This stuff is as indie as it `igets`i, man. You can only spend them in this very cottage. Let's get you hooked up.`0\"`n`nHe sits down and pulls out a worn leather notebook and a purple-feathered quill pen. \"`@What's your ID, my friend?`0\"`n`n");
output("`J`bPinned to the slightly run-down fourth wall of the cottage is this message:`b`n`n`0The ID that the dirty hippy is asking for is your World Community Grid username.`n`n`bWhat's the story, daddy-o?`b`n`nYour computer can cure AIDS and cancer.`n`nNo, seriously. It can also help provide us with cheap, environmentally-friendly electricity, sort out world hunger, and kick Dengue Fever in the nuts. It can do a lot, really. Most people hardly ever use the full capacity of their computer's CPU's. You'll certainly have unused CPU cycles lying around while you're surfing the Internet or playing this game. It'd be a terrible shame to waste those cycles. Why not donate them to a worthy cause?`n`nScientists and humanitarian researchers need all the computing power they can get their hands on in order to analyse protein structures, chemical properties and other computationally-intensive stuff. You can download a program that'll perform this life-saving research on your very own computer - and it'll run at a very low priority, so that when you do want to use your PC for something computationally intensive like playing a 3D game, your computer will be just as responsive.`n`nThe more CPU cycles you donate to humanitarian research, the more cobblestones Jake will give you. These cobblestones can be used to play games or obtain other resources inside the Cottage. See the list at the end of this page to see what you can do with your cobblestones, and check back as we come up with new features.`n`n`bThe nitty-gritty`b`n`nIn a nutshell, World Community Grid is a distributed computing network that performs humanitarian research using your computer's unused CPU cycles. The project uses the BOINC networked computing client, which runs on Windows, Mac, Linux, FreeBSD and many other platforms, and doesn't affect the normal day-to-day performance of your computer. When your computer's screensaver is active, the World Community Grid client will request instructions, process them, and send them back. When your computer is in use, the client goes into Snooze mode and doesn't use any CPU cycles, so you'll likely not notice that the client is running.`n`nHumanitarian work performed by your computer for World Community Grid includes, but is not limited to:`nDeveloping drugs to combat cancer in children and adults;`nDeveloping antiviral medication for new influenza strains;`nCalculating the electronic properties of materials in order to find an organic compound that we can use to make dirt-cheap solar panels;`nDetermining the best options to create a new strain of rice that will provide maximum nutrition and thrive in a harsh environment;`nUncovering new drugs to combat dengue hemorrhagic fever, hepatitis C, West Nile encephalitis, and Yellow fever;`nIdentifying candidate drugs that have the right shape and chemical characteristics to block HIV protease;`nHuman proteome folding.`n`nFor more information or to join, search for World Community Grid in Wikipedia or your favourite search engine.`n`n`bHow World Community Grid interacts with Improbable Island`b`n`nAt each new game day, Jake will reward you with his entirely-made-up currency based on how many World Community Grid points you've accumulated since the previous game day. More information on how WCG Points are calculated and rewarded can be found via a web search, or on the World Community Grid website. You may install and run the BOINC client on more than one machine if you wish, under the same WCG username - this will result in more points and thus more cobblestones.`n`nWCG only updates their stats every 24 hours, and the work done by your computer must be verified first - so the XML file that Improbable Island reads to determine your cobblestone awards may be several days behind the actual work done by your computer. To save undue stress on World Community Grid's servers, cobblestones are only awarded at each new Game Day. If you joined World Community Grid today, it may be a day or two (or three!) before Jake gives you `iany`i cobblestones at all - however, if you allow your computer to run the BOINC client reasonably often, you should get more cobblestones every day after the first batch arrive.`n`nIf you've been a member of World Community Grid for some time, Jake will give you an initial bag of cobblestones corresponding to the total work done by your computer over the course of your entire WCG membership. You'll be stinking rich!`n`n`bDISCLAIMER`b`nImprobable Island is not affiliated with or endorsed by IBM or World Community Grid. In fact, I'd be surprised if they even knew about this.`n`n`bGETTING STARTED`b`nThere are three steps to the process - signing up at World Community Grid, installing the BOINC client, and associating your World Community Grid account with your Improbable Island username.`n`n`bSteps One and Two`b`nIf you're already signed up with World Community Grid, you can skip this bit.`n");
rawoutput("Head over to <a href=\"http://www.worldcommunitygrid.org/reg/viewRegister.do?teamID=" . get_module_setting("teamid") . "\" target='new'>World Community Grid</a>, and follow the onscreen instructions to sign up, download and install the WCG BOINC client.");
output("`n`n`bStep Three`b`nEnter your World Community Grid username and Verification Code into the boxes below.`n");
rawoutput("<form action='runmodule.php?module=wcgpoints&op=verify' method='POST'>World Community Grid username: <input name='wcgid' value=\"\"><br />World Community Grid Verification Code: <input name='vcode' value=\"\"><br />Your verification code can be found on <a href=\"https://secure.worldcommunitygrid.org/ms/viewMyProfile.do\">this page</a>. Copy-paste it into the box above, making sure you don't leave any tabs or spaces in there.<br /><input type='submit' class='button' value='{$submit}'></form>");
addnav("", "runmodule.php?module=wcgpoints&op=verify");
output("`bFeatures available in Cobblestone Cottage:`b`n`n");
modulehook("wcg-features-desc");
}
require_once "lib/commentary.php";
addcommentary();
viewcommentary("wcgpoints", "Interject your own opinions about trying to get the damned thing working!", 25);
addnav("Exit to Common Ground", "gardens.php");
break;
case "verify":
//Player has entered a WCG ID
//Check that it exists
$id = httppost('wcgid');
$vcode = httppost('vcode');
$id = str_replace(" ", "+", $id);
$source = "http://www.worldcommunitygrid.org/verifyMember.do?name=" . $id . "&code=" . $vcode;
if ($xmlObj = simplexml_load_file($source)) {
if (!$xmlObj->MemberStat && !$xmlObj->MemberStats->MemberStat) {
debug($xmlObj);
output("Jake scans his notebook and frowns. \"`@You sure that's right, man?`0\"`n`n");
output("Something went wrong. Please double-check the information you provided - remember that both usernames and verification codes are case-sensitive.`n`nHere's the error that World Community Grid passed back - it may or may not be useful:`n`4`b%s`b`0`nIf there is no error message above, then it's likely that World Community Grid is running its nightly stats update - in which case, try again in an hour or so.`n`n", $xmlObj);
rawoutput("<form action='runmodule.php?module=wcgpoints&op=verify' method='POST'>World Community Grid username: <input name='wcgid' value=\"\"><br />World Community Grid Verification Code: <input name='vcode' value=\"\"><br />Your verification code can be found on <a href=\"https://secure.worldcommunitygrid.org/ms/viewMyProfile.do\">this page</a>. Copy-paste it into the box above, making sure you don't leave any tabs or spaces in there.<br /><input type='submit' class='button' value='{$submit}'></form>");
addnav("", "runmodule.php?module=wcgpoints&op=verify");
} else {
//Check that the username isn't already taken
$sql = "SELECT acctid FROM " . db_prefix("accounts") . "";
$result = db_query($sql);
$idlo = strtolower($id);
for ($i = 0; $i < db_num_rows($result); $i++) {
$row = db_fetch_assoc($result);
$check = strtolower(get_module_pref("wcgid", "wcgpoints", $row['acctid']));
if ($check == $idlo) {
debug("Match found");
if (get_module_pref("wcgid-verified", "wcgpoints", $row['acctid'])) {
output("`bThat World Community Grid username has already been taken!`b`n`n");
$alreadyexists = 1;
rawoutput("<form action='runmodule.php?module=wcgpoints&op=verify1' method='POST'>World Community Grid username: <input name='wcgid' value=\"\"><br />World Community Grid Verification Code: <input name='vcode' value=\"\"><br />Your verification code can be found on <a href=\"https://secure.worldcommunitygrid.org/ms/viewMyProfile.do\">this page</a>. Copy-paste it into the box above, making sure you don't leave any tabs or spaces in there.<br /><input type='submit' class='button' value='{$submit}'></form>");
addnav("", "runmodule.php?module=wcgpoints&op=verify");
break;
}
}
}
if (!$alreadyexists) {
set_module_pref("uidok", true);
set_module_pref("wcgid", $id);
set_module_pref("user_vcode", $vcode);
$points = $xmlObj->MemberStat->StatisticsTotals->Points;
if (!$points) {
$points = $xmlObj->MemberStats->MemberStat->StatisticsTotals->Points;
}
if (!$points) {
$points = $xmlObj->MemberStatsWithTeamHistory->MemberStats->MemberStat->StatisticsTotals->Points;
}
if (!$points) {
output("The hippy smiles. \"`@Okay, you're all set. Come back tomorrow and we'll sort you out with some cobblestones.`0\"`n`nYour account was verified successfully, but no points have been processed yet. Points sometimes process a day or two late - check back and you'll get some cobblestones soon.`n`n");
} else {
set_module_pref("points", $points);
output("The hippy smiles. \"`@Okay, you're all set. Let's sort you out with some cobblestones...`0\" He reaches underneath his desk and brings out a large bag. \"`@Here you go, man. %s cobblestones. Have fun!`0\"`n`nThose should last you a while...`n`n", number_format($points));
}
}
}
} else {
output("Whoops! The XML file from World Community Grid couldn't be loaded. This could be because World Community Grid is updating its point totals, in which case try again in an hour. If it's still not working in a couple of hours, please Petition the admins to find out what went wrong. Thanks!`n`n");
}
addnav("Exit to Common Ground", "gardens.php");
break;
}
page_footer();
return true;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:97,代码来源:wcgpoints.php
示例13: output
output("`bBy Section Name`b`n`n");
$sql = "SELECT DISTINCT section FROM " . db_prefix("commentary") . " WHERE section NOT LIKE 'dwelling%' AND section NOT LIKE 'bio%' AND section NOT LIKE 'clan%' AND section NOT LIKE 'pet-%'";
$result = db_query($sql);
$locations = array();
while ($row = db_fetch_assoc($result)) {
$locations[] = $row['section'];
}
foreach ($locations as $key => $loc) {
output("`b%s`b`n", $loc);
viewcommentary($loc, "Intervene:", 25);
rawoutput("<hr style=\"border-bottom: 1px dotted #333333; border-top: 0; border-left: 0; border-right: 0;\" />");
}
break;
case "all":
output("`bAll Comments`b`n");
viewcommentary("all", "X", 200);
break;
}
break;
}
function moderate_getlogin($acctid)
{
$sql = "SELECT login FROM " . db_prefix("accounts") . " WHERE acctid = " . $acctid;
$searchresult = db_query($sql);
if (db_num_rows($searchresult) != 1) {
$login = "Unknown";
} else {
$i = 0;
$row = db_fetch_assoc($searchresult);
$login = $row['login'];
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:moderate.php
示例14: addcommentary
<?php
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at your
// option) any later version.
//
// File: rock.php
require_once "common.php";
// This idea is Imusade's from lotgd.net
if ($session['user']['dragonkills'] > 0 || $session['user']['superuser'] > 1) {
addcommentary();
}
checkday();
if ($session['user']['dragonkills'] > 0 || $session['user']['superuser'] > 1) {
page_header("The Veteran's Club");
output("`b`c`2The Veteran's Club`0`c`b");
output("`n`n`4Something in you compels you to examine the curious rock. Some dark magic, locked up in age old horrors.");
output("`n`nWhen you arrive at the rock, an old scar on your arm begins to throb in succession with a mysterious light that ");
output("now seems to come from the rock. As you stare at it, the rock shimmers, shaking off an illusion. You realize that this is ");
output("more than a rock. It is, in fact, a doorway, and over the threshold, you see others, bearing an identical scar to yours. It ");
output("somehow reminds you of the head of one of the great serpents from legend. You have discovered The Veteran's Club.");
output("`n`n");
viewcommentary("veterans", "Boast here", 30, "boasts");
} else {
page_header("Curious looking rock");
output("You approach the curious looking rock. After staring, and looking at it for a little while, it continues to look just like a curious looking rock.`n`n");
output("Bored, you decide to return to the village.");
}
addnav("Return to the village", "village.php");
page_footer();
开发者ID:BackupTheBerlios,项目名称:dragonsaga-svn,代码行数:31,代码来源:rock.php
示例15: pub_kittania_run
function pub_kittania_run()
{
global $session;
$td = gametimedetails();
$gt = $td['secssofartoday'];
//8400 seconds in a day
//3600 seconds in an hour
//midnight: 0
//1am: 3600
//2am: 7200
//3am: 10800
//4am: 14400
//5am: 18000
//6am: 21600
//7am: 25200
//8am: 28800
//9am: 32400
//10am: 36000
//11am: 39600
//12pm midday: 43200
//1pm: 46800
//2pm: 50400
//3pm: 54000
//4pm: 57600
//5pm: 61200
//6pm: 64800
//7pm: 68400
//8pm: 72000
//9pm: 75600
//10pm: 79200
//11pm: 82800
//11:59:59: 86399
//midnight: 0
page_header("The Sunny Spot");
$op = httpget("op");
switch ($op) {
case "start":
rawoutput("<table cellpadding=0 cellspacing=0><tr><td><img src='images/pubsigns/kittania.png' align='left'>");
$phrases = array(1 => "flirting cheerfully with one of her patrons as she draws a pint", 2 => "wearily giving directions to a confused Rookie", 3 => "gossiping idly about the latest chef in town");
$chosenphrase = array_rand($phrases);
output("You climb up a short ladder and emerge into the largest treehouse you've ever seen. Large branches are visible through the transluscent net drape of the ceiling. A few kittymorphs chat and consume drinks while lounging in some of the many inviting hammocks, while others share a meal on reclining couches. Large soft pillows are scattered about the floor around trays full of drink and smokeables. The landlady Miu-Miu is a tawny, middle-aged kittymorph. Right now she's %s.`n`nThe soft murmur of conversation is punctuated by laughter, and the smell of strange incense hangs in the air, mingling with the fresh green scent of the tree itself.`n`n", $phrases[$chosenphrase]);
rawoutput("</td></tr></table>");
require_once "lib/commentary.php";
addcommentary();
viewcommentary("pub_kittania");
addnav("Talk to people");
addnav("Miu-Miu", "runmodule.php?module=pub_kittania&op=bartender");
modulehook("pub_kittania");
break;
case "continue":
rawoutput("<table cellpadding=0 cellspacing=0><tr><td><img src='images/pubsigns/kittania.png' align='left'>");
output("You rejoin your fellows in the open space.`n`n");
rawoutput("</td></tr></table>");
require_once "lib/commentary.php";
addcommentary();
viewcommentary("pub_kittania");
addnav("Talk to people");
addnav("Miu-Miu", "runmodule.php?module=pub_kittania&op=bartender");
modulehook("pub_kittania");
break;
case "bartender":
//add a text parser here at some point, I think...
//maybe make this opening text time-dependent?
$text = array();
$text['hello'] = "Miu-Miu shows you a slightly tired smile. \"`2Yes love, what'll you have?`0\"`n`n";
$drinks = array();
$hook = array();
$hook['drinks'] = $drinks;
$hook['text'] = $text;
$hook = modulehook("pub_kittania_bartender", $hook);
$text = $hook['text'];
//debug($hook);
$drinks = $hook['drinks'];
output_notl($text['hello']);
foreach ($drinks as $key => $vals) {
addnav("What'll it be?");
if (!$vals['blockdrink']) {
if ($session['user']['gold'] >= $vals['price']) {
addnav(array("%s (%s Req)", $vals['verbosename'], $vals['price']), "runmodule.php?module=pub_kittania&op=drink&drink=" . $key);
} else {
addnav(array("%s (%s Req)", $vals['verbosename'], $vals['price']), "");
}
}
}
if (!$hook['blockreturnnav']) {
addnav("Never mind");
addnav("Return to the lounge", "runmodule.php?module=pub_kittania&op=continue");
}
break;
case "drink":
$hook = array("drink" => httpget("drink"));
$hook = modulehook("pub_kittania_drink", $hook);
if (!$hook['blockbarnav']) {
addnav("More!");
addnav("Get Miu-Miu's attention again", "runmodule.php?module=pub_kittania&op=bartender");
}
if (!$hook['blockreturnnav']) {
addnav("That's enough");
addnav("Return to the lounge", "runmodule.php?module=pub_kittania&op=continue");
}
//.........这里部分代码省略.........
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:101,代码来源:pub_kittania.php
示例16: pub_squathole_run
function pub_squathole_run()
{
global $session;
$td = gametimedetails();
$gt = $td['secssofartoday'];
//8400 seconds in a day
//3600 seconds in an hour
//midnight: 0
//1am: 3600
//2am: 7200
//3am: 10800
//4am: 14400
//5am: 18000
//6am: 21600
//7am: 25200
//8am: 28800
//9am: 32400
//10am: 36000
//11am: 39600
//12pm midday: 43200
//1pm: 46800
//2pm: 50400
//3pm: 54000
//4pm: 57600
//5pm: 61200
//6pm: 64800
//7pm: 68400
//8pm: 72000
//9pm: 75600
//10pm: 79200
//11pm: 82800
//11:59:5
|
请发表评论