+ + +
+ += $_SESSION["username"]; ?>
- -= $_SESSION["username"]; ?>
- - - " . strtoupper($role) . " PLAN"; - ?> - - '', - 'developer' => '', - 'seller' => '', - 'Reseller' => '', - 'Manager' => '', - 'default' => '' - }; - echo $display; - - if ($role === 'developer' || $role === 'seller') { - echo ''; - } - ?> -diff --git a/app/layout/toolbars/_toolbar-1.php b/app/layout/toolbars/_toolbar-1.php new file mode 100644 index 0000000..651d46b --- /dev/null +++ b/app/layout/toolbars/_toolbar-1.php @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/app/layout/topbar.php b/app/layout/topbar.php deleted file mode 100644 index 978bce8..0000000 --- a/app/layout/topbar.php +++ /dev/null @@ -1,133 +0,0 @@ - - - diff --git a/app/layout/topbar/_base.php b/app/layout/topbar/_base.php new file mode 100644 index 0000000..c0ef677 --- /dev/null +++ b/app/layout/topbar/_base.php @@ -0,0 +1,49 @@ + + + \ No newline at end of file diff --git a/app/layout/topbar/partials/_user-menu.php b/app/layout/topbar/partials/_user-menu.php new file mode 100644 index 0000000..e0efd4f --- /dev/null +++ b/app/layout/topbar/partials/_user-menu.php @@ -0,0 +1,43 @@ + + + \ No newline at end of file diff --git a/app/license-download.php b/app/license-download.php new file mode 100644 index 0000000..762dab6 --- /dev/null +++ b/app/license-download.php @@ -0,0 +1,106 @@ + array(), + "subscription" => array() + ) + ); + + $jsondata = json_decode($jsonarray); + + $userquery = misc\mysql\query("SELECT * FROM `users` WHERE `app` = ?", [$_SESSION['app']]); + + while ($row = mysqli_fetch_array($userquery->result)) { + + $userjson = array( + "username" => $row["username"], + "email" => $row["email"], + "password" => $row["password"], + "hwid" => $row["hwid"], + "banned" => $row["banned"], + "ip" => $row["ip"] + ); + + array_push($jsondata->users, $userjson); + } + + $subscriptionquery = misc\mysql\query("SELECT * FROM `subs` WHERE `app` = ? ", [$_SESSION['app']]); + + while ($row = mysqli_fetch_array($subscriptionquery->result)) { + + $subjson = array( + "user" => $row["user"], + "subscription" => "default", + "expiry" => $row["expiry"] + ); + + array_push($jsondata->subscription, $subjson); + } + + $newjson = json_encode($jsondata); + + header('Content-Description: File Transfer'); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename="KeyAuthUsers.json"'); + header('Expires: 0'); + header('Cache-Control: must-revalidate'); + header('Pragma: public'); + header('Content-Length: ' . strlen($newjson)); + + + die($newjson); + + case 'licenses': + $query = misc\mysql\query("SELECT * FROM `keys` WHERE `app` = ?",[$_SESSION['app']]); + + + + while ($row = mysqli_fetch_array($query->result)) + + + + $stringData .= "" . $row['key'] . "\n"; + + + + $stringData = preg_replace( + + '~[\r\n]+~', + + "\r\n", + + trim($stringData) + + ); + + + + header('Content-Description: File Transfer'); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename="KeyAuthKeys.txt"'); + header('Expires: 0'); + header('Cache-Control: must-revalidate'); + header('Pragma: public'); + header('Content-Length: ' . strlen($stringData)); + + + die($stringData); + + default: + echo 'Invalid Type or Type does not Exist'; +} \ No newline at end of file diff --git a/app/license-fetch.php b/app/license-fetch.php index 89793b6..f45aa19 100644 --- a/app/license-fetch.php +++ b/app/license-fetch.php @@ -11,7 +11,8 @@ error_log(print_r($_POST, true)); error_log("\n--------------------------------------------------------------"); http_response_code(500); - die("Error: " . $exception->getMessage()); + $errorMsg = str_replace($databaseUsername, "REDACTED", $exception->getMessage()); + die("Error: " . $errorMsg); }); if (session_status() === PHP_SESSION_NONE) { @@ -23,7 +24,6 @@ } if (!isset($_SESSION['app'])) { - dashboard\primary\error("Application not selected"); die("Application not selected."); } @@ -62,9 +62,9 @@ ## If only one or two keys exists then we will use custom margin to fix the bugging menu $banBtns = ""; if ($row['status'] == "Banned") { - $banBtns = ''; + $banBtns = ''; } else { - $banBtns = ''; + $banBtns = 'Ban'; } $MarginManager = ""; @@ -76,47 +76,15 @@ $data[] = array( "key" => $row['key'], - "gendate" => '', + "gendate" => '', "genby" => $row['genby'], "expires" => timeconversion($row["expires"]), "note" => $row['note'] ?? 'N/A', - "usedon" => (!is_null($row["usedon"])) ? '' : 'N/A', + "usedon" => (!is_null($row["usedon"])) ? '' : 'N/A', "usedby" => ($row["usedby"] == $row['key']) ? 'Same as key' : $row["usedby"] ?? 'N/A', - "status" => '' . $row['status'] . '', - - "actions" => ' - - ', - ); + "status" => '', + "actions" => '', + ); } ## Response diff --git a/app/log-fetch.php b/app/log-fetch.php index f89fc05..2ff6e9e 100644 --- a/app/log-fetch.php +++ b/app/log-fetch.php @@ -8,7 +8,8 @@ error_log(print_r($_POST, true)); error_log("\n--------------------------------------------------------------"); http_response_code(500); - die("Error: " . $exception->getMessage()); + $errorMsg = str_replace($databaseUsername, "REDACTED", $exception->getMessage()); + die("Error: " . $errorMsg); }); if (session_status() === PHP_SESSION_NONE) { @@ -20,7 +21,6 @@ } if (!isset($_SESSION['app'])) { - dashboard\primary\error("Application not selected"); die("Application not selected."); } @@ -56,7 +56,7 @@ while ($row = mysqli_fetch_assoc($query->result)) { $data[] = array( - "logdate" => '', + "logdate" => '', "logdata" => $row['logdata'], "credential" => $row['credential'] ?? 'N/A', "pcuser" => $row['pcuser'] ?? 'N/A', diff --git a/app/pages/account-logs.php b/app/pages/account-logs.php index 2f9dde5..7f11168 100644 --- a/app/pages/account-logs.php +++ b/app/pages/account-logs.php @@ -1,53 +1,45 @@ - -
Account Logs
-View the event history of your account.
-| Date | -IP | -User-Agent | -|||
|---|---|---|---|---|---|
| - - | +
| Date | +IP Address | +User Agent | += $row["ip"]; ?> | -= $row["useragent"]; ?> | - - - -
|---|
+
+
+
+
+