Commit 141ece9d authored by System Administrator's avatar System Administrator
Browse files

affichage de formulaire en cliquant sur lire message

parents be2e6e23 d5816a6f
......@@ -22,22 +22,19 @@ session_start(); // Demmare la Session
<!-- Custom styles for this template -->
<link href="./style/css/sticky-footer-navbar.css" rel="stylesheet">
<script type="text/javascript">
function noBack(){window.history.forward()}
noBack();
window.onload=noBack;
window.onpageshow=function(evt){if(evt.persisted)noBack()}
window.onunload=function(){void(0)}
function bascule(id) {
if (document.getElementById(id).style.visibility == "hidden")
document.getElementById(id).style.visibility = "visible";
else document.getElementById(id).style.visibility = "hidden";
}
</script>
</script>
</head>
<body>
<body >
<?php
//Appel au header du site
......@@ -65,10 +62,24 @@ session_start(); // Demmare la Session
<button class="btn btn-outline-secondary" type="submit">Écrire un message</button>
</form>
<br>
<button class="btn btn-outline-secondary" onclick="bascule('header');">Lire un message</button>
<!-- <form action="deconnexion.php">
<button class="btn btn-outline-secondary" type="submit">Déconnexion</button>
</form> -->
<button class="btn btn-outline-secondary" onclick="bascule('form');">Lire un message</button>
<form METHOD="post" ACTION="consommateur.php" id="form" style="visibility: hidden;">
<p>Nom de topic</p>
<div class="form-group">
<input type="text" class="form-control" name="topic" value="" required/>
</div>
<p>Mot de passe : </p>
<div class="form-group">
<input type="password" class="form-control" name="password" value="" pattern=".{6,}" required/>
</div>
<div class="form-group">
<input class="btn btn-outline-secondary" type="submit" name="Valider" value="Valider">
</div>
</form>
<?php
......@@ -162,11 +173,25 @@ session_start(); // Demmare la Session
<button class="btn btn-outline-secondary" type="submit">Écrire un message</button>
</form>
<br>
<!-- <button class="btn btn-outline-secondary" type="submit">Lire un message</button> -->
<button class="btn btn-outline-secondary" type="submit" onclick="bascule('header');">Lire un message</button>
<!-- <form action="deconnexion.php">
<button class="btn btn-outline-secondary" type="submit">Déconnexion</button>
</form> -->
<button class="btn btn-outline-secondary" onclick="bascule('form');">Lire un message</button>
<form METHOD="post" ACTION="consommateur.php" id="form" style="visibility: hidden;"
<p>Nom de topic</p>
<div class="form-group">
<input type="text" class="form-control" name="topic" value="" required/>
</div>
<p>Mot de passe : </p>
<div class="form-group">
<input type="password" class="form-control" name="password" value="" pattern=".{6,}" required/>
</div>
<div class="form-group">
<input class="btn btn-outline-secondary" type="submit" name="Valider" value="Valider">
</div>
</form>
<?php
} else {
require_once("consommateur.php");
......
......@@ -15,7 +15,7 @@
// On sécurise les données entrées par le membre.
// Le htmlentities() passera les guillemets en entités HTML, ce qui empêchera les injections SQL.
$topic = htmlentities($_POST['topic'] ), ENT_QUOTES, "ISO-8859-1");
$topic = htmlentities($_POST['topic'], ENT_QUOTES, "ISO-8859-1");
$pass_topic = htmlentities($_POST['pass_topic'], ENT_QUOTES, "ISO-8859-1");
// On se connecte à la base de données
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment