added login_indicator div

This commit is contained in:
Václav Šmejkal 2024-05-07 20:51:32 +02:00
parent ad5d4985fe
commit 83ff40ca0d
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
3 changed files with 22 additions and 0 deletions

View File

@ -40,6 +40,8 @@
</form>
</div>
<div id="login_indicator">Přihlášen jako:</div>
<?php
$secret = fopen("./secret", "r");
$database = mysqli_connect("109.123.243.163", "fht", fgets($secret), "fht");

View File

@ -67,4 +67,10 @@ function show_register()
register_clicked = !register_clicked;
login_clicked = false;
}
function set_login_uname(uname)
{
document.getElementById("login_indicator").style.visibility = "visible";
document.getElementById("login_indicator").innerText += " " + uname;
}

View File

@ -89,4 +89,18 @@ body
#login_buttons *
{
width: 17vh;
}
#login_indicator
{
visibility: hidden;
position: fixed;
top: 0;
right: 0;
margin: 0.5vh;
padding: 1vh;
border: 1px #3E392F solid;
background: #6F7270;
}