commit d975e212f9d31e5c50136c3b58a92f77b2574a06 Author: Bildcraft1 Date: Thu Oct 31 10:47:12 2024 +0100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/h1-h6.php b/h1-h6.php new file mode 100644 index 0000000..aa11742 --- /dev/null +++ b/h1-h6.php @@ -0,0 +1,13 @@ + + + + + Ciao mamma "; +} +?> + + + \ No newline at end of file diff --git a/login/amici.php b/login/amici.php new file mode 100644 index 0000000..498bc67 --- /dev/null +++ b/login/amici.php @@ -0,0 +1,36 @@ + + + + + + + Login + + + + + + +
+

Lista Amici

+

Ecco i tuoi amici

+ + $x) { ?> +

+ + +
+ + + + + diff --git a/login/foto.php b/login/foto.php new file mode 100644 index 0000000..594428e --- /dev/null +++ b/login/foto.php @@ -0,0 +1,42 @@ + + + + + + + Login + + + + + + +
+

Foto dell'amministratore

+
+ '; + echo '' . $file . ''; + echo ''; + } + ?> +
+
+ + + + + diff --git a/login/home.php b/login/home.php new file mode 100644 index 0000000..2c7fe7e --- /dev/null +++ b/login/home.php @@ -0,0 +1,66 @@ + $password) { + if (strcmp($nome, $_POST["nome"]) == 0 and strcmp($password, $_POST["password"]) == 0) { + $_SESSION["nome"] = $nome; + $_SESSION["loggedIn"] = true; + } + } + + if (in_array($_POST["nome"], array_keys($users)) == 0) { + $users[$_POST["nome"]] = $_POST["password"]; + $json = json_encode($users); + file_put_contents("users.json", $json); + $_SESSION["nome"] = $_POST['nome']; + $_SESSION["loggedIn"] = true; + } + + if (!isset($_SESSION["loggedIn"])) { + $_SESSION["error"] = true; + header("Location: index.php"); + exit(); + } + + if (strcmp($_SESSION["nome"], "admin") == 0) { + $_SESSION["admin"] = true; + } +} + +if (!isset($_COOKIE["lastSeen"])) { + setcookie("lastSeen", date("d/m/Y H:i:s"), time() + 60, "/"); +} + +if ($_SESSION["loggedIn"] === true) { + $_COOKIE["lastSeen"] = date("d/m/Y H:i:s"); +} +?> + + + + + + Login + + + + + + +
+

Home Page

+

Benvenuto

+

L'ultima volta in cui hai fatto l'accesso:

+
+ + + + + diff --git a/login/includes/footer.php b/login/includes/footer.php new file mode 100644 index 0000000..5884a6e --- /dev/null +++ b/login/includes/footer.php @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/login/includes/head.php b/login/includes/head.php new file mode 100644 index 0000000..71466ae --- /dev/null +++ b/login/includes/head.php @@ -0,0 +1,7 @@ + + + diff --git a/login/includes/navbar.php b/login/includes/navbar.php new file mode 100644 index 0000000..24554cb --- /dev/null +++ b/login/includes/navbar.php @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/login/includes/security.php b/login/includes/security.php new file mode 100644 index 0000000..5d3f2da --- /dev/null +++ b/login/includes/security.php @@ -0,0 +1,4 @@ + + + + + + Login + + + + + +
+

Login

+ + + +
+
+ + +
+
+ + +
+ +
+
+ + + + + \ No newline at end of file diff --git a/login/logout.php b/login/logout.php new file mode 100644 index 0000000..336227f --- /dev/null +++ b/login/logout.php @@ -0,0 +1,6 @@ + $password) { + if (strcmp($nome, $_POST["nome"]) == 0 and strcmp($password, $_POST["password"]) == 0) { + $_SESSION["nome"] = $nome; + $_SESSION["loggedIn"] = true; + } + } + + if (!isset($_SESSION["loggedIn"])) { + $_SESSION["error"] = true; + header("Location: index.php"); + exit(); + } +} +?> + + + + + + Login + + + + + + +
+

Home Page

+

Benvenuto

+
+ + + + + diff --git a/login/upload.php b/login/upload.php new file mode 100644 index 0000000..5c2684f --- /dev/null +++ b/login/upload.php @@ -0,0 +1,94 @@ + 500000) { + echo "Sorry, your file is too large."; + $uploadOk = 0; + } + +// Allow certain file formats + if ($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" + && $imageFileType != "gif" && $imageFileType != "mp4") { + echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; + $uploadOk = 0; + } + +// Check if $uploadOk is set to 0 by an error + if ($uploadOk == 0) { + echo "Sorry, your file was not uploaded."; +// if everything is ok, try to upload file + } else { + if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { + echo "The file " . htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded."; + } else { + echo "Sorry, there was an error uploading your file."; + } + } +} + +?> + + + + + + Login + + + + + + +
+

Upload di Foto

+
+
+ + + +
+ +
+ +
+ + + + + + diff --git a/login/uploads/photo_2023-06-20_03-40-00.jpg b/login/uploads/photo_2023-06-20_03-40-00.jpg new file mode 100644 index 0000000..863bb89 Binary files /dev/null and b/login/uploads/photo_2023-06-20_03-40-00.jpg differ diff --git a/login/uploads/photo_2024-10-07_19-50-24.jpg b/login/uploads/photo_2024-10-07_19-50-24.jpg new file mode 100644 index 0000000..c9b4a57 Binary files /dev/null and b/login/uploads/photo_2024-10-07_19-50-24.jpg differ diff --git a/login/users.json b/login/users.json new file mode 100644 index 0000000..567d624 --- /dev/null +++ b/login/users.json @@ -0,0 +1 @@ +{"admin":"admin","mario":"sturniolo"} \ No newline at end of file diff --git a/nomi-voti.php b/nomi-voti.php new file mode 100644 index 0000000..f89bced --- /dev/null +++ b/nomi-voti.php @@ -0,0 +1,27 @@ + + + + + + + + +3, "Paolo"=>9, "Luca"=>7, "Roberto"=>3); +$media = 0; + foreach($voti as $name => $voto){ + $media+= $voto; + echo " + + + "; + } + $media = $media / count($voti); + ?> +
NomeVoto
$name$voto
+ + + + \ No newline at end of file diff --git a/prestito/conferma.php b/prestito/conferma.php new file mode 100644 index 0000000..58cbf58 --- /dev/null +++ b/prestito/conferma.php @@ -0,0 +1,26 @@ + + + + + + + Conferma + + + + + +
+

Riepilogo del Prestito

+

Nome:

+

Cognome:

+

Prestito:

+

Durata:

+
+ + + + + diff --git a/prestito/errore.php b/prestito/errore.php new file mode 100644 index 0000000..dcaa6c8 --- /dev/null +++ b/prestito/errore.php @@ -0,0 +1,13 @@ + + + + + Prestito + + + + +

Errore dati insufficienti

+ + + \ No newline at end of file diff --git a/prestito/includes/footer.php b/prestito/includes/footer.php new file mode 100644 index 0000000..5c9d7c6 --- /dev/null +++ b/prestito/includes/footer.php @@ -0,0 +1,3 @@ + diff --git a/prestito/includes/head.php b/prestito/includes/head.php new file mode 100644 index 0000000..9b9269e --- /dev/null +++ b/prestito/includes/head.php @@ -0,0 +1,2 @@ + diff --git a/prestito/index.php b/prestito/index.php new file mode 100644 index 0000000..d3aabc7 --- /dev/null +++ b/prestito/index.php @@ -0,0 +1,27 @@ + + + + + Prestito + + + + + +
+

Banca Bruschetta

+

Form Prestito

