This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ripreso CSS validato e apportate le altre modifiche
- Loading branch information
1 parent
9615b10
commit 215f9df
Showing
53 changed files
with
2,877 additions
and
2,909 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,72 @@ | ||
|
||
function checkText(input, text, regexp){ | ||
var element = document.getElementById(input); | ||
var test = element.value; | ||
var parent = element.parentNode; | ||
var alert = parent.querySelector(".invalid-feedback"); | ||
|
||
return showAlert(alert, regexp.test(test) || test === "" , text, parent); | ||
} | ||
|
||
function checkEmail(){ | ||
var regex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/; | ||
var element = document.getElementById('email'); | ||
var test = element.value; | ||
var parent = element.parentNode; | ||
var alert = parent.querySelector(".invalid-feedback"); | ||
|
||
return showAlert(alert,regex.test(test) || test === "", 'Email non valida', parent); | ||
} | ||
|
||
function checkPassword(){ | ||
var inputPassword = document.getElementById('psw'); | ||
var inputRepeatPassword =document.getElementById('password-repeat'); | ||
var parent = inputRepeatPassword.parentNode; | ||
var alert = parent.querySelector(".invalid-feedback"); | ||
return showAlert(alert, inputPassword.value === inputRepeatPassword.value, 'Password e Conferma Password non coincidono, riprova', parent); | ||
} | ||
|
||
function checkDateProfile(){ | ||
var element = document.getElementById("data_nascita"); | ||
var parent = element.parentNode; | ||
var alert = parent.querySelector(".invalid-feedback"); | ||
var condition = false; | ||
var userAge= getAge(element.value); | ||
if(userAge < 18){ | ||
text = 'Devi avere almeno 18 anni per registrarti al nostro portale'; | ||
} | ||
else | ||
condition = true; | ||
|
||
return showAlert(alert, condition, text, parent); | ||
} | ||
|
||
function getAge(DOB) { | ||
var today = new Date(); | ||
var birthDate = new Date(DOB); | ||
var age = today.getFullYear() - birthDate.getFullYear(); | ||
var m = today.getMonth() - birthDate.getMonth(); | ||
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { | ||
age--; | ||
} | ||
return age; | ||
} | ||
|
||
function showAlert(alert, condition, text, parent){ | ||
if(alert) parent.removeChild(alert); | ||
|
||
if(!condition && text !== ""){ | ||
var div = document.createElement("div"); | ||
div.classList.add("feedback"); | ||
div.classList.add("invalid-feedback"); | ||
var p = document.createElement("p"); | ||
p.appendChild(document.createTextNode(text)); | ||
div.appendChild(p); | ||
parent.appendChild(div); | ||
|
||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
function checkText(input, text, regexp){ | ||
var element = document.getElementById(input); | ||
var test = element.value; | ||
var parent = element.parentNode; | ||
var alert = parent.querySelector(".invalid-feedback"); | ||
|
||
return showAlert(alert, regexp.test(test) || test === "" , text, parent); | ||
} | ||
|
||
function checkEmail(){ | ||
var regex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/; | ||
var element = document.getElementById('email'); | ||
var test = element.value; | ||
var parent = element.parentNode; | ||
var alert = parent.querySelector(".invalid-feedback"); | ||
|
||
return showAlert(alert,regex.test(test) || test === "", 'Email non valida', parent); | ||
} | ||
|
||
function checkPassword(){ | ||
var inputPassword = document.getElementById('psw'); | ||
var inputRepeatPassword =document.getElementById('password-repeat'); | ||
var parent = inputRepeatPassword.parentNode; | ||
var alert = parent.querySelector(".invalid-feedback"); | ||
return showAlert(alert, inputPassword.value === inputRepeatPassword.value, 'Password e Conferma Password non coincidono, riprova', parent); | ||
} | ||
|
||
function checkDateProfile(){ | ||
var element = document.getElementById("data_nascita"); | ||
var parent = element.parentNode; | ||
var alert = parent.querySelector(".invalid-feedback"); | ||
var condition = false; | ||
var userAge= getAge(element.value); | ||
if(userAge < 18){ | ||
text = 'Devi avere almeno 18 anni per registrarti al nostro portale'; | ||
} | ||
else | ||
condition = true; | ||
|
||
return showAlert(alert, condition, text, parent); | ||
} | ||
|
||
function getAge(DOB) { | ||
var today = new Date(); | ||
var birthDate = new Date(DOB); | ||
var age = today.getFullYear() - birthDate.getFullYear(); | ||
var m = today.getMonth() - birthDate.getMonth(); | ||
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { | ||
age--; | ||
} | ||
return age; | ||
} | ||
|
||
function showAlert(alert, condition, text, parent){ | ||
if(alert) parent.removeChild(alert); | ||
|
||
if(!condition && text !== ""){ | ||
var div = document.createElement("div"); | ||
div.classList.add("feedback"); | ||
div.classList.add("invalid-feedback"); | ||
var p = document.createElement("p"); | ||
p.appendChild(document.createTextNode(text)); | ||
div.appendChild(p); | ||
parent.appendChild(div); | ||
|
||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<h2>PAGINA ERRORE 404</h2> | ||
<div class = "errorPage"> | ||
<h3>AMANTE DEL FUORISTRADA?</h3> | ||
<img id="img_404" src="../img/errore2.jpg"> | ||
<p>Oh no, sembra che tu sia finito fuori strada ... | ||
Purtroppo non vendiamo carri attrezzi, ma fortunatamente potrai vedere e acquistare molte altre tipologie di veicoli presso i nostri eventi. Rimiettiti nelle nostre mani e tornerai nella stada giusta. Fidati, non te ne pentirai </p> | ||
<a id ="homeButton" href="../php/index.php">TORNA ALLA PAGINA INIZIALE</a> | ||
</div> | ||
|
||
<h2>PAGINA ERRORE 404</h2> | ||
<div class = "errorPage"> | ||
<h3>AMANTE DEL FUORISTRADA?</h3> | ||
<img id="img_404" src="../img/errore2.jpg"> | ||
<p>Oh no, sembra che tu sia finito fuori strada ... | ||
Purtroppo non vendiamo carri attrezzi, ma fortunatamente potrai vedere e acquistare molte altre tipologie di veicoli presso i nostri eventi. </p> | ||
<a id ="homeButton" href="../php/index.php">TORNA ALLA PAGINA INIZIALE</a> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
<form action="../php/editorEventi.php?id_Evento={value-id_Evento}" " method="post" id="formEditEventi"> | ||
<div class="registration_form"> | ||
<h2>Modifica Evento</h2> | ||
<p>Compila i campi seguenti per modificare un evento</p> | ||
<hr> | ||
|
||
<fieldset name="capienza" form="formEditEventi"> | ||
<label for="capienza"><b>Capienza</b></label> | ||
<input type="text" value = {value-capienza} placeholder="Inserisci la capienza" name="capienza" id="capienza"> | ||
</fieldset> | ||
|
||
<fieldset name="data" form="formEditEventi"> | ||
<label for="data"><b>Data</b></label> | ||
<input type="date" value = {value-data} placeholder="Inserisci la data" name="data" id="data"> | ||
</fieldset> | ||
|
||
<fieldset name="nome" form="formEditEventi"> | ||
<label for="nome"><b>Nome</b></label> | ||
<input type="text" value = {value-nome} placeholder="Inserisci il nome" name="nome" id="nome"> | ||
</fieldset> | ||
|
||
<fieldset name="descrizione" form="formEditEventi"> | ||
<label for="descrizione"><b>Descrizione</b></label> | ||
<textarea id="descrizione" name="descrizione">{value-descrizione}</textarea> | ||
</fieldset> | ||
|
||
<fieldset name="prezzo" form="formEditEventi"> | ||
<label for="prezzo"><b>Prezzo</b></label> | ||
<input type="number" value = {value-prezzo} placeholder="Inserisci il prezzo" name="prezzo" id="prezzo"> | ||
</select> | ||
</fieldset> | ||
|
||
<button type="submit" class="register_btn" name="submit">Modifica Dati Evento</button> | ||
<input type="reset" class="reset_btn"> | ||
</div> | ||
<form action="../php/editorEventi.php?id_Evento={value-id_Evento}" " method="post" id="formEditEventi"> | ||
<div class="registration_form"> | ||
<h2>Modifica Evento</h2> | ||
<p>Compila i campi seguenti per modificare un evento</p> | ||
<hr> | ||
|
||
<fieldset name="capienza" form="formEditEventi"> | ||
<label for="capienza"><b>Capienza</b></label> | ||
<input type="text" value = {value-capienza} placeholder="Inserisci la capienza" name="capienza" id="capienza"> | ||
</fieldset> | ||
|
||
<fieldset name="data" form="formEditEventi"> | ||
<label for="data"><b>Data</b></label> | ||
<input type="date" value = {value-data} placeholder="Inserisci la data" name="data" id="data"> | ||
</fieldset> | ||
|
||
<fieldset name="nome" form="formEditEventi"> | ||
<label for="nome"><b>Nome</b></label> | ||
<input type="text" value = {value-nome} placeholder="Inserisci il nome" name="nome" id="nome"> | ||
</fieldset> | ||
|
||
<fieldset name="descrizione" form="formEditEventi"> | ||
<label for="descrizione"><b>Descrizione</b></label> | ||
<textarea id="descrizione" name="descrizione">{value-descrizione}</textarea> | ||
</fieldset> | ||
|
||
<fieldset name="prezzo" form="formEditEventi"> | ||
<label for="prezzo"><b>Prezzo</b></label> | ||
<input type="number" value = {value-prezzo} placeholder="Inserisci il prezzo" name="prezzo" id="prezzo"> | ||
</select> | ||
</fieldset> | ||
|
||
<button type="submit" class="register_btn" name="submit">Modifica Dati Evento</button> | ||
<input type="reset" class="reset_btn"> | ||
</div> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
|
||
<h2> PROSSIMO EVENTO IN PROGRAMMA </h2> | ||
<dl class="eventList"> | ||
{event-list} | ||
</dl> | ||
|
||
|
||
<h2> PROSSIMO EVENTO IN PROGRAMMA </h2> | ||
<dl class="eventList"> | ||
{event-list} | ||
</dl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<footer> | ||
<address> | ||
<p>AUTO ASTA</p> | ||
<p>Carlesso Niccolò, Pillon Matteo, Soldà Matteo, Veronese Andrea</p> | ||
<p>Università degli Studi di Padova - Dipartimento di Matematica</p> | ||
<footer> | ||
<address> | ||
<p>AUTO ASTA</p> | ||
<p>Carlesso Niccolò, Pillon Matteo, Soldà Matteo, Veronese Andrea</p> | ||
<p>Università degli Studi di Padova - Dipartimento di Matematica</p> | ||
</footer> |
Oops, something went wrong.