|
@@ -0,0 +1,70 @@
|
|
|
+<?php
|
|
|
+ require_once("../../../api.php");
|
|
|
+ require_once("../../../include/lib.php");
|
|
|
+ if (!isset($_GET["id"])) header("Location: /404.php");
|
|
|
+ $id = (int)$_GET["id"];
|
|
|
+ $cur = "/users/manga/?id=".$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->manga) == 0) header("Location: /404.php");
|
|
|
+ $out = ["title" => $top->extraData->meta->title, "desc" => $top->extraData->meta->description, "img_sec" => "userhead", "img_id" => $id];
|
|
|
+
|
|
|
+ $index = 0;
|
|
|
+ $manga = count((array)$res->manga);
|
|
|
+ $murl = "user/".$id."/profile/illusts?";
|
|
|
+
|
|
|
+ foreach ($res->manga as $k => $v) {
|
|
|
+ $index++;
|
|
|
+ if ($index <= $offset) continue;
|
|
|
+ if ($index >= ($pagemax+$offset)+1) break;
|
|
|
+ $murl .= "ids[]=".$k."&";
|
|
|
+ }
|
|
|
+
|
|
|
+ $murl .= "work_category=illustManga&is_first_page=0";
|
|
|
+ unset($index);
|
|
|
+?>
|
|
|
+
|
|
|
+<?php
|
|
|
+ include("../../../include/header.php");
|
|
|
+ $title = $top->extraData->meta->ogp->title;
|
|
|
+ $now = "manga";
|
|
|
+ $bmc = $res->bookmarkCount->public->illust;
|
|
|
+ $ilc = count((array)$res->illusts);
|
|
|
+ $mgc = count((array)$res->manga);
|
|
|
+ include("../../../include/usermenu.php");
|
|
|
+ unset($res);
|
|
|
+?>
|
|
|
+ <hr />
|
|
|
+<?php
|
|
|
+ if ($manga > 0) {
|
|
|
+?>
|
|
|
+ <h2>漫画</h2>
|
|
|
+<?php
|
|
|
+ $m = get($murl);
|
|
|
+ foreach ($m->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);
|
|
|
+ $sum = ceil($manga/$pagemax);
|
|
|
+ include("../../../include/pagination.php");
|
|
|
+ include("../../../include/footer.php");
|
|
|
+?>
|