BARRAUX Arthur
3 years ago
8 changed files with 61 additions and 148 deletions
@ -1,146 +1,13 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="fr"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>Tickets de panne</title> |
|||
<link href="stylepage.css" rel="stylesheet"> |
|||
<script type="text/javascript" src="script.js" defer></script> |
|||
<img class="logo" src="img/logo_PC.png" alt="logo_PC" width="200px"> |
|||
</head> |
|||
<body id="page"> |
|||
<h1 id="titre"> |
|||
Formulaire de panne informatique |
|||
</h1> |
|||
<form method="POST" action="cible.php"> |
|||
<div class="container-champ"> |
|||
<?php |
|||
$titre = 'Date'; |
|||
$sql_name = 'dates'; |
|||
$type = 'date'; |
|||
$error = 'Veuillez saisir une date'; |
|||
$help = false; |
|||
include("champ.php"); |
|||
?> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<p>Détails :</p> |
|||
<div class="champ"> |
|||
<textarea class="entry" rows="10" cols="30" name='details' required></textarea><br> |
|||
<img class="check" src="img/check.png" alt="check"> |
|||
<img class="excla" src="img/excla.png" alt="exclamation"> |
|||
</div> |
|||
<small>Error: Veuillez remplir ce champ</small> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<?php |
|||
$titre = 'Lieu'; |
|||
$sql_name = 'lieu'; |
|||
$type = 'text'; |
|||
$error = "Vous n'avez saisie de lieu"; |
|||
$help = true; |
|||
include("champ.php"); |
|||
?> |
|||
<div class="help" id="lieu"> |
|||
<p>Entrez le nom du bâtiment dans lequel se trouve le matériel</p><br> |
|||
<code>Ex: bâtiment A</code> |
|||
</div> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<?php |
|||
$titre = 'Salle'; |
|||
$sql_name = 'salle'; |
|||
$type = 'text'; |
|||
$error = "Vous n'avez pas saisie de salle"; |
|||
$help = true; |
|||
include("champ.php"); |
|||
?> |
|||
<div class="help" id="salle"> |
|||
<p>Entrez le nom de la salle dans lequel se trouve le matériel</p><br> |
|||
<code>Ex: A 11 codage</code> |
|||
</div> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<?php |
|||
$titre = 'Position dans la salle'; |
|||
$sql_name = 'pos'; |
|||
$type = 'text'; |
|||
$error = 'Veuillez remplir ce champ'; |
|||
$help = true; |
|||
include("champ.php"); |
|||
?> |
|||
<div class="help" id="pos"> |
|||
<p>Veillez fournir des présision sur la position du matériel</p><br> |
|||
<code>Ex: PC-42 au fond à droite</code> |
|||
</div> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<p>Matériel :</p> |
|||
<div class="champ"> |
|||
<select class="entry" name='materiel' required> |
|||
<option value="UC">Unité Centrale</option> |
|||
<option value="IMP">Imprimante</option> |
|||
<option value="ECR">Ecran</option> |
|||
<option value="VID">Vidéo Projecteur</option> |
|||
<option value="TBI">Tableau Blanc Interactif</option> |
|||
</select> |
|||
<img class="check" src="img/check.png" alt="check"> |
|||
<img class="excla" src="img/excla.png" alt="exclamation"> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<?php |
|||
$titre = 'Marque'; |
|||
$sql_name = 'marque'; |
|||
$type = 'text'; |
|||
$error = "Vous n'avez pas saisie la marque"; |
|||
$help = true; |
|||
include("champ.php"); |
|||
?> |
|||
<div class="help" id="marque"> |
|||
<p>Veillez renseigner la marque du matériel</p><br> |
|||
<code>Ex: Asus</code> |
|||
</div> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<?php |
|||
$titre = 'Model'; |
|||
$sql_name = 'model'; |
|||
$type = 'text'; |
|||
$error = "Veuillez saisir le model"; |
|||
$help = true; |
|||
include("champ.php"); |
|||
?> |
|||
<div class="help" id="model"> |
|||
<p>Veillez renseigner le modèle du matériel</p><br> |
|||
<code>Ex: Lattitude E6410</code> |
|||
</div> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<?php |
|||
$titre = 'N° de série'; |
|||
$sql_name = 'nserie'; |
|||
$type = 'text'; |
|||
$error = "Vous n'avez saisie le n° de série"; |
|||
$help = true; |
|||
include("champ.php"); |
|||
?> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<?php |
|||
$titre = 'Nom'; |
|||
$sql_name = 'demandeur'; |
|||
$type = 'text'; |
|||
$error = 'Veillez entrer votre nom'; |
|||
$help = true; |
|||
include("champ.php"); |
|||
?> |
|||
</div> |
|||
<div class="container-champ"> |
|||
<br> |
|||
<div class="submit"> |
|||
<input id="submit" class="entry" type="button" onclick="checkInputs()" value="Valider"> |
|||
</div> |
|||
</div> |
|||
|
|||
</form> |
|||
</body> |
|||
</html> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<title>Login</title> |
|||
</head> |
|||
<body> |
|||
<form action="login.php" method="post"> |
|||
Login: <input type="text" name="login"><br> |
|||
Pwd: <input type="password" name="pwd"><br> |
|||
<input type="submit" value="conexion"> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,20 @@ |
|||
<?php |
|||
|
|||
$good_login = 'prof'; |
|||
$good_pwd = 'arthur'; |
|||
|
|||
if (isset($_POST['login']) && isset($_POST['pwd'])) { |
|||
if ($good_login == $_POST['login'] && $good_pwd == $_POST['pwd']) { |
|||
session_start(); |
|||
$_SESSION['login'] = $_POST['login']; |
|||
$_SESSION['pwd'] = $_POST['pwd']; |
|||
header('location: prof/index.php'); |
|||
} |
|||
else { |
|||
echo '<meta http-equiv="refresh" content="0;URL=index.php">'; |
|||
} |
|||
} |
|||
else { |
|||
echo 'c vide'; |
|||
} |
|||
?> |
@ -0,0 +1,10 @@ |
|||
<?php |
|||
session_start(); |
|||
if (!isset($_SESSION['login']) || !isset($_SESSION['pwd'])) { |
|||
print_r($_SESSION); |
|||
header('location: ../index.php'); |
|||
} |
|||
else{ |
|||
echo 'voous etes autentifié'; |
|||
} |
|||
?> |
Loading…
Reference in new issue