From eabf06f4113cbfe21c57143f8a269100945b6cce Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 08:21:04 +0200 Subject: [PATCH 01/29] Update --- .editorconfig | 16 + .gitignore | 1 + check_login.php | 47 - css/main.css | 36 - functions.php | 34 - index.php | 418 -------- package-lock.json | 998 +++++++++++++++++++ package.json | 22 + panel.php | 447 --------- tailwind.config.js | 7 + tailwind.css | 3 + website/check_login.php | 47 + check_logout.php => website/check_logout.php | 2 +- {css => website/css}/animate.css | 0 website/css/main.css | 36 + website/css/tailwind.min.css | 1 + website/functions.php | 34 + {images => website/images}/server-icon.png | Bin website/index.php | 416 ++++++++ main_page.php => website/main_page.php | 2 +- website/panel.php | 447 +++++++++ settings-864337.php => website/settings.php | 16 +- {themes => website/themes}/blue.css | 0 {themes => website/themes}/dark.css | 0 24 files changed, 2038 insertions(+), 992 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitignore delete mode 100644 check_login.php delete mode 100644 css/main.css delete mode 100644 functions.php delete mode 100644 index.php create mode 100644 package-lock.json create mode 100644 package.json delete mode 100644 panel.php create mode 100644 tailwind.config.js create mode 100644 tailwind.css create mode 100644 website/check_login.php rename check_logout.php => website/check_logout.php (98%) rename {css => website/css}/animate.css (100%) create mode 100644 website/css/main.css create mode 100644 website/css/tailwind.min.css create mode 100644 website/functions.php rename {images => website/images}/server-icon.png (100%) create mode 100644 website/index.php rename main_page.php => website/main_page.php (88%) create mode 100644 website/panel.php rename settings-864337.php => website/settings.php (73%) rename {themes => website/themes}/blue.css (100%) rename {themes => website/themes}/dark.css (100%) diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..01917d2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +indent_style = tab +indent_size = 2 +charset = utf-8 +insert_final_newline = false +trim_trailing_whitespace = true +end_of_line = lf + +[*.yml] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/check_login.php b/check_login.php deleted file mode 100644 index 01f72a7..0000000 --- a/check_login.php +++ /dev/null @@ -1,47 +0,0 @@ -success){ - - - - }else{ - $_SESSION["msg"] = "Please complete the captcha!"; - $_SESSION["color"] = "alert-danger"; - header("Location: panel.php"); - } -}else{ - if($_POST['username'] == $login_username){ - if($_POST["password"] == $login_password){ - $_SESSION["username"] = $_POST['username']; - header("Location: panel.php"); - }else{ - $_SESSION["msg"] = "Password is incorrect!"; - $_SESSION["color"] = "alert-danger"; - header("Location: panel.php"); - } - }else{ - $_SESSION["msg"] = "Username is incorrect!"; - $_SESSION["color"] = "alert-danger"; - header("Location: panel.php"); - } -} -}else{ - $_SESSION["msg"] = "Ne dela !"; - $_SESSION["color"] = "alert-danger"; - header("Location: panel.php"); -} -?> diff --git a/css/main.css b/css/main.css deleted file mode 100644 index 84f1c6f..0000000 --- a/css/main.css +++ /dev/null @@ -1,36 +0,0 @@ -*{ - font-family: 'Ubuntu', sans-serif; -} - -span{ - box-shadow: 1px 5px; - margin-top: -10px; -} - -h1{ - text-align: center; - margin: 1em; -} - -a:hover{ - text-decoration: none; -} - -.table{ - max-width: 80%; - margin: auto; -} - -table { - border-collapse: collapse; - width: 100%; -} - -th, td{ - text-align: center; - padding: 15px; -} - -.fa { - font-size: 12px; -} diff --git a/functions.php b/functions.php deleted file mode 100644 index a8814d0..0000000 --- a/functions.php +++ /dev/null @@ -1,34 +0,0 @@ -", $text); - $text = str_replace('&1', "", $text); - $text = str_replace('&2', "", $text); - $text = str_replace('&3', "", $text); - $text = str_replace('&4', "", $text); - $text = str_replace('&5', "", $text); - $text = str_replace('&6', "", $text); - $text = str_replace('&7', "", $text); - $text = str_replace('&8', "", $text); - $text = str_replace('&9', "", $text); - $text = str_replace('&a', "", $text); - $text = str_replace('&b', "", $text); - $text = str_replace('&c', "", $text); - $text = str_replace('&d', "", $text); - $text = str_replace('&e', "", $text); - $text = str_replace('&f', "", $text); - $text = str_replace('&g', "", $text); - - $text = str_replace('&k', "", $text); - $text = str_replace('&l', "", $text); - $text = str_replace('&m', "", $text); - $text = str_replace('&n', "", $text); - $text = str_replace('&o', "", $text); - $text = str_replace('&r', "", $text); - } - return $text; -} - -?> diff --git a/index.php b/index.php deleted file mode 100644 index 3eadf0c..0000000 --- a/index.php +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - - - <?php echo $server_name; ?> - - - - - -
- - - -

Bans

