A lot of code cleanup and code sanitation done.

This commit is contained in:
2026-06-20 00:31:32 +02:00
parent be392b8149
commit d781078c0d
100 changed files with 733 additions and 2097 deletions

View File

@@ -9,8 +9,8 @@ if (!defined('APP_INIT')) {
# IDE Section
# Includes Section
include_once($_SERVER['DOCUMENT_ROOT'] . '/bin/php/Classes/pageNavbar.php');
include_once($_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_apitoken.php');
require_once "{$_SERVER['DOCUMENT_ROOT']}/bin/php/Classes/pageNavbar.php";
require_once "{$_SERVER['DOCUMENT_ROOT']}/api/classes/API_apitoken.php";
# Check permissions
@@ -31,7 +31,7 @@ $user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups WH
$user_groups = array();
$admin_data = false;
while ($user_group = $user_groups_data->fetch_assoc()) {
array_push($user_groups, $user_group);
$user_groups[] = $user_group;
$last_weight = $user_group['user_group_weight'];
}
@@ -59,7 +59,7 @@ if (isset($_SESSION['tmp_api_token'])) {
if ($API_token->checkPermissions('admin-access-admins', 'RW', true)) {
$pageNavbar->AddHTMLButton('<a class="btn btn-primary mx-3" type="button" href="?edit=' . $_SESSION['user']['user_uuid'] . '"><i class="fas fa-edit"></i> ' . __('edit') . '</a>');
};
}
# Set breadcrumb data
@@ -242,7 +242,7 @@ if ($user_data) { ?>
<h4 class="mb-0">User history</h4>
</div>
<div class="card-body">
To be made. Its going show the history of the user.
To be made. It's going show the history of the user.
</div>
</div>
</div>
@@ -316,7 +316,7 @@ if ($user_data) { ?>
<td>
<label class="switch">
<input type="checkbox" class="checkbox" data-api-data='<?php echo json_encode(['api_token_uuid' => $token_data['api_token_uuid'], 'api_token_revoked' => $token_data['api_token_revoked'] ? 1 : 0]) ?>' data-api-changevalue="api_token_revoked" data-api-url="/api/v1/user/apitoken/" <?php echo((($token_data['api_token_revoked'])) ? 'checked' : '') ?>>
<div class="slider"></div>
<span class="slider"></span>
</label>
</td>
<?php if ($API_token->checkPermissions('user-apitoken-self', 'RW', true)) { ?>