summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-24 15:37:01 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-24 15:37:01 +0200
commite3298dbeaae79bb1d384fa8cd78a67be89819720 (patch)
tree871560e330f6c7225fb50ae86e3586776d81356a /index.php
downloadkartik-net-e3298dbeaae79bb1d384fa8cd78a67be89819720.tar.gz
kartik-net-e3298dbeaae79bb1d384fa8cd78a67be89819720.tar.bz2
kartik-net-e3298dbeaae79bb1d384fa8cd78a67be89819720.zip
Initial commit
Diffstat (limited to 'index.php')
-rw-r--r--index.php236
1 files changed, 236 insertions, 0 deletions
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..a4fa5ba
--- /dev/null
+++ b/index.php
@@ -0,0 +1,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>