Exemple #1
0
}
require '../htmlHelpers.php';
renderHtmlStartAdmin("Categoriën", "", "categorie");
// ë = ë in html, is beter
// alle categorieen ophalen
$query = "SELECT * FROM categorie";
$categorieen = query($query, null);
$succes = "";
if (isset($_GET["x"])) {
    if ($_GET["x"] === "1") {
        $succes = "Categorie is toegevoegd.";
    }
}
echo "<table><tr><td><a href='addCategorie.php' id='addCategorieLink'><button type=\"button\"><span style=\"color: #333333\">Toevoegen</span></button></a></td><td>{$succes}</td></tr></table>";
echo "<div id='categorieList'>";
//Categorieën tonen
foreach ($categorieen as $categorie) {
    echo "<a class='categorieListItem' href='editCategorie.php?id=" . $categorie["CategorieID"] . "'>";
    // link
    echo "<div class='categorieListItemInner'>";
    // block
    echo "<span class='titel'>" . $categorie["Categorie_naam"] . "</span><br/>  ";
    // maam
    echo "<span class='beschrijving'>" . $categorie["Beschrijving"] . "</span><br/>";
    // beschrijving
    echo "</div>";
    showSmallImagesList(query("SELECT * FROM schilderij WHERE CategorieID = ? LIMIT 0,5", [$categorie["CategorieID"]]), query("SELECT COUNT(*) as count FROM schilderij WHERE CategorieID = ?", [$categorie["CategorieID"]]));
    echo "</a>";
}
echo "</div>";
renderHtmlEndAdmin();
Exemple #2
0
session_start();
require 'functions.php';
if (!isLoggedIn()) {
    header("location: index.php");
    exit;
}
require '../htmlHelpers.php';
renderHtmlStartAdmin("Materiaal", "", "materiaal");
// materialen ophalen
$query = "SELECT * FROM materiaal";
$materiaalen = query($query, null);
$succes = "";
if (isset($_GET["x"])) {
    if ($_GET["x"] === "1") {
        $succes = "Materiaal is toegevoegd.";
    }
}
echo "<table><tr><td><a href='addMateriaal.php' id='addMateriaalLink'><button type=\"button\"><span style=\"color: #333333\">Toevoegen</span></button></a></td><td>{$succes}</td></tr></table>";
echo "<div id='materiaalList'>";
// materialen tonen
foreach ($materiaalen as $materiaal) {
    echo "<a class='materiaalListItem' href='editMateriaal.php?id=" . $materiaal["MateriaalID"] . "'>";
    echo "<div class='materiaalListItemInner'>";
    echo "<span class='titel'>" . $materiaal["Materiaal_soort"] . "</span><br/>  ";
    echo "<span class='beschrijving'>" . $materiaal["Beschrijving"] . "</span><br/>";
    echo "</div>";
    showSmallImagesList(query("SELECT * FROM schilderij WHERE MateriaalID = ? LIMIT 0,5", [$materiaal["MateriaalID"]]), query("SELECT COUNT(*) as count FROM schilderij WHERE MateriaalID = ?", [$materiaal["MateriaalID"]]));
    echo "</a>";
}
echo "</div>";
renderHtmlEndAdmin();