diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-09 01:43:12 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-09 01:43:12 +0500 |
| commit | 29477e67ede12347b153e2255325327374e1b073 (patch) | |
| tree | be9170a20d332eab1fcc8b380f70f231921aac45 /system/emotes/index.php | |
| parent | 28bb4f3618e2e947d14a05a24e99d826c26c0ce3 (diff) | |
feat: new configuration
Diffstat (limited to 'system/emotes/index.php')
| -rw-r--r-- | system/emotes/index.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/emotes/index.php b/system/emotes/index.php index d172482..79be71f 100644 --- a/system/emotes/index.php +++ b/system/emotes/index.php @@ -5,7 +5,7 @@ include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/alert.php"; include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php"; include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/utils.php"; -if (!MOD_EMOTES_APPROVE) { +if (!CONFIG['mod']['approve']) { generate_alert("/404.php", "Manual emote approval is disabled", 405); exit; } @@ -17,7 +17,7 @@ if (!authorize_user(true) || !$_SESSION["user_role"]["permission_approve_emotes" $current_user_id = $_SESSION["user_id"] ?? ""; -$db = new PDO(DB_URL, DB_USER, DB_PASS); +$db = new PDO(CONFIG['database']['url'], CONFIG['database']['user'], CONFIG['database']['pass']); $emote_results = $db->prepare("SELECT e.*, CASE WHEN up.private_profile = FALSE OR up.id = ? THEN e.uploaded_by ELSE NULL END AS uploaded_by, CASE WHEN up.private_profile = FALSE OR up.id = ? THEN u.username ELSE NULL END AS uploader_name, @@ -65,7 +65,7 @@ if (isset($_GET["id"])) { <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> @@ -87,7 +87,7 @@ if (isset($_GET["id"])) { echo '<span style="font-size:10px;"> by '; if ($row["uploader_name"] == null) { - echo ANONYMOUS_DEFAULT_NAME . '*'; + echo CONFIG['anonymous']['defaultname'] . '*'; } else { echo $row["uploader_name"]; } @@ -174,7 +174,7 @@ if (isset($_GET["id"])) { <tr> <th>Uploader</th> <td><?php - $username = ANONYMOUS_DEFAULT_NAME; + $username = CONFIG['anonymous']['defaultname']; $link = "#"; if ($emote["uploader_name"] != null) { |
