123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- require_once("../../api.php");
- require_once("../../include/lib.php");
- $q = htmlspecialchars($_GET["q"]);
- if (!isset($q) || $q == "" || is_null($q)) {
- header("Location: /");
- die();
- }
- $cur = "/search/?q=".$q;
- $res = get("search/artworks/".$q);
- if ($res->error) die();
- if (!isset($res->body)) {
- header("Location: /404.php");
- die();
- }
- $res = $res->body;
- $out = ["title" => $res->alt, "desc" => $res->description];
- ?>
- <?php include("../../include/header.php"); ?>
- <?php
- foreach ($res->relatedTags as $t) {
- ?>
- <a href="/search/?q=<?= $t ?>">#<?= $t ?></a>
- <?php
- }
- ?>
- <h2>結果</h2>
- <?php
- foreach ($res->illustManga->data as $r) {
- if (is_null($r->id)) continue;
- ?>
- <div class="searchres">
- <a href="/artworks/?id=<?= $r->id ?>">
- <img src="<?= imgprx($r->url) ?>" alt="<?= $r->alt ?>" />
- <?= $r->title ?>
- </a>
- <br />
- <a href="/users/?id=<?= $r->userId ?>">
- <img src="<?= imgprx($r->profileImageUrl) ?>" alt="<?= $r->userName ?>" style="width: 24px; height: 24px;" />
- <?= $r->userName ?>
- </a>
- </div>
- <?php
- }
- ?>
- <?php include("../../include/footer.php"); ?>
|