From 7d0a7b98c4a8e93bdfc75cea4c88b93eb997247d Mon Sep 17 00:00:00 2001 From: Jose Torres Date: Fri, 23 Dec 2022 10:26:44 +0100 Subject: [PATCH 1/2] proyect session PHP --- close_session.php | 9 +++ footer.php | 20 ++++++ header.php | 11 ++++ index.php | 44 ++++++++++++++ panel.php | 29 +++++++++ phpinfo/phpinfo.php | 3 + style.css | 144 ++++++++++++++++++++++++++++++++++++++++++++ validate.php | 18 ++++++ 8 files changed, 278 insertions(+) create mode 100644 close_session.php create mode 100644 footer.php create mode 100644 header.php create mode 100644 index.php create mode 100644 panel.php create mode 100644 phpinfo/phpinfo.php create mode 100644 style.css create mode 100644 validate.php diff --git a/close_session.php b/close_session.php new file mode 100644 index 0000000..0cfcf46 --- /dev/null +++ b/close_session.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..84db3e0 --- /dev/null +++ b/footer.php @@ -0,0 +1,20 @@ + + + + + + + + + + \ No newline at end of file diff --git a/header.php b/header.php new file mode 100644 index 0000000..c2a133f --- /dev/null +++ b/header.php @@ -0,0 +1,11 @@ + + + + + + + Document + + + + diff --git a/index.php b/index.php new file mode 100644 index 0000000..981fb62 --- /dev/null +++ b/index.php @@ -0,0 +1,44 @@ +El usuario o contraseƱa no son correctos

'; +} +if(isset($_SESSION['email'])) { + echo '

Do you want to log in again ' . $_SESSION['email'] . '?

'; + unset($_SESSION['email']); +} + +?> + + +
+
+

Complete the fields to log in

+
+
+
+ +
+
+
+ +
+ +

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

' . $_SESSION['email'] . '';?>

+
+ + +
+
+
+ + + + + + + + diff --git a/phpinfo/phpinfo.php b/phpinfo/phpinfo.php new file mode 100644 index 0000000..968c8df --- /dev/null +++ b/phpinfo/phpinfo.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..182ab60 --- /dev/null +++ b/style.css @@ -0,0 +1,144 @@ +body{ + background-color: #1C1C1C; +} + +#section-login{ + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + max-width: 70vw; + height: 90vh; +} + +#tittle-login{ + color: #dcb18c; + margin-bottom: 50px; +} +#form-login{ + display: flex; +} + +.form-control{ + border:none; +} +input[type="email"], input[type="password"]{ + background-color: #1C1C1C; + border-bottom: 1px solid #dcb18c; + color:#dcb18c; + border-radius: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + -ms-border-radius: 0; + -o-border-radius: 0; + width: 30vw; +} +::placeholder { + color:#dcb18c !important; +} +input[type="email"], input[type="password"]:active{ + background-color: #1C1C1C !important; +} +.form-control:focus:focus{ + background-color: #1C1C1C !important; + border-bottom: 5px solid #dcb18c; + box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 0%); +} +label{ + color:antiquewhite; +} + +button[type="submit"]{ + padding: 50px 35px; + border-radius: 150px; + background: #1c1c1c; + border: 1px solid #dcb18c; + color: #dcb18c; + font-weight: 900; + transition: 0.4s; + transform: perspective(1px) translateZ(0); +} + +button[type="submit"]:hover { + color: #1c1c1c; + background-color: #dcb18c; +} + +button[type="submit"]::before { + clip-path: circle(0.5% at 50% 50%); + background-color: #dcb18c; + transition: 0.4s; + opacity: 1; +} + +button[type="submit"]:hover::before { + clip-path: circle(100% at 50% 50%); +} + +.warning{ + color: #dcb18c; + text-align: center; + padding: 30px; + font-weight: 700; +} + +.greeting{ + color: #dcb18c; + text-align: center; + padding: 30px; + font-weight: 700; +} + +#section-panel{ + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + width: 100vw; +} + +#section-panel h1{ + width: 100%; + color:#dcb18c; + font-size: 80px; + font-weight: 800; + text-align: center; + margin-bottom: 50px; +} + +#section-panel h1 span{ + font-weight: 100; +} + +#close-sesion{ + display: flex; + justify-content: center; +} + +@media screen and (max-width: 790px){ + #form-login{ + display: flex; + flex-direction: column !important; + } + input[type="email"], input[type="password"]{ + width: 100% !important; + } + button[type="submit"]{ + padding: 20px !important; + } + #section-panel h1{ + font-size: 60px; + padding: 20px; + } + #close-sesion button{ + width: 60%; + } +} + +@media screen and (max-width: 520px){ + #section-panel h1{ + font-size: 40px; + padding: 20px; + } + +} \ No newline at end of file diff --git a/validate.php b/validate.php new file mode 100644 index 0000000..bb8071d --- /dev/null +++ b/validate.php @@ -0,0 +1,18 @@ + \ No newline at end of file From 7ffa796aa2c053af4a4a65a06356ada3c54935b1 Mon Sep 17 00:00:00 2001 From: Jose Torres Date: Fri, 23 Dec 2022 11:07:20 +0100 Subject: [PATCH 2/2] update --- footer.php | 13 ------------- index.php | 9 --------- panel.php | 3 +-- style.css | 19 +++++++++++++++---- 4 files changed, 16 insertions(+), 28 deletions(-) diff --git a/footer.php b/footer.php index 84db3e0..dc1c1cc 100644 --- a/footer.php +++ b/footer.php @@ -2,19 +2,6 @@ include "header.php"; ?> - - - - - \ No newline at end of file diff --git a/index.php b/index.php index 981fb62..da6be64 100644 --- a/index.php +++ b/index.php @@ -11,12 +11,6 @@ } ?> -
@@ -32,13 +26,10 @@


-
- - \ No newline at end of file diff --git a/panel.php b/panel.php index 65c2f63..5a49b7a 100644 --- a/panel.php +++ b/panel.php @@ -11,8 +11,7 @@

' . $_SESSION['email'] . '';?>

- - +
diff --git a/style.css b/style.css index 182ab60..be17293 100644 --- a/style.css +++ b/style.css @@ -48,7 +48,7 @@ label{ color:antiquewhite; } -button[type="submit"]{ +#form-login button[type="submit"]{ padding: 50px 35px; border-radius: 150px; background: #1c1c1c; @@ -59,19 +59,19 @@ button[type="submit"]{ transform: perspective(1px) translateZ(0); } -button[type="submit"]:hover { +#form-login button[type="submit"]:hover { color: #1c1c1c; background-color: #dcb18c; } -button[type="submit"]::before { +#form-login button[type="submit"]::before { clip-path: circle(0.5% at 50% 50%); background-color: #dcb18c; transition: 0.4s; opacity: 1; } -button[type="submit"]:hover::before { +#form-login button[type="submit"]:hover::before { clip-path: circle(100% at 50% 50%); } @@ -115,6 +115,17 @@ button[type="submit"]:hover::before { justify-content: center; } +.close{ + padding: 50px 40px; + border-radius: 150px; + background: #1c1c1c; + border: 1px solid #dcb18c; + color: #dcb18c; + font-weight: 900; + transition: 0.4s; + transform: perspective(1px) translateZ(0); +} + @media screen and (max-width: 790px){ #form-login{ display: flex;