« Back to History
auth.php
|
20260722_120325.php
Initial Domain Snapshot
Copy Code
<?php declare(strict_types=1); if (session_status() === PHP_SESSION_NONE) { session_start(); } require_once __DIR__ . '/config.php'; /** * Check if owner is logged in */ function is_logged_in(): bool { return isset($_SESSION['owner']) && isset($_SESSION['owner']['shop_id']); } /** * Force login for protected pages */ function require_login(): void { if (!is_logged_in()) { header('Location: login.php'); exit; } }