Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['form_email']) && isset($_POST['form_passwort'])){
- if(ueberpruefe_login($_POST['form_email'], $_POST['form_passwort'])){
- $login_ok = true;
- }
- else{
- $login_ok = false;
- }
- }
- else{
- $login_ok = null;
- }
- ?>
- <html>
- <head>
- <title>Login</title>
- <style type="text/css">
- #registrieren{
- border-radius: 20px;
- -webkit-transition-duration: 0.4s;
- -transition-duration: 0.4s;
- font-size: 0.8em;
- padding-left: 5px;
- padding-right: 5px;
- background-color: #70d080;
- text-decoration: none;
- cursor: default;
- color: #000;
- border-right: 1px solid gray;
- border-bottom: 1px solid gray;
- border-left: 1px solid white;
- border-top: 1px solid white;
- }
- #registrieren:hover{
- background-color: #4CAF50;
- color: white;
- }
- #registrieren:active{
- border-right: 1px solid white;
- border-bottom: 1px solid white;
- border-left: 1px solid gray;
- border-top: 1px solid gray;
- }
- #loginbox{
- display: none;
- position: absolute;
- left: 5px;
- top: 5px;
- padding: 5px;
- border: 1px solid black;
- background-color: #ddd;
- }
- #login, #verberge_loginbox, #zeige_loginbox{
- border-radius: 20px;
- background-color: #ffe4b5;
- box-shadow: 0 12px 16px 0 rgba(0,0,0,0.2), 0 ipx 50px 0 rgba(0,0,0,0.19);
- }
- #verberge_loginbox{
- position: absolute;
- top: 5px;
- right: 5px;
- }
- .loginformular_eingabefeld{
- border-radius: 20px;
- }
- #login_fehler{
- color: #f00;
- }
- </style>
- </head>
- <body>
- <input type="button" id="zeige_loginbox" value="Login" />
- <div id="loginbox">
- <input type="button" id="verberge_loginbox" value="X" />
- <form method="post" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>">
- <?php if($login_ok === false){ ?><span id="login_fehler">Falsche Email/Falsches Passwort</span><?php } ?>
- <dl>
- <dt>Email:</dt><dd><input class="loginformular_eingabefeld" id="form_email" name="form_email" type="text" /></dd>
- <dt>Passwort:</dt><dd><input class="loginformular_eingabefeld" id="form_passwort" name="form_passwort" type="password" /></dd>
- </dl>
- <input id="login" type="submit" id="login" value="Einloggen" />
- </form>
- <a href="registrierung.php" target="_blank" id="registrieren">Noch nicht angemeldet, jetzt registrieren</a>
- </div>
- <script>
- document.getElementById('zeige_loginbox').addEventListener('click',
- function(){
- document.getElementById('loginbox').style.display = 'block';
- }
- );
- document.getElementById('verberge_loginbox').addEventListener('click',
- function(){
- document.getElementById('form_email').value = '';
- document.getElementById('form_passwort').value = '';
- document.getElementById('loginbox').style.display = 'none';
- }
- );
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement