aboutsummaryrefslogtreecommitdiff
path: root/admin/NeutronManage/index.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-08 12:04:30 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-08 12:04:30 +0200
commit95112b1eb06a4be531ded59563d53a63a8d614e8 (patch)
treefd3dc676227309c87a39feab9ca458985e327907 /admin/NeutronManage/index.php
parent87303b0d3540037fb94efdde24dbaacb2880d6cb (diff)
downloadmain-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.gz
main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.bz2
main-95112b1eb06a4be531ded59563d53a63a8d614e8.zip
Opening!
Diffstat (limited to 'admin/NeutronManage/index.php')
-rw-r--r--admin/NeutronManage/index.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/admin/NeutronManage/index.php b/admin/NeutronManage/index.php
new file mode 100644
index 0000000..f15a43e
--- /dev/null
+++ b/admin/NeutronManage/index.php
@@ -0,0 +1,23 @@
+<?php
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
+
+if (isset($_GET['_']) && strpos($_GET['_'], "/") === false) {
+ $arg = $_GET['_'];
+} else {
+ die();
+}
+
+$webs = scandir("/mnt/minteckrolt-cloud");
+
+if (in_array($arg, $webs)) {
+ $token = "madm-" . bin2hex(random_bytes(24));
+
+ file_put_contents("/mnt/minteckrolt-cloud/" . $arg . "/data/tokens/" . $token, "");
+ setcookie("_NEUTRON_ADMIN_TOKEN", $token, 0, "/", ".minteck.ro.lt", true, true);
+
+ header("Location: https://cloud.minteck.ro.lt/" . $arg . "/cms-special/admin/#/home");
+ die();
+}
+
+die("Unable to calculate data usage"); \ No newline at end of file