feat:explain the users query
This commit is contained in:
parent
404bd217ac
commit
39dd311cee
4 changed files with 75 additions and 0 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue