From f7a821300b6e03306572c113199d4fa0f2ad07f4 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 20 Jun 2025 00:35:06 +0500 Subject: feat: show different big.webp --- lib/partials.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lib/partials.php') diff --git a/lib/partials.php b/lib/partials.php index 6e1a182..3d6b637 100644 --- a/lib/partials.php +++ b/lib/partials.php @@ -3,11 +3,24 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/../config.php'; function html_big_navbar() { + $brand_url = '/static/img/brand/big.webp'; + $static_folder = '/static/img/brand/big'; + $brand_folder = $_SERVER['DOCUMENT_ROOT'] . $static_folder; + + if (is_dir($brand_folder)) { + $files = glob("$brand_folder/*.*"); + + if (!empty($files)) { + $file = basename($files[random_int(0, count($files) - 1)]); + $brand_url = "$static_folder/$file"; + } + } + echo '' ?>