diff options
Diffstat (limited to 'admin/NeutronManage/index.php')
-rw-r--r-- | admin/NeutronManage/index.php | 23 |
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 |