<?php
function system_install_check(){
    $uri = $_SERVER['REQUEST_URI'] ?? '/';
    if(strpos($uri, '/install/') === 0) return;
    if(strpos($uri, '/assets/') === 0) return;

    $lock = __DIR__ . '/../install/install.lock';
    if(!is_file($lock)){
        header('Location: /install/');
        exit;
    }
}
system_install_check();
