<?php
namespace App\Controllers;

require_once BASE_PATH . '/app/helpers/permissions.php';

require_once BASE_PATH . '/app/helpers/conference_scope.php';

use App\Core\Controller;
use App\Core\Database;

class AdminChairController extends Controller
{
    public function index()
    {
$db = Database::getInstance();
        $conf = $_SESSION['conference_id'] ?? 0;

        if(!$conf){
            echo "<div class='alert alert-warning m-4'>اختر مؤتمر أولاً</div>";
            return;
        }

        $users = $db->query("SELECT id,first_name,last_name FROM users WHERE role_id=3")->fetchAll();

        ob_start();
        require BASE_PATH.'/app/views/admin/chairs/index.php';
        $content = ob_get_clean();
        require BASE_PATH.'/app/views/layouts/admin_layout.php';
    }
}
