Exemple #1
0
include_once "common/base.php";
?>
<div id="ribbon">


    <div class="categories">
        <h3>Categories</h3>
        <div class="cat-1">Humour</div>
        <div class="cat-2">Science</div>
        <div class="cat-3">Art</div>
    </div>
    
<?php 
if (isset($_SESSION['LoggedIn']) && isset($_SESSION['Username']) && $_SESSION['LoggedIn'] == 1) {
    include_once "inc/class.game.inc.php";
    $gameObj = new SpinnereyeGame($db);
    ?>
 
    <div class="connections">
        <h3>Followers</h3>
        <?php 
    $followers = $gameObj->fetchFollowers();
    $i = 1;
    foreach ($followers as $follower) {
        ?>
            <div class="con-<?php 
        echo $i;
        ?>
"><?php 
        echo $gameObj->tagFromId($follower);
        ?>
Exemple #2
0
<?php

include_once 'common/base.php';
$pageTitle = 'Outer';
include_once 'common/header.php';
include_once 'inc/class.game.inc.php';
if (isset($_SESSION['LoggedIn']) && isset($_SESSION['Username']) && $_SESSION['LoggedIn'] == 1) {
    $game = new SpinnereyeGame($db);
    include_once 'common/dashboard.php';
    ?>

<div class="wrapp grid">
<?php 
    $game->listUsers();
    ?>
</div>
<div class="wrapp grid"> <?php 
    echo '<div class="userLists">';
    $game->listUsersLists();
    echo '</div>';
    $game->fetchFollowed();
    //$game->listCategories();
    ?>
</div>
</div>

<script src="js/followers.js"></script>
<?php 
}
Exemple #3
0
<?php

session_start();
include_once '../inc/constants.inc.php';
include_once '../inc/class.game.inc.php';
$gameObj = new SpinnereyeGame();
if (!empty($_POST['action']) && isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == '1') {
    switch ($_POST['action']) {
        case 'addfollower':
            $status = $gameObj->followUser() ? 'followed' : 'follow failure';
            break;
        case 'unfollower':
            $status = $gameObj->unfollowUser() ? 'unfollowed' : 'unfollow failure';
            break;
    }
}