本文整理匯總了PHP中game::set_planet方法的典型用法代碼示例。如果您正苦於以下問題:PHP game::set_planet方法的具體用法?PHP game::set_planet怎麽用?PHP game::set_planet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類game
的用法示例。
在下文中一共展示了game::set_planet方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: message
// Nach PHP/Perl-UserAgent suchen
if (stristr($_SERVER['HTTP_USER_AGENT'], 'php') || stristr($_SERVER['HTTP_USER_AGENT'], 'perl')) {
stgc_log('illegal_user_agent', 'I don\'t like the user agent ' . $_SERVER['HTTP_USER_AGENT'] . ' of ' . $game->player['user_name']);
}
// #############################################################################
// Notepad-Actions
if (isset($_GET['show_notepad'])) {
$db->query('UPDATE user SET user_hidenotepad = 0 WHERE user_id = ' . $game->player['user_id']);
$game->player['user_hidenotepad'] = 0;
}
if (isset($_GET['hide_notepad'])) {
$db->query('UPDATE user SET user_hidenotepad = 1 WHERE user_id = ' . $game->player['user_id']);
$game->player['user_hidenotepad'] = 1;
}
if (isset($_POST['set_planet'])) {
$game->set_planet((int) $_POST['quadrant'], $_POST['type']);
}
// #############################################################################
// Security Code
if ($game->TIME - $game->player['last_secimage'] > 3600 * 1.5 && $game->player['content_secimage'] == '') {
if ($game->player['user_auth_level'] == STGC_DEVELOPER) {
$sql = 'UPDATE user
SET last_secimage = ' . $game->TIME . ',
content_secimage = ""
WHERE user_id = ' . $game->player['user_id'];
if (!$db->query($sql)) {
message(DATABASE_ERROR, 'Could not update dev content_secimage data');
}
echo 'I filled in the security code for you, master';
} else {
include 'include/libs/secimage.php';