12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- require_once("../../../api.php");
- require_once("../../../include/lib.php");
- if (!isset($_GET["id"])) header("Location: " . SITEURL . "/404.php");
- $id = (int)$_GET["id"];
- $cur = "/users/illusts/?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: " . SITEURL . "/404.php");
- die();
- }
- $top = get("user/".$id."/profile/top");
- $res = $res->body;
- $top = $top->body;
- if (count((array)$res->illusts) == 0) header("Location: " . SITEURL . "/404.php");
- $out = ["title" => $top->extraData->meta->title, "desc" => $top->extraData->meta->description, "img_sec" => "userhead", "img_id" => $id];
- $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";
- $bmc = $res->bookmarkCount->public->illust;
- $ilc = count((array)$res->illusts);
- $mgc = count((array)$res->manga);
- 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="<?= SITEURL ?>/artworks/?id=<?= $v->id ?>">
- <img src="<?= imgprx($v->url) ?>" alt="<?= $v->alt ?>">
- <?= $v->title ?>
- </a>
- </div>
- <?php
- }
- }
- unset($top);
- $sum = ceil($illusts/$pagemax);
- include("../../../include/pagination.php");
- include("../../../include/footer.php");
- ?>
|