diff options
author | lolcat <will@lolcat.ca> | 2023-10-16 02:30:43 -0400 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2023-10-16 02:30:43 -0400 |
commit | 3aa01807741ffad103b9f6a74d878e58f2e828e8 (patch) | |
tree | a06816e71b059d96b5e08f9d304cbc3818e85b48 /web.php | |
parent | fa9dc4d6efc593b7301229c18b058d90024c939e (diff) |
captcha and imgur, findthatmeme, yep imagesearch
Diffstat (limited to 'web.php')
-rw-r--r-- | web.php | 68 |
1 files changed, 34 insertions, 34 deletions
@@ -10,11 +10,11 @@ $frontend = new frontend(); $get = $frontend->parsegetfilters($_GET, $filters); -$frontend->loadheader( - $get, - $filters, - "web" -); +/* + Captcha +*/ +include "lib/captcha_gen.php"; +new captcha($frontend, $get, $filters, true); $payload = [ "class" => "", @@ -44,6 +44,35 @@ try{ die(); } +/* + Prepend Oracle output, if applicable +*/ +include("oracles/encoder.php"); +include("oracles/calc.php"); +include("oracles/time.php"); +include("oracles/numerics.php"); +$oracles = [new calculator(), new encoder(), new time(), new numerics()]; +$fortune = ""; +foreach ($oracles as $oracle) { + if ($oracle->check_query($_GET["s"])) { + $resp = $oracle->generate_response($_GET["s"]); + if ($resp != "") { + $fortune .= "<div class=\"infobox\">"; + foreach ($resp as $title => $r) { + if ($title) { + $fortune .= "<h3>".htmlspecialchars($title)."</h3><div class=\"code\">".htmlspecialchars($r)."</div>"; + } + else { + $fortune .= "<i>".$r."</i><br>"; + } + } + $fortune .= "<small>Answer provided by oracle: ".$oracle->info["name"]."</small></div>"; + } + break; + } +} +$payload["left"] = $fortune; + $answerlen = 0; /* @@ -476,35 +505,6 @@ if($c !== 0){ } /* - Prepend Oracle output, if applicable -*/ -include_once("oracles/encoder.php"); -include_once("oracles/calc.php"); -include_once("oracles/time.php"); -include_once("oracles/numerics.php"); -$oracles = [new calculator(), new encoder(), new time(), new numerics()]; -$fortune = ""; -foreach ($oracles as $oracle) { - if ($oracle->check_query($_GET["s"])) { - $resp = $oracle->generate_response($_GET["s"]); - if ($resp != "") { - $fortune .= "<div class=\"infobox\">"; - foreach ($resp as $title => $r) { - if ($title) { - $fortune .= "<h3>".htmlspecialchars($title)."</h3><div class=\"code\">".htmlspecialchars($r)."</div>"; - } - else { - $fortune .= "<i>".$r."</i><br>"; - } - } - $fortune .= "<small>Answer provided by oracle: ".$oracle->info["name"]."</small></div>"; - } - break; - } -} -$payload["left"] = $fortune . $payload["left"]; - -/* Load next page */ if($results["npt"] !== null){ |