本文整理汇总了PHP中tlschema函数的典型用法代码示例。如果您正苦于以下问题:PHP tlschema函数的具体用法?PHP tlschema怎么用?PHP tlschema使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tlschema函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: drpap_dohook
function drpap_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "village":
if ($session['user']['location'] == get_module_setting("paploc") && $session['user']['dragonkills'] >= get_module_setting("dk")) {
tlschema($args['schemas']['marketnav']);
addnav($args['marketnav']);
tlschema();
addnav("Dr Paprika's Office", "runmodule.php?module=drpap&op=enter");
}
break;
case "changesetting":
if ($args['setting'] == "villagename") {
if ($args['old'] == get_module_setting("paploc")) {
set_module_setting("paploc", $args['new']);
}
}
break;
case "dragonkilltext":
if (get_module_setting("reset") == 1) {
set_module_pref("count", 0);
}
break;
case "moderate":
$args['drpap'] = "Dr Paprika's Waiting Room";
break;
}
return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:drpap.php
示例2: sethsong_run
function sethsong_run()
{
$op = httpget('op');
$visits = get_module_setting("visits");
$been = get_module_pref("been");
$iname = getsetting("innname", LOCATION_INN);
tlschema("inn");
page_header($iname);
rawoutput("<span style='color: #9900FF'>");
output_notl("`c`b");
output($iname);
output_notl("`b`c");
tlschema();
// Short circuit out if we've heard enough
if ($been >= $visits) {
output("%s`0 clears his throat and drinks some water.", getsetting("bard", "`^Seth"));
output("\"I'm sorry, my throat is just too dry.\"");
} else {
sethsong_sing();
}
addnav("Where to?");
addnav("I?Return to the Inn", "inn.php");
villagenav();
rawoutput("</span>");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:26,代码来源:sethsong.php
示例3: improbablehousing_furnitureshop_dohook
function improbablehousing_furnitureshop_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "village":
tlschema($args['schemas']['marketnav']);
addnav($args['marketnav']);
tlschema();
addnav("Cadfael's Furniture", "runmodule.php?module=improbablehousing_furnitureshop&op=start");
break;
case "improbablehousing_sleepslot":
$hid = $args['hid'];
$house = $args['house'];
$rid = $args['rid'];
$slot = $args['slot'];
// debug($rid);
// debug($house);
if (improbablehousing_getkeytype($house, $rid) >= 100) {
//player has a master key, or owns the Dwelling
$furniture = get_items_with_prefs("furniture");
// debug($furniture);
if (is_array($furniture)) {
addnav("Put down Furniture");
foreach ($furniture as $key => $vals) {
//debug($vals);
addnav("Install Furniture");
addnav(array("Put down %s", $vals['verbosename']), "runmodule.php?module=improbablehousing_furnitureshop&op=drop&item=" . $key . "&hid=" . $args['house']['id'] . "&rid=" . $args['rid'] . "&slot=" . $args['slot']);
}
}
}
break;
}
return $args;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:34,代码来源:improbablehousing_furnitureshop.php
示例4: iitems_hunterslodge_dohook
function iitems_hunterslodge_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "superuser":
if ($session['user']['superuser'] & SU_EDIT_USERS) {
addnav("Hunter's Lodge Purchase Log", "runmodule.php?module=iitems_hunterslodge&op=superuser");
}
break;
case "village":
tlschema($args['schemas']['fightnav']);
addnav($args['fightnav']);
tlschema();
blocknav("lodge.php");
addnav("L?The Hunter's Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
break;
case "newday":
if ($session['user']['referer'] > 0) {
$sql = "SELECT lastip, uniqueid FROM " . db_prefix("accounts") . " WHERE acctid={$session['user']['referer']}";
$result = db_query($sql);
$row = db_fetch_assoc($result);
if ($row['lastip'] != $session['lastip'] && $row['uniqueid'] != $session['uniqueid']) {
$sql = "UPDATE " . db_prefix("accounts") . " SET donation=donation+1 WHERE acctid={$session['user']['referer']}";
$result = db_query($sql);
}
}
break;
case "items-returnlinks":
$args['lodge'] = "runmodule.php?module=iitems_hunterslodge&op=start";
break;
}
return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:33,代码来源:iitems_hunterslodge.php
示例5: gauntlet_dohook
function gauntlet_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "hprecalc":
$args['total'] -= get_module_pref("extrahps");
if (!get_module_setting("carrydk")) {
$args['extra'] -= get_module_pref("extrahps");
set_module_pref("extrahps", 0);
}
break;
case "dragonkill":
set_module_pref("seendk", 0);
break;
case "newday":
set_module_pref("seen", 0);
break;
case "village":
tlschema($args['schemas']['fightnav']);
addnav($args["fightnav"]);
tlschema();
addnav("The Gauntlet", "runmodule.php?module=gauntlet");
break;
}
return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:26,代码来源:gauntlet.php
示例6: relativedate
function relativedate(string $indate) : string
{
$lastOn = round((strtotime('now') - strtotime($indate)) / 86400, 0) . 'days';
tlschema('datetime');
if (substr($lastOn, 0, 2) == '1 ') {
$lastOn = translate_inline('1 day');
} else {
if (date('Y-m-d', strtotime($lastOn)) == date('Y-m-d')) {
$lastOn = translate_inline('Today');
} else {
if (date('Y-m-d', strtotime($lastOn)) == date('Y-m-d', strtotime('-1 day'))) {
$lastOn = translate_inline('Yesterday');
} else {
if (strpos($indate, '0000-00-00') !== false) {
$lastOn = translate_inline('Never');
} else {
$lastOn = sprintf_translate('%s days', round((strtotime('now') - strtotime($indate)) / 86400, 0));
rawoutput(tlbutton_clear());
}
}
}
}
tlschema();
return $lastOn;
}
示例7: maikopan_dohook
function maikopan_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "village":
if (get_module_pref("plotpoint3a", "watcher_quests") && !get_module_pref("plotpoint1") && $session['user']['location'] == "Kittania") {
output("`0You hear quite a commotion coming from Maiko's cookery school. A clattering of pots and pans, and a hoarse, screeching voice: \"`i`%Where is it? WHERE IS IT?!`i`0\"`n`nYou might want to check that out.`n`n");
addnav($args['fightnav']);
tlschema();
blocknav("runmodule.php?module=meatschool&op=start");
addnav("Maiko's Cookery Academy", "runmodule.php?module=maikopan&step=1");
} else {
if (get_module_pref("plotpoint1") && !get_module_pref("plotpoint2")) {
blocknav("runmodule.php?module=meatschool&op=start");
}
}
break;
case "pub_kittania":
if (get_module_pref("plotpoint1") && !get_module_pref("plotpoint2")) {
redirect("runmodule.php?module=maikopan&step=2");
}
break;
}
return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:maikopan.php
示例8: checkban
function checkban(string $login, bool $connect = false) : bool
{
global $session;
$accounts = db_prefix('accounts');
$bans = db_prefix('accounts');
$today = date('Y-m-d');
$sql = db_query("SELECT lastip, uniquid, banoverride, superuser FROM {$accounts}\n WHERE login = '{$login}'");
$row = db_fetch_assoc($sql);
if ($row['banoverride'] || $row['superuser'] & ~SU_DOESNT_GIVE_GROTTO) {
return false;
}
db_free_result($sql);
$sql = db_query("SELECT * FROM {$bans}\n WHERE (\n (ipfilter = '{$row['lastip']}' OR ipfilter = '{$_SERVER['REMOTE_ADDR']}')\n OR (uniqueid = '{$row['uniqueid']}' OR uniqueid = '{$_COOKIE['lgi']}')\n )\n AND (banexpire = '000-00-00' OR banexpire >= '{$today}')");
if (db_num_rows($sql) > 0) {
if ($connect) {
$session = [];
tlschema('ban');
$session['message'] .= translate_inline('`n`4You fall under a ban currently in place on this website:');
while ($row = db_fetch_assoc($sql)) {
$session['message'] .= "`n{$row['banreason']}`n";
if ($row['banexpire'] == '0000-00-00') {
$session['message'] .= translate_inline("`\$This ban is permanent!`0");
} else {
$session['message'] .= sprintf_translate("`^This ban will be removed `\$after`^ %s.`0", date("M d, Y", strtotime($row['banexpire'])));
}
db_query("UPDATE {$bans}\n SET lasthit = '{$today} 00:00:00'\n WHERE ipfilter = '{$row['ipfilter']}'\n AND uniqueid = '{$row['uniqueid']}'\n ");
}
$session['message'] .= translate_inline("`n`4If you wish, you may appeal your ban with the petition link.");
tlschema();
header('Location: home.php');
}
return true;
}
return false;
}
示例9: oldhouse_dohook
function oldhouse_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "newday":
set_module_pref("scaretoday", 0);
break;
case "changesetting":
if ($args['setting'] == "villagename") {
if ($args['old'] == get_module_setting("oldhouseloc")) {
set_module_setting("oldhouseloc", $args['new']);
}
}
break;
case "village":
if ($session['user']['location'] == get_module_setting("oldhouseloc")) {
tlschema($args['schemas']['tavernnav']);
addnav($args['tavernnav']);
tlschema();
addnav("O?The Old House", "runmodule.php?module=oldhouse");
}
break;
}
return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:oldhouse.php
示例10: fightnav
function fightnav($allowspecial = true, $allowflee = true, $script = false)
{
global $PHP_SELF, $session, $newenemies, $companions;
tlschema("fightnav");
if ($script === false) {
$script = substr($PHP_SELF, strrpos($PHP_SELF, "/") + 1) . "?";
} else {
if (!strpos($script, "?")) {
$script .= "?";
// }elseif (substr($script,strlen($script)-1)!="&" && !substr($script,strlen($script)-1)=="?"){
} elseif (substr($script, strlen($script) - 1) != "&") {
$script .= "&";
}
}
$fight = "Fight";
$run = "Run";
if (!$session['user']['alive']) {
$fight = "F?Torment";
$run = "R?Flee";
}
addnav($fight, $script . "op=fight");
if ($allowflee) {
addnav($run, $script . "op=run");
}
if ($session['user']['superuser'] & SU_DEVELOPER) {
addnav("Abort", $script);
}
if (getsetting("autofight", 0)) {
addnav("Automatic Fighting");
addnav("5?For 5 Rounds", $script . "op=fight&auto=five");
addnav("1?For 10 Rounds", $script . "op=fight&auto=ten");
$auto = getsetting("autofightfull", 0);
if (($auto == 1 || $auto == 2 && !$allowflee) && count($newenemies) == 1) {
addnav("U?Until End", $script . "op=fight&auto=full");
} elseif ($auto == 1 || $auto == 2 && !$allowflee) {
addnav("U?Until current enemy dies", $script . "op=fight&auto=full");
}
}
if ($allowspecial) {
addnav("Special Abilities");
modulehook("fightnav-specialties", array("script" => $script));
if ($session['user']['superuser'] & SU_DEVELOPER) {
addnav("`&Super user`0", "");
addnav("!?`&• __GOD MODE", $script . "op=fight&skill=godmode", true);
}
modulehook("fightnav", array("script" => $script));
}
if (count($newenemies) > 1) {
addnav("Targets");
foreach ($newenemies as $index => $badguy) {
if ($badguy['creaturehealth'] <= 0 || isset($badguy['dead']) && $badguy['dead'] == true) {
continue;
}
addnav(array("%s%s`0", isset($badguy['istarget']) && $badguy['istarget'] ? "`#*`0" : "", $badguy['creaturename']), $script . "op=fight&newtarget={$index}");
}
}
tlschema();
}
示例11: eboy_dohook
function eboy_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "village":
tlschema($args['schemas']['marketnav']);
addnav($args['marketnav']);
tlschema();
addnav("eBoy's Trading Station", "runmodule.php?module=eboy&op=start");
break;
case "newday-runonce":
$eboyitems = get_items_with_settings("eboy");
//get number of players
$sql = "SELECT count(acctid) AS c FROM " . db_prefix("accounts") . " WHERE locked=0";
$result = db_query_cached($sql, "numplayers", 600);
$row = db_fetch_assoc($result);
$numplayers = $row['c'];
$sql = "SELECT * from " . db_prefix("cityprefs");
$result = db_query($sql);
$numrows = db_num_rows($result);
for ($i = 0; $i < $numrows; $i++) {
$row = db_fetch_assoc($result);
$cid = $row['cityid'];
foreach ($eboyitems as $item => $settings) {
//Advance Multiplier
if ($settings['eboy_multiplier_' . $cid]) {
if ($settings['eboy_stock_' . $cid] < $numplayers / 10) {
increment_item_setting("eboy_multiplier_" . $cid, 0.1, $item);
} else {
if ($settings['stock_' . $cid] > $numplayers / 5) {
increment_item_setting("eboy_multiplier_" . $cid, -0.1, $item);
}
}
//stop prices staying ridiculously low
if (get_item_setting("eboy_multiplier_" . $cid, $item) < 0.1) {
set_item_setting("eboy_multiplier_" . $cid, 0.1, $item);
}
//or going ridiculously high
if (get_item_setting("eboy_multiplier_" . $cid, $item) > 50) {
set_item_setting("eboy_multiplier_" . $cid, 50, $item);
}
} else {
set_item_setting("eboy_multiplier_" . $cid, 1, $item);
}
if (!isset($settings['eboy_stock_' . $cid])) {
set_item_setting("eboy_stock_" . $cid, 1, $item);
}
increment_item_setting("eboy_stock_" . $cid, $settings['eboy_dailyadd'], $item);
}
}
break;
case "items-returnlinks":
$args['eboy'] = "runmodule.php?module=eboy&op=start";
break;
}
return $args;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:57,代码来源:eboy.php
示例12: logd_error_handler
function logd_error_handler($errno, $errstr, $errfile, $errline)
{
global $session;
static $in_error_handler = 0;
// If we have used the @ operator, just don't report anything!
if (!error_reporting()) {
return;
}
$in_error_handler++;
if ($in_error_handler > 1) {
//prevents the error handler from being re-called when we're already within a call of it.
if ($errno & (E_USER_WARNING | E_WARNING)) {
echo "PHP Warning: \"{$errstr}\"<br>in <b>{$errfile}</b> at <b>{$errline}</b>. Additionally this occurred while within logd_error_handler().<br>";
} elseif ($errno & (E_USER_ERROR | E_ERROR)) {
echo "PHP ERROR: \"{$errstr}\"<br>in <b>{$errfile}</b> at <b>{$errline}</b>. Additionally this occurred while within logd_error_handler().<br>";
}
$in_error_handler--;
return;
}
switch ($errno) {
case E_NOTICE:
case E_USER_NOTICE:
if (getsetting('show_notices', 0) && $session['user']['superuser'] & SU_SHOW_PHPNOTICE) {
debug("PHP Notice: \"{$errstr}\"<br>in <b>{$errfile}</b> at <b>{$errline}</b>.");
}
break;
case E_WARNING:
case E_USER_WARNING:
require_once "show_backtrace.php";
tlschema("errorhandler");
output("PHP Warning: \"%s\"`nin `b%s`b at `b%s`b.`n", $errstr, $errfile, $errline, true);
tlschema();
$backtrace = show_backtrace();
rawoutput($backtrace);
if (getsetting("notify_on_warn", 0) > "") {
//$args = func_get_args();
//call_user_func_array("logd_error_notify",$args);
logd_error_notify($errno, $errstr, $errfile, $errline, $backtrace);
}
break;
case E_ERROR:
case E_USER_ERROR:
require_once "lib/show_backtrace.php";
echo sprintf("PHP ERROR: \"%s\"<br>in <b>%s</b> at <b>%s</b>.<br>", $errstr, $errfile, $errline);
$backtrace = show_backtrace();
echo $backtrace;
if (getsetting("notify_on_error", 0) > "") {
//$args = func_get_args();
//call_user_func_array("logd_error_notify",$args);
logd_error_notify($errno, $errstr, $errfile, $errline, $backtrace);
}
die;
break;
}
$in_error_handler--;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:56,代码来源:errorhandler.php
示例13: dwellingseditor_run
function dwellingseditor_run()
{
global $session;
tlschema("dwellingseditor");
$op = httpget('op');
if ($op != "lookup") {
page_header("Dwellings Editor");
}
addnav("Navigation");
addnav("Back to the Grotto", "superuser.php");
if ($op != "") {
addnav("Dwelling List", "runmodule.php?module=dwellingseditor");
}
addnav("Find Dwellings by User", "runmodule.php?module=dwellingseditor&op=usersearch");
addnav("Operations");
if ($op != "typsu") {
addnav("Type Pref Editor", "runmodule.php?module=dwellingseditor&op=typesu");
}
modulehook("dwellingseditor-main");
$typeid = httpget("typeid");
$dwid = httpget('dwid');
$type = httpget("type");
if ($type == "" && $dwid > 0) {
$sql = "SELECT type FROM " . db_prefix("dwellings") . " WHERE dwid={$dwid}";
$result = db_query($sql);
$row = db_fetch_assoc($result);
$type = $row['type'];
}
if ($dwid > 0) {
addnav("Operations");
if ($op != "edit") {
addnav("Edit Dwelling Details", "runmodule.php?module=dwellingseditor&op=edit&dwid={$dwid}");
}
if ($op != "keys") {
addnav("Manage Keys", "runmodule.php?module=dwellingseditor&op=keys&dwid={$dwid}");
}
if ($session['user']['superuser'] & SU_EDIT_COMMENTS) {
addnav("Moderate Commentary", "moderate.php?area=dwellings-{$dwid}&dwid={$dwid}");
}
if ($op != "delete") {
addnav("Delete this Dwelling", "runmodule.php?module=dwellingseditor&op=delete&dwid={$dwid}");
}
modulehook("dwellingseditor", array("dwid" => $dwid));
addnav("Navigation");
if ($op != "coffers") {
addnav("Coffer Log", "runmodule.php?module=dwellingseditor&op=coffers&dwid={$dwid}");
}
if ($op != "dwsu") {
addnav("Dwelling Viewer", "runmodule.php?module=dwellingseditor&op=dwsu&dwid={$dwid}");
}
}
require_once "modules/dwellingseditor/case_{$op}.php";
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:54,代码来源:dwellingseditor.php
示例14: meatschool_dohook
function meatschool_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "village":
addnav($args['fightnav']);
tlschema();
addnav("Maiko's Cookery Academy", "runmodule.php?module=meatschool&op=start");
break;
}
return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:12,代码来源:meatschool.php
示例15: insultschool_dohook
function insultschool_dohook($hookname, $args)
{
global $session;
switch ($hookname) {
case "village":
addnav($args['fightnav']);
tlschema();
addnav("Cuthbert's Academy of Lingual Defence", "runmodule.php?module=insultschool&op=start");
break;
}
return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:12,代码来源:insultschool.php