summaryrefslogtreecommitdiff
path: root/index.php
blob: 5a00c47cf55a892f21c3553f037b0d9f7c86f780 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/partials.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/utils.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/config.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/alert.php';

$user = $_SESSION['user'] ?: null;
?>
<!DOCTYPE html>
<html>

<head>
    <title>id system</title>
    <link rel="stylesheet" href="/static/style.css">
</head>

<body>
    <main>
        <?php html_navbar(); ?>
        <?php display_alert(); ?>

        <?php if (isset($user)): ?>
            <div>
                <h1>Account information</h1>
                <table>
                    <tr>
                        <th>Username</th>
                        <td><?= $user['username'] ?></td>
                    </tr>
                    <tr>
                        <th>Password</th>
                        <td>*****</td>
                    </tr>
                    <tr>
                        <th>Joined</th>
                        <td><?= $user['joined_at'] ?></td>
                    </tr>
                    <tr>
                        <th></th>
                        <td><a href="/account/edit.php"><button>Edit</button></a></td>
                    </tr>
                </table>
            </div>
        <?php else: ?>
            <div class="row gap-16">
                <section class="column gap-16 grow">
                    <h1>Your key to ilotterytea&apos;s software</h1>
                    <p>
                        The ilt.su identification system gives you an access
                        to all software developed by ilotterytea &amp; alright.party.
                    </p>
                    <p>
                        All your data is under one house. It sounds very unsecure, but
                        we don&apos;t store anything except your username and hashed password.
                    <p>
                        It&apos;s completely anonymous.
                    </p>
                    <div>
                        <a href="/register.php">
                            <button class="fancy">Register an account today!</button>
                        </a>
                    </div>
                </section>
                <section class="column align-center justify-center">
                    <img src="/static/img/promo/1.webp" alt="" width="384">
                </section>
            </div>
        <?php endif; ?>
    </main>
</body>

</html>