$tpl->addTransform("email_hash", md5($data["email"])); $tpl->addTransform("name", $data["name"]); $tpl->addTransform("attached_issue", "None"); } break; case "search": if (count($_POST) > 0 or count($path) > 1) { $db = new Database(); $order = "id DESC"; $reports = null; $cleanDuplicated = true; if ($path[0] === "plugin") { $plugin = clean(str_replace(['"', "'"], "", isset($_POST["plugin"]) ? $_POST["plugin"] : $path[1])); $reports = $db->getReports("plugin = '{$plugin}'", $order); } elseif ($path[0] === "report") { $report = $db->getReport((int) (isset($_POST["id"]) ? $_POST["id"] : $path[1])); if ($report !== null and count($report) > 0) { $message = "0x" . bin2hex($report["message"]); $file = "0x" . bin2hex($report["file"]); $reports = $db->getReports("message = {$message} AND file = {$file} AND line = " . intval($report["line"]), $order); $cleanDuplicated = false; } } elseif (count($_POST) > 0) { if ($path[0] === "id") { header("Location: /view/" . intval($_POST["id"]) . ($isAPI ? "/api" : "")); exit; } elseif ($path[0] === "build") { $operator = "="; if ($_POST["type"] === "greater") { $operator = ">"; } elseif ($_POST["type"] === "less") {