Beispiel #1
0
function Admin()
{
    try {
        $pdo = new PDO('sqlite:bd.sqlite3');
    } catch (PDOException $e) {
        echo 'Connection failed: ' . $e->getMessage();
    }
    try {
        $req = $pdo->prepare("SELECT CompteEmail FROM Compte");
        $req->execute();
        $value = $req->fetchAll();
        $doc = new DOMDocument();
        $doc->loadHTMLFile("../HTML/AdminMain.php");
        $ii = 0;
        foreach ($value as $data) {
            //remplit ma liste de tous les comptes
            ShowAccount($doc, $data['CompteEmail'], $ii);
            $ii++;
        }
        echo $doc->saveHTML();
        $pdo = null;
    } catch (PDOException $ex) {
        echo "Connection failed: " . $ex->getMessage();
    }
}
Beispiel #2
0
        </div><!--/.nav-collapse -->
    </div>
</nav>

<div class="SignUp">
    <div class="container">
        <div class="jumbotron2">
            <h1>Compte</h1>
            <div id="ListeAccount" class="Liste"></div>
            <input type="text" placeholder="Email" class="form-control">
            <input type="password" placeholder="Mot de Passe" class="form-control">
            <br>
        </div>
    </div>
</div>


<<footer class="footer">
    <p class="text-muted"><a href="#">Haut de la page</a></p>
</footer>

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>

</html>

<?php 
ShowAccount();