當前位置: 首頁>>代碼示例>>PHP>>正文


PHP LT_call函數代碼示例

本文整理匯總了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);
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:7,代碼來源:query.php

示例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')));
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:15,代碼來源:Admin.users.php

示例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);
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:31,代碼來源:Map.settings.php

示例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);
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:23,代碼來源:Piece.settings.php

示例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);
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:18,代碼來源:Character.share.php

示例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')));
    }
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:18,代碼來源:Campaign.users.php

示例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);
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:20,代碼來源:Campaign.deleteUser.php

示例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);
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:15,代碼來源:Piece.delete.php

示例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);
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:17,代碼來源:User.settings.php

示例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());
    }
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:18,代碼來源:Campaign.blacklist.php

示例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')));
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:14,代碼來源:User.characters.php

示例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);
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:18,代碼來源:Campaign.arrive.php

示例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);
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:18,代碼來源:Admin.password.php

示例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();
            }
        }
    }
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:30,代碼來源:Map.tile.php

示例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);
}
開發者ID:reburke,項目名稱:live-tabletop,代碼行數:21,代碼來源:Campaign.message.php


注:本文中的LT_call函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。