|
@@ -0,0 +1,67 @@
|
|
|
+<?php
|
|
|
+ require_once("../../../api.php");
|
|
|
+ require_once("../../../include/lib.php");
|
|
|
+ if (!isset($_GET["id"])) header("Location: /404.php");
|
|
|
+ $id = (int)$_GET["id"];
|
|
|
+ $page = isset($_GET["page"]) ? (int)$_GET["page"] : 1;
|
|
|
+ if ($page < 1) $page = 1;
|
|
|
+ $pagemax = 40;
|
|
|
+ $offset = $pagemax * ($page - 1);
|
|
|
+ $res = get("user/".$id."/profile/all");
|
|
|
+ if (!isset($res->body)) {
|
|
|
+ header("Location: /404.php");
|
|
|
+ die();
|
|
|
+ }
|
|
|
+ $top = get("user/".$id."/profile/top");
|
|
|
+ $res = $res->body;
|
|
|
+ $top = $top->body;
|
|
|
+ if (count((array)$res->illusts) == 0) header("Location: /404.php");
|
|
|
+ $out = ["title" => $top->extraData->meta->title, "desc" => $top->extraData->meta->description];
|
|
|
+
|
|
|
+ $index = 0;
|
|
|
+ $illusts = count((array)$res->illusts);
|
|
|
+ $iurl = "user/".$id."/profile/illusts?";
|
|
|
+
|
|
|
+ foreach ($res->illusts as $k => $v) {
|
|
|
+ $index++;
|
|
|
+ if ($index <= $offset) continue;
|
|
|
+ if ($index >= ($pagemax+$offset)+1) break;
|
|
|
+ $iurl .= "ids[]=".$k."&";
|
|
|
+ }
|
|
|
+
|
|
|
+ $iurl .= "work_category=illustManga&is_first_page=0";
|
|
|
+ unset($index);
|
|
|
+?>
|
|
|
+
|
|
|
+<?php
|
|
|
+ include("../../../include/header.php");
|
|
|
+ $title = $top->extraData->meta->ogp->title;
|
|
|
+ $now = "illust";
|
|
|
+ include("../../../include/usermenu.php");
|
|
|
+ unset($res);
|
|
|
+?>
|
|
|
+ <hr />
|
|
|
+<?php
|
|
|
+ if ($illusts > 0) {
|
|
|
+?>
|
|
|
+ <h2>イラスト</h2>
|
|
|
+<?php
|
|
|
+ $i = get($iurl);
|
|
|
+ foreach ($i->body->works as $k => $v) {
|
|
|
+?>
|
|
|
+ <div class="searchres">
|
|
|
+ <a href="/artworks/?id=<?= $v->id ?>">
|
|
|
+ <img src="<?= imgprx($v->url) ?>" alt="<?= $v->alt ?>">
|
|
|
+ <?= $v->title ?>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ unset($top);
|
|
|
+ $cur = "/users/illusts/?id=".$id;
|
|
|
+ $sum = ceil($illusts/$pagemax);
|
|
|
+ include("../../../include/pagination.php");
|
|
|
+ include("../../../include/footer.php");
|
|
|
+?>
|