Exemplo n.º 1
0
<div class="main-content">
    <h1 class="text-center main-page-header-style"><strong>Your Decks!</strong></h1>
    <?php 
$decks = new Decks();
if ($decks->getDeckCount() == 0) {
    echo "<div class='content text-center'>\n       <h2 class='text-center main-page-header-style'><strong>You have no decks created!</strong></h2>\n        <button class='btn btn-lg btn-style CreateADeck'>Create a deck</button>\n    </div>";
} else {
    $data = $decks->getDecks();
    $picture = new Pictures();
    echo "\n                <div class='container-fluid marginBottom'>";
    foreach ($data as $row) {
        echo "<div class='col-md-4 text-center deck-class'>\n                        <div style='width: 300px; height: 200px;'>\n                            <a href='DeckBuilding.php?Id={$row->Id}'><img src ='" . $picture->getHeroLogo($row->Class) . "'></a>\n                            <span class='DeckName-style'>{$row->Name}</span>\n                        </div>\n                 </div>";
    }
    echo "</div>";
}
?>
</div>

<div id="CreateADeck-dialog" style="display: none;">
    <form class="text-center" method="POST" action="DeckBuilding.php">

        <input name="hero" type="image" src="../Content/Heroes/Druid.png" value="druid">
        <input name="hero" type="image" src="../Content/Heroes/Warrior.png" value="warrior">
        <input name="hero" type="image" src="../Content/Heroes/Warlock.png" value="warlock">
        <input name="hero" type="image" src="../Content/Heroes/Mage.png" value="mage">
        <input name="hero" type="image" src="../Content/Heroes/Rogue.png" value="rogue">
        <input name="hero" type="image" src="../Content/Heroes/Hunter.png" value="hunter">
        <input name="hero" type="image" src="../Content/Heroes/Priest.png" value="priest">
        <input name="hero" type="image" src="../Content/Heroes/Shaman.png" value="shaman">
        <input name="hero" type="image" src="../Content/Heroes/Paladin.png" value="paladin">
Exemplo n.º 2
0
<?php

require_once "../Includes.php";
if (isset($_GET['username']) && !empty($_GET['username'])) {
    $decks = new Decks();
    echo json_encode($decks->getDecks());
}