<?php
// Admin Panel Config - loads DB connection from parent api folder
require_once dirname(__DIR__) . '/api/konak.php';

// Load SMTP settings from DB
function getSmtpSettings($koneksi) {
    $res = [];
    $q = mysqli_query($koneksi, "SELECT setting_key, setting_value FROM admin_settings");
    if ($q) {
        while ($row = mysqli_fetch_assoc($q)) {
            $res[$row['setting_key']] = $row['setting_value'];
        }
    }
    return $res;
}
