first commit
This commit is contained in:
commit
d975e212f9
35 changed files with 813 additions and 0 deletions
44
similverifica/index.php
Normal file
44
similverifica/index.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
include "includes/security.php";
|
||||
|
||||
checkPost();
|
||||
|
||||
$_SESSION["nome"] = $_POST["nome"];
|
||||
$_SESSION["code"] = $_POST["code"];
|
||||
$_SESSION["film"] = $_POST["film"];
|
||||
$_SESSION["voto"] = $_POST["voto"];
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="it">
|
||||
|
||||
<head>
|
||||
<title>Login</title>
|
||||
<?php require "includes/head.php" ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php if (checkHasVoted()) { ?>
|
||||
<div class="container">
|
||||
<h1>Conferma Voto</h1>
|
||||
<h2>Nome utente: <?php echo $_SESSION["nome"] ?></h2>
|
||||
<h2>Film: <?php echo $_SESSION["film"] ?></h2>
|
||||
<h2>Voto: <?php echo $_SESSION["voto"] ?></h2>
|
||||
<form action="thanks.php" method="post">
|
||||
<div class="mb-3">
|
||||
<label for="nome" class="form-label">Vuoi confermare il voto?</label>
|
||||
<button type="submit" class="btn btn-primary">Invia voto</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<script>
|
||||
alert("Hai già votato, non puoi votare una seconda volta")
|
||||
window.location.href = "login.php"
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<?php require "includes/footer.php" ?>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue