From 9b4743d25af8a11596c9c8140f179bae8c135048 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Wed, 18 Jan 2017 09:19:38 +0100 Subject: [PATCH] Splitted login and register pages --- website/public/login.php | 62 ++++++++- website/public/register.php | 200 +++++++++++++++++++++++++++ website/public/styles/index.css | 151 +++++++++++--------- website/views/login-view.php | 237 ++------------------------------ website/views/login_head.php | 2 - website/views/register-view.php | 145 +++++++++++++++++++ 6 files changed, 508 insertions(+), 289 deletions(-) create mode 100644 website/public/register.php create mode 100644 website/views/register-view.php diff --git a/website/public/login.php b/website/public/login.php index 0018067..e20c204 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -5,9 +5,65 @@ include("../views/login_head.php"); ?> diff --git a/website/public/register.php b/website/public/register.php new file mode 100644 index 0000000..1d65102 --- /dev/null +++ b/website/public/register.php @@ -0,0 +1,200 @@ + + + + +connect_error) { + die("Connection failed: " . $conn->connect_error); + } + + // Query for inserting all the data in the database + $sql = "INSERT INTO + VALUES ($name, $surname, $bday, $username, $password, + $confirmpassword, $streetname, $housenumber, $email)"; + + // Checks if able to insert into database + if (mysqli_query($conn, $sql)) { + echo "New record created successfully"; + } else { + echo "Error: " . $sql . "
" . mysqli_error($conn); + } + + + + prepare('SELECT name, colour, calories + FROM fruit + WHERE calories < :calories AND colour = :colour'); + $sth->bindParam(':calories', $calories, PDO::PARAM_INT); + $sth->bindParam(':colour', $colour, PDO::PARAM_STR, 12); + $sth->execute(); + ?> + + + + // Closing connection + mysql_close($connection); + } + } + +/* This view adds register view */ +include("../views/register-view.php"); +?> + + diff --git a/website/public/styles/index.css b/website/public/styles/index.css index b4daae7..5978f9d 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -1,98 +1,117 @@ ::selection { - background: #845663; - color: white; + background: #845663; + color: white; } ::-moz-selection { - background: #845663; - color: white; + background: #845663; + color: white; } a, a:link, a:visited, a:hover, a:active { - color: inherit; - text-decoration: none; + color: inherit; + text-decoration: none; } +a.button { + background-color: #845663; + border: 2px solid black; + border-radius: 12px; + color: white; + cursor: pointer; + height: 50%; + margin: 8px 0; + padding: 14px 20px; + width: 25%; + font-family: Arial; + font-size: 16px; +} a[data-title]:hover:after, img[data-title]:hover:after, span[data-title]:hover:after, div[data-title]:hover:after{ - content: attr(data-title); - padding: 4px 4px; - color: #FFFFFF; - position: absolute; - left: 0; - top: 100%; - z-index: 20; - white-space: nowrap; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - -moz-box-shadow: 0px 0px 4px #222; - -webkit-box-shadow: 0px 0px 4px #222; - box-shadow: 0px 0px 4px #222; - background-color: #333; - font-size: 15px; - line-height: normal; - font-family: Arial, sans-serif; + content: attr(data-title); + padding: 4px 4px; + color: #FFFFFF; + position: absolute; + left: 0; + top: 100%; + z-index: 20; + white-space: nowrap; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + -moz-box-shadow: 0px 0px 4px #222; + -webkit-box-shadow: 0px 0px 4px #222; + box-shadow: 0px 0px 4px #222; + background-color: #333; + font-size: 15px; + line-height: normal; + font-family: Arial, sans-serif; } /* Add Zoom Animation */ .animate { - animation: animatezoom 0.6s - -webkit-animation: animatezoom 0.6s; + animation: animatezoom 0.6s + -webkit-animation: animatezoom 0.6s; } /* Body */ body { - height: 100%; + height: 900px; - background-color: #B78996; - color: #333; + background-image: url(https://images2.pixlis.com/background-image-plaid-checkered-seamless-tileable-235ftm.png); + background-size: contain; + background-attachment: fixed; - font-family: Arial, sans-serif; + /*background-color: #B78996;*/ + color: #333; + + font-family: Arial, sans-serif; } /* stijl voor alle buttons */ button { - background-color: #845663; - border: 2px solid black; - border-radius: 12px; - color: white; - cursor: pointer; - height: 50%; - margin: 8px 0; - padding: 14px 20px; - width: 25%; - font-family: Arial; - font-size: 16px; + background-color: #845663; + border: 2px solid black; + border-radius: 12px; + color: white; + cursor: pointer; + height: 50%; + margin: 8px 0; + padding: 14px 20px; + width: 25%; + font-family: Arial; + font-size: 16px; } /* The Close Button */ .close { /* Position it in the top right corner outside of the modal */ - color: white; - font-size: 100px; - font-weight: bold; - position: absolute; - right: 25px; - top: 0; + color: white; + font-size: 100px; + font-weight: bold; + position: absolute; + right: 25px; + top: 0; } /* Close button on hover */ .close:hover, .close:focus { - color: red; - cursor: pointer; + color: red; + cursor: pointer; } /* inlogform */ form { - background-color: #a87a87; + /*background-color: #a87a87;*/ border: 5px solid #325da3; + background-color: #a87a87; border-radius: 12px; - height: 50%; - margin: auto; - width: 55%; + height: 57%; + margin: 8px auto; + width: 45%; + overflow: auto; } /* inlog titel */ @@ -142,14 +161,21 @@ label { /* padding voor registreer container */ .login_containerregister { - padding: 16px; - text-align: left; + padding: 16px; + text-align: left; } /* padding voor login_containers */ .login_containerlogin { - padding: 16px; - text-align: center; + padding: 16px; + text-align: center; +} + +/* padding voor foutmelding login */ +.login_containerfault { + padding: 16px; + text-align: center; + color: red; } /* The Modal (background) */ @@ -175,12 +201,13 @@ label { margin: 5px auto; /* 15% from the top and centered */ overflow-y: auto; width: 40%; /* Could be more or less, depending on screen size */ - height: 80%; + height: 60%; + } @keyframes animatezoom { - from {transform: scale(0)} - to {transform: scale(1)} + from {transform: scale(0)} + to {transform: scale(1)} } /* datepicker */ @@ -203,6 +230,6 @@ select { } ul { - font-family: Arial; - font-size: 16px; + font-family: Arial; + font-size: 16px; } diff --git a/website/views/login-view.php b/website/views/login-view.php index 7ee3d66..e70d96b 100644 --- a/website/views/login-view.php +++ b/website/views/login-view.php @@ -1,256 +1,49 @@ - - -
MyHyvesbook+
-
+" + return= $correct method="post">

Welkom bij MyHyvesbook+

+ + + + + +
+
- + Registreer een account
- -
- -
- - - - diff --git a/website/views/login_head.php b/website/views/login_head.php index 6111b5d..2283b7d 100644 --- a/website/views/login_head.php +++ b/website/views/login_head.php @@ -5,6 +5,4 @@ type="text/css" href="styles/index.css"> - - diff --git a/website/views/register-view.php b/website/views/register-view.php new file mode 100644 index 0000000..a184f71 --- /dev/null +++ b/website/views/register-view.php @@ -0,0 +1,145 @@ +
+ MyHyvesbook+ +
+ + +
" + return= $correct + method="post"> +

Registreer uw account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ Login met een account +