summaryrefslogtreecommitdiff
path: root/pages/login.inc
blob: 313be91a83e7dd68285b98561734b0ce899b3907 (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
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $title; global $isLoggedIn; global $lang; global $pages;
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; global $readOnly; global $isNormallyLoggedIn;

if (isset($_GET["return"])) {
    setcookie("PEH2_RETURN_PAGE", $_GET["return"], 0, "/");
}


if (isset($_GET["mini"])) {
?>
<style>
    #navigation-pane, #title-bar, #footer, #titlebar-separator, #mobile-navigation, #global-search-container {
        display: none !important;
    }

    body {
        margin-left: 0 !important;
    }
</style>
<?php } ?>

<br>
<div class="container">
    <div>
        <h2><?= $pages["login"]["name"][$lang["_name"]] ?></h2>
        <?php if ($readOnly): ?>
        <div class="alert alert-warning">
            <b><?= $lang["login"]["maintenance"][0] ?> </b><?= $lang["login"]["maintenance"][1] ?>
        </div>
        <?php else: ?>
        <?php global $isLoggedIn; if ($isLoggedIn): ?>
        <div class="alert alert-warning">
            <b>You are already logged in.</b> If you want to log into a different account or using a different authentication method, you may do so now.
        </div>
        <?php else: ?>
        <p><?= $lang["login"]["select"] ?> Cold Haze.</p>
        <div class="row">
            <div class="col-md-6">
                <div class="card" style="margin-bottom:10px;text-align: center;">
                    <div class="card-body">
                        <h4 class="card-title" style="margin-top:15px;"><?= $lang["login"]["private"][0] ?></h4>
                        <p><?= $lang["login"]["private"][1] ?></p>
                        <a href="/auth/init" class="btn btn-primary"><?= $lang["login"]["private"][2] ?></a>
                    </div>
                </div>
            </div>
            <div class="col-md-6"></div>
        </div>
        <?php endif; endif; ?>
    </div>
</div>

<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/footer.inc'; ?>