Example #1
0
function playerLevel($uid, $mysqli)
{
    return playerDataSingle($uid, "playerLevel", $mysqli);
    // Simple and neat!
}
Example #2
0
                <li role="presentation"><a href="#">Vývojáři</a></li>
                <li role="presentation"><a href="#">Kontakt</a></li>
            </ul>
        </nav>
        <h3 class="text-muted">Minecore Times</h3>
    </div>
    <?php 
$uId = getPlayerId($_COOKIE["MTU"], $mysqli);
?>
    <div class="jumbotron">
        <h1>Vyber si dobu</h1>
        <p class="lead">Vyber si herní dobu, kterou chceš hrát. Měj však na paměti, že se ti zpřístupní pouze ta, na kterou máš potřebný level.</p>
        <?php 
$list = listAges($mysqli);
foreach ($list as $single) {
    if (checkAgeLevel(playerDataSingle($uId, "playerLevel", $mysqli), $single['id'], $mysqli) == 1) {
        print "<p><a class='btn btn-lg btn-success' href='quest-list.php?ageName=" . $single['ageName'] . "' role='button'><span class='glyphicon glyphicon-play' aria-hidden='true'></span> " . $single['ageName'] . "</a></p>";
    } else {
        print "<p><a class='btn btn-lg btn-warning' href='#' role='button'> <span class='glyphicon glyphicon-lock' aria-hidden='true'></span> " . $single['ageName'] . "</a></p>";
    }
}
?>
        <p><a class="btn btn-lg btn-success" href="#" role="button">---</a></p>

        <?php 
//addXp(1, 3, $mysqli); LWC
close($mysqli);
?>

    </div>
Example #3
0
        $materials = $single["recommendedMaterials"];
    }
    if (true) {
        //#todo check if player has completed/submitted the quest for different button colors
        print "<div class='col-lg-6'><h4>" . $name . " - " . $quest["timeSent"] . "</h4><p>Tento quest splnil <strong>" . $nick . "</strong>.<br><strong>Popis questu: </strong>" . $description . "<br><br><a class=' btn-sm btn-primary ' href='admin-single.php?completed=" . $quest['id'] . "' role='button'>Zkontrolovat</a></p> </div>";
    } else {
        print "<p><a class='btn btn-lg btn-warning' href='#' role='button'>" . $single . "</a></p>";
    }
}
?>
        <?php 
$info = array();
$questList = array();
$questList = listAll($mysqli);
foreach ($questList as $quest) {
    $nick = playerDataSingle($quest["playerId"], "playerName", $mysqli);
    $info = questInfo($quest["questId"], $mysqli);
    foreach ($info as $single) {
        $name = $single["questName"];
        $description = $single["questDescription"];
        $detailedDescription = $single["questDetailedDescription"];
        $materials = $single["recommendedMaterials"];
    }
    if (true) {
        //#todo check if player has completed/submitted the quest for different button colors
        print "<div class='col-lg-6'><h4>" . $name . " - " . $quest["timeSent"] . "</h4><p>Tento quest splnil <strong>" . $nick . "</strong>.<br><strong>Popis questu: </strong>" . $description . "<br><br><a class=' btn-sm btn-info ' href='admin-single.php?completed=" . $quest['id'] . "' role='button'>Zobrazit</a></p> </div>";
    } else {
        print "<p><a class='btn btn-lg btn-warning' href='#' role='button'>" . $single . "</a></p>";
    }
}
?>