34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
|
// En tête de page
|
|
?>
|
|
<?php require_once(PATH_VIEWS.'header.php');?>
|
|
|
|
<!-- Zone message d'alerte -->
|
|
<?php require_once(PATH_VIEWS.'alert.php');?>
|
|
|
|
<!-- Début de la page -->
|
|
<?php if (isset($categories) and $categories) { ?>
|
|
<form>
|
|
<label for="category"><?= CATEGORY_SELECT ?></label>
|
|
<select id="category" name="category">
|
|
<option value="0"><?= ALL_PHOTOS ?></option>
|
|
<?php foreach ($categories as $cat) { ?>
|
|
<option value="<?= $cat["catId"] ?>" <?= $cat["catId"] == $category ? "selected" : "" ?>><?= $cat["nomCat"] ?></option>
|
|
<?php } ?>
|
|
</select>
|
|
<input type="submit">
|
|
</form>
|
|
<?php } ?>
|
|
|
|
<h1><?= TITRE_PAGE_ACCUEIL_TOUS ?></h1>
|
|
|
|
<?php if(isset($photos) and $photos) { ?>
|
|
<?php foreach ($photos as $photo) {?>
|
|
<a href="index.php?page=photo&id=<?= $photo["photoId"] ?>"><img src="<?= PATH_IMAGES ?>/<?= $photo['nomFich'] ?>" alt="<?= $photo['description'] ?>"></a>
|
|
<?php }
|
|
} ?>
|
|
|
|
<!-- Fin de la page -->
|
|
|
|
<!-- Pied de page -->
|
|
<?php require_once(PATH_VIEWS.'footer.php');
|