本文整理汇总了PHP中LT_call函数的典型用法代码示例。如果您正苦于以下问题:PHP LT_call函数的具体用法?PHP LT_call怎么用?PHP LT_call使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LT_call函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LT_call_silent
function LT_call_silent()
{
$proc = func_get_arg(0);
$args = array_slice(func_get_args(), 1);
$die = FALSE;
return LT_call($proc, $args, $die);
}
示例2: session_start
<?php
// Admin views all users
include 'db_config.php';
include 'include/query.php';
include 'include/output.php';
session_start();
if (!isset($_SESSION['admin'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
// Query the Database
if (is_array($rows = LT_call('read_users'))) {
LT_output_array($rows, array('integer' => array('id', 'reset_time', 'last_action'), 'boolean' => array('logged_in', 'subscribed')));
}
示例3: session_start
<?php
// User paints, erases or toggles fog on a tile
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
// Interpret the Request
$map = intval($_REQUEST['map']);
$name = $LT_SQL->real_escape_string($_REQUEST['name']);
$type = $LT_SQL->real_escape_string($_REQUEST['type']);
$min_zoom = floatval($_REQUEST['min_zoom']);
$max_zoom = floatval($_REQUEST['max_zoom']);
$min_rotate = intval($_REQUEST['min_rotate']);
$max_rotate = intval($_REQUEST['max_rotate']);
$min_tilt = intval($_REQUEST['min_tilt']);
$max_tilt = intval($_REQUEST['max_tilt']);
$grid_thickness = intval($_REQUEST['grid_thickness']);
$grid_color = $LT_SQL->real_escape_string($_REQUEST['grid_color']);
$wall_thickness = intval($_REQUEST['wall_thickness']);
$wall_color = $LT_SQL->real_escape_string($_REQUEST['wall_color']);
$door_thickness = intval($_REQUEST['door_thickness']);
$door_color = $LT_SQL->real_escape_string($_REQUEST['door_color']);
// Query the Database
if (LT_can_edit_map($map)) {
LT_call('update_map', $map, $name, $type, $min_zoom, $max_zoom, $min_rotate, $max_rotate, $min_tilt, $max_tilt, $grid_thickness, $grid_color, $wall_thickness, $wall_color, $door_thickness, $door_color);
}
示例4: session_start
<?php
// User modifies a piece's settings
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
// Interpret the Request
$piece = intval($_REQUEST['piece']);
$image = $LT_SQL->real_escape_string($_REQUEST['image']);
$name = $LT_SQL->real_escape_string($_REQUEST['name']);
$character = intval($_REQUEST['character']);
$locked = intval($_REQUEST['locked']);
$markers = $LT_SQL->real_escape_string($_REQUEST['markers']);
$color = $LT_SQL->real_escape_string($_REQUEST['color']);
// Query the Database
if (LT_can_edit_piece($piece)) {
LT_call('update_piece', $piece, $image, $name, $character, $locked, $markers, $color);
}
示例5: session_start
<?php
// User shares this character with another user
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
// Interpret the Request
$user = intval($_REQUEST['user']);
$character = intval($_REQUEST['character']);
// Query the Database
if (LT_can_edit_character($character)) {
LT_call('create_character_owner', $user, $character);
}
示例6: session_start
<?php
// User views the owners, members and guests of this campaign
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
include 'include/output.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
$campaign = intval($_REQUEST['campaign']);
if (LT_can_view_campaign($campaign)) {
if (is_array($rows = LT_call('read_campaign_users', $campaign))) {
LT_output_array($rows, array('integer' => array('id', 'avatar'), 'boolean' => array('viewing'), 'json' => array('cursor')));
}
}
示例7: session_start
<?php
/* User disowns the campaign
or User revokes a user's ownership or membership
or User removes a user from the campaign's blacklist */
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
// Interpret the Request
$user = intval($_REQUEST['user']);
$campaign = intval($_REQUEST['campaign']);
// Query the Database
if (LT_can_edit_campaign($campaign)) {
LT_call('delete_campaign_user', $user, $campaign);
}
示例8: session_start
<?php
// User moves a piece
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
$piece = intval($_REQUEST['piece']);
if (LT_can_edit_piece($piece)) {
LT_call('delete_piece', $piece);
}
示例9: session_start
<?php
// User updates his account information
include 'db_config.php';
include 'include/query.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
// Interpret the Request
$user = intval($_SESSION['user']);
$name = $LT_SQL->real_escape_string($_REQUEST['name']);
$color = $LT_SQL->real_escape_string($_REQUEST['color']);
$subscribed = intval($_REQUEST['subscribed']);
// Query the Database
LT_call('update_user', $user, $subscribed, $name, $color);
示例10: session_start
<?php
// User views the blacklist of this campaign
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
include 'include/output.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
$campaign = intval($_REQUEST['campaign']);
if (LT_can_view_campaign($campaign)) {
if (is_array($rows = LT_call('read_campaign_user_blacklist', $campaign))) {
LT_output_array($rows, array());
}
}
示例11: session_start
<?php
// User views a list of characters he owns
include 'db_config.php';
include 'include/query.php';
include 'include/output.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
if (is_array($rows = LT_call('read_characters', intval($_SESSION['user'])))) {
LT_output_array($rows, array('integer' => array('id'), 'json' => array('stats', 'notes', 'portrait', 'piece')));
}
示例12: session_start
<?php
// User checks in to a campaign
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
// Interpret the Request
$user = intval($_SESSION['user']);
$campaign = intval($_REQUEST['campaign']);
// Query the Database
if (LT_can_view_campaign($campaign)) {
LT_call('update_campaign_user_arrive', $user, $campaign);
}
示例13: session_start
<?php
// Admin changes his password
include 'db_config.php';
include 'include/query.php';
include 'include/password.php';
session_start();
if (!isset($_SESSION['admin'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
// Interpret the Request
$login = $LT_SQL->real_escape_string($_SESSION['admin']);
$password = $LT_SQL->real_escape_string($_REQUEST['password']);
$salt = LT_random_salt();
$hash = LT_hash_password($password, $salt);
// Query the Database
LT_call('update_admin_password', $login, $hash, $salt);
示例14: session_start
// User paints or erases tiles, fog or walls
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
$base64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
// Interpret the Request
$map = intval($_REQUEST['map']);
$x = intval($_REQUEST['x']);
$y = intval($_REQUEST['y']);
$tile = intval($_REQUEST['tile']);
// Query the Database
if (LT_can_edit_map($map)) {
$LT_SQL->autocommit(FALSE);
/* avoid canceling simultaneous edits */
if ($rows = LT_call('read_map_tiles', $map)) {
$width = intval($rows[0]['columns']);
$height = intval($rows[0]['rows']);
if ($x >= 0 && $x < $width && $y >= 0 && $y < $height) {
$tiles = substr_replace($rows[0]['tiles'], $base64[$tile / 64 % 64] . $base64[$tile % 64], ($x + $y * $width) * 2, 2);
if (is_array(LT_call('update_map_tiles', $map, $tiles))) {
$LT_SQL->commit();
}
}
}
}
示例15: session_start
<?php
// User joins a campaign or looks for new messages
include 'db_config.php';
include 'include/query.php';
include 'include/ownership.php';
include 'include/roll.php';
session_start();
if (!isset($_SESSION['user'])) {
header('HTTP/1.1 401 Unauthorized', true, 401);
exit('You are not logged in.');
}
// Interpret the Request
$user = intval($_SESSION['user']);
$campaign = intval($_REQUEST['campaign']);
$avatar = intval($_REQUEST['avatar']);
$text = $LT_SQL->real_escape_string(LT_expand_rolls($_REQUEST['text']));
// Query the Database
if (LT_can_view_campaign($campaign)) {
LT_call('create_message', $campaign, $user, $avatar, $text);
}