From addc5a14a93547f630f23e5b6a79cffa2e37d71a Mon Sep 17 00:00:00 2001 From: lolcat Date: Sat, 17 Feb 2024 23:22:19 -0500 Subject: boobs --- lib/frontend.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/frontend.php') diff --git a/lib/frontend.php b/lib/frontend.php index b002ee9..738ad83 100644 --- a/lib/frontend.php +++ b/lib/frontend.php @@ -39,6 +39,14 @@ class frontend{ $replacements["ac"] = ''; } + if( + isset($replacements["timetaken"]) && + $replacements["timetaken"] !== null + ){ + + $replacements["timetaken"] = '
Took ' . substr(microtime(true) - $replacements["timetaken"], 0, 4) . 's
'; + } + $handle = fopen("template/{$template}", "r"); $data = fread($handle, filesize("template/{$template}")); fclose($handle); @@ -68,7 +76,7 @@ class frontend{ echo $this->load("header.html", [ - "title" => trim($get["s"] . " ({$page})"), + "title" => trim(htmlspecialchars($get["s"]) . " ({$page})"), "description" => ucfirst($page) . ' search results for "' . htmlspecialchars($get["s"]) . '"', "index" => "no", "search" => htmlspecialchars($get["s"]), @@ -88,7 +96,7 @@ class frontend{ $this->drawerror( "Tshh, blocked!", - 'You were blocked from viewing this page. If you wish to scrape data from 4get, please consider running your own 4get instance or using the API.', + 'You were blocked from viewing this page. If you wish to scrape data from 4get, please consider running your own 4get instance.', ); die(); } @@ -98,6 +106,7 @@ class frontend{ echo $this->load("search.html", [ + "timetaken" => null, "class" => "", "right-left" => "", "right-right" => "", -- cgit v1.2.3