+
+ Name:
+ Cognome:

+ Prestito Annuale (365gg) 4%
+ Prestito Mensile 830gg) 5%

+ Cifra:

+ +
+
+ + + + + \ No newline at end of file diff --git a/prestito/prestito.php b/prestito/prestito.php new file mode 100644 index 0000000..1e14b67 --- /dev/null +++ b/prestito/prestito.php @@ -0,0 +1,39 @@ + + + + + + + Prestito + + + + +

Calcolo saldo del prestito richiesto

+

Benvenuto
+ il saldo del tuo prestito di tra xx giorni sarà di: + € +

+Conferma Prestito + + + \ No newline at end of file diff --git a/similverifica/includes/footer.php b/similverifica/includes/footer.php new file mode 100644 index 0000000..5884a6e --- /dev/null +++ b/similverifica/includes/footer.php @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/similverifica/includes/head.php b/similverifica/includes/head.php new file mode 100644 index 0000000..71466ae --- /dev/null +++ b/similverifica/includes/head.php @@ -0,0 +1,7 @@ + + + diff --git a/similverifica/includes/imgs/avengers.jpg b/similverifica/includes/imgs/avengers.jpg new file mode 100644 index 0000000..e32a066 Binary files /dev/null and b/similverifica/includes/imgs/avengers.jpg differ diff --git a/similverifica/includes/imgs/napoleon.jpg b/similverifica/includes/imgs/napoleon.jpg new file mode 100644 index 0000000..bb1b162 Binary files /dev/null and b/similverifica/includes/imgs/napoleon.jpg differ diff --git a/similverifica/includes/imgs/walle.jpg b/similverifica/includes/imgs/walle.jpg new file mode 100644 index 0000000..72adb40 Binary files /dev/null and b/similverifica/includes/imgs/walle.jpg differ diff --git a/similverifica/includes/navbar.php b/similverifica/includes/navbar.php new file mode 100644 index 0000000..24554cb --- /dev/null +++ b/similverifica/includes/navbar.php @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/similverifica/includes/security.php b/similverifica/includes/security.php new file mode 100644 index 0000000..b420823 --- /dev/null +++ b/similverifica/includes/security.php @@ -0,0 +1,42 @@ + + + + + + Login + + + + + +
+

Conferma Voto

+

Nome utente:

+

Film:

+

Voto:

+
+
+ + +
+
+
+ + + + + + + + diff --git a/similverifica/login.php b/similverifica/login.php new file mode 100644 index 0000000..e073085 --- /dev/null +++ b/similverifica/login.php @@ -0,0 +1,64 @@ + + + + + + Login + + + + + +
+

Login

+

Statistiche

+ + + +
+
+ + +
+
+ + +
+
+
+ ... +
A caption for the above image.
+
+
+ ... +
A caption for the above image.
+
+
+ ... +
A caption for the above image.
+
+
+ + + + + + + +
+
+ + + + + \ No newline at end of file diff --git a/similverifica/statistics.php b/similverifica/statistics.php new file mode 100644 index 0000000..12f16fe --- /dev/null +++ b/similverifica/statistics.php @@ -0,0 +1,49 @@ + + + + + + + Login + + + + + +
+

Statistiche dei voti

+ +
+ + + + + + + + diff --git a/similverifica/thanks.php b/similverifica/thanks.php new file mode 100644 index 0000000..f41be6e --- /dev/null +++ b/similverifica/thanks.php @@ -0,0 +1,34 @@ + + + + + + + Login + + + + + +
+

Grazie per aver votato

+

Per controllare i voti controlla la pagina statistiche

+
+ + + + + + diff --git a/similverifica/votes.json b/similverifica/votes.json new file mode 100644 index 0000000..62b61b8 --- /dev/null +++ b/similverifica/votes.json @@ -0,0 +1 @@ +{"avengers":9,"walle":2,"napoleon":3} \ No newline at end of file