Commit f47f292c authored by Romain Benit's avatar Romain Benit 🥇
Browse files

Merge branch 'master' of gricad-gitlab.univ-grenoble-alpes.fr:ferrafli/RIE-2017-ProjetTutore-G1

parents 3be879d3 3b8b3591
......@@ -36,6 +36,7 @@ window.onunload=function(){void(0)}
<?php
//Appel au header du site
include('header.php');
include('footer.php');
// BENIT Romain
// V2.0
......@@ -59,9 +60,9 @@ window.onunload=function(){void(0)}
</form>
<br>
<!-- <button class="btn btn-outline-secondary" type="submit">Lire un message</button> -->
<form action="deconnexion.php">
<!-- <form action="deconnexion.php">
<button class="btn btn-outline-secondary" type="submit">Déconnexion</button>
</form>
</form> -->
<?php
exit;
......@@ -72,20 +73,28 @@ window.onunload=function(){void(0)}
// on vérifie que le champ "Login" n'est pas vide
// empty vérifie à la fois si le champ est vide et si le champ existe belle et bien (is set)
?>
<form class='error'>
<form class="error" action="deconnexion.php">
<p>Le champ login est vide.</p>
<input class="btn bnt-outline-secondary" type="submit" value="Retour">
</form>
<!-- <form class='error'>
<p>Le champ login est vide.</p>
<button class="btn bnt-outline-secondary"><a href="index.php">Retour</a></button>
</form>
</form> -->
<?php
exit;
}
// On vérifie maintenant si le champ "Password" n'est pas vide
elseif( empty($_POST['password']) ) {
?>
<form class='error'>
<form class="error" action="deconnexion.php">
<p>Le champ mot de passe est vide.</p>
<input class="btn bnt-outline-secondary" type="submit" value="Retour">
</form>
<!-- <form class='error'>
<p>Le champ mot de passe est vide.</p>
<button class="btn bnt-outline-secondary"><a href="index.php">Retour</a></button>
</form>
</form> -->
<?php
exit;
}
......@@ -119,10 +128,16 @@ window.onunload=function(){void(0)}
// Test sur la réussite de la reqête
if ( $compt == 0 ) {
?>
<form class='error'>
<form class="error" action="deconnexion.php">
<p>Erreur sur l'identifiant.</p>
<button class="btn bnt-outline-secondary"><a href="index.php">Retour</a></button>
</form>
<input class="btn bnt-outline-secondary" type="submit" value="Retour">
</form>
<!-- <form class='error'>
<p>Erreur sur l'identifiant.</p>
<a class="btn bnt-outline-secondary" href="index.php">Retour</a>
</form> -->
<?php
exit;
}
......@@ -142,9 +157,9 @@ window.onunload=function(){void(0)}
<br>
<!-- <button class="btn btn-outline-secondary" type="submit">Lire un message</button> -->
<form action="deconnexion.php">
<!-- <form action="deconnexion.php">
<button class="btn btn-outline-secondary" type="submit">Déconnexion</button>
</form>
</form> -->
<?php
} else {
require_once("consommateur.php");
......@@ -152,10 +167,14 @@ window.onunload=function(){void(0)}
} else {
?>
<form class='error'>
<form class="error" action="deconnexion.php">
<p>Erreur sur le mot de passe.</p>
<input class="btn bnt-outline-secondary" type="submit" value="Retour">
</form>
<!-- <form class='error'>
<p>Erreur sur le mot de passe.</p>
<button class="btn bnt-outline-secondary"><a href="index.php">Retour</a></button>
</form>
</form> -->
<?php
exit;
}
......
......@@ -8,7 +8,7 @@ session_start(); // Demmare la Session
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<meta http-equiv="Content-Security-Policy" content="default-src https:">
<!-- <meta http-equiv="Content-Security-Policy" content="default-src https:"> -->
<link rel="shortcut icon" type="image/x-icon" href="/Imgs/favicon.ico" />
<title>Trueack</title>
......@@ -33,6 +33,9 @@ session_start(); // Demmare la Session
if( isset($_GET['topic']) ) {
$topic = $_GET['topic'];
}
if(!empty($_SESSION['login'])){
require("deconnexion.php");
}
?>
<?php include_once('header.php'); ?>
......
......@@ -54,11 +54,11 @@ if (!isset($_SESSION['login'])) {
<div>
<button class="btn bnt-outline-secondary"><a href="accueil.php">Retour</a></button>
</div>
<form action="deconnexion.php">
<!-- <form action="deconnexion.php">
<input class="btn bnt-outline-secondary" type="submit" value="Déconnexion">
</form>
</form> -->
......
Supports Markdown
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