Neuer Login :D (img noch anpassen) popup offen lassen
This commit is contained in:
parent
90012a7e36
commit
9f095f37b9
3 changed files with 120 additions and 24 deletions
80
index.php
80
index.php
|
@ -5,8 +5,12 @@
|
|||
|
||||
<body>
|
||||
<div class="bild">
|
||||
<img src="schriftv2.png">
|
||||
<img src="schriftv2.png" class="cliff_logo">
|
||||
</div>
|
||||
<div class="key_login">
|
||||
<img src="key.png" class="key" id="login_run">
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
session_start();
|
||||
|
@ -150,34 +154,66 @@ while($row = $result->fetch_assoc()){
|
|||
</table><br>
|
||||
|
||||
|
||||
<div id="login_modal" class="m_login">
|
||||
<div class="m_login_c">
|
||||
<span class="close">×</span>
|
||||
|
||||
<script>
|
||||
var modal1 = document.getElementById("login_modal");
|
||||
var btn1 = document.getElementById("login_run");
|
||||
var span1 = document.getElementsByClassName("close")[0];
|
||||
btn1.onclick = function() {
|
||||
modal1.style.display = "block";
|
||||
}
|
||||
span1.onclick = function() {
|
||||
modal1.style.display = "none";
|
||||
}
|
||||
window.onclick = function(event) {
|
||||
if (event.target == modal1) {
|
||||
modal1.style.display = "none";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<?php
|
||||
if (!isset ($_SESSION['id'])){
|
||||
echo '<div class="loginform">'.
|
||||
|
||||
<?php
|
||||
if (!isset ($_SESSION['id'])){
|
||||
echo '<div class="loginform">' .
|
||||
'<form action="/login.php" method="post">' .
|
||||
'<input type="text" placeholder="Username" name="user">' .
|
||||
'<input type="password" placeholder="Password" name="pw">' .
|
||||
'<input type="submit" value="Login">' .
|
||||
'</form>' .
|
||||
'</div>';
|
||||
if (isset ($_SESSION['status'])){
|
||||
echo $_SESSION['status'];
|
||||
}
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo '<div class="loginform">' .
|
||||
'<form action="/insert.php" method="post">' .
|
||||
'<input type="url" pattern="https?://.+" required placeholder="Link" name="url"><br>' .
|
||||
'<input type="submit" value="Add">' .
|
||||
'</form>' .
|
||||
'<form action="/logout.php" method="post">' .
|
||||
'<input type="submit" value="Logout">' .
|
||||
'</form>' .
|
||||
'</div>';
|
||||
?>
|
||||
|
||||
'</div>';
|
||||
if (isset ($_SESSION['status'])){
|
||||
echo $_SESSION['status'];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
|
||||
echo '<div class="loginform">' .
|
||||
'<form action="/insert.php" method="post">' .
|
||||
'<input type="url" pattern="https?://.+" required placeholder="Link" name="url"><br>' .
|
||||
'<input type="submit" value="Add">' .
|
||||
'</form>' .
|
||||
'<form action="/logout.php" method="post">' .
|
||||
'<input type="submit" value="Logout">' .
|
||||
'</form>' .
|
||||
'</div>';
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
BIN
key.png
Normal file
BIN
key.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
64
style.css
64
style.css
|
@ -68,8 +68,8 @@ table.center {
|
|||
padding-bottom: 0px;
|
||||
background: rgba(18,18,18, 0.3);
|
||||
border: 2px solid #DDDDDD;
|
||||
position: fixed;
|
||||
margin-left: 1600px;
|
||||
position: relative;
|
||||
margin: auto;
|
||||
bottom: 10px;
|
||||
|
||||
}
|
||||
|
@ -103,3 +103,63 @@ table.center {
|
|||
margin-top: 325px;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.key{
|
||||
|
||||
color: white;
|
||||
|
||||
max-width: 64px;
|
||||
max-height: 64px;
|
||||
}
|
||||
.key_login{
|
||||
width: 75px;
|
||||
height: 75px;
|
||||
background: rgba(18,18,18, 0.6);
|
||||
box-sizing: border-box;
|
||||
border: 2px solid #DDDDDD;
|
||||
text-align: center;
|
||||
margin-bottom: 25px;
|
||||
padding: 0;
|
||||
padding-top: 2;
|
||||
position: absolute;
|
||||
right: 160px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.m_login{
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
padding-top: 100px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background: rgba(18,18,18, 0.6);
|
||||
|
||||
}
|
||||
.m_login_c{
|
||||
background: rgba(18,18,18, 0.6);
|
||||
margin: auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.close {
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
font-size: 5vw;
|
||||
font-weight: bold;
|
||||
}
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: red;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
Reference in a new issue