<?php
namespace App\controllers;

use App\middleware\OrgGuard;
use App\Core\Database;

class TenantDashboardController
{
    public function index(): void
    {
        OrgGuard::check();

        $orgId = $_SESSION['org_id'];

        $db = Database::getInstance();

        $stmt = $db->prepare("SELECT * FROM conferences WHERE org_id = :oid");
        $stmt->execute([':oid' => $orgId]);
        $conferences = $stmt->fetchAll();

        require BASE_PATH . '/app/views/tenant/dashboard.php';
    }
}
