From 29477e67ede12347b153e2255325327374e1b073 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 9 Dec 2025 01:43:12 +0500 Subject: feat: new configuration --- system/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'system/index.php') diff --git a/system/index.php b/system/index.php index f5c1677..31291be 100644 --- a/system/index.php +++ b/system/index.php @@ -4,7 +4,7 @@ include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php"; include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/alert.php"; include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php"; -if (!MOD_SYSTEM_DASHBOARD) { +if (!CONFIG['mod']['dashboard']) { generate_alert("/404.php", "System dashboard is disabled", 405); exit; } @@ -14,14 +14,14 @@ if (!authorize_user(true) || (!$_SESSION["user_role"]["permission_approve_emotes exit; } -$db = new PDO(DB_URL, DB_USER, DB_PASS); +$db = new PDO(CONFIG['database']['url'], CONFIG['database']['user'], CONFIG['database']['pass']); ?> - System panel - <?php echo INSTANCE_NAME ?> + System panel - <?php echo CONFIG['instance']['name'] ?> @@ -35,7 +35,7 @@ $db = new PDO(DB_URL, DB_USER, DB_PASS);
Emotes'; $results = $db->query("SELECT COUNT(*) FROM emotes WHERE visibility = 2")->fetch()[0]; @@ -47,7 +47,7 @@ $db = new PDO(DB_URL, DB_USER, DB_PASS); echo ''; } - if (REPORTS_ENABLE && $_SESSION["user_role"]["permission_report_review"]) { + if (CONFIG['reports']['enable'] && $_SESSION["user_role"]["permission_report_review"]) { echo 'Reports'; $results = $db->query("SELECT COUNT(*) FROM reports WHERE resolved_by IS NULL")->fetch()[0]; -- cgit v1.2.3