query($sql); - - ?> - - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - - -
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); - }else if($_GET["page"] == 'mutes'){ ?> - -

Mutes

query($sql); - - ?> - - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - - -
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); - }else if($_GET["page"] == 'warns'){ ?> -

Warns

query($sql); - - ?> - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - -
">Player ">Moderator Reason">Date ">Server
" />" />
close(); - }else if($_GET["page"] == 'kicks'){ ?> -

Kicks

query($sql); - - ?> - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - -
">Player ">Moderator Reason">Date ">Server
" />" />
close(); - }else{ - include "main_page.php"; - $conn->close(); - } ?> -
- - - - - diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..9b4d8a5 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,998 @@ +{ + "name": "admin-bans-website", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "admin-bans-website", + "version": "1.0.0", + "license": "GPL-3.0", + "devDependencies": { + "tailwindcss": "^3.3.1" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", + "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jiti": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", + "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss": { + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", + "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "dev": true, + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz", + "integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.10" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", + "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dev": true, + "dependencies": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sucrase": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.32.0.tgz", + "integrity": "sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.1.tgz", + "integrity": "sha512-Vkiouc41d4CEq0ujXl6oiGFQ7bA3WEhUZdTgXAhtKxSy49OmKs8rEfQmupsfF0IGW8fv2iQkp1EVUuapCFrZ9g==", + "dev": true, + "dependencies": { + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "color-name": "^1.1.4", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.2.12", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.17.2", + "lilconfig": "^2.0.6", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.0.9", + "postcss-import": "^14.1.0", + "postcss-js": "^4.0.0", + "postcss-load-config": "^3.1.4", + "postcss-nested": "6.0.0", + "postcss-selector-parser": "^6.0.11", + "postcss-value-parser": "^4.2.0", + "quick-lru": "^5.1.1", + "resolve": "^1.22.1", + "sucrase": "^3.29.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..ed93743 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "admin-bans-website", + "version": "1.0.0", + "description": "Website interface for managing and monitoring Minecraft bans, mutes, warns and kicks", + "main": "index.js", + "scripts": { + "build": "npx tailwindcss -i ./tailwind.css -o ./website/css/tailwind.min.css --minify" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/zigazajc007/AdminBans-Website.git" + }, + "author": "Rabbit Company LLC", + "license": "GPL-3.0", + "bugs": { + "url": "https://github.com/zigazajc007/AdminBans-Website/issues" + }, + "homepage": "https://github.com/zigazajc007/AdminBans-Website#readme", + "devDependencies": { + "tailwindcss": "^3.3.1" + } +} \ No newline at end of file diff --git a/panel.php b/panel.php deleted file mode 100644 index 97249bd..0000000 --- a/panel.php +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - - - - - <?php echo $server_name; ?> - - - - - -
- - - -

Bans

query($sql); - - ?> - - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - - -
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); - }else if($_GET["page"] == 'mutes'){ ?> - -

Mutes

query($sql); - - ?> - - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - - -
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); - }else if($_GET["page"] == 'warns'){ ?> -

Warns

query($sql); - - ?> - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - -
">Player ">Moderator Reason">Date ">Server
" />" />
close(); - }else if($_GET["page"] == 'kicks'){ ?> -

Kicks

query($sql); - - ?> - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - -
">Player ">Moderator Reason">Date ">Server
" />" />
close(); - }else{ - include "main_page.php"; - $conn->close(); - } - }else{ ?> -

Log in

-
-
-
- - -
-
- - -
-
- -
- - -
-
-
- -
- - -
alert-dismissible fade show" role="alert" style="position: fixed; bottom: 0; left: 0; margin: 30px;"> - ".$_SESSION['msg'].""; - $_SESSION['msg'] = ""?> - -
- - - - - - diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..1dd2d1f --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,7 @@ +module.exports = { + content: ["./website/**/*.{html,js,php}"], + theme: { + extend: {}, + }, + plugins: [], +} \ No newline at end of file diff --git a/tailwind.css b/tailwind.css new file mode 100644 index 0000000..bd6213e --- /dev/null +++ b/tailwind.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/website/check_login.php b/website/check_login.php new file mode 100644 index 0000000..694d430 --- /dev/null +++ b/website/check_login.php @@ -0,0 +1,47 @@ +success){ + + + + }else{ + $_SESSION["msg"] = "Please complete the captcha!"; + $_SESSION["color"] = "alert-danger"; + header("Location: panel.php"); + } +}else{ + if($_POST['username'] == $login_username){ + if($_POST["password"] == $login_password){ + $_SESSION["username"] = $_POST['username']; + header("Location: panel.php"); + }else{ + $_SESSION["msg"] = "Password is incorrect!"; + $_SESSION["color"] = "alert-danger"; + header("Location: panel.php"); + } + }else{ + $_SESSION["msg"] = "Username is incorrect!"; + $_SESSION["color"] = "alert-danger"; + header("Location: panel.php"); + } +} +}else{ + $_SESSION["msg"] = "Ne dela !"; + $_SESSION["color"] = "alert-danger"; + header("Location: panel.php"); +} +?> diff --git a/check_logout.php b/website/check_logout.php similarity index 98% rename from check_logout.php rename to website/check_logout.php index 45f2144..6ec7566 100644 --- a/check_logout.php +++ b/website/check_logout.php @@ -6,4 +6,4 @@ setcookie(session_name(),'',0,'/'); session_regenerate_id(true); header("Location: index.php"); -?> +?> \ No newline at end of file diff --git a/css/animate.css b/website/css/animate.css similarity index 100% rename from css/animate.css rename to website/css/animate.css diff --git a/website/css/main.css b/website/css/main.css new file mode 100644 index 0000000..47f6bff --- /dev/null +++ b/website/css/main.css @@ -0,0 +1,36 @@ +* { + font-family: 'Ubuntu', sans-serif; +} + +span { + box-shadow: 1px 5px; + margin-top: -10px; +} + +h1 { + text-align: center; + margin: 1em; +} + +a:hover { + text-decoration: none; +} + +.table { + max-width: 80%; + margin: auto; +} + +table { + border-collapse: collapse; + width: 100%; +} + +th,td { + text-align: center; + padding: 15px; +} + +.fa { + font-size: 12px; +} \ No newline at end of file diff --git a/website/css/tailwind.min.css b/website/css/tailwind.min.css new file mode 100644 index 0000000..ff674f5 --- /dev/null +++ b/website/css/tailwind.min.css @@ -0,0 +1 @@ +/*! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.collapse{visibility:collapse}.fixed{position:fixed}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mr-auto{margin-right:auto}.table{display:table}.hidden{display:none}.align-top{vertical-align:top} \ No newline at end of file diff --git a/website/functions.php b/website/functions.php new file mode 100644 index 0000000..4bb40fa --- /dev/null +++ b/website/functions.php @@ -0,0 +1,34 @@ +", $text); + $text = str_replace('&1', "", $text); + $text = str_replace('&2', "", $text); + $text = str_replace('&3', "", $text); + $text = str_replace('&4', "", $text); + $text = str_replace('&5', "", $text); + $text = str_replace('&6', "", $text); + $text = str_replace('&7', "", $text); + $text = str_replace('&8', "", $text); + $text = str_replace('&9', "", $text); + $text = str_replace('&a', "", $text); + $text = str_replace('&b', "", $text); + $text = str_replace('&c', "", $text); + $text = str_replace('&d', "", $text); + $text = str_replace('&e', "", $text); + $text = str_replace('&f', "", $text); + $text = str_replace('&g', "", $text); + + $text = str_replace('&k', "", $text); + $text = str_replace('&l', "", $text); + $text = str_replace('&m', "", $text); + $text = str_replace('&n', "", $text); + $text = str_replace('&o', "", $text); + $text = str_replace('&r', "", $text); + } + return $text; +} + +?> diff --git a/images/server-icon.png b/website/images/server-icon.png similarity index 100% rename from images/server-icon.png rename to website/images/server-icon.png diff --git a/website/index.php b/website/index.php new file mode 100644 index 0000000..d23b7d6 --- /dev/null +++ b/website/index.php @@ -0,0 +1,416 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +} catch (PDOException $e) { + die("Connection failed: " . $e->getMessage()); +} + +$sql="SELECT * FROM adminbans_banned_players"; +if ($result=mysqli_query($conn,$sql)){ $ban_count=mysqli_num_rows($result); } + +$sql="SELECT * FROM adminbans_muted_players"; +if ($result=mysqli_query($conn,$sql)){ $mute_count=mysqli_num_rows($result); } + +$sql="SELECT * FROM adminbans_warned_players"; +if ($result=mysqli_query($conn,$sql)){ $warn_count=mysqli_num_rows($result); } + +$sql="SELECT * FROM adminbans_kicked_players"; +if ($result=mysqli_query($conn,$sql)){ $kick_count=mysqli_num_rows($result); } + +?> + + + + + + + + + + + + + <?php echo $server_name; ?> + + + + + +
+ + + +

Bans

query($sql); + + ?> + + + + + + + + + num_rows > 0) { + + while($row = $result->fetch_assoc()) { + ?> + + + + + + + + +
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); + }else if($_GET["page"] == 'mutes'){ ?> + +

Mutes

query($sql); + + ?> + + + + + + + + + num_rows > 0) { + + while($row = $result->fetch_assoc()) { + ?> + + + + + + + + +
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); + }else if($_GET["page"] == 'warns'){ ?> +

Warns

query($sql); + + ?> + + + + + + + + num_rows > 0) { + + while($row = $result->fetch_assoc()) { + ?> + + + + + + + +
">Player ">Moderator Reason">Date ">Server
" />" />
close(); + }else if($_GET["page"] == 'kicks'){ ?> +

Kicks

query($sql); + + ?> + + + + + + + + num_rows > 0) { + + while($row = $result->fetch_assoc()) { + ?> + + + + + + + +
">Player ">Moderator Reason">Date ">Server
" />" />
close(); + }else{ + include "main_page.php"; + $conn->close(); + } ?> +
+ + + + + diff --git a/main_page.php b/website/main_page.php similarity index 88% rename from main_page.php rename to website/main_page.php index f515f73..6c6b546 100644 --- a/main_page.php +++ b/website/main_page.php @@ -1,3 +1,3 @@

-

Here you can make custom Home page for your Minecraft server. Change me in main_page.php file.

+

Here you can make custom Home page for your Minecraft server. Change me in main_page.php file.

\ No newline at end of file diff --git a/website/panel.php b/website/panel.php new file mode 100644 index 0000000..0a612c5 --- /dev/null +++ b/website/panel.php @@ -0,0 +1,447 @@ + + + + + + + + + + + + + + <?php echo $server_name; ?> + + + + + +
+ + + +

Bans

query($sql); + + ?> + + + + + + + + + num_rows > 0) { + + while($row = $result->fetch_assoc()) { + ?> + + + + + + + + +
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); + }else if($_GET["page"] == 'mutes'){ ?> + +

Mutes

query($sql); + + ?> + + + + + + + + + num_rows > 0) { + + while($row = $result->fetch_assoc()) { + ?> + + + + + + + + +
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); + }else if($_GET["page"] == 'warns'){ ?> +

Warns

query($sql); + + ?> + + + + + + + + num_rows > 0) { + + while($row = $result->fetch_assoc()) { + ?> + + + + + + + +
">Player ">Moderator Reason">Date ">Server
" />" />
close(); + }else if($_GET["page"] == 'kicks'){ ?> +

Kicks

query($sql); + + ?> + + + + + + + + num_rows > 0) { + + while($row = $result->fetch_assoc()) { + ?> + + + + + + + +
">Player ">Moderator Reason">Date ">Server
" />" />
close(); + }else{ + include "main_page.php"; + $conn->close(); + } + }else{ ?> +

Log in

+
+
+
+ + +
+
+ + +
+
+ +
+ + +
+
+
+ +
+ + +
alert-dismissible fade show" role="alert" style="position: fixed; bottom: 0; left: 0; margin: 30px;"> + ".$_SESSION['msg'].""; + $_SESSION['msg'] = ""?> + +
+ + + + + + diff --git a/settings-864337.php b/website/settings.php similarity index 73% rename from settings-864337.php rename to website/settings.php index b08ec85..aa63038 100644 --- a/settings-864337.php +++ b/website/settings.php @@ -4,7 +4,7 @@ $server_name = "Server Name"; //Database -$mysql_host = "localhost"; +$mysql_host = "127.0.0.1"; $mysql_port = "3306"; $mysql_database = "AdminBans"; $mysql_user = "root"; @@ -32,13 +32,13 @@ /* Website for player heads: - Options: - - "https://crafatar.com/avatars/{uuid}?size=20" - - "http://cravatar.eu/avatar/{uuid}/20.png" - - "https://mc-heads.net/avatar/{uuid}/20" - - "https://minotar.net/avatar/{uuid}/20" - - "https://visage.surgeplay.com/face/20/{uuid}" - - null + Options: + - "https://crafatar.com/avatars/{uuid}?size=20" + - "http://cravatar.eu/avatar/{uuid}/20.png" + - "https://mc-heads.net/avatar/{uuid}/20" + - "https://minotar.net/avatar/{uuid}/20" + - "https://visage.surgeplay.com/face/20/{uuid}" + - null */ $heads_link = "https://crafatar.com/avatars/{uuid}?size=20"; diff --git a/themes/blue.css b/website/themes/blue.css similarity index 100% rename from themes/blue.css rename to website/themes/blue.css diff --git a/themes/dark.css b/website/themes/dark.css similarity index 100% rename from themes/dark.css rename to website/themes/dark.css From fb3efb9fb32997c5557a461cef51a2550bdcf0c7 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 08:29:52 +0200 Subject: [PATCH 02/29] Update --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b512c09..e87aeb3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +website/settings.php \ No newline at end of file From 8ef33a4ccb2b48e2c28034f483f51db5d02c0201 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 09:08:44 +0200 Subject: [PATCH 03/29] Update --- .gitignore | 3 +- website/Settings.php | 49 +++++++++++++++++++++++++++ website/Utils.php | 78 +++++++++++++++++++++++++++++++++++++++++++ website/functions.php | 34 ------------------- website/index.php | 50 ++++++++++----------------- website/main_page.php | 2 +- website/panel.php | 4 +-- website/settings.php | 46 ------------------------- 8 files changed, 149 insertions(+), 117 deletions(-) create mode 100644 website/Settings.php create mode 100644 website/Utils.php delete mode 100644 website/functions.php delete mode 100644 website/settings.php diff --git a/.gitignore b/.gitignore index e87aeb3..d323711 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules -website/settings.php \ No newline at end of file +website/settings.php +website/cache.json \ No newline at end of file diff --git a/website/Settings.php b/website/Settings.php new file mode 100644 index 0000000..8d816d9 --- /dev/null +++ b/website/Settings.php @@ -0,0 +1,49 @@ + diff --git a/website/Utils.php b/website/Utils.php new file mode 100644 index 0000000..f5cec4e --- /dev/null +++ b/website/Utils.php @@ -0,0 +1,78 @@ +", $text); + $text = str_replace('&1', "", $text); + $text = str_replace('&2', "", $text); + $text = str_replace('&3', "", $text); + $text = str_replace('&4', "", $text); + $text = str_replace('&5', "", $text); + $text = str_replace('&6', "", $text); + $text = str_replace('&7', "", $text); + $text = str_replace('&8', "", $text); + $text = str_replace('&9', "", $text); + $text = str_replace('&a', "", $text); + $text = str_replace('&b', "", $text); + $text = str_replace('&c', "", $text); + $text = str_replace('&d', "", $text); + $text = str_replace('&e', "", $text); + $text = str_replace('&f', "", $text); + $text = str_replace('&g', "", $text); + + $text = str_replace('&k', "", $text); + $text = str_replace('&l', "", $text); + $text = str_replace('&m', "", $text); + $text = str_replace('&n', "", $text); + $text = str_replace('&o', "", $text); + $text = str_replace('&r', "", $text); + } + return $text; + } + + public static function createConnection(){ + $conn = null; + try{ + $conn = new PDO('mysql:host=' . Settings::$mysql_host . ';port=' . Settings::$mysql_port . ';dbname=' . Settings::$mysql_database, Settings::$mysql_user, Settings::$mysql_password); + $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + } catch (PDOException $e) { + die("Connection failed: " . $e->getMessage()); + } + return $conn; + } + + public static function writeCache($key, $value, $ttl = 60){ + $data = json_decode(file_get_contents('cache.json'), true); + $data[$key] = array('value' => $value, 'expiration' => time() + $ttl); + file_put_contents('cache.json', json_encode($data)); + } + + public static function readCache($key){ + $data = json_decode(file_get_contents('cache.json'), true); + return $data[$key]['value']; + } + + public static function getRowCount($table = 'adminbans_banned_players', $cache = 60){ + + return Utils::readCache('row_count_' . $table); + + try{ + $conn = Utils::createConnection(); + + $stmt = $conn->prepare("SELECT COUNT(*) AS 'amount' FROM " . $table); + $stmt->execute(); + + $amount = $stmt->fetchColumn(); + Utils::writeCache('row_count_' . $table, $amount, $cache); + return $amount; + }catch(PDOException $e) { + Utils::writeCache('row_count_' . $table, -1, 5); + return -1; + } + } +} + +?> diff --git a/website/functions.php b/website/functions.php deleted file mode 100644 index 4bb40fa..0000000 --- a/website/functions.php +++ /dev/null @@ -1,34 +0,0 @@ -", $text); - $text = str_replace('&1', "", $text); - $text = str_replace('&2', "", $text); - $text = str_replace('&3', "", $text); - $text = str_replace('&4', "", $text); - $text = str_replace('&5', "", $text); - $text = str_replace('&6', "", $text); - $text = str_replace('&7', "", $text); - $text = str_replace('&8', "", $text); - $text = str_replace('&9', "", $text); - $text = str_replace('&a', "", $text); - $text = str_replace('&b', "", $text); - $text = str_replace('&c', "", $text); - $text = str_replace('&d', "", $text); - $text = str_replace('&e', "", $text); - $text = str_replace('&f', "", $text); - $text = str_replace('&g', "", $text); - - $text = str_replace('&k', "", $text); - $text = str_replace('&l', "", $text); - $text = str_replace('&m', "", $text); - $text = str_replace('&n', "", $text); - $text = str_replace('&o', "", $text); - $text = str_replace('&r', "", $text); - } - return $text; -} - -?> diff --git a/website/index.php b/website/index.php index d23b7d6..e0e83a6 100644 --- a/website/index.php +++ b/website/index.php @@ -1,26 +1,11 @@ setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); -} catch (PDOException $e) { - die("Connection failed: " . $e->getMessage()); -} - -$sql="SELECT * FROM adminbans_banned_players"; -if ($result=mysqli_query($conn,$sql)){ $ban_count=mysqli_num_rows($result); } - -$sql="SELECT * FROM adminbans_muted_players"; -if ($result=mysqli_query($conn,$sql)){ $mute_count=mysqli_num_rows($result); } - -$sql="SELECT * FROM adminbans_warned_players"; -if ($result=mysqli_query($conn,$sql)){ $warn_count=mysqli_num_rows($result); } - -$sql="SELECT * FROM adminbans_kicked_players"; -if ($result=mysqli_query($conn,$sql)){ $kick_count=mysqli_num_rows($result); } +$ban_count = Utils::getRowCount('adminbans_banned_players'); +$mute_count = Utils::getRowCount('adminbans_muted_players'); +$warn_count = Utils::getRowCount('adminbans_warned_players'); +$kick_count = Utils::getRowCount('adminbans_kicked_players'); ?> @@ -32,17 +17,17 @@ - + - <?php echo $server_name; ?> + <?php echo Settings::$server_name; ?> + + + + +
@@ -362,8 +379,6 @@ include "main_page.php"; } ?>
- - - + diff --git a/website/js/index.js b/website/js/index.js new file mode 100644 index 0000000..ce19fac --- /dev/null +++ b/website/js/index.js @@ -0,0 +1,5 @@ +import Utils from './utils.js'; + +document.getElementById("menu-toggle-btn").addEventListener('click', () => { + Utils.toggleMenu(); +}); \ No newline at end of file diff --git a/website/js/utils.js b/website/js/utils.js new file mode 100644 index 0000000..c19dc3a --- /dev/null +++ b/website/js/utils.js @@ -0,0 +1,19 @@ +export default class Utils{ + + static toggleMenu(){ + if(document.getElementById("mobile-menu").className == 'hidden pt-2 pb-3 space-y-1'){ + document.getElementById("mobile-menu").className = 'pt-2 pb-3 space-y-1'; + }else{ + document.getElementById("mobile-menu").className = 'hidden pt-2 pb-3 space-y-1'; + } + } + + static hide(element){ + document.getElementById(element).style.display = 'none'; + } + + static show(element, method = 'flex'){ + document.getElementById(element).style.display = method; + } + +} \ No newline at end of file diff --git a/website/themes/blue.css b/website/themes/blue.css deleted file mode 100644 index b535fc1..0000000 --- a/website/themes/blue.css +++ /dev/null @@ -1,50 +0,0 @@ -/* - ----------------------------------------------------------- - Blue theme made by Black1_TV ----------------------------------------------------------- - -*/ - -body{ - background-color: #80bdff; -} - -h1{ - color: #003e80; -} - -p{ - color: #0063cc; -} - -a{ - color: black; -} - -.bg-dark{ - background-color: #007bff!important; -} - -a:hover{ - color: black; -} - -table, th, td { - border: 1px solid black; -} - -th{ - background-color: #004a99; - color: white; -} - -td{ - color: #e6f2ff; -} - -tr:nth-child(even){background-color: #0063cc;} - -tr:nth-child(odd){background-color: #006fe6;} - -tr:hover {background-color: #0056b3;} diff --git a/website/themes/dark.css b/website/themes/dark.css deleted file mode 100644 index 5df6e54..0000000 --- a/website/themes/dark.css +++ /dev/null @@ -1,44 +0,0 @@ -/* - ----------------------------------------------------------- - Dark theme made by Black1_TV ----------------------------------------------------------- - -*/ - -body{ - background-color: #464c53; -} - -h1{ - color: white; -} - -p{ - color: white; -} - -a{ - color: white; -} - -a:hover{ - color: white; -} - -table, th, td { - border: 1px solid black; -} - -th{ - background-color: #68727d; - color: white; -} - -td{ - color: #d5d8dc; -} - -tr:nth-child(even){background-color: #515861;} - -tr:hover {background-color: #68727d;} From 1f611a3116621f18f7f5a66d4c5f695d5e0d3f45 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 17:27:04 +0200 Subject: [PATCH 15/29] Update --- website/index.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/website/index.php b/website/index.php index b2fdab5..4f08c68 100644 --- a/website/index.php +++ b/website/index.php @@ -83,9 +83,17 @@ From e225ee324a4a7c4acd93c43960723226f5bdc85f Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 17:58:20 +0200 Subject: [PATCH 16/29] Update --- website/css/tailwind.min.css | 2 +- website/index.php | 102 ++++++++++++++++++++++++++++------- 2 files changed, 85 insertions(+), 19 deletions(-) diff --git a/website/css/tailwind.min.css b/website/css/tailwind.min.css index 69df529..ea0ef9e 100644 --- a/website/css/tailwind.min.css +++ b/website/css/tailwind.min.css @@ -1 +1 @@ -/*! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.relative{position:relative}.z-0{z-index:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.ml-3{margin-left:.75rem}.mr-auto{margin-right:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-16{height:4rem}.h-6{height:1.5rem}.h-8{height:2rem}.w-6{width:1.5rem}.w-auto{width:auto}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-transparent{border-color:#0000}.p-2{padding:.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.align-top{vertical-align:top}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}@media (min-width:640px){.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\:ml-6{margin-left:1.5rem}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:justify-end{justify-content:flex-end}.lg\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.5rem*var(--tw-space-x-reverse));margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)))}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-8{padding-left:2rem;padding-right:2rem}} \ No newline at end of file +/*! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.relative{position:relative}.z-0{z-index:0}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.ml-3{margin-left:.75rem}.mr-auto{margin-right:auto}.mt-10{margin-top:2.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-16{height:4rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-auto{width:auto}.min-w-full{min-width:100%}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-transparent{border-color:#0000}.p-2{padding:.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem}.pb-3,.py-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.tracking-wider{letter-spacing:.05em}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}@media (min-width:640px){.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\:ml-6{margin-left:1.5rem}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:justify-end{justify-content:flex-end}.lg\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.5rem*var(--tw-space-x-reverse));margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)))}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-8{padding-left:2rem;padding-right:2rem}} \ No newline at end of file diff --git a/website/index.php b/website/index.php index 4f08c68..bf4ce6c 100644 --- a/website/index.php +++ b/website/index.php @@ -29,6 +29,9 @@ $activeMobile = 'mainMenuMobileLinkSelected block pl-3 pr-4 py-2 border-l-4 text-base font-medium'; $inactiveMobile = 'mainMenuMobileLink block pl-3 pr-4 py-2 border-l-4 text-base font-medium'; + + $ascIcon = ''; + $descIcon = ''; ?> -
+
+
@@ -150,8 +154,36 @@ } $result = Utils::executeQuery($sql); - - ?> + ?> + +
+
+
+
+
+ + + + + + + + + + @@ -172,9 +204,13 @@
+ "> +
+ Player + +
+
+
NameReasonCategoriesPlayersPlayers
">Player ">Moderator
+ +
+
+
+ +

