Exemple #1
0
 static function loginName()
 {
     if (Player::isLoggedIn()) {
         return $_SESSION['username'];
     } else {
         return false;
     }
 }
Exemple #2
0
<?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();
Exemple #3
0
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;
}
Exemple #4
0
<?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()
{