<?php
/**
 * RUHONDO BEACH RESORT HMS + POS System
 * Public Index - Redirects to appropriate page
 * Developer: JOACHIM'S INNOTECH
 */

// Initialize system
require_once dirname(__DIR__) . '/config/config.php';
require_once dirname(__DIR__) . '/config/constants.php';
require_once dirname(__DIR__) . '/config/database.php';
require_once dirname(__DIR__) . '/config/helpers.php';
require_once dirname(__DIR__) . '/config/auth.php';

// Check if user is logged in
if (is_logged_in()) {
    // Redirect to dashboard
    redirect('public/dashboard.php');
} else {
    // Redirect to login page
    redirect('public/login.php');
}