summaryrefslogtreecommitdiff
path: root/index.php
blob: a4fa5ba8186d4b013af40d38a2ad6422abfcb30e (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<?php

if ((1623504600 - time()) < 0) {
    header("Location: /home");
    die();
}

function l($fr, $en) {
    if (isset($_GET['lang'])) {
        if ($_GET['lang'] == "en") {
            $_SERVER['HTTP_ACCEPT_LANGUAGE'] = "en";
        } else if ($_GET['lang'] == "fr") {
            $_SERVER['HTTP_ACCEPT_LANGUAGE'] = "fr";
        }
    }
    if (substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) == "fr") {
        return $fr;
    } else {
        return $en;
    }
}

?>

<!DOCTYPE html>
<html lang="en" style="height:100%;">
<head>
    <meta charset="UTF-8">
    <title>Kartik</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="/static/favicon.png">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
    <script src="/static/constellation.js"></script>
</head>
<body style="height:100%;overflow:hidden;">
    <div id="k__loader">
        <style>
            #k__loader {
                transition: opacity 200ms;
                opacity: 1;
                inset: 0;
                background-color: #fadbc1;
                display: flex;
                align-items: center;
                justify-content: center;
                position: fixed;
                z-index: 99999999999;
            }

            body {
                overflow: hidden;
            }
        </style>
        <img src="/static/banner.gif" width="380px">
    </div>
    <script>
        window.addEventListener('load', () => {
            setTimeout(() => {
                document.getElementById('k__loader').style.pointerEvents = "none";
                document.getElementById('k__loader').style.opacity = "0";
                setTimeout(() => {
                    document.getElementById('k__loader').style.display = "none";
                }, 200)
            }, 2000)
        });
    </script>

    <nav class="navbar navbar-expand-sm bg-dark navbar-dark" style="position:fixed;left:0;z-index:9999;background:none !important;width:max-content;">

        <div class="collapse navbar-collapse" id="collapsibleNavbar">
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" data-toggle="modal" data-target="#contact" href="#"><?= l("Nous contacter", "Contact Us") ?></a>
                </li>
            </ul>
        </div>
    </nav>

    <div id="particle-canvas" style="height:100%;width:100%;position:fixed;top:0;left:0;right:0;bottom:0;"></div>
    <?php if ((1623424015 - time()) < 0): ?>
    <div id="countdown-outer" style="position: fixed;top: 0;left: 0;right: 0;bottom: 0;pointer-events: none;color: white;font-size: 56px;display: flex;align-items: center;justify-content: center;z-index: 99;font-family: monospace;text-align: center;">
        <div>
            <img src="/static/logo.png"><br>
            <div id="countdown" style="font-family: monospace;">-:--:--</div>
        </div>
    </div>
    <script>
        var countDownDate = new Date("2021-06-12T15:30:00.000+02:00").getTime();

        var x = setInterval(function() {

            var now = new Date().getTime();

            var distance = countDownDate - now;

            var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
            var seconds = Math.floor((distance % (1000 * 60)) / 1000);

            document.getElementById("countdown").innerHTML = hours + ":"
                + "00".substr(0, 2 - minutes.toString().length) + minutes + ":" + "00".substr(0, 2 - seconds.toString().length) + seconds;

            if (distance < 0) {
                clearInterval(x);
                document.getElementById("countdown").innerHTML = "-:--:--";
                location.href = "/redirect";
            }
        }, 1000);
    </script>
    <?php else: ?>
    <div id="countdown-outer" style="position: fixed;top: 0;left: 0;right: 0;bottom: 0;pointer-events: none;color: white;font-size: 56px;display: flex;align-items: center;justify-content: center;z-index: 99;text-align: center;">
        <div>
            <img src="/static/logo.png"><br>
            <div><?= l("Le 12 juin 2021", "On June 12<sup>th</sup> 2021") ?></div>
        </div>
    </div>
        
    <script>
        setInterval(() => {
            if ((new Date() - 1 + 1)/1000 >= 1623504600) {
                location.reload();
            }
        }, 1000)
    </script>
    <?php endif; ?>

    <script>
        var canvasDiv = document.getElementById('particle-canvas');
        var options = {
            particleColor: '#888',
            background: '/static/background.jpg',
            interactive: true,
            speed: 'high',
            density: 'high'
        };
        var particleCanvas = new ParticleNetwork(canvasDiv, options);
    </script>

    <div class="modal fade" id="downloads" style="  z-index:999999;">
        <div class="modal-dialog modal-md modal-dialog-scrollable">
            <div class="modal-content">

                <div class="modal-header">
                    <h4 class="modal-title"><?= l("Télécharger Kartik", "Get Kartik") ?></h4>
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>

                <div class="modal-body">
                    <div class="download-items">
                        <div>
                            <h2>Kartik EAP</h2>
                            <img src="/static/eap.png" width="96px">
                            <p><span style="color: #a63a1a;"><?= l("Pour les curieux.", "For the curious.") ?></span> <?= l("<b>Contient des bugs</b>.", "<b><u>Do</u> contains bugs</b>.") ?></p>
                            <p><small>version <?= file_get_contents("./data/eap/release") ?> (#<?= file_get_contents("./data/eap/pkgbuild") ?>)<br><?= l("mis à jour le", "updated") ?> <?php

                                    $odate = explode(" ", file_get_contents("./data/eap/date"))[0];
                                    $newDate = date("d/m/Y", strtotime($odate));
                                    echo $newDate;

                                    ?><br><?= l("n° de série", "serial no.") ?> <code><?= file_get_contents("./data/eap/build") ?></code></small></p>
                            <div class="form-check-inline">
                                <label class="form-check-label">
                                    <input checked type="radio" class="form-check-input" name="ossel" onclick="document.getElementsByName('t')[0].value = 'windows';">Windows
                                </label>
                            </div>
                            <div class="form-check-inline">
                                <label class="form-check-label">
                                    <input type="radio" class="form-check-input" name="ossel" onclick="document.getElementsByName('t')[0].value = 'linux';">Linux
                                </label>
                            </div>
                            <script>document.getElementsByName('ossel')[0].checked = true;</script>
                            <form id="form" action="/download/download.php">
                                <div class="input-group mb-3">
                                    <input type="hidden" name="c" value="eap">
                                    <input type="hidden" name="t" value="windows">
                                    <input name="k" autocomplete="off" class="form-control" placeholder="<?= l("Clé de téléchargement de Kartik EAP", "Kartik EAP download key") ?>">
                                    <div class="input-group-append">
                                        <button class="btn btn-success" type="submit"><?= l("Poursuivre", "Continue") ?></button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>

                    <style>
                        .download-items {
                            text-align: center;
                        }

                        .modal-backdrop {
                            z-index: 9999;
                        }
                    </style>

                    <p style="text-align:center;"><?= l("Version macOS pas encore disponible", "macOS version not yet available") ?></p>
                </div>

                <div class="modal-footer">
                    <p>
                        <?= l("En téléchargeant Kartik, vous acceptez que des données statistiques anonymes soit communiquées à Minteck.", "By downloading Kartik, you agree that anonymous stats will be sent to Minteck.") ?>
                    </p>
                </div>

            </div>
        </div>
    </div>

    <div class="modal fade" id="contact" style="z-index:999999;">
        <div class="modal-dialog modal-md modal-dialog-scrollable">
            <div class="modal-content">

                <div class="modal-header">
                    <h4 class="modal-title"><?= l("Nous contacter", "Contact Us") ?></h4>
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>

                <div class="modal-body">
                    <p><?= l("Comment souhaitez-vous nous contacter ?", "How do you want to contact us?") ?></p>
                    <blockquote><?= l("Si votre demande concerne une potentielle violation des droits d'auteurs, ajoutez <code>[Copyright]</code> à l'objet de votre email et marquez-le comme important, afin que nous vous répondions en moins de 48 heures. <i>Une confirmation de propriété légale sera requis pour que nous retirions le contenu concerné du jeu</i>", "If your request is about a potential copyright infringement, please add <code>[Copyright]</code> to your email's subject and mark it as important, so you get a reply in less than 48 hours. <i>Legal ownership confirmation will be required so that we remove the content from the game</i>") ?></blockquote>
                    
                    <div class="list-group">
                        <a href="mailto:nekostarfan+kartik-legal@gmail.com" class="list-group-item list-group-item-action" target="_blank"><?= l("Email (pour les demandes légales)", "Email (for legal inquiries)") ?></a>
                        <a href="mailto:nekostarfan+kartik-mods@gmail.com" class="list-group-item list-group-item-action" target="_blank"><?= l("Email (pour support des mods)", "Email (for modding help)") ?></a>
                        <a href="https://twitter.com/_Minteck" class="list-group-item list-group-item-action" target="_blank"><?= l("Twitter (pour le support technique)", "Twitter (for technical support)") ?></a>
                        <?= l('<a href="https://matrix.to/#/#openplug:kde.org" class="list-group-item list-group-item-action" target="_blank">Matrix</a>', '') ?>
                    </div>
                </div>

            </div>
        </div>
    </div>
</body>
</html>