aboutsummaryrefslogtreecommitdiffstats
path: root/query.php
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2023-12-26 22:58:20 -0500
committerSquibid <me@zacharyscheiman.com>2023-12-26 22:59:01 -0500
commit39dd311cee2255c6cc41d656007f395784e44d31 (patch)
tree8af4613eec2f7fcf8b0f67bf5c6791657a9ac6a4 /query.php
parent404bd217ac5fdad3e4e3c49657cbafacfa2742db (diff)
downloadwallheaven-39dd311cee2255c6cc41d656007f395784e44d31.tar.gz
wallheaven-39dd311cee2255c6cc41d656007f395784e44d31.tar.bz2
wallheaven-39dd311cee2255c6cc41d656007f395784e44d31.zip
feat:explain the users querydev
Diffstat (limited to 'query.php')
-rw-r--r--query.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/query.php b/query.php
index 41cc918..2cfa97f 100644
--- a/query.php
+++ b/query.php
@@ -1,6 +1,7 @@
<?php
include('scrapers/wallhaven.php');
include('style/header.php');
+ include('misc/tools.php');
$config = require('config.php');
$_SERVER['REQUEST_URI'] = "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
@@ -21,6 +22,9 @@
$_GET["page"] ? $page = $_GET["page"] : $page = 1;
$res = getwallpapers("https://wallhaven.cc/api/v1/search?q=".$_GET["q"]."&purity=".$purity."&categories=".$categories."&page=".$page);
+ /* explain query */
+ printf("<div id='queryinfo'><p>%s Wallpapers found for \"<a href='/query.php?q=%s'>%s</a>\"</p></div>", $res[1]["total"], $_GET["q"], humanquery($_GET["q"], $_GET["NSFW"] ? true : false));
+
/* display wallpapers */
printf("<div id='wallpapers'>\n");
if (!$res[0])