|
@@ -0,0 +1,80 @@
|
|
|
+<?php
|
|
|
+ require_once("../../api.php");
|
|
|
+ $id = (int)$_GET["id"];
|
|
|
+ $res = get("illust/".$id);
|
|
|
+ if (!isset($res->body)) {
|
|
|
+ header("Location: /404.php");
|
|
|
+ die();
|
|
|
+ }
|
|
|
+ $res = $res->body;
|
|
|
+ if ($res->commentCount > 0) {
|
|
|
+ $com = get("illusts/comments/roots?illust_id=".$id);
|
|
|
+ }
|
|
|
+ $rec = get("illust/".$id."/recommend/init?limit=".$rpsize);
|
|
|
+ $out = ["title" => $res->alt, "desc" => $res->description];
|
|
|
+ $icon = "";
|
|
|
+ foreach ($res->userIllusts as $k => $v) {
|
|
|
+ if (is_null($v)) continue;
|
|
|
+ if (isset($v->profileImageUrl)) $icon = str_replace("https://", "", $v->profileImageUrl);
|
|
|
+ }
|
|
|
+?>
|
|
|
+
|
|
|
+<?php include("../../include/header.php"); ?>
|
|
|
+ <div style="text-align: center;">
|
|
|
+ <a href="/proxy.php?url=<?= str_replace("https:
|
|
|
+ <img src="/proxy.php?url=<?= str_replace("https:
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <h1><?= $res->illustTitle ?></h1>
|
|
|
+ <p>
|
|
|
+ 好:<?= $res->likeCount ?> 保:<?= $res->bookmarkCount ?> 視:<?= $res->viewCount ?><br />
|
|
|
+ <img src="/proxy.php?url=<?= $icon ?>" alt="<?= $res->userName ?>" /> <a href="/users?id=<?= $res->userId ?>"><?= $res->userName ?></a>
|
|
|
+ </p>
|
|
|
+ <h2>コメント (<?= $res->commentCount ?>)</h2>
|
|
|
+ <table>
|
|
|
+<?php
|
|
|
+ if (!$com->error) {
|
|
|
+ foreach ($com->body->comments as $c) {
|
|
|
+?>
|
|
|
+ <tr>
|
|
|
+ <td rowspan="2" style="vertical-align: top;"><img src="/proxy.php?url=<?= str_replace("https:
|
|
|
+ <td style="padding-left: 12px;"><a href="/users/?id=<?= $c->userId ?>"><?= $c->userName ?></a> <?= $c->commentDate ?></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="padding-left: 12px;">
|
|
|
+<?php
|
|
|
+ if (is_null($c->stampId)) {
|
|
|
+ echo $c->comment;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+?>
|
|
|
+ <img src="/proxy.php?url=s.pximg.net/common/images/stamp/generated-stamps/<?= $c->stampId ?>_s.jpg" alt="<?= $c->stampId ?>" />
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ echo $com->message;
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </table>
|
|
|
+ <h2>関連作品</h2>
|
|
|
+<?php
|
|
|
+ if (!$rec->error) {
|
|
|
+ foreach ($rec->body->illusts as $r) {
|
|
|
+?>
|
|
|
+ <a href="/artworks/?id=<?= $r->id ?>">
|
|
|
+ <img src="/proxy.php?url=<?= str_replace("https:
|
|
|
+ </a>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ echo $rec->message;
|
|
|
+ }
|
|
|
+?>
|
|
|
+<?php include("../../include/footer.php"); ?>
|