View sourcecode

The following files exists in this folder. Click to view.

admin.php

34 lines UTF-8 Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
include('check_login.php');
if(isset(
$_GET["action"])){
    switch(
$_GET["action"]){
        case 
"killCookie":
            
setcookie('username'''time() - 070414);
            
setcookie('password'''time() - 070414);
        }
}
?>
<!DOCTYPE html>
<html lang="sv">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ADMIN</title>
    <link rel="stylesheet" href="/spectre/spectre-master/dist/spectre.css">
</head>
<body style="text-align: center;">
    <h1>Välkommen</h1>
    <img src="../tron.png">
    <p>Slå dig ner, <?php echo $_SESSION["username"]?></p>
    <p>För det är väl du ;)</p>
    <br>
    <a href="pmanager.php">Byt lösenord</a>
    <br><br>
    <a class="btn btn-primary" href="logout.php">Logga ut</a>
    <?php
    
if(isset($_COOKIE["username"])){
        echo
"<br><br><br> <a href=\"?action=killCookie\" class=\"btn btn-sm\">Kom inte ihåg mig längre</a>";
    }
    
?>
</body>
</html>