diff options
Diffstat (limited to 'system/index.php')
| -rw-r--r-- | system/index.php | 10 |
1 files changed, 5 insertions, 5 deletions
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']); ?> <html> <head> - <title>System panel - <?php echo INSTANCE_NAME ?></title> + <title>System panel - <?php echo CONFIG['instance']['name'] ?></title> <link rel="stylesheet" href="/static/style.css"> <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"> </head> @@ -35,7 +35,7 @@ $db = new PDO(DB_URL, DB_USER, DB_PASS); <div class="box navtab">System panel</div> <div class="box content"> <?php - if (MOD_EMOTES_APPROVE && $_SESSION["user_role"]["permission_approve_emotes"]) { + if (CONFIG['mod']['approve'] && $_SESSION["user_role"]["permission_approve_emotes"]) { echo '<a href="/system/emotes">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 '</a>'; } - if (REPORTS_ENABLE && $_SESSION["user_role"]["permission_report_review"]) { + if (CONFIG['reports']['enable'] && $_SESSION["user_role"]["permission_report_review"]) { echo '<a href="/system/reports">Reports'; $results = $db->query("SELECT COUNT(*) FROM reports WHERE resolved_by IS NULL")->fetch()[0]; |
