Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <? php
- $usernameErr = "BILLYBOBJOW";
- if (isset($_POST['submit'])) {
- if ($_SERVER["REQUEST_METHOD"] == "POST") {
- }
- }
- function sanitizeInput($input) {
- $input = trim($input);
- $input = stripslashes($input);
- $input = htmlspecialchars($input);
- return $input;
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>CPHS Inklings</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="stylesheet" href="../stylesheets/main.css" type="text/css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
- </head>
- <style>
- @font-face {
- font-family: "Helvetica Neue";
- src: url("../HelveticaNeue.ttf") format("truetype");
- }
- body {
- margin: 0px;
- box-sizing: border-box;
- overflow: hidden;
- font-weight: 400;
- font-family: "Helvetica Neue";
- }
- #background-image {
- margin: 0px;
- position: fixed;
- background-image: url(./courthouse-login.jpg);
- background-size: cover;
- background-position: 50% 50%;
- background-repeat: no-repeat;
- vertical-align: baseline;
- width: 100%;
- height: 100%;
- }
- #overlay {
- position: absolute;
- margin: 0px;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- #message {
- position: relative;
- display: flex;
- justify-content: center;
- transition: transform 1s;
- transform: translateY(-10%);
- }
- h1 {
- font-size: 80px;
- color: white;
- font-weight: 100;
- }
- #form-container {
- display: flex;
- justify-content: center;
- width: 100%;
- transform: translateY(10%);
- }
- #form {
- width: 300px;
- background-color: rgba(255, 255, 255, 0.7);
- border-radius: 10px;
- box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4);
- padding: 20px;
- }
- label {
- display: block;
- font-size: 1em;
- margin-bottom: 5px;
- color: black;
- font-style: bold;
- }
- input[type="text"], input[type="password"] {
- width: 100%;
- border-radius: 5px;
- border-style: solid;
- border-color: white;
- font-size: 1em;
- font-weight: 800;
- font-family: "Helvetica Neue";
- margin-bottom: 5px;
- color: #ef1538;
- }
- .hidden-form {
- display: none;
- }
- #expand-form {
- color: black;
- text-align: center;
- }
- #expand-form:hover {
- text-decoration: underline;
- }
- .error {
- color: red;
- }
- </style>
- <script>
- $(document).ready(function() {
- $('body').width($(window).width());
- $('body').height($(window).height());
- $('#overlay').hide().delay(1000).fadeIn(1000);
- $('#message').hide().delay(2000).fadeIn(1000);
- $('#form').hide().delay(2000).fadeIn(1000).css("transform","translateY(-20%)");
- var message1 = "Don't have an account?";
- var message2 = "Already have an account?";
- $('#expand-form').click(function() {
- if ($(this).html() == message2) {
- $(this).html(message1);
- $('#sign-in-option').prop("checked",true);
- }
- else {
- $(this).html(message2);
- $('#sign-up-option').prop("checked",true);
- }
- $('.hidden-form').each(function() {
- $(this).toggle("display");
- });
- });
- });
- </script>
- <body>
- <div id="background-image">
- </div>
- <div id="overlay">
- <div id="message">
- <h1>Sign In</h1>
- </div>
- <div id="form-container">
- <div id="form">
- <form method="POST" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"])?>" >
- <label class="hidden-form" for="first-name">First Name:
- <span class="error"><?php echo $firstnameErr; ?></span></label>
- <input class="hidden-form" type="text" id="first-name" name="first-name">
- <label class="hidden-form" for="last-name">Last Name:
- <span class="error"><?php echo $lastnameErr; ?></span></label>
- <input class="hidden-form" type="text" id="last-name" name="last-name">
- <label for="username">Username:
- <span class="error"><?php $usernameErr="BILLBOBJOW"; echo $usernameErr;?></span></label>
- <input type="text" id="username" name="username">
- <label for="password">Password:
- <span class="error"><?php echo $passwordErr; ?></span></label>
- <input type="password" id="password" name="password">
- <label class="hidden-form" for="confirm">Confirm Password:
- <span class="error"><?php echo $confirmErr ?></span></label>
- <input class="hidden-form" type="password" id="confirm" name="confirm">
- <input style="display: none" id="sign-in-option" type="radio" name="sign-type" value="sign-in" checked="checked">
- <input style="display: none" id="sign-up-option" type="radio" name="sign-type" value="sign-up">
- <div style="display: flex; justify-content: center">
- <input class="inklings-button" id="submit" type="submit" value="Submit" name="submit">
- </div>
- <div id="expand-form">
- Don't have an account?
- </div>
- </form>
- </div>
- </div>
- </div>
- <!--<table style="width: 100%; height: 100%">
- </table>-->
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement