<?php
// Simple landing page to test the system
session_start();

// Check if system is installed
$installed = file_exists('config/installed.lock');

if (!$installed) {
    // Redirect to installation
    header('Location: install.php');
    exit;
}

// Check if user is logged in
$logged_in = isset($_SESSION['admin_id']) && !empty($_SESSION['admin_id']);

if (!$logged_in) {
    // Redirect to login
    header('Location: login.php');
    exit;
}

// If we get here, redirect to main dashboard
header('Location: index.php');
exit;
?>
