Primo commit: trasferimento del progetto PPEasy

This commit is contained in:
2024-09-18 10:30:50 +02:00
commit eb475f257e
4233 changed files with 1043848 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
session_start();
$password="xxxxxx"; /* inserire su questa riga la password voluta */
if (isset($_SESSION['login'])) {
if (isset($_POST['logout'])) {
unset($_SESSION['login']);
$messaggio = "Logout effettuato con successo! Arrivederci!";
} else {
header("Location: protetta.php");
}
} else {
if (isset($_POST['password'])) {
if ($_POST['password'] == $password) {
$_SESSION['login'] = "verificata";
header("Location: protetta.php");
} else {
$messaggio = "Errore: password non corretta!";
}
}
}
?>
<html>
<head>
</head>
<body>
<form name="login" action="login.php" method="post">
<input type="password" name="password" value=""/> &nbsp; <input type="submit" value="Entra"/>
</form>
<?php
if(isset($messaggio)) {
echo $messaggio;
unset($messaggio);
}
?>
</body>
</html>