<?php
require_once __DIR__ . '/../includes/db.php';

try {
    $modules = fetchAll("SELECT * FROM system_modules");
    echo "System Modules:\n";
    foreach ($modules as $m) {
        echo "  - KEY: {$m['module_key']}, Name: {$m['name']}, Active: {$m['is_active']}\n";
    }
    
    $company = fetch("SELECT enabled_modules FROM companies WHERE id = 1");
    echo "\nCompany 1 Enabled Modules:\n";
    echo $company['enabled_modules'] . "\n";
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
