link signs straight in as that user, switching from whoever is signed in (the demo passwords are public). if ($method === 'GET' && isset($_GET['demo']) && is_demo()) { demo_link_login($path); } // Hourly LodDepot sync (catalog, sales, Buying) — starts in the background when due; see cron/hourly.php. require_once ROOT . '/app/catalog.php'; ld_maybe_sync(); // Weekly emails of saved Item performance views (checked at most once an hour; the cron job does it too) if (!site_only()) { require_once ROOT . '/app/itemperf.php'; item_maybe_mail(); } if ($path === '/admin' || str_starts_with($path, '/admin/')) { require ROOT . '/app/admin.php'; admin_dispatch(substr($path, 6) ?: '/', $method); exit; } if ($path === '/warehouse' || str_starts_with($path, '/warehouse/')) { require ROOT . '/app/warehouse.php'; wh_dispatch(substr($path, 10) ?: '/', $method); } if ($path === '/sales' || str_starts_with($path, '/sales/')) { require ROOT . '/app/sales.php'; sales_dispatch(substr($path, 6) ?: '/', $method); exit; } require ROOT . '/app/site.php'; site_dispatch($path, $method);