diff --git a/index.php b/index.php index af264de..eb277f9 100644 --- a/index.php +++ b/index.php @@ -40,6 +40,7 @@ $welcomeText = settingGet('welcome_text', 'Добро пожаловать в г $photo = $activePhotoId > 0 ? photoById($activePhotoId) : null; $comments = $photo ? commentsByPhoto($activePhotoId) : []; $photos = $activeSectionId > 0 ? photosBySection($activeSectionId) : []; +$isHomePage = $activeSectionId < 1 && $activePhotoId < 1; function h(string $v): string { return htmlspecialchars($v, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); } function assetUrl(string $path): string { $f=__DIR__ . '/' . ltrim($path,'/'); $v=is_file($f)?(string)filemtime($f):(string)time(); return $path . '?v=' . rawurlencode($v); } @@ -128,14 +129,65 @@ function outputWatermarked(string $path, string $mime): never