diff --git a/esercizio.css b/esercizio.css new file mode 100644 index 0000000..8eded46 --- /dev/null +++ b/esercizio.css @@ -0,0 +1,192 @@ +*, +*::before, +*::after { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html { + color-scheme: dark; +} + +body, +input, +button, +select, +textarea { + font-family: "Outfit", sans-serif; +} + +body { + background-color: hsl(219, 62%, 80%); + color: hsl(219, 62%, 10%); + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.container { + width: 95%; + max-width: 1200px; + margin-left: auto; + margin-right: auto; +} + +img { + width: 100% +} + +.page { + flex-grow: 1; +} + +section { + margin-top: 4rem; + margin-bottom: 4rem; + text-align: center; +} + +section h2 { + margin-bottom: 2rem; + user-select: none; +} + +.button { + font-size: 95%; + padding: 0.4rem 0.6rem; + border-radius: 0.5rem; + background-color: hsl(219, 62%, 30%); + color: hsl(219, 62%, 95%); + font-weight: bold; + text-transform: uppercase; + border: none; + cursor: pointer; + text-decoration: none; + user-select: none; +} + +.button:hover { + background-color: hsl(219, 62%, 22%); +} + +section .boxes { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + display: flex; + flex-direction: column; + gap: 2rem; +} + +section .boxes .box { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + width: 99%; + max-width: 1000px; + margin: 0 auto; + background-color: hsl(219, 62%, 95%); + border-radius: 1rem; + overflow: hidden; + box-shadow: 0px 0px 20px hsla(219, 62%, 70%, 0.4); +} + +section .boxes .box .image { + flex-grow: 1; + max-width: 10rem; + min-width: 10rem; + display: flex; + align-items: center; + justify-content: center; +} + +section .boxes .box .image img { + width: 60%; + object-fit: contain; + height: 60%; + display: block; + aspect-ratio: 1/1; + user-select: none; +} + +section .boxes .box .data { + flex-grow: 2; + text-align: left; + display: flex; + flex-direction: column; + padding: 1rem; +} + +section .boxes .box .data h3 { + font-size: 1.8rem; +} + +@media only screen and (max-width: 767px) { + section .boxes .box .image { + max-width: 12rem; + min-width: 12rem; + } + + section .boxes .box .data h3 { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 600px) { + + section .boxes .box .image { + max-width: 100%; + min-width: 12rem; + } + + section .boxes .box { + flex-direction: column; + } +} + + +section .boxes .box .data .meta { + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin: 1rem 0; + justify-content: flex-start; + align-items: center; + gap: 0.5rem; + user-select: none; +} + +section .boxes .box .data .meta p { + display: flex; + flex-direction: row; + align-items: center; + gap: 0.5rem; + width: max-content; + padding: 0.2rem 0.4rem; + border-radius: 0.5rem; + background-color: hsl(219, 62%, 70%); +} + +section .boxes .box .data .grow { + flex-grow: 1; +} + +section .buttons { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 0.5rem; + align-items: center; + justify-content: center; +} + +section .boxes .box .data .buttons { + justify-content: flex-end; + margin-top: 1rem; +} + +footer { + text-align: center; + background-color: hsl(219, 62%, 70%); + padding: 1rem 0; +} \ No newline at end of file diff --git a/esercizio1/eventi.css b/esercizio1/eventi.css new file mode 100644 index 0000000..c144857 --- /dev/null +++ b/esercizio1/eventi.css @@ -0,0 +1,314 @@ +*, +*::before, +*::after { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html { + color-scheme: dark; +} + +body, +input, +button, +select, +textarea { + font-family: "Outfit", sans-serif; +} + +body { + background-color: hsl(219, 69%, 10%); + color: #fff; + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.container { + width: 95%; + max-width: 1200px; + margin-left: auto; + margin-right: auto; +} + +header { + position: fixed; + top: 0; + left: 0; + width: 100%; + background-color: hsla(219, 69%, 6%, 0.9); + backdrop-filter: blur(6px); + -webkit-backdrop-filter: blur(6px); + padding: 0.5rem 0; + z-index: 3; +} + +header .container { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + gap: 1rem; +} + +header .logo img { + width: 100%; + height: auto; + display: block; +} + +header .logo { + width: 2rem; + user-select: none; +} + +.hero { + background-color: hsl(219, 69%, 10%); + background-image: url("img/hero.jpg"); + background-position: 50% 80%; + background-repeat: no-repeat; + background-size: cover; +} + +.hero .overlay { + padding: 12rem 1rem 8rem 1rem; + background-color: hsla(219, 69%, 5%, 0.6); + backdrop-filter: blur(2px); + -webkit-backdrop-filter: blur(2px); + text-align: center; +} + +img { + width: 100% +} + +.page { + flex-grow: 1; +} + +section { + margin-top: 4rem; + margin-bottom: 4rem; + text-align: center; +} + +section h2 { + margin-bottom: 2rem; + user-select: none; +} + +section form { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: center; + align-items: center; + gap: 1.5rem; + background-color: hsl(219, 69%, 20%); + width: 95%; + max-width: 900px; + margin: 1rem auto; + margin-bottom: 0; + padding: 1rem; + border-radius: 1rem; + box-shadow: 0px 0px 20px hsla(219, 69%, 10%, 0.4); +} + +section form fieldset { + border: none; + display: flex; + flex-direction: row; + align-items: center; + flex-wrap: nowrap; + gap: 1rem; + text-align: left; + width: 100%; + max-width: 100%; +} + +section form fieldset.buttons { + max-width: max-content; +} + +section form fieldset label { + font-size: 1.2rem; +} + +section form fieldset input[type="text"] { + font-size: 98%; + padding: 0.4rem 0.6rem; + border-radius: 0.5rem; + border: 1px solid hsla(219, 69%, 75%, 0.5); + width: 100%; + max-width: 100%; + background-color: hsla(219, 69%, 5%, 0.8); +} + +section form fieldset input[type="text"]:hover, +section form fieldset input[type="text"]:focus { + border: 1px solid hsla(219, 69%, 75%, 1); + outline: none; +} + +section form fieldset input[type="submit"], +section form fieldset input[type="button"], +.button { + font-size: 95%; + padding: 0.4rem 0.6rem; + border-radius: 0.5rem; + background-color: hsl(219, 69%, 75%); + color: hsl(219, 69%, 10%); + font-weight: bold; + text-transform: uppercase; + border: none; + cursor: pointer; + text-decoration: none; + user-select: none; +} + +section form fieldset input[type="submit"]:hover, +section form fieldset input[type="button"]:hover, +.button:hover { + background-color: hsl(219, 69%, 70%); +} + +section .boxes { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + display: flex; + flex-direction: column; + gap: 2rem; +} + +section .boxes .box { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + width: 99%; + max-width: 1100px; + margin: 0 auto; + background-color: hsl(219, 69%, 20%); + border-radius: 1rem; + overflow: hidden; + box-shadow: 0px 0px 20px hsla(219, 69%, 10%, 0.4); +} + +section .boxes .box .image { + flex-grow: 1; + max-width: 25rem; + min-width: 25rem; +} + +section .boxes .box .image img { + width: 100%; + object-fit: cover; + height: 100%; + display: block; + aspect-ratio: 4/3; + user-select: none; +} + +section .boxes .box .data { + flex-grow: 2; + text-align: left; + display: flex; + flex-direction: column; + padding: 1rem; +} + +section .boxes .box .data h3 { + font-size: 1.8rem; +} + +@media only screen and (max-width: 767px) { + section .boxes .box .image { + max-width: 12rem; + min-width: 12rem; + } + + section .boxes .box .data h3 { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 600px) { + section form { + flex-direction: column; + } + + section .boxes .box .image { + max-width: 100%; + min-width: 12rem; + } + + section .boxes .box { + flex-direction: column; + } +} + + +section .boxes .box .data .meta { + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin: 1rem 0; + justify-content: flex-start; + align-items: center; + gap: 0.5rem; + user-select: none; +} + +section .boxes .box .data .meta p { + display: flex; + flex-direction: row; + align-items: center; + gap: 0.5rem; + width: max-content; + padding: 0.2rem 0.4rem; + border-radius: 0.5rem; + background-color: hsl(219, 69%, 30%); +} + +section .boxes .box .data .grow { + flex-grow: 1; +} + +section .buttons { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 0.5rem; + align-items: center; + justify-content: center; +} + +section .boxes .box .data .buttons { + justify-content: flex-end; + margin-top: 1rem; +} + +code { + background-color: hsl(221, 14%, 14%); + color: #ff6685; + padding: 0.2rem 0.3rem; + border-radius: 0.5rem; +} + +.count { + transition: all 150ms cubic-bezier(0.165, 0.84, 0.44, 1); + transform: scale(1); +} + +.animated { + color: yellow; + transform: scale(1.2) rotate(3deg); +} + +footer { + text-align: center; + background-color: hsla(219, 69%, 6%, 0.8); + padding: 1rem 0; +} \ No newline at end of file diff --git a/esercizio1/favicon.png b/esercizio1/favicon.png new file mode 100644 index 0000000..bcb3d7e Binary files /dev/null and b/esercizio1/favicon.png differ diff --git a/esercizio1/giustificazione_eventi.txt b/esercizio1/giustificazione_eventi.txt new file mode 100644 index 0000000..8174f2a --- /dev/null +++ b/esercizio1/giustificazione_eventi.txt @@ -0,0 +1,10 @@ +Ho scelto di utilizzare il metodo GET per 3 motivi principali: + +- Semplicità di implementazione + +- Dati inviati non sensibili + +- Possibilità dell'utente di mantenere e/o salvare la ricerca effettuata + +I dati inviati saranno visibili nell'URL, nel formato chiave=valore dopo il simbolo ?. +Le coppie chiave-valore vengono separate dal simbolo &. \ No newline at end of file diff --git a/esercizio1/img/evento-bon-jovi.webp b/esercizio1/img/evento-bon-jovi.webp new file mode 100644 index 0000000..16355a6 Binary files /dev/null and b/esercizio1/img/evento-bon-jovi.webp differ diff --git a/esercizio1/img/evento-david-gilmour.webp b/esercizio1/img/evento-david-gilmour.webp new file mode 100644 index 0000000..18b4155 Binary files /dev/null and b/esercizio1/img/evento-david-gilmour.webp differ diff --git a/esercizio1/img/evento-matera.jpg b/esercizio1/img/evento-matera.jpg new file mode 100644 index 0000000..604a515 Binary files /dev/null and b/esercizio1/img/evento-matera.jpg differ diff --git a/esercizio1/img/evento-presepe-vivente-panettieri.jpg b/esercizio1/img/evento-presepe-vivente-panettieri.jpg new file mode 100644 index 0000000..e57cb9d Binary files /dev/null and b/esercizio1/img/evento-presepe-vivente-panettieri.jpg differ diff --git a/esercizio1/img/evento-scorpions.jpg b/esercizio1/img/evento-scorpions.jpg new file mode 100644 index 0000000..acc20b2 Binary files /dev/null and b/esercizio1/img/evento-scorpions.jpg differ diff --git a/esercizio1/img/flag-ctf.jpg b/esercizio1/img/flag-ctf.jpg new file mode 100644 index 0000000..167a12a Binary files /dev/null and b/esercizio1/img/flag-ctf.jpg differ diff --git a/esercizio1/img/hero.jpg b/esercizio1/img/hero.jpg new file mode 100644 index 0000000..c4725d3 Binary files /dev/null and b/esercizio1/img/hero.jpg differ diff --git a/esercizio1/index.html b/esercizio1/index.html new file mode 100644 index 0000000..486ea22 --- /dev/null +++ b/esercizio1/index.html @@ -0,0 +1,227 @@ + + + + + + + SecureTickets + + + + + + + + + + + + +
+
+ +
+ Biglietti: 0 +
+
+
+ +
+
+
+

Piattaforma n. 1 per cercare eventi

+
+
+
+ +
+
+

Cerca un evento

+ +

Utilizza la nostra nuova ricerca sicura per trovare l'evento desiderato, oppure consulta la sezione in + evidenza! +

+ +
+
+ + +
+
+ + +
+
+ +
+
+
+ +
+

In evidenza

+ +
+
+
+ Bon Jovi +
+
+

Bon Jovi - Forever Tour

+
+

24 luglio 2026

+

Arena di Verona

+
+

La leggenda del rock torna in Italia! Bon Jovi arriva all’Arena di Verona con il “Forever + Tour”, + per una serata di pura energia tra i brani del nuovo album e i grandi classici come Livin’ + on a + Prayer, Always e It’s My Life. +

+
+
+ +
+
+
+ +
+
+ David Gilmour +
+
+

David Gilmour - Luck And Strange Tour

+
+

18 marzo 2026

+

Circo Massimo, Roma

+
+

Il leggendario chitarrista dei Pink Floyd torna in Italia con il tour “Luck and Strange”. + Gilmour + presenta i brani del nuovo album e i capolavori che hanno fatto la storia del rock + psichedelico + in un emozionante viaggio sonoro al Circo Massimo. +

+
+
+ +
+
+
+ +
+
+ Scorpions +
+
+

Scorpions - Coming Home 60th Years Tour

+
+

16 agosto 2026

+

Arena di Verona

+
+

La storica band tedesca festeggia 60 anni di carriera con un tour speciale! Gli Scorpions tornano in Italia con tutti i loro successi, da Wind of Change a Still Loving You, fino all’energia di Rock You Like a Hurricane. Una serata esplosiva e ricca di emozioni nel segno del grande rock! +

+
+
+ +
+
+
+ +
+
+ Presepe Vivente +
+
+

Presepe Vivente - XXI Edizione

+
+

24 dicembre 2025

+

Panettieri (CS)

+
+

Torna il suggestivo Presepe Vivente di Panettieri, giunto alla ventunesima edizione. Le vie + del + borgo si animano con botteghe, figuranti e sapori tradizionali per rivivere la magia della + Natività nel cuore della Sila. +

+
+
+ +
+
+
+ +
+
+ Matera Light Festival +
+
+

Matera Light Festival 2026

+
+

10-19 ottobre 2026

+

Matera (MT)

+
+

La Città dei Sassi si illumina con il Matera Light Festival, dove arte, tecnologia e + paesaggio si + fondono in installazioni, videomapping e giochi di luce che valorizzano la bellezza senza + tempo + di Matera e del suo patrimonio UNESCO. +

+
+
+ +
+
+
+
+
+ +
+

HTTP GET e POST

+
+
+
+

GET

+

Metodo di HTTP utilizzato per inviare dati al server. I dati sono inviati nell'URL, dopo il + simbolo ? (Query String).

+

I valori inviati sono visibili, e vengono inviati secondo lo schema + chiave=valore, separando più coppie chiave-valore con il simbolo + &.

+

Possono essere inviati al massimo 2048 caratteri.

+
+
+ +
+
+

POST

+

Metodo di HTTP utilizzato per inviare dati al server. I dati non vengono inseriti in chiaro + nell'URL, ma vengono inseriti nel body della richiesta HTTP.

+

Non ci sono limiti di caratteri per invio. Viene preferito il metodo POST per l'utilizzo di + file, grandi quantità di informazioni o dati sensibili.

+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/esercizio1/logo.png b/esercizio1/logo.png new file mode 100644 index 0000000..8123713 Binary files /dev/null and b/esercizio1/logo.png differ diff --git a/esercizio1/process_eventi.php b/esercizio1/process_eventi.php new file mode 100644 index 0000000..b70e934 --- /dev/null +++ b/esercizio1/process_eventi.php @@ -0,0 +1,84 @@ + + + + + + + + + Ricerca > SecureTickets + + + + + + + + + + + + +
+
+ +
+ Biglietti: 0 +
+
+
+ +
+
+
+

Piattaforma n. 1 per cercare eventi

+
+
+
+ +
+
+ +

Richiesta non completa, riprova

+ Hai cercato"; + echo "

" . $nome . " in " . $citta . "

"; + echo "

Nessun evento trovato, per ora, ma l'invio dei dati con l'array $_GET funziona!

"; + } + ?> +
+ +
+ +
+
+ + + + + + \ No newline at end of file diff --git a/esercizio2/favicon.png b/esercizio2/favicon.png new file mode 100644 index 0000000..9d9fa4c Binary files /dev/null and b/esercizio2/favicon.png differ diff --git a/esercizio2/giustificazione_iscrizione.txt b/esercizio2/giustificazione_iscrizione.txt new file mode 100644 index 0000000..b3b6ec9 --- /dev/null +++ b/esercizio2/giustificazione_iscrizione.txt @@ -0,0 +1,3 @@ +Ho scelto di utilizzare il metodo POST perché i dati inviati al server HTTP sono sensibili e non devono essere visibili in chiaro nell'URL. + +I dati verranno quindi inseriti nel body della Request. \ No newline at end of file diff --git a/esercizio2/img/hero.jpg b/esercizio2/img/hero.jpg new file mode 100644 index 0000000..c3f2558 Binary files /dev/null and b/esercizio2/img/hero.jpg differ diff --git a/esercizio2/index.html b/esercizio2/index.html new file mode 100644 index 0000000..70b4a93 --- /dev/null +++ b/esercizio2/index.html @@ -0,0 +1,125 @@ + + + + + + + Iscrizione + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+

Iscrizione online

+
+
+
+ +
+
+

1-minuto per iscriverti

+ +

Compila il seguente modulo per iscriverti al corso online di Programmazione Web!

+

Riceverai un'email con tutti i dettagli per partecipazione, orari e programma.

+ +
+
+
+ + +
+
+ + +
+
+ +
+
+ Il corso +
+
+

Corso di programmazione Web

+

Imparerai le basi della programmazione Web, il linguaggio HTML, il linguaggio CSS e la logica + client-side con JavaScript.

+
+

18 ore

+

Online

+

Con quiz finale

+
+
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+
+ +
+

HTTP GET e POST

+
+
+
+

GET

+

Metodo di HTTP utilizzato per inviare dati al server. I dati sono inviati nell'URL, dopo il + simbolo ? (Query String).

+

I valori inviati sono visibili, e vengono inviati secondo lo schema + chiave=valore, separando più coppie chiave-valore con il simbolo + &. +

+

Possono essere inviati al massimo 2048 caratteri.

+
+
+ +
+
+

POST

+

Metodo di HTTP utilizzato per inviare dati al server. I dati non vengono inseriti in chiaro + nell'URL, ma vengono inseriti nel body della richiesta HTTP.

+

Non ci sono limiti di caratteri per invio. Viene preferito il metodo POST per l'utilizzo di + file, grandi quantità di informazioni o dati sensibili.

+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/esercizio2/iscrizione.css b/esercizio2/iscrizione.css new file mode 100644 index 0000000..ceefcb8 --- /dev/null +++ b/esercizio2/iscrizione.css @@ -0,0 +1,335 @@ +*, +*::before, +*::after { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html { + color-scheme: dark; +} + +body, +input, +button, +select, +textarea { + font-family: "Outfit", sans-serif; +} + +body { + background-color: hsl(203, 93%, 9%); + color: #fff; + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.container { + width: 95%; + max-width: 1200px; + margin-left: auto; + margin-right: auto; +} + +header { + position: fixed; + top: 0; + left: 0; + width: 100%; + background-color: hsla(203, 93%, 6%, 0.9); + backdrop-filter: blur(6px); + -webkit-backdrop-filter: blur(6px); + padding: 1rem 0; + z-index: 3; +} + +header .container { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: center; + align-items: center; + gap: 1rem; +} + +header .logo { + display: flex; + flex-direction: row; + align-items: center; + gap: 0.5rem; +} + +.hero { + background-color: hsl(203, 93%, 10%); + background-image: url("img/hero.jpg"); + background-attachment: fixed; + background-position: 50% 80%; + background-repeat: no-repeat; + background-size: cover; +} + +.hero .overlay { + padding: 12rem 1rem 8rem 1rem; + background-color: hsla(203, 93%, 5%, 0.6); + backdrop-filter: blur(2px); + -webkit-backdrop-filter: blur(2px); + text-align: center; +} + +img { + width: 100% +} + +.page { + flex-grow: 1; +} + +section { + margin-top: 4rem; + margin-bottom: 4rem; + text-align: center; +} + +section h2 { + margin-bottom: 1rem; +} + +section form { + display: flex; + flex-direction: column; + flex-wrap: nowrap; + justify-content: center; + align-items: center; + gap: 1rem; + background-color: hsl(203, 93%, 20%); + width: 95%; + max-width: 900px; + margin: 2rem auto; + margin-bottom: 0; + padding: 1rem; + border-radius: 1rem; + box-shadow: 0px 0px 20px hsla(203, 93%, 10%, 0.4); +} + +section form .orizzontale { + display: flex; + flex-direction: row; + align-items: center; + flex-wrap: nowrap; + gap: 1rem; + width: 100%; +} + +section form fieldset { + border: none; + display: flex; + flex-direction: row; + align-items: center; + flex-wrap: nowrap; + gap: 0.5rem; + text-align: left; + width: 100%; + max-width: 100%; +} + +section form .orizzontale fieldset { + flex-direction: column; +} + +section form fieldset.buttons { + max-width: max-content; +} + +section form fieldset label { + user-select: none; +} + +section form .orizzontale fieldset label { + display: block; + width: 100%; +} + +section form fieldset input[type="text"], +section form fieldset input[type="email"] { + font-size: 98%; + padding: 0.4rem 0.6rem; + border-radius: 0.5rem; + border: 1px solid hsla(203, 93%, 75%, 0.5); + width: 100%; + max-width: 100%; + background-color: hsla(203, 93%, 5%, 0.8); +} + +section form fieldset input[type="text"]:hover, +section form fieldset input[type="text"]:focus, +section form fieldset input[type="email"]:hover, +section form fieldset input[type="email"]:focus { + border: 1px solid hsla(203, 93%, 75%, 1); + outline: none; +} + +section form fieldset input[type="submit"], +section form fieldset input[type="button"], +.button { + font-size: 95%; + padding: 0.4rem 0.6rem; + border-radius: 0.5rem; + background-color: hsl(203, 93%, 75%); + color: hsl(203, 93%, 10%); + font-weight: bold; + text-transform: uppercase; + border: none; + cursor: pointer; + text-decoration: none; + user-select: none; +} + +section form fieldset input[type="submit"]:hover, +section form fieldset input[type="button"]:hover, +.button:hover { + background-color: hsl(203, 93%, 70%); +} + +section .boxes { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + display: flex; + flex-direction: column; + gap: 2rem; +} + +section .boxes .box, +.corso-box { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + width: 99%; + max-width: 1100px; + margin: 0 auto; + background-color: hsl(203, 93%, 20%); + border-radius: 1rem; + overflow: hidden; + box-shadow: 0px 0px 20px hsla(203, 93%, 10%, 0.4); +} + +.corso-box { + background-color: hsl(203, 93%, 15%); +} + +section .boxes .box .image { + flex-grow: 1; + max-width: 25rem; + min-width: 25rem; +} + +section .boxes .box .image img { + width: 100%; + object-fit: cover; + height: 100%; + display: block; + aspect-ratio: 4/3; +} + +.corso-box .image { + flex-grow: 1; + max-width: 10rem; + min-width: 10rem; +} + +.corso-box .image img { + width: 100%; + object-fit: cover; + height: 100%; + display: block; + aspect-ratio: 1/1; +} + +section .boxes .box .data, +.corso-box .data { + flex-grow: 2; + text-align: left; + display: flex; + flex-direction: column; + padding: 1rem; +} + +section .boxes .box .data h3, +.corso-box .data h3 { + font-size: 1.8rem; +} + +@media only screen and (max-width: 767px) { + + section .boxes .box .data h3, + .corso-box .data h3 { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 600px) { + section form .orizzontale { + flex-direction: column; + align-items: stretch; + } + + .corso-box { + flex-direction: column; + } + + .corso-box .image { + max-width: 100%; + min-width: 100%; + height: 8rem; + } + + .corso-box .data h3 { + font-size: 1.3rem; + } +} + +section .boxes .box .data .meta, +.corso-box .data .meta { + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin: 1rem 0; + justify-content: flex-start; + align-items: center; + gap: 0.5rem; +} + +section .boxes .box .data .meta p, +.corso-box .data .meta p { + display: flex; + flex-direction: row; + align-items: center; + gap: 0.5rem; + width: max-content; + padding: 0.2rem 0.4rem; + border-radius: 0.5rem; + background-color: hsl(203, 93%, 30%); +} + +section .buttons { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 0.5rem; + align-items: center; + justify-content: center; +} + +code { + background-color: hsl(221, 14%, 14%); + color: #ff6685; + padding: 0.2rem 0.3rem; + border-radius: 0.5rem; +} + +footer { + text-align: center; + background-color: hsla(203, 93%, 6%, 0.8); + padding: 1rem 0; +} \ No newline at end of file diff --git a/esercizio2/logo.png b/esercizio2/logo.png new file mode 100644 index 0000000..9d9fa4c Binary files /dev/null and b/esercizio2/logo.png differ diff --git a/esercizio2/process_iscrizione.php b/esercizio2/process_iscrizione.php new file mode 100644 index 0000000..e638799 --- /dev/null +++ b/esercizio2/process_iscrizione.php @@ -0,0 +1,86 @@ +Questa pagina blocca il metodo GET, compila prima il modulo!"); +} +?> + + + + + + + + Iscrizione confermata + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+

Iscrizione confermata

+
+
+
+ +
+
+ +

Invio dati del form non completo, riprova

+ Dati form inviati con successo!"; + echo "

Contenuto dell'array $_POST:


"; + echo "

Nome: " . $nome ."

"; + echo "

E-mail: " . $email ."

"; + } + ?> +
+ +
+ +
+
+ + + + + + \ No newline at end of file diff --git a/esercizio3/candidatura.css b/esercizio3/candidatura.css new file mode 100644 index 0000000..d8d9615 --- /dev/null +++ b/esercizio3/candidatura.css @@ -0,0 +1,403 @@ +*, +*::before, +*::after { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html { + color-scheme: light; +} + +body, +input, +button, +select, +textarea { + font-family: "Outfit", sans-serif; +} + +body { + background-color: hsl(44, 100%, 96%); + color: #000101; + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.container { + width: 95%; + max-width: 1200px; + margin-left: auto; + margin-right: auto; +} + +header { + position: fixed; + top: 0; + left: 0; + width: 100%; + background-color: #264f36; + backdrop-filter: blur(6px); + -webkit-backdrop-filter: blur(6px); + padding: 1rem 0; + z-index: 3; +} + +header .container { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: center; + align-items: center; + gap: 1rem; +} + +header .logo { + display: flex; + flex-direction: row; + align-items: center; + gap: 0.5rem; + color: #fff; +} + +header .logo img { + display: block; + height: auto; + width: 2rem; +} + +.hero { + background-color: #264f36; + background-image: url("img/hero.jpg"); + background-position: 50% 20%; + background-repeat: no-repeat; + background-size: cover; +} + +.hero .overlay { + padding: 12rem 1rem 8rem 1rem; + background-color: hsla(43, 100%, 53%, 0.8); + backdrop-filter: blur(2px); + -webkit-backdrop-filter: blur(2px); + text-align: center; +} + +img { + width: 100% +} + +.page { + flex-grow: 1; +} + +section { + margin-top: 4rem; + margin-bottom: 4rem; + text-align: center; +} + +section h2 { + margin-bottom: 1rem; +} + +.notice { + width: 95%; + max-width: 900px; + font-size: 87%; + opacity: 0.85; + margin: 0 auto; + font-style: italic; +} + +section form { + background-color: hsl(44, 100%, 86%); + width: 95%; + max-width: 900px; + margin: 2rem auto; + margin-bottom: 0; + padding: 0rem; + border-radius: 1rem; + box-shadow: 0px 0px 20px hsla(44, 100%, 86%, 0.4); + border: 1px solid hsla(43, 100%, 53%, 1); + position: relative; +} + +section form .effect { + background-color: hsla(43, 100%, 53%, 1); + background: linear-gradient(0deg, #ffbb0f 30%, transparent); + height: 65%; + width: 100%; + border-radius: 0 0 0.9rem 0.9rem; + position: absolute; + left: 0; + bottom: 0; + z-index: 0; +} + +section form .container { + z-index: 1; + padding: 1rem; + padding-bottom: 2rem; + width: 100%; + display: flex; + flex-direction: column; + flex-wrap: nowrap; + justify-content: center; + align-items: center; + position: relative; + gap: 1rem; +} + +section form img { + height: auto; + width: calc(100% - 2rem); + position: absolute; + top: 100%; + left: 1rem; +} + +section form .orizzontale { + display: flex; + flex-direction: row; + align-items: flex-start; + flex-wrap: nowrap; + gap: 1rem; + width: 100%; +} + +section form fieldset { + border: none; + display: flex; + flex-direction: row; + align-items: center; + flex-wrap: nowrap; + gap: 0.5rem; + text-align: left; + width: 100%; + max-width: 100%; +} + +section form .orizzontale fieldset { + flex-direction: column; + justify-content: flex-start; + align-items: flex-start; +} + +section form fieldset.buttons { + max-width: max-content; +} + +section form fieldset label { + user-select: none; +} + +section form .orizzontale fieldset > label { + display: block; + width: 100%; + font-weight: bold; +} + +section form fieldset input[type="text"], +section form fieldset input[type="email"], +section form fieldset textarea { + font-size: 98%; + padding: 0.4rem 0.6rem; + border-radius: 0.5rem; + border: 1px solid hsla(143, 35%, 23%, 0.5); + width: 100%; + max-width: 100%; + background-color: hsla(143, 35%, 95%, 0.8); +} + +section form fieldset input[type="file"] { + font-size: 88%; + width: 100%; + max-width: 100%; +} + +section form fieldset input[type="text"]:hover, +section form fieldset input[type="text"]:focus, +section form fieldset input[type="email"]:hover, +section form fieldset input[type="email"]:focus, +section form fieldset textarea:hover, +section form fieldset textarea:focus { + border: 1px solid hsla(143, 35%, 23%, 1); + outline: none; +} + +section form fieldset textarea { + resize: vertical; +} + +section form fieldset input[type="submit"], +section form fieldset input[type="button"], +.button { + font-size: 95%; + padding: 0.4rem 0.6rem; + border-radius: 0.5rem; + background-color: #264f36; + color: #fff; + font-weight: bold; + text-transform: uppercase; + border: none; + cursor: pointer; + text-decoration: none; + user-select: none; +} + +section form fieldset input[type="submit"]:hover, +section form fieldset input[type="button"]:hover, +.button:hover { + background-color: hsl(143, 35%, 18%); +} + +#upload { + margin-bottom: 1rem; +} + +.uploader { + display: flex !important; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 1rem; + border-radius: 1rem; + width: 100%; + height: 8rem; + text-align: center; + margin-top: 1rem; + border: 3px dashed hsla(143, 35%, 23%, 0.8); + background-color: hsla(143, 35%, 95%, 0.8); + white-space: unset; + cursor: pointer; +} + +.uploader span { + font-weight: normal; + font-size: 90%; +} + +section .boxes { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + display: flex; + flex-direction: column; + gap: 2rem; +} + +section .boxes .box { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + width: 99%; + max-width: 1100px; + margin: 0 auto; + background-color: hsl(143, 35%, 20%); + color: #fff; + border-radius: 1rem; + overflow: hidden; + box-shadow: 0px 0px 20px hsla(143, 35%, 10%, 0.4); +} + +section .boxes .box .image { + flex-grow: 1; + max-width: 25rem; + min-width: 25rem; +} + +section .boxes .box .image img { + width: 100%; + object-fit: cover; + height: 100%; + display: block; + aspect-ratio: 4/3; +} + +section .boxes .box .data { + flex-grow: 2; + text-align: left; + display: flex; + flex-direction: column; + padding: 1rem; +} + +section .boxes .box .data h3, +.corso-box .data h3 { + font-size: 1.8rem; +} + +@media only screen and (max-width: 767px) { + + section .boxes .box .data h3, + .corso-box .data h3 { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 600px) { + section form .orizzontale { + flex-direction: column; + align-items: stretch; + } +} + + +section .boxes .box .data .meta, +.corso-box .data .meta { + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin: 1rem 0; + justify-content: flex-start; + align-items: center; + gap: 0.5rem; +} + +section .boxes .box .data .meta p, +.corso-box .data .meta p { + display: flex; + flex-direction: row; + align-items: center; + gap: 0.5rem; + width: max-content; + padding: 0.2rem 0.4rem; + border-radius: 0.5rem; + background-color: hsl(143, 35%, 30%); +} + +section .buttons { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 0.5rem; + align-items: center; + justify-content: center; +} + +code { + background-color: #fff; + color: hsl(348, 100%, 40%); + padding: 0.2rem 0.3rem; + border-radius: 0.5rem; +} + +.post-data { + display: flex; + flex-direction: column; + align-items: center; + gap: 1rem; + margin-top: 2rem; +} + +a { + color: hsl(143, 35%, 23%); +} + +footer { + text-align: center; + background-color: hsl(143, 35%, 23%); + padding: 1rem 0; + color: #fff; +} \ No newline at end of file diff --git a/esercizio3/favicon.png b/esercizio3/favicon.png new file mode 100644 index 0000000..6f96902 Binary files /dev/null and b/esercizio3/favicon.png differ diff --git a/esercizio3/giustificazione_candidatura.txt b/esercizio3/giustificazione_candidatura.txt new file mode 100644 index 0000000..b06d361 --- /dev/null +++ b/esercizio3/giustificazione_candidatura.txt @@ -0,0 +1,6 @@ +Ho scelto di utilizzare il metodo POST perché i dati inviati al server HTTP sono sensibili e non devono essere visibili in chiaro nell'URL. + +I dati verranno quindi inseriti nel body della Request. + +Ho aggiunto per la lettura dei metadata del file caricato l'attributo enctype="multipart/form-data" al
. +Lato server, ho utilizzato l'array associativo $_FILES[] \ No newline at end of file diff --git a/esercizio3/img/graphic.png b/esercizio3/img/graphic.png new file mode 100644 index 0000000..294b665 Binary files /dev/null and b/esercizio3/img/graphic.png differ diff --git a/esercizio3/img/hero.jpg b/esercizio3/img/hero.jpg new file mode 100644 index 0000000..db3dc0d Binary files /dev/null and b/esercizio3/img/hero.jpg differ diff --git a/esercizio3/index.html b/esercizio3/index.html new file mode 100644 index 0000000..a75ef9d --- /dev/null +++ b/esercizio3/index.html @@ -0,0 +1,161 @@ + + + + + + + Candidati ora! + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+

Invia la tua candidatura

+
+
+
+ +
+
+

Vuoi far parte della nostra squadra?

+ +

Compila il form e inviaci una candidatura spontanea!

+
+

Le rendiamo noto che la sua candidatura potrà essere gestita direttamente da McDonald’s + Italia S.r.l. in + qualità di titolare del trattamento oppure da soggetti appartenenti al sistema a marchio McDonald’s che + gestiranno la fase di selezione come Titolari autonomi del trattamento.

+ + +
+ + +
+
+
+ + +
+
+ + +
+
+ +
+
+

Livello di esperienza

+
+ +
+ +
+ + +
+
+
+

Competenze

+
+ +
+ +
+ +
+ +
+ + +
+
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +

Informativa

+
+ + +
+ +
+ +
+
+ +
+ +
+

HTTP GET e POST

+
+
+
+

GET

+

Metodo di HTTP utilizzato per inviare dati al server. I dati sono inviati nell'URL, dopo il + simbolo ? (Query String).

+

I valori inviati sono visibili, e vengono inviati secondo lo schema + chiave=valore, separando più coppie chiave-valore con il simbolo + &. +

+

Possono essere inviati al massimo 2048 caratteri.

+
+
+ +
+
+

POST

+

Metodo di HTTP utilizzato per inviare dati al server. I dati non vengono inseriti in chiaro + nell'URL, ma vengono inseriti nel body della richiesta HTTP.

+

Non ci sono limiti di caratteri per invio. Viene preferito il metodo POST per l'utilizzo di + file, grandi quantità di informazioni o dati sensibili.

+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/esercizio3/logo.png b/esercizio3/logo.png new file mode 100644 index 0000000..ab843db Binary files /dev/null and b/esercizio3/logo.png differ diff --git a/esercizio3/process_candidatura.php b/esercizio3/process_candidatura.php new file mode 100644 index 0000000..09c99db --- /dev/null +++ b/esercizio3/process_candidatura.php @@ -0,0 +1,169 @@ +Questa pagina blocca il metodo GET, compila prima il modulo!"); +} +?> + + + + + + + + Candidatura confermata + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+

Invio confermato!

+
+
+
+ +
+
+

Grazie per aver inviato la tua candidatura!

+ +

Ecco i dati che abbiamo ricevuto (array $_POST):

+ +
+ + +

Invio dati del form non completo, riprova!

+ Nome
"; + if (isset($_POST["nome"])) { + // Sanitizzazione input necessaria + $var = htmlspecialchars($_POST["nome"]); + echo $var; + } else { + echo "NON PRESENTE"; + } + echo "

"; + + echo "

E-mail
"; + if (isset($_POST["email"])) { + // Sanitizzazione input necessaria + $var = htmlspecialchars($_POST["email"]); + echo $var; + } else { + echo "NON PRESENTE"; + } + echo "

"; + + echo "

Esperienza
"; + if (isset($_POST["esperienza"])) { + // Sanitizzazione input necessaria + $var = htmlspecialchars($_POST["esperienza"]); + echo $var; + } else { + echo "NON PRESENTE"; + } + echo "

"; + + echo "

Competenze
"; + if (isset($_POST["competenze"])) { + // Sanitizzazione input necessaria + foreach ($_POST["competenze"] as $competenza) { + echo htmlspecialchars($competenza); + echo "
"; + } + } else { + echo "NON PRESENTE"; + } + echo "

"; + + echo "

File allegato
"; + if (isset($_POST["curriculum"]) || isset($_FILES["curriculum"])) { + // Sanitizzazione necessaria solo per salvataggio del file, con permessi di esecuzione bloccati + echo "Nome: " . $_FILES["curriculum"]['name']; + echo "
Tipo di file: " . $_FILES['curriculum']['type']; + echo "
Directory temporanea: " . $_FILES['curriculum']['tmp_name']; + echo "
Errori riscontrati: " . $_FILES['curriculum']['error']; + echo "
Dimensione: " . $_FILES['curriculum']['size'] . " B"; + echo "

Utilizzato l'array di PHP $_FILES e l'attributo enctype=\"multipart/form-data\" al modulo"; + } else { + echo "NON PRESENTE"; + } + echo "

"; + + echo "

Lettera di presentazione
"; + if (isset($_POST["lettera"])) { + // Sanitizzazione input necessaria + $var = htmlspecialchars($_POST["lettera"]); + echo $var; + } else { + echo "NON PRESENTE"; + } + echo "

"; + + echo "

Privacy accettata
"; + if (isset($_POST["accetto"])) { + echo "Si"; + } else { + echo "No"; + } + echo "

"; + } + ?> + +
+ +
+ +
+

Verrai molto presto ricontattato da uno dei nostri addetti!
+ Per approfondire  

+
+ +
+ +
+
+ + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..e1cfaba --- /dev/null +++ b/index.html @@ -0,0 +1,90 @@ + + + + + + + Esercizio HTTP + + + + + + + + + + + + +
+
+

Esercizi HTTP con GET e POST

+
+
+
+ +
+
+

SecureTickets

+
+

Esercizio 1

+

Metodo GET

+
+

Ricerca con metodo GET di eventi filtrando per nome e città. Trova facilmente e in modo sicuro l'evento desiderato! Sfoglia gli eventi in evidenza e acquista il tuo biglietto online.

+
+ +
+
+ +
+
+ +
+
+

Corso online

+
+

Esercizio 2

+

Metodo POST

+
+

Acquisisci nuove competenze iscrivendoti al corso di Programmazione Web. Potrai imparare i linguaggi client-side (come HTML, CSS e JavaScript) e i linguaggi server-side (come PHP e Java).

+
+ +
+
+ +
+
+ +
+
+

Candidatura

+
+

Esercizio 3

+

Metodo POST

+
+

Invia la tua candidatura spontanea sulla nuovissima piattaforma dedicata! Inserisci i tuoi dati, carica il tuo CV e inizia subito. Ti aspettiamo!

+
+ +
+
+
+
+ +
+ + + + + + \ No newline at end of file diff --git a/index.php b/index.php deleted file mode 100644 index d27e275..0000000 --- a/index.php +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Funziona! - - - -

Funziona!

-

Se vedi questa pagina, deploy-dynamic funziona!

-
- PARTY -
-
- Pagina generata dinamicamente con PHP il -
-
-

Ospitato su vps.francescomancuso.it

- -