From d5f33ad6432aef68643158bc97756ccfdb0ae74a Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 2 Apr 2023 01:30:50 +0300 Subject: [PATCH] add ceawl in queue notification --- library/sqlite.php | 17 +++++++++++++++++ public/search.php | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/library/sqlite.php b/library/sqlite.php index 9ce3a87..ff09e9e 100644 --- a/library/sqlite.php +++ b/library/sqlite.php @@ -59,6 +59,23 @@ class SQLite { '); } + public function getTotalPagesByHttpCode(mixed $httpCode) { + + if (is_null($httpCode)) { + + $query = $this->_db->query('SELECT COUNT(*) AS `total` FROM `page` WHERE `httpCode` IS NULL'); + + } else { + + $query = $this->_db->prepare('SELECT COUNT(*) AS `total` FROM `page` WHERE `httpCode` = ?'); + + $query->execute([$httpCode]); + + } + + return $query->fetch()->total; + } + public function getTotalPages() { $query = $this->_db->prepare('SELECT COUNT(*) AS `total` FROM `page`'); diff --git a/public/search.php b/public/search.php index b053ce6..9ca4fb0 100644 --- a/public/search.php +++ b/public/search.php @@ -177,6 +177,9 @@ if (!empty($q)) {
+ getTotalPagesByHttpCode(null)) { ?> + +
@@ -190,6 +193,9 @@ if (!empty($q)) {
+ getTotalPagesByHttpCode(null)) { ?> + +