A lot of code cleanup and code sanitation done.
This commit is contained in:
@@ -8,10 +8,10 @@ if (!defined('APP_INIT')) {
|
||||
# Includes Section
|
||||
use api\classes\API;
|
||||
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API.php';
|
||||
require_once "{$_SERVER['DOCUMENT_ROOT']}/api/classes/API.php";
|
||||
$API = new API();
|
||||
|
||||
function showCard($module_name, $page_name, $width = 3)
|
||||
function showCard($module_name, $page_name): void
|
||||
{
|
||||
$page = $GLOBALS['pages'][$module_name][$page_name];
|
||||
?>
|
||||
@@ -40,11 +40,11 @@ function showCard($module_name, $page_name, $width = 3)
|
||||
<div class="row row-cols-1 row-cols-md-3 row-cols-sm-2 g-3">
|
||||
<?php
|
||||
if ($GLOBALS['modules_enabled']['customers'] && $API->checkPermissions('customer-companies', 'RO', true)) {
|
||||
showCard('customers', 'companies', '6');
|
||||
showCard('customers', 'companies');
|
||||
}
|
||||
|
||||
if ($GLOBALS['modules_enabled']['servers'] && $API->checkPermissions('servers', 'RO', true)) {
|
||||
showCard('servers', 'server_overview', '6');
|
||||
showCard('servers', 'server_overview');
|
||||
}
|
||||
|
||||
if ($GLOBALS['modules_enabled']['office'] && $API->checkPermissions('office-stompjes', 'RO', true)) {
|
||||
|
||||
Reference in New Issue
Block a user