Ajout de l'affichage des erreurs sur la page "login.php".

This commit is contained in:
Yoann Bonavero 2011-02-19 10:11:04 +01:00
parent e2f1fe6ec9
commit 08d97add29
2 changed files with 20 additions and 3 deletions

View File

@ -2,9 +2,9 @@
session_start();
include("_head.php");
if(isset($_POST['loginid']))
if(isset($_POST['loginid']) && !empty($_POST['loginid']))
$user = SQLite3::escapeString($_POST['loginid']);
if(isset($_POST['loginpswd']))
if(isset($_POST['loginpswd']) && !empty($_POST['loginpswd']))
$pswd = md5($_POST['loginpswd']);
if(isset($_GET['return']))
$location = $_GET['return'];
@ -42,7 +42,11 @@ else if(isset($user) or isset($pswd))
</div>
<div class="content">
<p>Vous êtes déjà inscrit&nbsp;? Authentifiez-vous&nbsp;:</p>
<form name="loginform" method="post" action="login.php?return=<?php echo $location; ?>">
<?php
if(isset($msg))
echo '<span class="warning">'.$msg.'</span>';
?>
<form name="loginform" method="post" action="login.php?return=<?php echo $location; ?>">
<table class="logintbl">
<tr>
<td>

View File

@ -118,3 +118,16 @@ h2#tache-description {
padding-top: 0.3em;
clear:both;
}
.warning {
width : 40%;
display : block;
border : 1px dashed red;
background-color : #F0C060;
padding : 5px;
padding-left : 30px;
margin-top : 10px;
margin-bottom : 10px;
margin-right : 6%;
margin-left : 6%;
}