From e3298dbeaae79bb1d384fa8cd78a67be89819720 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 24 Aug 2021 15:37:01 +0200 Subject: Initial commit --- online/callback/index.php | 44 ++++++++ online/callback_ig/index.php | 44 ++++++++ online/index.php | 184 ++++++++++++++++++++++++++++++++++ online/ingame/allow/index.php | 16 +++ online/ingame/api/profile.level.php | 15 +++ online/ingame/api/profile.logout.php | 15 +++ online/ingame/api/profile.name.php | 11 ++ online/ingame/api/profile.picture.php | 11 ++ online/ingame/api/profile.stats.php | 15 +++ online/ingame/api/profile.token.php | 13 +++ online/ingame/api/set.level.php | 13 +++ online/ingame/api/set.stats.php | 13 +++ online/ingame/index.php | 74 ++++++++++++++ online/logout/confirm/index.php | 28 ++++++ online/logout/index.php | 85 ++++++++++++++++ online/private/.htaccess | 3 + online/private/app.json | 4 + online/private/statsnames.json | 38 +++++++ online/session/index.php | 6 ++ 19 files changed, 632 insertions(+) create mode 100644 online/callback/index.php create mode 100644 online/callback_ig/index.php create mode 100644 online/index.php create mode 100644 online/ingame/allow/index.php create mode 100644 online/ingame/api/profile.level.php create mode 100644 online/ingame/api/profile.logout.php create mode 100644 online/ingame/api/profile.name.php create mode 100644 online/ingame/api/profile.picture.php create mode 100644 online/ingame/api/profile.stats.php create mode 100644 online/ingame/api/profile.token.php create mode 100644 online/ingame/api/set.level.php create mode 100644 online/ingame/api/set.stats.php create mode 100644 online/ingame/index.php create mode 100644 online/logout/confirm/index.php create mode 100644 online/logout/index.php create mode 100644 online/private/.htaccess create mode 100644 online/private/app.json create mode 100644 online/private/statsnames.json create mode 100644 online/session/index.php (limited to 'online') diff --git a/online/callback/index.php b/online/callback/index.php new file mode 100644 index 0000000..113a681 --- /dev/null +++ b/online/callback/index.php @@ -0,0 +1,44 @@ +diff($dtT)->format('%h'); + $rest = $dtF->diff($dtT)->format("%i " . l("min, ", "mn, ") . " %s " . l("secs", "sec")); + $hours = ($dtF->diff($dtT)->format('%a') * $hours) . " " . l("hrs, ", "hr, "); + + return $hours . $rest; +} + +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; + } +} + +?> + + + + + Kartik Online + + + + + + + + + + + + + +
+ +
+
+
+ +
+

+

+ +
+
+
+
+
+
    + + + +
  • + + +
  • + +
+ +

+ +
+
+
+
+
+
+
+ + +
    + $items): ?> + $value): ?> +
  • + +
    - + + +
    (%) + + +
    (%) + +
    (~ ) + +
    + + (~ ) + + +
    + + (~ ) + + +
    (~ ) + +
    + + + +
  • + + +
+ +

+ +
+
+
+
+
+
+
+ +

+
+
%">
+
+ +

+ +
+
+
+
+
+ + + + diff --git a/online/ingame/allow/index.php b/online/ingame/allow/index.php new file mode 100644 index 0000000..16171b6 --- /dev/null +++ b/online/ingame/allow/index.php @@ -0,0 +1,16 @@ + + + + + + Kartik Online + + + + + + + + + + + + +
+ +
+

+

.

+
+

+ + +

+
+ + + + diff --git a/online/logout/confirm/index.php b/online/logout/confirm/index.php new file mode 100644 index 0000000..36ecda6 --- /dev/null +++ b/online/logout/confirm/index.php @@ -0,0 +1,28 @@ + + + + + + Kartik Online + + + + + + + + + + + + +
+ +
+

+

+

+
+

+ + +

+
+ + + + diff --git a/online/private/.htaccess b/online/private/.htaccess new file mode 100644 index 0000000..bf4912f --- /dev/null +++ b/online/private/.htaccess @@ -0,0 +1,3 @@ +Deny from All +Require all denied +Order deny,allow \ No newline at end of file diff --git a/online/private/app.json b/online/private/app.json new file mode 100644 index 0000000..ae86a06 --- /dev/null +++ b/online/private/app.json @@ -0,0 +1,4 @@ +{ + "id": "2d3ca3a8-38b7-4193-990a-a9454bb8d44c", + "secret": "8RAn6Ja2mj1V" +} \ No newline at end of file diff --git a/online/private/statsnames.json b/online/private/statsnames.json new file mode 100644 index 0000000..dda48b0 --- /dev/null +++ b/online/private/statsnames.json @@ -0,0 +1,38 @@ +{ + "times.single": { + "fr": "Temps passé en mode solo", + "en": "Time spent in singleplayer" + }, + "times.local": { + "fr": "Temps passé en multijoueur local", + "en": "Time spent in local multiplayer" + }, + "times.online": { + "fr": "Temps passé en multijoueur en ligne", + "en": "Time spent in online multiplayer" + }, + "results.wins": { + "fr": "Parties gagnées", + "en": "Games won" + }, + "results.loses": { + "fr": "Parties perdues", + "en": "Games lost" + }, + "results.total": { + "fr": "Parties jouées", + "en": "Games played" + }, + "ingame.walls": { + "fr": "Nombre de collisions", + "en": "Collisions count" + }, + "ingame.laps": { + "fr": "Nombre de tours", + "en": "Laps count" + }, + "ingame.turns": { + "fr": "Nombre de rotations", + "en": "Turns count" + } +} \ No newline at end of file diff --git a/online/session/index.php b/online/session/index.php new file mode 100644 index 0000000..0f4ae89 --- /dev/null +++ b/online/session/index.php @@ -0,0 +1,6 @@ +