Mutes

- ?> +
+
+
+
+
@@ -248,9 +289,13 @@
">Player ">Moderator
+ + + + + +

Warns

- ?> +
+
+
+
+
@@ -314,9 +364,13 @@
">Player ">Moderator
+ + + + + +

Kicks

- ?> +
+
+
+
+
@@ -380,13 +439,20 @@
">Player ">Moderator
+ + +
+
+
+
+
+
+ From c7d917a1bf7d283ed28edc038062fc599119fe27 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 18:33:20 +0200 Subject: [PATCH 17/29] Update --- website/Utils.php | 23 ++++++++++ website/index.php | 109 ++++++++++++++++++---------------------------- 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/website/Utils.php b/website/Utils.php index 1bc2e1c..2022cb6 100644 --- a/website/Utils.php +++ b/website/Utils.php @@ -105,6 +105,29 @@ public static function executeQuery($query, $parms = []){ return null; } } + + public static function generateHeader($page = 'bans', $order = 'player', $name = 'Player', $curOrder = null, $type = 1){ + + if($type === 0){ + return '' . $name . ''; + } + + $ascIcon = ''; + $descIcon = ''; + + $newOrder = (isset($curOrder) && $curOrder == $order) ? $order . '_desc' : $order; + $html = '
' . $name . ''; + + if(isset($curOrder) && $curOrder == $order){ + $html .= $ascIcon; + }else if(isset($curOrder) && $curOrder == $order . '_desc'){ + $html .= $descIcon; + } + + $html .= '
'; + + return $html; + } } ?> diff --git a/website/index.php b/website/index.php index bf4ce6c..4f2cb56 100644 --- a/website/index.php +++ b/website/index.php @@ -29,9 +29,6 @@ $activeMobile = 'mainMenuMobileLinkSelected block pl-3 pr-4 py-2 border-l-4 text-base font-medium'; $inactiveMobile = 'mainMenuMobileLink block pl-3 pr-4 py-2 border-l-4 text-base font-medium'; - - $ascIcon = ''; - $descIcon = ''; ?>
From f9a5026945ba22df270833f06a011dc13d1d4823 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 19:06:13 +0200 Subject: [PATCH 19/29] Update --- website/css/tailwind.min.css | 2 +- website/index.php | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/website/css/tailwind.min.css b/website/css/tailwind.min.css index ea0ef9e..6899f5b 100644 --- a/website/css/tailwind.min.css +++ b/website/css/tailwind.min.css @@ -1 +1 @@ -/*! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.relative{position:relative}.z-0{z-index:0}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.ml-3{margin-left:.75rem}.mr-auto{margin-right:auto}.mt-10{margin-top:2.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-16{height:4rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-auto{width:auto}.min-w-full{min-width:100%}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-transparent{border-color:#0000}.p-2{padding:.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem}.pb-3,.py-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.tracking-wider{letter-spacing:.05em}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}@media (min-width:640px){.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\:ml-6{margin-left:1.5rem}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:justify-end{justify-content:flex-end}.lg\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.5rem*var(--tw-space-x-reverse));margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)))}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-8{padding-left:2rem;padding-right:2rem}} \ No newline at end of file +/*! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.relative{position:relative}.z-0{z-index:0}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem}.mb-2,.my-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-auto{margin-bottom:auto}.ml-3{margin-left:.75rem}.mr-auto{margin-right:auto}.mt-10{margin-top:2.5rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-16{height:4rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-auto{width:auto}.min-w-full{min-width:100%}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.whitespace-nowrap{white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-transparent{border-color:#0000}.p-2{padding:.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.tracking-wider{letter-spacing:.05em}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}@media (min-width:640px){.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\:ml-6{margin-left:1.5rem}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:justify-end{justify-content:flex-end}.lg\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.5rem*var(--tw-space-x-reverse));margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)))}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-8{padding-left:2rem;padding-right:2rem}} \ No newline at end of file diff --git a/website/index.php b/website/index.php index 135fcf7..7f54dd7 100644 --- a/website/index.php +++ b/website/index.php @@ -103,8 +103,9 @@ -

Bans

Bans + - " /> - " /> - - - - + ?> +
" />" . $result[$i]['username_to']; ?>
+
" />" . $result[$i]['username_from']; ?>
+ + + + From 25bcffc160e293bb126929378c9a5f2014f49146 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 19:20:40 +0200 Subject: [PATCH 20/29] Update --- website/Utils.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/website/Utils.php b/website/Utils.php index 2022cb6..4d5a626 100644 --- a/website/Utils.php +++ b/website/Utils.php @@ -2,6 +2,9 @@ include_once 'Settings.php'; class Utils{ + + public static $cache = null; + public static function chatColor($text){ if (strpos($text, '&') !== false) { @@ -46,13 +49,22 @@ public static function createConnection(){ public static function writeCache($key, $value, $ttl = null){ if($ttl === null) $ttl = Settings::$cache_data; - $data = json_decode(file_get_contents('cache.json'), true); + + $data = Utils::$cache; + if($data === null){ + $data = json_decode(file_get_contents('cache.json'), true); + } $data[$key] = array('value' => $value, 'expiration' => time() + $ttl); file_put_contents('cache.json', json_encode($data)); + Utils::$cache = $data; } public static function readCache($key){ - $data = json_decode(file_get_contents('cache.json'), true); + $data = Utils::$cache; + if($data === null){ + $data = json_decode(file_get_contents('cache.json'), true); + Utils::$cache = $data; + } if(!isset($data[$key])) return null; if($data[$key]['expiration'] < time()) return null; return $data[$key]['value']; From 85d921ad085f466fb489aaeb193f27e73c9d0331 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 19:28:38 +0200 Subject: [PATCH 21/29] Update --- website/index.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/website/index.php b/website/index.php index 7f54dd7..abc6dc4 100644 --- a/website/index.php +++ b/website/index.php @@ -112,6 +112,10 @@ if(isset($_GET["player"]) && $_GET["player"] != ''){ $sql = $sql . " WHERE username_to = '" . $_GET["player"] . "'"; + }else if(isset($_GET["moderator"]) && $_GET["moderator"] != ''){ + $sql = $sql . " WHERE username_from = '" . $_GET["moderator"] . "'"; + }else if(isset($_GET["server"]) && $_GET["server"] != ''){ + $sql = $sql . " WHERE server = '" . $_GET["server"] . "'"; } switch ($order) { @@ -174,12 +178,12 @@ -
" />" . $result[$i]['username_to']; ?>
-
" />" . $result[$i]['username_from']; ?>
+
" />" . $result[$i]['username_to']; ?>
+
" />" . $result[$i]['username_from']; ?>
- + From de9381be12222d585e5ba7d230d3535819e7bbee Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 19:36:12 +0200 Subject: [PATCH 22/29] Update --- website/index.php | 126 ++++++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 59 deletions(-) diff --git a/website/index.php b/website/index.php index abc6dc4..751b054 100644 --- a/website/index.php +++ b/website/index.php @@ -196,51 +196,55 @@ -

Mutes

Mutes +
- - - - - - - - + + + + + + - - - - - - - - -
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
+ for($i = 0; $i < count($result); $i++){ + ?> +
" />" . $result[$i]['username_to']; ?>
+
" />" . $result[$i]['username_from']; ?>
+ + + + + + + +
From 080a8214fb6f1638fc14fca4f8a460e317ca9230 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 19:44:01 +0200 Subject: [PATCH 23/29] Update --- website/index.php | 124 ++++++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 58 deletions(-) diff --git a/website/index.php b/website/index.php index 751b054..2d57d8b 100644 --- a/website/index.php +++ b/website/index.php @@ -282,51 +282,54 @@ }?> - - - - + + + + -

Warns

Warns + +
- - - - - - - - - - - - - - + + + + + + -
">Player ">Moderator Reason">Date ">Server
" />" />
-
- - - + for($i = 0; $i < count($result); $i++){ + ?> +
" />" . $result[$i]['username_to']; ?>
+
" />" . $result[$i]['username_from']; ?>
+ + + + + + + + + + +

Kicks

Date: Fri, 14 Apr 2023 19:46:57 +0200 Subject: [PATCH 24/29] Update --- website/index.php | 107 ++++++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 50 deletions(-) diff --git a/website/index.php b/website/index.php index 2d57d8b..5a468ff 100644 --- a/website/index.php +++ b/website/index.php @@ -371,45 +371,48 @@ -

Kicks

Kicks + +
- - - - - - - - - - - - - - + + + + + + - + for($i = 0; $i < count($result); $i++){ + ?> + + + + + + + +
">Player ">Moderator Reason">Date ">Server
" />" />
" />" . $result[$i]['username_to']; ?>
" />" . $result[$i]['username_from']; ?>
From 641d6f4a9e3d39daa6685bd36d9f51fa8d162e47 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 20:09:11 +0200 Subject: [PATCH 25/29] Update --- website/js/index.js | 17 ++++++++++++++++- website/main_page.php | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/website/js/index.js b/website/js/index.js index ce19fac..3c27eb1 100644 --- a/website/js/index.js +++ b/website/js/index.js @@ -1,5 +1,20 @@ import Utils from './utils.js'; +const parms = new URLSearchParams(window.location.search); + document.getElementById("menu-toggle-btn").addEventListener('click', () => { Utils.toggleMenu(); -}); \ No newline at end of file +}); + +try{ + if(parms.get('player') !== null){ + document.getElementById("search").value = parms.get('player'); + } + + document.getElementById("search").addEventListener("keypress", (event) => { + if (event.key !== "Enter" && event.key !== " ") return; + event.preventDefault(); + let search = document.getElementById("search").value.split(' ')[0]; + if(search.length !== 0) window.location.href = "/?page=" + parms.get('page') + "&player=" + search; + }); +}catch{}; \ No newline at end of file diff --git a/website/main_page.php b/website/main_page.php index 2720682..2664b08 100644 --- a/website/main_page.php +++ b/website/main_page.php @@ -1,3 +1,3 @@ -

+

-

Here you can make custom Home page for your Minecraft server. Change me in main_page.php file.

\ No newline at end of file +

Here you can make custom Home page for your Minecraft server. Change me in main_page.php file.

\ No newline at end of file From f2e90dc056f548f9d3ed3d6a10c36d2952e7668b Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 20:24:57 +0200 Subject: [PATCH 26/29] Update --- website/index.php | 54 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/website/index.php b/website/index.php index 5a468ff..900ba9d 100644 --- a/website/index.php +++ b/website/index.php @@ -109,13 +109,17 @@ $sql = "SELECT * FROM adminbans_banned_players"; $limit = "LIMIT " . Settings::$data_limit; $order = (isset($_GET["order"])) ? $_GET["order"] : null; + $parms = []; if(isset($_GET["player"]) && $_GET["player"] != ''){ - $sql = $sql . " WHERE username_to = '" . $_GET["player"] . "'"; + $parms[':player'] = [ 'value' => $_GET["player"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE username_to = :player"; }else if(isset($_GET["moderator"]) && $_GET["moderator"] != ''){ - $sql = $sql . " WHERE username_from = '" . $_GET["moderator"] . "'"; + $parms[':moderator'] = [ 'value' => $_GET["moderator"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE username_from = :moderator"; }else if(isset($_GET["server"]) && $_GET["server"] != ''){ - $sql = $sql . " WHERE server = '" . $_GET["server"] . "'"; + $parms[':server'] = [ 'value' => $_GET["server"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE server = :server"; } switch ($order) { @@ -154,7 +158,7 @@ break; } - $result = Utils::executeQuery($sql); + $result = Utils::executeQuery($sql, $parms); ?>
@@ -202,13 +206,17 @@ $sql = "SELECT * FROM adminbans_muted_players"; $limit = "LIMIT " . Settings::$data_limit; $order = (isset($_GET["order"])) ? $_GET["order"] : null; + $parms = []; if(isset($_GET["player"]) && $_GET["player"] != ''){ - $sql = $sql . " WHERE username_to = '" . $_GET["player"] . "'"; + $parms[':player'] = [ 'value' => $_GET["player"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE username_to = :player"; }else if(isset($_GET["moderator"]) && $_GET["moderator"] != ''){ - $sql = $sql . " WHERE username_from = '" . $_GET["moderator"] . "'"; + $parms[':moderator'] = [ 'value' => $_GET["moderator"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE username_from = :moderator"; }else if(isset($_GET["server"]) && $_GET["server"] != ''){ - $sql = $sql . " WHERE server = '" . $_GET["server"] . "'"; + $parms[':server'] = [ 'value' => $_GET["server"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE server = :server"; } switch ($order) { @@ -247,7 +255,7 @@ break; } - $result = Utils::executeQuery($sql); + $result = Utils::executeQuery($sql, $parms); ?>
@@ -271,12 +279,12 @@ -
" />" . $result[$i]['username_to']; ?>
-
" />" . $result[$i]['username_from']; ?>
+
" />" . $result[$i]['username_to']; ?>
+
" />" . $result[$i]['username_from']; ?>
- + @@ -295,11 +303,17 @@ $sql = "SELECT * FROM adminbans_warned_players"; $limit = "LIMIT " . Settings::$data_limit; $order = (isset($_GET["order"])) ? $_GET["order"] : null; + $parms = []; if(isset($_GET["player"]) && $_GET["player"] != ''){ - $sql = $sql . " WHERE username_to = '" . $_GET["player"] . "'"; + $parms[':player'] = [ 'value' => $_GET["player"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE username_to = :player"; }else if(isset($_GET["moderator"]) && $_GET["moderator"] != ''){ - $sql = $sql . " WHERE username_from = '" . $_GET["moderator"] . "'"; + $parms[':moderator'] = [ 'value' => $_GET["moderator"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE username_from = :moderator"; + }else if(isset($_GET["server"]) && $_GET["server"] != ''){ + $parms[':server'] = [ 'value' => $_GET["server"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE server = :server"; } switch ($order) { @@ -332,7 +346,7 @@ break; } - $result = Utils::executeQuery($sql); + $result = Utils::executeQuery($sql, $parms); ?>
@@ -378,11 +392,17 @@ $sql = "SELECT * FROM adminbans_kicked_players"; $limit = "LIMIT " . Settings::$data_limit; $order = (isset($_GET["order"])) ? $_GET["order"] : null; + $parms = []; if(isset($_GET["player"]) && $_GET["player"] != ''){ - $sql = $sql . " WHERE username_to = '" . $_GET["player"] . "'"; + $parms[':player'] = [ 'value' => $_GET["player"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE username_to = :player"; }else if(isset($_GET["moderator"]) && $_GET["moderator"] != ''){ - $sql = $sql . " WHERE username_from = '" . $_GET["moderator"] . "'"; + $parms[':moderator'] = [ 'value' => $_GET["moderator"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE username_from = :moderator"; + }else if(isset($_GET["server"]) && $_GET["server"] != ''){ + $parms[':server'] = [ 'value' => $_GET["server"], 'type' => PDO::PARAM_STR]; + $sql = $sql . " WHERE server = :server"; } switch ($order) { @@ -415,7 +435,7 @@ break; } - $result = Utils::executeQuery($sql); + $result = Utils::executeQuery($sql, $parms); ?>
From 5a297582e6274ee04fd319a20630dddfae5d4286 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 20:32:42 +0200 Subject: [PATCH 27/29] Update --- website/check_login.php | 2 +- website/index.php | 2 + website/main_page.php | 2 +- website/panel.php | 447 ---------------------------------------- 4 files changed, 4 insertions(+), 449 deletions(-) delete mode 100644 website/panel.php diff --git a/website/check_login.php b/website/check_login.php index 694d430..a92dc32 100644 --- a/website/check_login.php +++ b/website/check_login.php @@ -40,7 +40,7 @@ } } }else{ - $_SESSION["msg"] = "Ne dela !"; + $_SESSION["msg"] = "Missing login creditions!"; $_SESSION["color"] = "alert-danger"; header("Location: panel.php"); } diff --git a/website/index.php b/website/index.php index 900ba9d..1d219e3 100644 --- a/website/index.php +++ b/website/index.php @@ -61,11 +61,13 @@
+
- - - - -
- - - -

Bans

query($sql); - - ?> - - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - - -
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); - }else if($_GET["page"] == 'mutes'){ ?> - -

Mutes

query($sql); - - ?> - - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - - -
">Player ">Moderator Reason">Date ">Expires ">Server
" />" />
close(); - }else if($_GET["page"] == 'warns'){ ?> -

Warns

query($sql); - - ?> - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - -
">Player ">Moderator Reason">Date ">Server
" />" />
close(); - }else if($_GET["page"] == 'kicks'){ ?> -

Kicks

query($sql); - - ?> - - - - - - - - num_rows > 0) { - - while($row = $result->fetch_assoc()) { - ?> - - - - - - - -
">Player ">Moderator Reason">Date ">Server
" />" />
close(); - }else{ - include "main_page.php"; - $conn->close(); - } - }else{ ?> -

Log in

-
-
-
- - -
-
- - -
-
- -
- - -
-
-
- -
- - -
alert-dismissible fade show" role="alert" style="position: fixed; bottom: 0; left: 0; margin: 30px;"> - ".$_SESSION['msg'].""; - $_SESSION['msg'] = ""?> - -
- - - - - - From 7211b7c55a4b736634438bf867b48fddc93d3c05 Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 20:33:39 +0200 Subject: [PATCH 28/29] Update --- website/main_page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/main_page.php b/website/main_page.php index ebe3edb..c45144c 100644 --- a/website/main_page.php +++ b/website/main_page.php @@ -1,3 +1,3 @@ -

+

Here you can make custom Home page for your Minecraft server. Change me in main_page.php file.

\ No newline at end of file From fbe25bb1339f4382763f9c631ec3d79f42234aed Mon Sep 17 00:00:00 2001 From: Ziga Date: Fri, 14 Apr 2023 20:39:51 +0200 Subject: [PATCH 29/29] Update --- .gitignore | 1 - website/Settings.php | 48 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 website/Settings.php diff --git a/.gitignore b/.gitignore index 62b0109..f0b58c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ node_modules -website/Settings.php website/cache.json \ No newline at end of file diff --git a/website/Settings.php b/website/Settings.php new file mode 100644 index 0000000..6e10ecd --- /dev/null +++ b/website/Settings.php @@ -0,0 +1,48 @@ + \ No newline at end of file