本文整理汇总了PHP中Player::isLoggedIn方法的典型用法代码示例。如果您正苦于以下问题:PHP Player::isLoggedIn方法的具体用法?PHP Player::isLoggedIn怎么用?PHP Player::isLoggedIn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Player
的用法示例。
在下文中一共展示了Player::isLoggedIn方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loginName
static function loginName()
{
if (Player::isLoggedIn()) {
return $_SESSION['username'];
} else {
return false;
}
}
示例2: session_start
<?php
session_start();
include 'lib.php';
$hasError = false;
$errormsg = "";
print_header("Series Control Panel");
?>
<div class="grid_10 suffix_1 prefix_1">
<div id="gatherling_main" class="box">
<div class="uppertitle"> Series Control Panel </div>
<?php
if (!Player::isLoggedIn()) {
linkToLogin();
} else {
do_page();
}
?>
<div class="clear"></div>
</div></div>
<?php
print_footer();
?>
<?php
function do_page()
{
handleActions();
示例3: checkDeckAuth
function checkDeckAuth($event, $player, $deck = NULL)
{
if (!Player::isLoggedIn()) {
loginRequired();
return false;
}
$loginname = Player::loginName();
if (is_null($deck)) {
// Creating a deck.
$entry = new Entry($event, $player);
$auth = $entry->canCreateDeck($loginname);
} else {
// Updating a deck.
$auth = $deck->canEdit($loginname);
}
if ($auth) {
return true;
} else {
authFailed();
}
return false;
}
示例4: session_start
<?php
session_start();
include 'lib.php';
include 'lib_form_helper.php';
$hasError = false;
$errormsg = "";
if (!Player::isLoggedIn() || !Player::getSessionPlayer()->isSuper()) {
redirect("Location: index.php");
}
print_header("Admin Control Panel");
?>
<div class="grid_10 suffix_1 prefix_1">
<div id="gatherling_main" class="box">
<div class="uppertitle"> Admin Control Panel </div>
<center>
<?php
do_page();
?>
</center>
<div class="clear"></div>
</div></div>
<?php
print_footer();
?>
<?php
function do_page()
{