diff --git a/Assets/imagen-principal.png b/Assets/imagen-principal.png new file mode 100644 index 0000000..18c1cb7 Binary files /dev/null and b/Assets/imagen-principal.png differ diff --git a/Assets/logo.png b/Assets/logo.png new file mode 100644 index 0000000..4c15fae Binary files /dev/null and b/Assets/logo.png differ diff --git a/close_session.php b/close_session.php new file mode 100644 index 0000000..26d556e --- /dev/null +++ b/close_session.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..bf11042 --- /dev/null +++ b/index.php @@ -0,0 +1,52 @@ + + + + + + + + + Login + + + + +
+
+ + + +
+

+ +

+
+ +
+
+ + + + \ No newline at end of file diff --git a/panel.php b/panel.php new file mode 100644 index 0000000..de3c0d9 --- /dev/null +++ b/panel.php @@ -0,0 +1,47 @@ + + + + + + + + Logueado + + + + + + + + + + + +

Find Your City

+
+ + + + +
+ +
+ + + \ No newline at end of file diff --git a/principalStyle.css b/principalStyle.css new file mode 100644 index 0000000..88d8bbe --- /dev/null +++ b/principalStyle.css @@ -0,0 +1,106 @@ +body { + width: 100%; + height: 100%; + background-image: url("Assets/imagen-principal.png"); + background-size: cover; + place-items: center; + display: flex; + justify-content: center; + +} + +.menu { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + height: 12vh; + background-color: blue; + margin-top: -1.5%; + margin-left: -1.5%; +} + +.menu img { + width: 5%; + height: 70%; + margin-left: 2%; + margin-top: 1%; +} + + +.account { + color: white; + margin-right: 3%; + margin-top: 1%; + cursor: pointer; +} + +.account:hover { + background-color: black; + color: aqua; +} + +.menu-account { + display: none; + +} + +.menu-account_show { + background-color: black; + color: white; + width: 10%; + margin-bottom: -10%; + margin-left: 90%; + display: block; + position: absolute; + z-index: 0; +} + +.menu-account p:hover { + background-color: red; +} + +.container { + width: 100%; + height: 100%; + place-items: center; + display: flex; + flex-direction: column; + justify-content: center; + position: absolute; + margin-bottom: -30%; + z-index: -1; +} + +.container h1 { + font: bold 80px/1 arial; + text-transform: uppercase; + color: #c69c1e; + text-shadow: 0 12px 0 #41330a; + font-size: 100px; + +} + +.content { + width: 80%; + height: 20%; +} + +input { + width: 31%; + height: 100%; + text-align: center; +} + +select { + width: 31%; + height: 100%; + text-align: center; +} + +button { + width: 31%; + height: 100%; + margin-left: 32%; + background-color: skyblue; +} \ No newline at end of file diff --git a/prueba.html b/prueba.html new file mode 100644 index 0000000..2da8f83 --- /dev/null +++ b/prueba.html @@ -0,0 +1,15 @@ + + + + + + + Document + + + +
+ +
+ + \ No newline at end of file diff --git a/prueba.js b/prueba.js new file mode 100644 index 0000000..a54523b --- /dev/null +++ b/prueba.js @@ -0,0 +1,14 @@ +let edad = new FormData(); +edad.append('edad', 14); +edad.append('nombre', "Juan"); + + +fetch("./prueba.php", { + method: 'POST', + body: edad +}) +.then(res => { + return res.text() +}) +.then(data => console.log(data)) +.catch(error => console.log(error)) \ No newline at end of file diff --git a/prueba.php b/prueba.php new file mode 100644 index 0000000..80455ec --- /dev/null +++ b/prueba.php @@ -0,0 +1,11 @@ + diff --git a/script.js b/script.js new file mode 100644 index 0000000..b692d51 --- /dev/null +++ b/script.js @@ -0,0 +1,12 @@ +const account = document.getElementsByClassName("account")[0]; +account.addEventListener("click", OpenAccount); +const menuAccount = document.getElementsByClassName("menu-account")[0]; +const unlogin = document.getElementsByClassName("unlogin")[0]; +unlogin.addEventListener("click", disconect); +function OpenAccount(){ + menuAccount.classList.toggle("menu-account_show"); +} + +function disconect(){ + window.location="close_session.php"; +} \ No newline at end of file diff --git a/server_session.php b/server_session.php new file mode 100644 index 0000000..ab49964 --- /dev/null +++ b/server_session.php @@ -0,0 +1,11 @@ +"; +print_r($_SESSION); +echo ""; + +?> \ No newline at end of file diff --git a/server_variables.php b/server_variables.php new file mode 100644 index 0000000..b1512fe --- /dev/null +++ b/server_variables.php @@ -0,0 +1,15 @@ +"; +print_r($_SERVER); +echo ""; + +echo "
"; + +//php.ini +$iniRuta = php_ini_loaded_file(); +if($iniRuta){ + echo "Cargando el fichero php.ini: ".$iniRuta; +} else { + echo "El fichero php.ini no esta cargado"; +} +?> \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..7625fff --- /dev/null +++ b/style.css @@ -0,0 +1,49 @@ +body { + width: 100vw; + height: 100vh; + background-color: aqua; + place-items: center; + display: flex; + justify-content: center; +} + + +.container{ + width: 20vw; + height: 50vh; + background-color: gray; + place-items: center; + display: flex; + justify-content: center; + border-radius: 23px; + border: 0; + +} +label{ + font-size: 30px; +} +.formulario{ + width: 20vw; + height: 50vh; + place-items: center; + display: flex; + flex-direction: column; + justify-content: center; + +} + +#submit{ + width: 50%; + margin:0 auto; + margin-top: 50px; + background-color: red; +} + +input{ + width: 50%; +} +.errores{ + background-color: rosybrown; + border-radius: 5px; +} + diff --git a/validate.php b/validate.php new file mode 100644 index 0000000..bdd7a89 --- /dev/null +++ b/validate.php @@ -0,0 +1,32 @@ +Error: Tienes que rellenar el formulario"; + header("Location: index.php"); + } + if(($username != $user && $username!="") || ($password != $pass && $password!="")){ + $_SESSION["errorSession"] = "Error: El Username o el Password son incorrecto, por favor vuelve a intentarlo"; + header("Location: index.php"); + } + + if ($username == $user && $password == $pass) { + $_SESSION['username']=$user; + $_SESSION['password']=$pass; + header("Location: panel.php"); + + } +} + +