diff options
Diffstat (limited to 'lib/partials.php')
| -rw-r--r-- | lib/partials.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/partials.php b/lib/partials.php index 760923a..979621d 100644 --- a/lib/partials.php +++ b/lib/partials.php @@ -7,26 +7,26 @@ function html_navigation_bar() <section class="navbar"> <a href="/" class="brand" style="color:black;text-decoration:none;"> <img src="/static/img/brand/mini.webp" alt=""> - <h2 style="margin-left:8px;font-size:24px;"><b><?php echo INSTANCE_NAME ?></b></h2> + <h2 style="margin-left:8px;font-size:24px;"><b><?= CONFIG['instance']['name'] ?></b></h2> </a> <div class="links"> <a href="/emotes" class="button">Emotes</a> - <?php if (EMOTESET_PUBLIC_LIST): ?> + <?php if (CONFIG['emoteset']['public']): ?> <a href="/emotesets.php" class="button">Emotesets</a> <?php endif; ?> - <?php if (ACCOUNT_PUBLIC_LIST): ?> + <?php if (CONFIG['account']['publiclist']): ?> <a href="/users.php" class="button">Users</a> <?php endif; ?> - <?php if (EMOTE_UPLOAD && (ANONYMOUS_UPLOAD || (isset($_SESSION["user_role"]) && $_SESSION["user_role"]["permission_upload"]))) { + <?php if (CONFIG['emote']['upload'] && (CONFIG['anonymous']['upload'] || (isset($_SESSION["user_role"]) && $_SESSION["user_role"]["permission_upload"]))) { echo '<a href="/emotes/upload.php" class="button">Upload</a>'; } ?> <a href="/account" class="button">Account</a> <?php if (isset($_SESSION["user_id"])) { - $db = new PDO(DB_URL, DB_USER, DB_PASS); + $db = new PDO(CONFIG['database']['url'], CONFIG['database']['user'], CONFIG['database']['pass']); // getting inbox $stmt = $db->prepare("SELECT COUNT(*) FROM inbox_messages WHERE recipient_id = ? AND has_read = false"); @@ -40,7 +40,7 @@ function html_navigation_bar() $stmt = null; if (isset($_SESSION["user_role"])) { - if (REPORTS_ENABLE && $_SESSION["user_role"]["permission_report"]) { + if (CONFIG['reports']['enable'] && $_SESSION["user_role"]["permission_report"]) { // getting reports $stmt = $db->prepare("SELECT COUNT(*) FROM reports WHERE sender_id = ? AND resolved_by IS NULL"); $stmt->execute([$_SESSION["user_id"]]); @@ -53,10 +53,10 @@ function html_navigation_bar() <?php ; } - if (MOD_SYSTEM_DASHBOARD && ($_SESSION["user_role"]["permission_approve_emotes"] || $_SESSION["user_role"]["permission_report_review"])) { + if (CONFIG['mod']['dashboard'] && ($_SESSION["user_role"]["permission_approve_emotes"] || $_SESSION["user_role"]["permission_report_review"])) { $system_count = 0; - if ($_SESSION["user_role"]["permission_approve_emotes"] && MOD_EMOTES_APPROVE) { + if ($_SESSION["user_role"]["permission_approve_emotes"] && CONFIG['mod']['approve']) { $system_count += intval($db->query("SELECT COUNT(*) FROM emotes WHERE visibility = 2")->fetch()[0]); } |
