2019-10-16 22:35:06 +00:00
|
|
|
<?php require_once "header.php";
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-10-16 22:35:06 +00:00
|
|
|
if (isset($_GET["edit"])) { ?>
|
|
|
|
<form method="POST">
|
|
|
|
<label for="content">Contenu de la page :</label>
|
|
|
|
<textarea id="content" name="content" class="form-control" rows="<?= substr_count($CONFIG->getIndexPage(), "\n") + 1 ?>"><?php echo $CONFIG->getIndexPage() ?></textarea>
|
2019-09-23 22:41:53 +00:00
|
|
|
|
2019-10-16 22:35:06 +00:00
|
|
|
<hr />
|
2019-09-23 22:41:53 +00:00
|
|
|
|
2019-10-16 22:35:06 +00:00
|
|
|
<div class="form-group row">
|
|
|
|
<input class="btn btn-primary btn-lg btn-block" name="edit_page" type="submit" value="Modifier"/>
|
2019-09-23 22:41:53 +00:00
|
|
|
</div>
|
2019-10-16 22:35:06 +00:00
|
|
|
</form>
|
|
|
|
<?php } else {
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-10-16 22:35:06 +00:00
|
|
|
echo htmlspecialchars_decode($CONFIG->getIndexPage());
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-10-16 22:35:06 +00:00
|
|
|
if (isset($_SESSION["user_id"]) && $_SESSION["role"] == Role::ADMIN) { ?>
|
|
|
|
<hr/>
|
|
|
|
<a class="btn btn-primary btn-block btn-lg" style="background-color: #ff2e34;" href="/modifier-page">
|
|
|
|
Modifier la page
|
|
|
|
</a>
|
|
|
|
<?php }
|
|
|
|
}
|
2019-09-23 22:41:53 +00:00
|
|
|
|
2019-10-16 22:35:06 +00:00
|
|
|
require_once "footer.php";
|