本文整理汇总了PHP中showform函数的典型用法代码示例。如果您正苦于以下问题:PHP showform函数的具体用法?PHP showform怎么用?PHP showform使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showform函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sessioncheck
function sessioncheck()
{
if (!isset($_SESSION['login']['user']) || !isset($_SESSION['login']['password'])) {
showform();
exit;
}
}
示例2: mechanicalturk_run
function mechanicalturk_run()
{
global $session;
require_once "common.php";
require_once "lib/http.php";
page_header("Report a Monster Sighting");
$points = get_module_setting("addpoints");
switch (httpget("creatureaction")) {
case "report":
require_once "lib/showform.php";
// $level = 1;
output("You head into a little hut on the outskirts of the Outpost, close to where the clearing turns to jungle.`n`nAn excitable-looking man sits behind a desk, a pair of binoculars slung around his neck.`n`n\"`2Hello!`0\" he calls to you, practically bouncing with geeky excitement. \"`2Have you come to report a sighting of a new monster? I do so enjoy writing them up!`0\" He opens a little ledger and whips out a pen, ready for your report.`n`nYou've heard rumours about this guy. Billing himself as a monster expert, he listens to the reports of new monsters that players find, and writes them down in his book. Sauntering into his hut and providing deadly serious reports of completely made-up monsters is a game that many contestants enjoy playing. However, given the aura of Improbability surrounding his innocent-looking ledger, the rumours contain a dark side as well; sometimes, if a made-up monster is deemed to be Improbable enough by the standards of whatever strange powers control the Island, it takes on a physical form in the Jungle...`n`n");
output("As you're thinking this, a splintering CRUNCH from your left causes you to jump three feet into the air. `%Admin `4Caveman`\$Joe`0 is standing in the remains of the fourth wall of the hut, holding a large axe. He strikes an attractive pose and says \"`4This is Improbable Island's monster submission hut. Think of a new monster, and submit it here. If your idea is accepted, you'll get %s Donator Points!`0\"`n`nHe turns to the little man sat behind the desk, who at this moment is picking bits of wood out of his tea, hair and person in general. `%Admin `4Caveman`\$Joe`0 shows him a smile. \"`4I'd say 'Sorry about your wall,' mate, but I'm not. All part of the job, you see.`0\"`n`nWith that, he walks back out of the hole in the fourth wall, attaches his Admin Goggles, leaps into the sky and flies away.`n`n", $points);
output("\"`2What a very, very strange man,`0\" says the little man behind the desk. Quietly.`n`n");
output("`4`b<a href=\"http://enquirer.improbableisland.com/dokuwiki/doku.php?id=terrible_monster_suggestions\">Here are the monster submission guidelines</a>.`b`0 You MUST read these first if you want any chance at all of your monster being accepted, I really can't stress this enough.`n`n", true);
rawoutput("When writing descriptions, please use `n to go down one line, and `n`n to leave a blank line. That's `n, not 'n. The ` key is usually in the top left corner of your keyboard - it's the same key you use for colour codes.");
$form = array("Creature Properties,title", "creatureid" => "Creature id,hidden", "creaturename" => "Creature Name", "creatureweapon" => "Weapon", "creaturewin" => "Win Message (Displayed when the `bcreature kills the player`b)", "creaturelose" => "Death Message (Displayed when the `bplayer kills the creature`b)", "creaturelevel" => "Level,range,1,17,1", "forest" => "Creature is in Jungle?,bool", "graveyard" => "Creature is on FailBoat?,bool", "description" => "A long description of the creature");
$row = array("creatureid" => 0);
addnav("I honestly don't have any ideas. Back to the Jungle.", "forest.php");
rawoutput("<form action='runmodule.php?module=mechanicalturk&creatureaction=save' method='POST'>");
showform($form, $row);
rawoutput("</form>");
addnav("", "runmodule.php?module=mechanicalturk&creatureaction=save");
break;
case "save":
$creatureid = httppost('creatureid');
$creaturename = httppost('creaturename');
$creatureweapon = httppost('creatureweapon');
$creaturewin = httppost('creaturewin');
$creaturelose = httppost('creaturelose');
$creaturelevel = httppost('creaturelevel');
$forest = httppost('forest');
$graveyard = httppost('graveyard');
$description = httppost('description');
$submittedby = $session['user']['name'];
$uid = $session['user']['acctid'];
// $creatureid = db_insert_id();
// $creatureid++;
// $sql = 'LOCK TABLES '.db_prefix( 'mechanicalturk' ).' WRITE;';
// db_query( $sql );
// $sql = "INSERT INTO ".db_prefix("mechanicalturk")."(creatureid,creaturename,creatureweapon,creaturewin,creaturelose,creaturelevel,forest,graveyard,submittedby) VALUES ($creatureid,$creaturename,$creatureweapon,$creaturewin,$creaturelose,$creaturelevel,$forest,$graveyard,$submittedby)";
$sql = "INSERT INTO " . db_prefix("mechanicalturk") . " (creaturename,creatureweapon,creaturewin,creaturelose,creaturelevel,forest,graveyard,description,submittedby,uid) VALUES ('" . mysql_real_escape_string($creaturename) . "','" . mysql_real_escape_string($creatureweapon) . "','" . mysql_real_escape_string($creaturewin) . "','" . mysql_real_escape_string($creaturelose) . "','" . (int) $creaturelevel . "','" . (int) $forest . "','" . (int) $graveyard . "','" . mysql_real_escape_string($description) . "','" . mysql_real_escape_string($submittedby) . "',{$uid})";
// $result = db_query($sql);
db_query($sql);
debug($sql);
// $sql = 'UNLOCK TABLES;';
// db_query( $sql );
output("`4The monster \"`^%s`4\" has been submitted.`n`nDue to the high volume of monster submissions, it may take several days or even weeks before you hear back from us. Please be patient!`0`n`nThe little man behind the desk looks around, confused. \"Who said that?!\"`n`nYou decide it'd be best to get out of here.", $creaturename);
addnav("Back to the Jungle", "forest.php");
break;
case "showsubmitted":
$sql = "SELECT creatureid,creaturename,creatureweapon,creaturewin,creaturelose,creaturelevel,forest,graveyard,description,submittedby,uid FROM " . db_prefix("mechanicalturk");
$result = db_query($sql);
for ($i = 0; $i < db_num_rows($result); $i++) {
$row = db_fetch_assoc($result);
output("Monster submission by %s`n`n", $row['submittedby']);
output("%s`n`n", stripslashes($row['description']));
output("You have encountered %s which lunges at you with %s!`n`n", stripslashes($row['creaturename']), stripslashes($row['creatureweapon']));
output("Creature win message: %s`n", stripslashes($row['creaturewin']));
output("Creature lose message: %s`n", stripslashes($row['creaturelose']));
output("Creature level: %s`n", $row['creaturelevel']);
output("Jungle: %s - FailBoat: %s`n`n", $row['forest'], $row['graveyard']);
rawoutput("<a href=\"runmodule.php?module=mechanicalturk&creatureaction=edit&id=" . $row['creatureid'] . "\">Edit</a> | <a href=\"runmodule.php?module=mechanicalturk&creatureaction=reject&op=1&id=" . $row['creatureid'] . "\">Reject nonspecifically</a> | <a href=\"runmodule.php?module=mechanicalturk&creatureaction=reject&op=2&id=" . $row['creatureid'] . "\">Reject because of writing</a> | <a href=\"runmodule.php?module=mechanicalturk&creatureaction=reject&op=3&id=" . $row['creatureid'] . "\">Reject but ask for rewrite</a> | <a href=\"runmodule.php?module=mechanicalturk&creatureaction=reject&op=4&id=" . $row['creatureid'] . "\">Reject because of pop culture refs</a> | <a href=\"runmodule.php?module=mechanicalturk&creatureaction=accept&id=" . $row['creatureid'] . "\">Accept this monster</a>");
addnav("", "runmodule.php?module=mechanicalturk&creatureaction=edit&id=" . $row['creatureid']);
addnav("", "runmodule.php?module=mechanicalturk&creatureaction=reject&op=1&id=" . $row['creatureid']);
addnav("", "runmodule.php?module=mechanicalturk&creatureaction=reject&op=2&id=" . $row['creatureid']);
addnav("", "runmodule.php?module=mechanicalturk&creatureaction=reject&op=3&id=" . $row['creatureid']);
addnav("", "runmodule.php?module=mechanicalturk&creatureaction=reject&op=4&id=" . $row['creatureid']);
addnav("", "runmodule.php?module=mechanicalturk&creatureaction=accept&id=" . $row['creatureid']);
output("`n`n====================`n`n");
}
addnav("Back to the Superuser grotto", "superuser.php");
break;
case "edit":
$id = httpget("id");
require_once "lib/showform.php";
addnav("Back to the Jungle", "forest.php");
$form = array("Creature Properties,title", "creatureid" => "Creature id,hidden", "creaturename" => "Creature Name", "creatureweapon" => "Weapon", "creaturewin" => "Win Message (Displayed when the creature kills the player)", "creaturelose" => "Death Message (Displayed when the creature is killed by the player)", "creaturelevel" => "Level,range,1,18,1", "forest" => "Creature is in Jungle?,bool", "graveyard" => "Creature is on FailBoat?,bool", "description" => "A long description of the creature");
$sql = "SELECT creatureid,creaturename,creatureweapon,creaturewin,creaturelose,creaturelevel,forest,graveyard,description,submittedby,uid FROM " . db_prefix("mechanicalturk") . " WHERE creatureid = {$id}";
$result = db_query($sql);
$row = db_fetch_assoc($result);
debug($row);
$row['creaturename'] = stripslashes($row['creaturename']);
$row['creatureweapon'] = stripslashes($row['creatureweapon']);
$row['creaturewin'] = stripslashes($row['creaturewin']);
$row['creaturelose'] = stripslashes($row['creaturelose']);
$row['description'] = stripslashes($row['description']);
rawoutput("<form action='runmodule.php?module=mechanicalturk&creatureaction=update' method='POST'>");
showform($form, $row);
rawoutput("</form>");
addnav("", "runmodule.php?module=mechanicalturk&creatureaction=update");
addnav("Back to the submission list", "runmodule.php?module=mechanicalturk&creatureaction=showsubmitted");
addnav("Back to the Superuser grotto", "superuser.php");
break;
case "update":
addnav("Back to the submission list", "runmodule.php?module=mechanicalturk&creatureaction=showsubmitted");
addnav("Back to the Superuser grotto", "superuser.php");
$creatureid = httppost('creatureid');
$creaturename = httppost('creaturename');
$creatureweapon = httppost('creatureweapon');
//.........这里部分代码省略.........
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:101,代码来源:mechanicalturk.php
示例3: output
output("`n`nThe original game code, developed by Eric Stevens and JT Traub, with a design by Chris Yarbrough, remains under their copyright.");
output("`n`nYou may download the latest official version of LoGD at <a href=\"http://sourceforge.net/projects/lotgd\">http://sourceforge.net/projects/lotgd</a>", true);
output("and you can play the version currently in development at http://lotgd.net.");
output("`n`nLegend of the Green Dragon is a remake of and homage to the classic");
output("BBS Door game, Legend of the Red Dragon (aka LoRD) by <a href=\"http://www.rtsoft.com/\">Seth Able Robinson</a>. ", true);
output("`n`n`@`2LoRD is now owned by Gameport (<a href='http://www.gameport.com/bbs/lord.html'>http://www.gameport.com/bbs/lord.html</a>), and ", true);
output("they retain exclusive rights to the LoRD name and game. That's why all content in ");
output("Legend of the Green Dragon (and by extension, TDS) is new, with only a very few nods to the original game, such ");
output("as the buxom barmaid, Violet, and the handsome bard, Seth.`n`n");
output("`@`2Although serious effort was made to preserve the original feel of the game, ");
output("numerous departures were taken from the original game to enhance playability, and ");
output("to adapt it to the web.`n`n");
output("`@`2We hope you enjoy the game!`@");
break;
}
}
addnav("Game Setup Info", "about.php?op=setup");
} elseif ($_GET['op'] == "setup") {
addnav("About TDS", "about.php");
$setup = array("Game Setup,title", "pvp" => "Enable Slay Other Players,viewonly", "pvpday" => "Player Fights per day,viewonly", "pvpimmunity" => "Days that new players are safe from PvP,viewonly", "pvpminexp" => "Amount of experience when players become killable in PvP,viewonly", "soap" => "Clean user posts (filters bad language and splits words over 45 chars long),viewonly", "newplayerstartgold" => "Amount of gold to start a new character with,viewonly", "New Days,title", "fightsforinterest" => "Player must have fewer than how many forest fights to earn interest?,viewonly", "maxinterest" => "Max Interest Rate (%),viewonly", "mininterest" => "Min Interest Rate (%),viewonly", "daysperday" => "Game days per calendar day,viewonly", "specialtybonus" => "Extra daily uses in specialty area,viewonly", "Bank settings,title", "borrowperlevel" => "Max amount player can borrow per level,viewonly", "transferperlevel" => "Max amount player can transfer per level of recipient,viewonly", "mintransferlev" => "Minimum level a player has to be before they can transfer gold,viewonly", "transferreceive" => "Total transfers a player can receive in one play day,viewonly", "maxtransferout" => "Max amount total a player can transfer to others per level,viewonly", "Bounty,title", "bountymin" => "Minimum amount per level of target for bounty,viewonly", "bountymax" => "Maximum amount per level of target for bounty,viewonly", "bountylevel" => "Minimum player level for being a bounty target,viewonly", "bountyfee" => "Percentage of bounty kept by Dag Durnick,viewonly", "maxbounties" => "How many bounties can a person set per day,viewonly", "Forest,title", "turns" => "Forest Fights per day,viewonly", "dropmingold" => "Forest Creatures always drop at least 1/4 of possible gold,viewonly", "lowslumlevel" => "Minimum level to allow slumming,viewonly", "Mail Settings,title", "mailsizelimit" => "Message size limit per message,viewonly", "inboxlimit" => "Limit # of messages in inbox,viewonly", "oldmail" => "Automatically delete old messages after (days),viewonly", "Content Expiration,title", "expirecontent" => "Days to keep comments and news? (0 for infinite),viewonly", "expiretrashacct" => "Days to keep accounts that were never logged in to? (0 for infinite),viewonly", "expirenewacct" => "Days to keep level 1 accounts with no dragon kills? (0 for infinite),viewonly", "expireoldacct" => "Days to keep all other accounts? (0 for infinite),viewonly", "LOGINTIMEOUT" => "Seconds of inactivity before auto-logoff,viewonly", "Useful Information,title", "Day Duration: " . round($dayduration / 60 / 60, 0) . " hours,viewonly", "Current Server Time: " . date("Y-m-d h:i:s a") . ",viewonly", "Last new day: " . date("h:i:s a", strtotime("-{$realsecssofartoday} seconds")) . ",viewonly", "Current game time: " . getgametime() . ",viewonly", "Next new day: " . date("h:i:s a", strtotime("+{$realsecstotomorrow} seconds")) . " (" . date("H\\h i\\m s\\s", strtotime("1970-01-01 00:00:00 + {$realsecstotomorrow} seconds")) . "),viewonly");
output("`@<h3>Settings for this game</h3>`n`n", true);
//output("<table border=1>",true);
showform($setup, $settings, true);
//output("</table>",true);
}
if ($session['user']['loggedin']) {
addnav("Return to the news", "news.php");
} else {
addnav("Login Page", "index.php");
}
page_footer();
示例4: array
$weaponarray = array("Weapon,title", "weaponid" => "Weapon ID,hidden", "weaponname" => "Weapon Name", "damage" => "Damage,range,1,15,1");
$op = httpget('op');
$id = httpget('id');
if ($op == "edit" || $op == "add") {
if ($op == "edit") {
$sql = "SELECT * FROM " . db_prefix("weapons") . " WHERE weaponid='{$id}'";
$result = db_query($sql);
$row = db_fetch_assoc($result);
} else {
$sql = "SELECT max(damage+1) AS damage FROM " . db_prefix("weapons") . " WHERE level={$weaponlevel}";
$result = db_query($sql);
$row = db_fetch_assoc($result);
}
rawoutput("<form action='weaponeditor.php?op=save&level={$weaponlevel}' method='POST'>");
addnav("", "weaponeditor.php?op=save&level={$weaponlevel}");
showform($weaponarray, $row);
rawoutput("</form>");
} else {
if ($op == "del") {
$sql = "DELETE FROM " . db_prefix("weapons") . " WHERE weaponid='{$id}'";
db_query($sql);
$op = "";
httpset("op", $op);
} else {
if ($op == "save") {
$weaponid = (int) httppost("weaponid");
$damage = httppost("damage");
$weaponname = httppost("weaponname");
if ($weaponid > 0) {
$sql = "UPDATE " . db_prefix("weapons") . " SET weaponname=\"{$weaponname}\",damage=\"{$damage}\",value=" . $values[$damage] . " WHERE weaponid='{$weaponid}'";
} else {
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:weaponeditor.php
示例5: array
$armorarray = array("Armor,title", "armorid" => "Armor ID,hidden", "armorname" => "Armor Name", "defense" => "Defense,range,1,15,1");
$op = httpget('op');
$id = httpget('id');
if ($op == "edit" || $op == "add") {
if ($op == "edit") {
$sql = "SELECT * FROM " . db_prefix("armor") . " WHERE armorid='{$id}'";
$result = db_query($sql);
$row = db_fetch_assoc($result);
} else {
$sql = "SELECT max(defense+1) AS defense FROM " . db_prefix("armor") . " WHERE level={$armorlevel}";
$result = db_query($sql);
$row = db_fetch_assoc($result);
}
rawoutput("<form action='armoreditor.php?op=save&level={$armorlevel}' method='POST'>");
addnav("", "armoreditor.php?op=save&level={$armorlevel}");
showform($armorarray, $row);
rawoutput("</form>");
} else {
if ($op == "del") {
$sql = "DELETE FROM " . db_prefix("armor") . " WHERE armorid='{$id}'";
db_query($sql);
//output($sql);
$op = "";
httpset("op", $op);
} else {
if ($op == "save") {
$armorid = httppost('armorid');
$armorname = httppost('armorname');
$defense = httppost('defense');
if ($armorid > 0) {
$sql = "UPDATE " . db_prefix("armor") . " SET armorname=\"{$armorname}\",defense=\"{$defense}\",value=" . $values[$defense] . " WHERE armorid='{$armorid}'";
示例6: optional_param
<?php
require "../../../config.php";
include_once "class.Sudoku.php";
require '../header.php';
$action = optional_param('action', PARAM_ALPHA);
// action
if ($action == 'create') {
AppendSudokuB();
} else {
showform();
}
function showform()
{
$id = required_param('id', PARAM_NUMBER);
// action
?>
<form name="form" method="post" action="create.php">
<center>
<table cellpadding="5">
<tr valign="top">
<td align="right"><b><?php
echo get_string('sudoku_create_count', 'game');
?>
:</b></td>
<td>
<input type="text" name="count" size="6" value="2" /><br>
</td>
</tr>
<tr><td colspan=2><center><br><input type="submit" value="<?php
print_string('sudoku_create_start', 'game');
示例7: explode
if (is_array($val)) {
$v = $val[0];
$x = explode("|", $v);
$val[0] = $x[0];
$x[0] = $val;
} else {
$x = explode("|", $val);
}
$msettings[$key] = $x[0];
// Set up the defaults as well.
if (isset($x[1])) {
$data[$key] = $x[1];
}
}
$sql = "SELECT * FROM " . db_prefix("module_userprefs") . " WHERE modulename='{$module}' AND userid='{$userid}'";
$result = db_query($sql);
while ($row = db_fetch_assoc($result)) {
$data[$row['setting']] = $row['value'];
}
rawoutput("<form action='user.php?op=savemodule&module={$module}&userid={$userid}{$returnpetition}' method='POST'>");
addnav("", "user.php?op=savemodule&module={$module}&userid={$userid}{$returnpetition}");
tlschema("module-{$module}");
showform($msettings, $data);
tlschema();
rawoutput("</form>");
} else {
output("The {$module} module doesn't appear to define any user preferences.");
}
}
module_editor_navs('prefs', "user.php?op=edit&subop=module&userid={$userid}{$returnpetition}&module=");
addnav("", "user.php?op=lasthit&userid={$userid}");
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:user_edit.php
示例8: addnav
}
addnav("Game Settings");
addnav("Standard settings", "configuration.php");
addnav("", $REQUEST_URI);
module_editor_navs('settings', 'configuration.php?op=modulesettings&module=');
if ($op == "") {
$enum = "enumpretrans";
require_once "lib/datetime.php";
$details = gametimedetails();
$offset = getsetting("gameoffsetseconds", 0);
for ($i = 0; $i <= 86400 / getsetting("daysperday", 4); $i += 300) {
$off = $details['realsecstotomorrow'] - ($offset - $i);
if ($off < 0) {
$off += 86400;
}
$x = strtotime("+" . $off . " secs");
$str = sprintf_translate("In %s at %s (+%s)", reltime($x), date("h:i a", $x), date("H:i", $i));
$enum .= ",{$i},{$str}";
}
rawoutput(tlbutton_clear());
$setup = array("Game Setup,title", "loginbanner" => "Login Banner (under login prompt: 255 chars)", "maxonline" => "Max # of players online (0 for unlimited), int", "allowcreation" => "Allow creation of new characters,bool", "gameadminemail" => "Admin Email", "emailpetitions" => "Should submitted petitions be emailed to Admin Email address?,bool", "Enter languages here like this: `i(shortname 2 chars) comma (readable name of the language)`i and continue as long as you wish,note", "serverlanguages" => "Languages available on this server", "defaultlanguage" => "Default Language,enum," . getsetting("serverlanguages", "en,English,fr,Français,dk,Danish,de,Deutsch,es,Español,it,Italian"), "edittitles" => "Should DK titles be editable in user editor,bool", "motditems" => "How many items should be shown on the motdlist,int", "Main Page Display,title", "homeskinselect" => "Should the skin selection widget be shown?,bool", "homecurtime" => "Should the current realm time be shown?,bool", "homenewdaytime" => "Should the time till newday be shown?,bool", "homenewestplayer" => "Should the newest player be shown?,bool", "defaultskin" => "What skin should be the default?,theme", "impressum" => "Tell the world something about the person running this server. (e.g. name and address),textarea", "Beta Setup,title", "beta" => "Enable beta features for all players?,bool", "betaperplayer" => "Enable beta features per player?,bool", "Account Creation,title", "defaultsuperuser" => "Flags automatically granted to new players,bitfield," . ($session['user']['superuser'] | SU_ANYONE_CAN_SET) . " ," . SU_INFINITE_DAYS . ",Infinite Days," . SU_VIEW_SOURCE . ",View Source Code," . SU_DEVELOPER . ",Developer Super Powers (special inc list; god mode; auto defeat master; etc)," . SU_DEBUG_OUTPUT . ",Debug Output", "newplayerstartgold" => "Amount of gold to start a new character with,int", "maxrestartgold" => "Maximum amount of gold a player will get after a dragonkill,int", "maxrestartgems" => "Maximum number of gems a player will get after a dragonkill,int", "requireemail" => "Require users to enter their email address,bool", "requirevalidemail" => "Require users to validate their email address,bool", "blockdupeemail" => "One account per email address,bool", "spaceinname" => "Allow spaces in user names,bool", "allowoddadminrenames" => "Allow admins to enter 'illegal' names in the user editor,bool", "selfdelete" => "Allow player to delete their character,bool", "Commentary/Chat,title", "soap" => "Clean user posts (filters bad language and splits words over 45 chars long),bool", "maxcolors" => "Max # of color changes usable in one comment,range,5,40,1", "postinglimit" => "Limit posts to let one user post only up to 50% of the last posts (else turn it off),bool", "Place names and People names,title", "villagename" => "Name for the main village", "innname" => "Name of the inn", "barkeep" => "Name of the barkeep", "barmaid" => "Name of the barmaid", "bard" => "Name of the bard", "clanregistrar" => "Name of the clan registrar", "deathoverlord" => "Name of the death overlord", "Referral Settings,title", "refereraward" => "How many points will be awarded for a referral?,int", "referminlevel" => "What level does the referral need to reach to credit the referer?,int", "Random events,title", "forestchance" => "Chance for Something Special in the Forest,range,0,100,1", "villagechance" => "Chance for Something Special in any village,range,0,100,1", "innchance" => "Chance for Something Special in the Inn,range,0,100,1", "gravechance" => "Chance for Something Special in the Graveyard,range,0,100,1", "gardenchance" => "Chance for Something Special in the Gardens,range,0,100,1", "Paypal,title", "paypalemail" => "Email address of Admin's paypal account", "paypalcurrency" => "Currency type", "paypalcountry-code" => "What country's predominant language do you wish to have displayed in your PayPal screen?,enum\n\t\t,US,United States,DE,Germany,AI,Anguilla,AR,Argentina,AU,Australia,AT,Austria,BE,Belgium,BR,Brazil,CA,Canada\n\t\t,CL,Chile,C2,China,CR,Costa Rica,CY,Cyprus,CZ,Czech Republic,DK,Denmark,DO,Dominican Republic\n\t\t,EC,Ecuador,EE,Estonia,FI,Finland,FR,France,GR,Greece,HK,Hong Kong,HU,Hungary,IS,Iceland,IN,India\n\t\t,IE,Ireland,IL,Israel,IT,Italy,JM,Jamaica,JP,Japan,LV,Latvia,LT,Lithuania,LU,Luxembourg,MY,Malaysia\n\t\t,MT,Malta,MX,Mexico,NL,Netherlands,NZ,New Zealand,NO,Norway,PL,Poland,PT,Portugal,SG,Singapore,SK,Slovakia\n\t\t,SI,Slovenia,ZA,South Africa,KR,South Korea,ES,Spain,SE,Sweden,CH,Switzerland,TW,Taiwan,TH,Thailand,TR,Turkey\n\t\t,GB,United Kingdom,UY,Uruguay,VE,Venezuela", "paypaltext" => "What text should be displayed as item name in the donations screen(player name will be added after it)?", "(standard: 'Legend of the Green Dragon Site Donation from',note", "General Combat,title", "autofight" => "Allow fighting multiple rounds automatically,bool", "autofightfull" => "Allow fighting until fight is over,enum,0,Never,1,Always,2,Only when not allowed to flee", "Training,title", "automaster" => "Masters hunt down truant students,bool", "multimaster" => "Can players gain multiple levels (challenge multiple masters) per game day?,bool", "displaymasternews" => "Display news if somebody fought his master?,bool", "Clans,title", "allowclans" => "Enable Clan System?,bool", "goldtostartclan" => "Gold to start a clan,int", "gemstostartclan" => "Gems to start a clan,int", "officermoderate" => "Can clan officers who are also moderators moderate their own clan even if they cannot moderate all clans?,bool", "New Days,title", "daysperday" => "Game days per calendar day,range,1,6,1", "specialtybonus" => "Extra daily uses in specialty area,range,0,5,1", "newdaycron" => "Let the newday-runonce run via a cronjob,bool", "The directory is necessary! Do not forget to set the correct one in cron.php in your main game folder!!! ONLY experienced admins should use cron jobbing here,note", "`bAlso make sure you setup a cronjob on your machine using confixx/plesk/cpanel or any other admin panel pointing to the cron.php file in your main folder`b,note", "If you do not know what a Cronjob is... leave it turned off. If you want to know more... check out: <a href='http://wiki.dragonprime.net/index.php?title=Cronjob'>http://wiki.dragonprime.net/index.php?title=Cronjob</a>,note", "resurrectionturns" => "Modify (+ or -) the number of turns deducted after a resurrection as an absolute (number) or relative (number followed by %),text", "Forest,title", "turns" => "Forest Fights per day,range,5,30,1", "dropmingold" => "Forest Creatures drop at least 1/4 of max gold,bool", "suicide" => "Allow players to Seek Suicidally?,bool", "suicidedk" => "Minimum DKs before players can Seek Suicidally?,int", "forestgemchance" => "Player will find a gem one in X times,range,10,100,1", "disablebonuses" => "Should monsters which get buffed with extra HP/Att/Def get a gold+exp bonus?,bool", "forestexploss" => "What percentage of experience should be lost?,range,10,100,1", "Multiple Enemies,title", "multifightdk" => "Multiple monsters will attack players above which amount of dragonkills?,range,8,50,1", "multichance" => "The chance for an attack from multiple enemies is,range,0,100,1", "addexp" => "Additional experience (%) per enemy during multifights?,range,0,15", "instantexp" => "During multi-fights hand out experience instantly?,bool", "maxattacks" => "How many enemies will attack per round (max. value),range,1,10", "allowpackofmonsters" => "Allow multiple monsters of the same type to appear in a battle?,bool", "Random values for type of seeking is added to random base.,note", "multibasemin" => "The base number of multiple enemies at minimum is,range,1,100,2", "multibasemax" => "The base number of multiple enemies at maximum is,range,1,100,3", "multislummin" => "The number of multiple enemies at minimum for slumming is,range,0,100,0", "multislummax" => "The number of multiple enemies at maximum for slumming is,range,0,100,1", "multithrillmin" => "The number of multiple enemies at minimum for thrill seeking is,range,0,100,1", "multithrillmax" => "The number of multiple enemies at maximum for thrill seeking is,range,0,100,2", "multisuimin" => "The number of multiple enemies at minimum for suicide is,range,0,100,2", "multisuimax" => "The number of multiple enemies at maximum for suicide is,range,0,100,4", "Stables,title", "allowfeed" => "Does Merick have feed onhand for creatures,bool", "Companions/Mercenaries,title", "enablecompanions" => "Enable the usage of companions,bool", "companionsallowed" => "How many companions are allowed per player,int", "Modules my alter this value on a per player basis!,note", "companionslevelup" => "Are companions allowed to level up?,bool", "Bank Settings,title", "fightsforinterest" => "Max forest fights remaining to earn interest?,range,0,10,1", "maxinterest" => "Max Interest Rate (%),range,5,10,1", "mininterest" => "Min Interest Rate (%),range,0,5,1", "maxgoldforinterest" => "Over what amount of gold does the bank cease paying interest? (0 for unlimited),int", "borrowperlevel" => "Max player can borrow per level (val * level for max),range5,200,5", "allowgoldtransfer" => "Allow players to transfer gold,bool", "transferperlevel" => "Max player can receive from a transfer (val * level),range,5,100,5", "mintransferlev" => "Min level a player (0 DK's) needs to transfer gold,range,1,5,1", "transferreceive" => "Total transfers a player can receive in one day,range,0,5,1", "maxtransferout" => "Amount player can transfer to others (val * level),range,5,100,5", "innfee" => "Fee for express inn payment (x or x%),int", "Mail Settings,title", "mailsizelimit" => "Message size limit per message,int", "inboxlimit" => "Limit # of messages in inbox,int", "oldmail" => "Automatically delete old messages after (days),int", "superuseryommessage" => "Warning to give when attempting to YoM an admin?", "onlyunreadmails" => "Only unread mail count towards the inbox limit?,bool", "PvP,title", "pvp" => "Enable Slay Other Players,bool", "pvpday" => "Player Fights per day,range,1,10,1", "pvpimmunity" => "Days that new players are safe from PvP,range,1,5,1", "pvpminexp" => "Experience below which player is safe from PvP,int", "pvpattgain" => "Percent of victim experience attacker gains on win,floatrange,.25,20,.25", "pvpattlose" => "Percent of experience attacker loses on loss,floatrange,.25,20,.25", "pvpdefgain" => "Percent of attacker experience defender gains on win,floatrange,.25,20,.25", "pvpdeflose" => "Percent of experience defender loses on loss,floatrange,.25,20,.25", "Content Expiration,title", "expirecontent" => "Days to keep comments and news? (0 = infinite),int", "expiretrashacct" => "Days to keep never logged-in accounts? (0 = infinite),int", "expirenewacct" => "Days to keep 1 level (0 dragon) accounts? (0 =infinite),int", "expireoldacct" => "Days to keep all other accounts? (0 = infinite),int", "LOGINTIMEOUT" => "Seconds of inactivity before auto-logoff,int", "High Load Optimization,title", "This has been moved to the dbconnect.php,note", "LoGDnet Setup,title", "(LoGDnet requires your PHP configuration to have file wrappers enabled!!),note", "logdnet" => "Register with LoGDnet?,bool", "serverurl" => "Server URL", "serverdesc" => "Server Description (75 chars max)", "logdnetserver" => "Master LoGDnet Server (default http://logdnet.logd.com/)", "curltimeout" => "How long we wait for responses from logdnet.logd.com (in seconds),range,1,10,1|2", "Game day Setup,title", "dayduration" => "Day Duration,viewonly", "curgametime" => "Current game time,viewonly", "curservertime" => "Current Server Time,viewonly", "lastnewday" => "Last new day,viewonly", "nextnewday" => "Next new day,viewonly", "gameoffsetseconds" => "Real time to offset new day,{$enum}", "Translation Setup,title", "enabletranslation" => "Enable the use of the translation engine,bool", "It is strongly recommended to leave this feature turned on.,note", "cachetranslations" => "Cache the translations (datacache must be turned on)?,bool", "permacollect" => "Permanently collect untranslated texts (overrides the next settings!),bool", "collecttexts" => "Are we currently collecting untranslated texts?,viewonly", "tl_maxallowed" => "Collect untranslated texts if you have fewer player than this logged in. (0 never collects),int", "charset" => "Which charset should be used for htmlentities?", "Error Notification,title", "Note: you MUST have data caching turned on if you want to use this feature. Also the first error within any 24 hour period will not generate a notice; I'm sorry: that's really just how it is for technical reasons.,note", "show_notices" => "Show PHP Notice output?,bool", "notify_on_warn" => "Send notification on site warnings?,bool", "notify_on_error" => "Send notification on site errors?,bool", "notify_address" => "Address to notify", "notify_every" => "Only notify every how many minutes for each distinct error?,int", "Miscellaneous Settings,title", "allowspecialswitch" => "The Barkeeper may help you to switch your specialty?,bool", "maxlistsize" => "Maximum number of items to be shown in the warrior list,int");
$secstonewday = secondstonextgameday($details);
$useful_vals = array("dayduration" => round($details['dayduration'] / 60 / 60, 0) . " hours", "curgametime" => getgametime(), "curservertime" => date("Y-m-d h:i:s a"), "lastnewday" => date("h:i:s a", strtotime("-{$details['realsecssofartoday']} seconds")), "nextnewday" => date("h:i:s a", strtotime("+{$details['realsecstotomorrow']} seconds")) . " (" . date("H\\h i\\m s\\s", $secstonewday) . ")");
loadsettings();
$vals = $settings + $useful_vals;
rawoutput("<form action='configuration.php?op=save' method='POST'>");
addnav("", "configuration.php?op=save");
showform($setup, $vals);
rawoutput("</form>");
}
page_footer();
示例9: rawoutput
// output("`\$`bServer full!`b`n`^Please wait until some users have logged out.`n`n`0");
// if ($op=="timeout"){
// $session['message'].= translate_inline(" Your session has timed out, you must log in again.`n");
// }
// if (!isset($_COOKIE['lgi'])){
// $session['message'].=translate_inline("It appears that you may be blocking cookies from this site. At least session cookies must be enabled in order to use this site.`n");
// $session['message'].=translate_inline("`b`#If you are not sure what cookies are, please <a href='http://en.wikipedia.org/wiki/WWW_browser_cookie'>read this article</a> about them, and how to enable them.`b`n");
// }
// if ($session['message']>"") output("`b`\$%s`b`n", $session['message'],true);
// rawoutput(templatereplace("loginfull",array()));
// output_notl("`c");
// }
// $msg = getsetting("loginbanner","*BETA* This is a BETA of this website, things are likely to change now and again, as it is under active development *BETA*");
// output_notl("`n`c`b`&%s`0`b`c`n", $msg);
// $session['message']="";
// output("`c`2Game server running version: `@%s`0`c", $logd_version);
if (getsetting("homeskinselect", 1)) {
rawoutput("<form action='home.php' method='POST'>");
rawoutput("<table align='center'><tr><td>");
$form = array("template" => "Choose a different display skin:,theme");
$prefs['template'] = $_COOKIE['template'];
if ($prefs['template'] == "") {
$prefs['template'] = getsetting("defaultskin", "jade.htm");
}
require_once "lib/showform.php";
showform($form, $prefs, true);
$submit = translate_inline("Choose");
rawoutput("</td><td><br> <input type='submit' class='button' value='{$submit}'></td>");
rawoutput("</tr></table></form>");
}
page_footer();
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:home.php
示例10: showform
<?php
// Note that the sample code includes PHP 'require' and 'require_once'
// statements that reference files in the EventTools directory. If you
// move the sample file to another directory, you'll have to update the file
// paths in these statements.
require_once 'access.php';
require 'utilities.php';
$message = "<span style=\"color:red;font-weight:bold\">";
if (!formcomplete()) {
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$message .= "Please complete all values";
}
$message .= "</span>";
showform($message);
return;
}
$now = time();
// add to local log file.
$datastring = get_request_args(date("m/d/y g:i a T", $now), ";") . "\r\n";
if (!($fp = fopen("datafile.dtf", "a"))) {
print "Cannot open \"datafile.dtf\"\n";
} else {
fwrite($fp, $datastring);
fclose($fp);
}
// send email with info
// If needed, change the email address on the next line
$to = $event_tools_registrar_email_address;
$subject = $event_tools_event_name . " Registration FYI " . $_REQUEST["fname"] . " " . $_REQUEST["lname"];
$headers = sprintf("From: " . $event_tools_event_name . " Registration Form <" . $to . ">\r\n");
示例11: db_prefix
<?php
if (is_numeric($id)) {
$sql = 'SELECT * FROM ' . db_prefix('magicitems') . ' WHERE id=' . $id . ' LIMIT 1';
$result = db_query($sql);
$row = array_merge(db_fetch_assoc($result), $itemarray_extra_vals);
rawoutput('<form action="' . htmlentities($fromeditor . 'save&id=' . $id . '&cat=') . $cat . '" method="POST">');
addnav('', $fromeditor . 'save&id=' . $id . '&cat=' . $cat);
require_once 'lib/showform.php';
showform($itemarray, $row);
rawoutput('</form>');
} else {
output('Nothing to edit.');
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:14,代码来源:edit.php
示例12: drinks_editor
//.........这里部分代码省略.........
$id = translate_inline("Id");
$nm = translate_inline("Name");
$dkn = translate_inline("Drunkeness");
$hard = translate_inline("Hard Alchohol?");
$edit = translate_inline("Edit");
$deac = translate_inline("Deactivate");
$act = translate_inline("Activate");
$conf = translate_inline("Are you sure you wish to delete this drink?");
$del = translate_inline("Del");
rawoutput("<table border=0 cellpadding=2 cellspacing=1 bgcolor='#999999'>");
rawoutput("<tr class='trhead'>");
rawoutput("<td>{$op}</td><td>{$id}</td><td>{$nm}</td><td>{$dkn}</td><td>{$hard}</td>");
rawoutput("</tr>");
$sql = "SELECT drinkid,active,name,drunkeness,harddrink FROM " . db_prefix("drinks") . " ORDER BY drinkid";
$result = db_query($sql);
for ($i = 0; $i < db_num_rows($result); $i++) {
$row = db_fetch_assoc($result);
$id = $row['drinkid'];
rawoutput("<tr class='" . ($i % 2 ? "trlight" : "trdark") . "'>");
rawoutput("<td nowrap>[ <a href='runmodule.php?module=drinks&act=editor&op=edit&drinkid={$id}&admin=true'>{$edit}</a>");
addnav("", "runmodule.php?module=drinks&act=editor&op=edit&drinkid={$id}&admin=true");
if ($row['active']) {
rawoutput(" | <a href='runmodule.php?module=drinks&act=editor&op=deactivate&drinkid={$id}&admin=true'>{$deac}</a>");
addnav("", "runmodule.php?module=drinks&act=editor&op=deactivate&drinkid={$id}&admin=true");
} else {
rawoutput(" | <a href='runmodule.php?module=drinks&act=editor&op=activate&drinkid={$id}&admin=true'>{$act}</a>");
addnav("", "runmodule.php?module=drinks&act=editor&op=activate&drinkid={$id}&admin=true");
}
rawoutput(" | <a href='runmodule.php?module=drinks&act=editor&op=del&drinkid={$id}&admin=true' onClick='return confirm(\"{$conf}\");'>{$del}</a> ]</td>");
addnav("", "runmodule.php?module=drinks&act=editor&op=del&drinkid={$id}&admin=true");
output_notl("<td>`^%s</td>`0", $id, true);
output_notl("<td>`&%s`0</td>", $row['name'], true);
output_notl("<td>`^%s`0</td>", $row['drunkeness'], true);
$hard = translate_inline("`^No");
if ($row['harddrink']) {
$hard = translate_inline("`\$Yes");
}
output_notl("<td>%s`0</td>", $hard, true);
rawoutput("</tr>");
}
rawoutput("</table>");
}
$subop = httpget("subop");
if ($op == "edit") {
addnav("Drink properties", "runmodule.php?module=drinks&act=editor&op=edit&drinkid={$drinkid}&admin=true");
module_editor_navs("prefs-drinks", "runmodule.php?module=drinks&act=editor&drinkid={$drinkid}&op=edit&subop=module&editmodule=");
if ($subop == "module") {
$module = httpget("editmodule");
$oldmodule = $mostrecentmodule;
rawoutput("<form action='runmodule.php?module=drinks&act=editor&op=save&subop=module&editmodule={$module}&drinkid={$drinkid}&admin=true' method='POST'>");
module_objpref_edit('drinks', $module, $drinkid);
$mostrecentmodule = $oldmodule;
rawoutput("</form>");
addnav("", "runmodule.php?module=drinks&act=editor&op=save&subop=module&editmodule={$module}&drinkid={$drinkid}&admin=true");
} elseif ($subop == "") {
$sql = "SELECT * FROM " . db_prefix("drinks") . " WHERE drinkid='" . httpget('drinkid') . "'";
$result = db_query($sql);
$row = db_fetch_assoc($result);
}
} elseif ($op == "add") {
/* We're adding a new drink, make an empty row */
$row = array();
$row['drinkid'] = 0;
}
if (($op == "edit" || $op == "add") && $subop == "") {
rawoutput("<form action='runmodule.php?module=drinks&act=editor&op=save&admin=true' method='POST'>");
addnav("", "runmodule.php?module=drinks&act=editor&op=save&admin=true");
showform($drinksarray, $row);
rawoutput("</form>");
output("`\$NOTE:`7 Make sure that you know what you are doing when modifying or adding drinks.`n");
output("Just because the drinks have a lot of options, doesn't mean you have to use all of them`n`n");
output("`2Drink ID: `7This field is used internally and should be unique.`n");
output("`2Name: `7The name of the drink the user will see.`n");
output("`2Cost per level: `7This value times the users level is the drink cost.`n");
output("`2Chance of modifying HP: `7If set, this is the number of chances out of the total of this and the turn chance for HP getting modified.`n");
output("`2Chance of modifying turns: `7If set, this is the number of chances out of the total of this and the HP chance for turns getting modified.`n");
output("`2Always modify HP: `7If set, hitpoints will be modified. Should not be set alongside HP chance above.`n");
output("`2Always modify turns: `7If set, turns will be modified. Should not be set alongside turn chance above.`n");
output("`2Drunkeness: `7How drunk will this make the player.`n");
output("`2Hard Drink: `7Users are only allowed a certain number of hard drinks per day regardless of drunkeness.`n");
output("`2Min HP to add: `7If we are modifying hitpoints, and if HP percent isn't set, use this and the HP max value to pick a random amount of HP to add. Can be negative.`n");
output("`2Max HP to add: `7If we are modifying hitpoints and if HP percent isn't set, use this and the HP min value to pick a random amount of HP to add. Can be negative.`n");
output("`2HP percent: `7If we are modifying hitpoints and if this is set, the users hitpoints are modified by this percentage. Can be negative.`n");
output("`2Min turns to add: `7If we are modifying turns, use this and the turn max value to pick a random amount of turns to add. Can be negative.`n");
output("`2Max turns to add: `7If we are modifying turns, use this and the turn min value to pick a random amount of turns to add. Can be negative.`n");
output("`2Remarks: `7Text displayed to the user when they order the drink.`n");
output("`2Buff name: `7What is this buff called.`n");
output("`2Buff rounds: `7How many rounds this buff lasts.`n");
output("`2Buff round message: `7What message should show as each round occurs.`n");
output("`2Buff wearoff: `7What message is shown when this buff wears off.`n");
output("`2Buff attack modifier: `7Multiplier to modify attack points by? 1.0 is no modification, 2.0 doubles their attack points.`n");
output("`2Buff defense modifier: `7Multiplier to modify defense points by? 1.0 is no modification, 2.0 doubles their defense points.`n");
output("`2Buff damage modifier: `7Multiplier to modify damage by? 1.0 is no modification, 2.0 doubles their damage points. This is `\$VERY POTENT`7!`n");
output("`2Buff damage shield modifier: `7When you are hit, deals damage to your opponent based on damage done to you. 1.0 deals identical damage, 2.0 deals double damage back to the opponent.`n");
output("`2Effect failure message: Message if this buff fails. (Only used with damage shield)`n");
output("`2Effect no damage message: Message if no damage is done. (Only used with damage shield)`n");
output("`2Effect message: What shows when this buff has an effect. (Only used with damage shield)`n`n");
}
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:101,代码来源:misc_functions.php
示例13: str_replace
$list[] = str_replace(",", " ", sanitize($baddie['creaturename']));
}
if (is_array($list) && count($list)) {
$listjoin = join(",", $list);
} else {
$listjoin = "0,none,";
}
require_once "lib/showform.php";
rawoutput("<form action='runmodule.php?module=aitest&opz=pre' method='post'>");
addnav("", "runmodule.php?module=aitest&opz=pre");
$format = array("id" => "Enemy, enum, " . $listjoin, "num" => "Number of enemies, range, 1, 20");
if (get_module_setting("allowload")) {
$format['loadscript'] = "-Optional- Filepath and name of manual encounter script (including enemies),text,60";
$format['note'] = "Do not use this option unless you know what you are doing!,note";
}
showform($format, array());
rawoutput("</form>");
break;
case "pre":
restore_buff_fields();
$loadscript = httppost("loadscript");
debug($loadscript);
if (!empty($loadscript) && file_exists($loadscript)) {
global $session;
require $loadscript;
//it is up to the loaded file to setup and create badguys and options.
} else {
$id = httppost("id");
$num = max(1, httppost("num"));
$cr = db_prefix("creatures");
$sql = "SELECT * FROM {$cr} WHERE creatureid = {$id} LIMIT 1";
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:run.php
示例14: httpget
$id = httpget("id");
$yes = translate_inline("Yes");
$no = translate_inline("No");
if ($id != "") {
$sql = "SELECT * FROM " . db_prefix("magicitembuffs") . " WHERE buffid = {$id}";
$result = db_query($sql);
$buff2 = db_fetch_assoc($result);
$buff = unserialize($buff2['itembuff']);
$buff['buffname'] = $buff2['buffname'];
} else {
$buff = array();
}
rawoutput("<form action='runmodule.php?module=mysticalshop_buffs&op=editor&what=newbuff2&id={$id}' method='post'>");
addnav("", "runmodule.php?module=mysticalshop_buffs&op=editor&what=newbuff2&id={$id}");
$format = array("General Settings,title", 'buffname' => "Buff name (shown in editor),string,250", 'name' => "Buff name (shown in charstats),string,250", 'rounds' => "Rounds,string,250", "Combat Modifiers,title", 'dmgmod' => "Damage Modifier (Goodguy),string,250", 'atkmod' => "Attack Modifier (Goodguy),string,250", 'defmod' => "Defense Modifier (Goodguy),string,250", 'badguydmgmod' => "Damage Modifier (Badguy),string,250", 'badguyatkmod' => "Attack Modifier (Badguy),string,250", 'badguydefmod' => "Defense Modifier (Badguy),string,250", "Misc Combat Modifiers,title", 'lifetap' => "Lifetap,string,250", 'damageshield' => "Damage Shield,string,250", 'regen' => "Regeneration,string,250", "Minion Count Settings,title", 'minioncount' => "Minion count,string,250", 'minbadguydamage' => "Min Badguy Damage,string,250", 'maxbadguydamage' => "Max Badguy Damage,string,250", 'mingoodguydamage' => "Max Goodguy Damage,string,250", 'maxgoodguydamage' => "Max Goodguy Damage,string,250", "Message Settings,title", 'startmsg' => "Start Message,string,250", 'roundmsg' => "Round Message,string,250", 'wearoff' => "Wear Off Message,string,250", 'effectmsg' => "Effect Message,string,250", 'effectfailmsg' => "Effect Fail Message,string,250", 'effectnodmgmsg' => "Effect No Damage Message,string,250", "Misc Settings,title", 'allowinpvp' => "Allow in PvP?,bool", 'allowintrain' => "Allow in Training?,bool", 'survivenewday' => "Survive New Day?,bool", 'invulnerable' => "Invulnerable?,bool", 'expireafterfight' => "Expires after fight?,bool");
showform($format, $buff);
output("`n`n`bOn Dynamic Buffs`b`n");
output("`@In the above, for most fields, you can choose to enter valid PHP code, substituting <fieldname> for fields in the user's account table.`n");
output("Examples of code you might enter:`n");
output("`^<charm>`n");
output("round(<maxhitpoints>/10)`n");
output("round(<level>/max(<gems>,1))`n");
output("`@Fields you might be interested in for this: `n");
output("`3name, sex `7(0=male 1=female)`3, specialty `7(DA=darkarts MP=mystical TS=thief)`3,`n");
output("experience, gold, weapon `7(name)`3, armor `7(name)`3, level,`n");
output("defense, attack, alive, goldinbank,`n");
output("spirits `7(-2 to +2 or -6 for resurrection)`3, hitpoints, maxhitpoints, gems,`n");
output("weaponvalue `7(gold value)`3, armorvalue `7(gold value)`3, turns, title, weapondmg, armordef,`n");
output("age `7(days since last DK)`3, charm, playerfights, dragonkills, resurrections `7(times died since last DK)`3,`n");
output("soulpoints, gravefights, deathpower `7(Ramius favor)`3,`n");
output("race, dragonage, bestdragonage`n`n");
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:newbuff.php
示例15: page_header
page_header("Game Settings");
addnav("G?Return to the Grotto", "superuser.php");
addnav("M?Return to the Mundane", "village.php");
addnav("", $REQUEST_URI);
//$nextnewday = ((gametime()%86400))/4 ; //abs(((86400- gametime())/getsetting("daysperday",4))%86400 );
//echo date("h:i:s a",strtotime("-$nextnewday seconds"))." (".($nextnewday/60)." minutes) ".date("h:i:s a",gametime()).gametime();
$time = strtotime(date("1971-m-d H:i:s", strtotime("now -" . getsetting("gameoffsetseconds", 0) . " seconds"))) * getsetting("daysperday", 4) % strtotime("1971-01-01 00:00:00");
$time = gametime();
$tomorrow = strtotime(date("Y-m-d H:i:s", $time) . " + 1 day");
$tomorrow = strtotime(date("Y-m-d 00:00:00", $tomorrow));
$today = strtotime(date("Y-m-d 00:00:00", $time));
$dayduration = ($tomorrow - $today) / getsetting("daysperday", 4);
$secstotomorrow = $tomorrow - $time;
$secssofartoday = $time - $today;
$realsecstotomorrow = $secstotomorrow / getsetting("daysperday", 4);
$realsecssofartoday = $secssofartoday / getsetting("daysperday", 4);
//output("Current server time: ".date("Y-m-d H:i:s").", current game time: ".date("Y-m-d H:i:s",$time).", tomorrow is ".date("Y-m-d H:i:s",$tomorrow).", $secstotomorrow secs to tomorrow which is $realsecstotomorrow real secs.");
//output("Current server time: ".date("h:i:s a").", current game time: ".date("h:i:s a",$time).", next new day at ".date("h:i:s a",strtotime("+$realsecstotomorrow seconds")).".");
$enum = "enum";
for ($i = 0; $i <= 86400; $i += 900) {
$enum .= ",{$i}," . (int) ($i / 60 / 60) . ":" . $i / 60 % 60 . "";
}
$setup = array("Game Setup,title", "loginbanner" => "Login Banner (under login prompt: 255 chars)", "soap" => "Clean user posts (filters bad language and splits words over 45 chars long),bool", "maxcolors" => "Max # of color changes usable in one comment,int", "gameadminemail" => "Admin Email", "paypalemail" => "Email address of Admin's paypal account", "defaultlanguage" => "Default Language,enum,en,English,dk,Danish,de,Deutsch,es,Español,fr,French", "automaster" => "Masters hunt down truant students,bool", "multimaster" => "Master can be challenged multiple times in a day?,bool", "topwebid" => "ID for Top Web Games (if you are registered),int", "beta" => "Enable beta features for all players?,bool", "Account Creation,title", "superuser" => "Default superuser level,enum,0,Standard play days per calendar day,1,Unlimited play days per calendar day,2,Admin creatures and taunts,3,Admin users", "newplayerstartgold" => "Amount of gold to start a new character with,int", "requireemail" => "Require users to enter their email address,bool", "requirevalidemail" => "Require users to validate their email address,bool", "blockdupeemail" => "One account per email address,bool", "spaceinname" => "Allow spaces in user names,bool", "selfdelete" => "Allow player to delete their character,bool", "New Days,title", "fightsforinterest" => "Max forest fights remaining to earn interest?,int", "maxinterest" => "Max Interest Rate (%),int", "mininterest" => "Min Interest Rate (%),int", "daysperday" => "Game days per calendar day,int", "specialtybonus" => "Extra daily uses in specialty area,int", "Forest,title", "turns" => "Forest Fights per day,int", "dropmingold" => "Forest Creatures drop at least 1/4 of max gold,bool", "lowslumlevel" => "Minimum level perfect fights give extra turn,int", "Bounty,title", "bountymin" => "Minimum amount per level of target for bounty,int", "bountymax" => "Maximum amount per level of target for bounty,int", "bountylevel" => "Minimum player level for being a bounty target,int", "bountyfee" => "Percentage of bounty kept by Dag Durnick,int", "maxbounties" => "How many bounties can a person set per day,int", "Bank Settings,title", "borrowperlevel" => "Max player can borrow per level (val * level for max),int", "allowgoldtransfer" => "Allow players to transfer gold,bool", "transferperlevel" => "Max player can receive from a transfer (val * level),int", "mintransferlev" => "Min level a player (0 DK's) needs to transfer gold,int", "transferreceive" => "Total transfers a player can receive in one day,int", "maxtransferout" => "Amount player can transfer to others (val * level),int", "innfee" => "Fee for express inn payment (x or x%),int", "Mail Settings,title", "mailsizelimit" => "Message size limit per message,int", "inboxlimit" => "Limit # of messages in inbox,int", "oldmail" => "Automatically delete old messages after (days),int", "PvP,title", "pvp" => "Enable Slay Other Players,bool", "pvpday" => "Player Fights per day,int", "pvpimmunity" => "Days that new players are safe from PvP,int", "pvpminexp" => "Experience below which player is safe from PvP,int", "pvpattgain" => "Percent of victim experience attacker gains on win,int", "pvpattlose" => "Percent of experience attacker loses on loss,int", "pvpdefgain" => "Percent of attacker experience defender gains on win,int", "pvpdeflose" => "Percent of experience defender loses on loss,int", "Content Expiration,title", "expirecontent" => "Days to keep comments and news? (0 = infinite),int", "expiretrashacct" => "Days to keep never logged-in accounts? (0 = infinite),int", "expirenewacct" => "Days to keep 1 level (0 dragon) accounts? (0 =infinite),int", "expireoldacct" => "Days to keep all other accounts? (0 = infinite),int", "LOGINTIMEOUT" => "Seconds of inactivity before auto-logoff,int", "Useful Information,title", "Last new day: " . date("h:i:s a", strtotime("-{$realsecssofartoday} seconds")) . ",viewonly", "Next new day: " . date("h:i:s a", strtotime("+{$realsecstotomorrow} seconds")) . ",viewonly", "Current game time: " . getgametime() . ",viewonly", "Day Duration: " . $dayduration / 60 / 60 . " hours,viewonly", "Current Server Time: " . date("Y-m-d h:i:s a") . ",viewonly", "gameoffsetseconds" => "Real time to offset new day,{$enum}", "LoGDnet Setup (LoGDnet does require PHP to have file wrappers enabled!!),title", "logdnet" => "Register with LoGDnet?,bool", "serverurl" => "Server URL", "serverdesc" => "Server Description (255 chars)", "logdnetserver" => "Master LoGDnet Server (default http://lotgd.net/)", "End Game Setup,title");
if ($_GET['op'] == "") {
loadsettings();
output("<form action='configuration.php?op=save' method='POST'>", true);
addnav("", "configuration.php?op=save");
showform($setup, $settings);
output("</form>", true);
}
page_footer();