diff --git a/assets/style.css b/assets/style.css index 4d7b6a0..876d503 100644 --- a/assets/style.css +++ b/assets/style.css @@ -11,9 +11,7 @@ } body { - background: linear-gradient(127deg, var(--secondary-bg), var(--primary-bg)); - background-repeat: no-repeat; - background-attachment: fixed; + background: linear-gradient(127deg, var(--secondary-bg), var(--primary-bg)) no-repeat fixed; background-size: cover; height: 100%; width: 100%; @@ -29,28 +27,9 @@ nav { justify-content: space-between; padding: 1.2rem 1rem; background-color: rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0px 20px 28px 0px rgba(0,0,0,0.2); - -moz-box-shadow: 0px 20px 28px 0px rgba(0,0,0,0.2); - box-shadow: 0px 20px 28px 0px rgba(0,0,0,0.2); -} - -nav #login { - color: var(--primary-text); - text-decoration: none; - background-color: #2a9dd6; - padding: 0.35rem 0.65rem; - transition: all 0.3s ease; - border-radius: 15px; -} - -nav #login:hover, nav #login.active{ - transition: all 0.3s ease; - background-color: var(--primary-hover); - color: var(--primary-text); -} - -nav #login:hover::after, nav #login.active::after { - width: 0; + -webkit-box-shadow: 0 20px 28px 0 rgba(0,0,0,0.2); + -moz-box-shadow: 0 20px 28px 0 rgba(0,0,0,0.2); + box-shadow: 0 20px 28px 0 rgba(0,0,0,0.2); } ul { @@ -89,11 +68,6 @@ li a:hover::after { width: 85%; } -li a:hover, li a.active { - color: var(--primary); - transition: all 0.3s ease; -} - .wrapper-404 { text-align: center; } @@ -162,7 +136,6 @@ header hr { } .navpage_list{ - margin-top: 8px; background-color: var(--third-bg); margin-top: 10px; display: flex; @@ -178,11 +151,6 @@ header hr { border: 4px solid var(--primary-hover) ; } -a.navpage_link{ - padding: 0; - margin: 0; -} - li.navpage_item{ padding-left: 20px; padding-right: 20px; diff --git a/index.php b/index.php index 2e07b5a..08eb6e3 100644 --- a/index.php +++ b/index.php @@ -1,11 +1,21 @@ \ No newline at end of file diff --git a/lib/account.php b/lib/account.php index d90f988..1aee7d6 100644 --- a/lib/account.php +++ b/lib/account.php @@ -19,13 +19,13 @@ function doLogin(){ $nickname = ""; $pwdhash = ""; $mcnick = ""; - $isadmin = false; /* bind variables to prepared statement */ - $stmt->bind_result($idcko, $fname, $lname, $nickname, $pwdhash, $mcnick, $isadmin); - - $found = false; + $stmt->bind_result($idcko, $fname, $lname, $nickname, $pwdhash, $mcnick, false); + /* fetch values */ - while ($stmt->fetch()) { + $found = false; + if($stmt->num_rows() > 0){ + $stmt->fetch(); if (password_verify($pass, $pwdhash)){ $_SESSION["ID"] = $idcko; $_SESSION["first_name"] = $fname; @@ -33,14 +33,9 @@ function doLogin(){ $_SESSION["nickname"] = $nickname; $_SESSION["email"] = $email; $_SESSION["mcnick"] = $mcnick; - $_SESSION["isadmin"] = $isadmin; - $found = true; - break; + $_SESSION["isadmin"] = false; + $found = true; } - else{ - $found = false; - } - break; } $stmt->close(); if($found){ @@ -76,7 +71,7 @@ function doRegister(){ $password = $_POST["password"]; $minecraftNick = $_POST["minecraftnick"]; $activationToken = $_POST["activationtoken"]; - if (!empty($firstName) && !empty($lastName) && !empty($nickname) && !empty($email) && !empty($password) && !empty($activationToken)){ + if (!empty($firstName) && !empty($lastName) && !empty($nickname) && !empty($email) && !empty($password)) { $passwordHash = password_hash($password, PASSWORD_DEFAULT); $stmt = $mysqli->prepare("UPDATE Users SET FirstName = ?, LastName = ?, Nickname = ?, Email = ?, PasswordHash = ?, MinecraftNick = ?, isAdmin = 0, isActivated = 1 WHERE isActivated = 0 AND ActivationToken = ?"); @@ -88,6 +83,6 @@ function doRegister(){ $stmt->close(); } } + echo json_encode($status); } -?> \ No newline at end of file diff --git a/lib/navpages.php b/lib/navpages.php index 35ce732..44e1699 100644 --- a/lib/navpages.php +++ b/lib/navpages.php @@ -1,44 +1,50 @@ __NAME__
'; $navpage_template = '