コミットを比較
2 コミット
67d5d60a2b
...
5ba83b4dbe
作成者 | SHA1 | 日付 |
---|---|---|
守矢諏訪子 | 5ba83b4dbe | |
守矢諏訪子 | 52576db947 |
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
function imgprx (string $url): string {
|
||||
return "/proxy.php?url=".str_replace("https://", "", $url);
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,25 @@
|
|||
<div class="pagination">
|
||||
<span class="userbtn<?= $page == 1 ? " now" : "" ?>">
|
||||
<?php if ($page == 1) { ?>
|
||||
最初
|
||||
<?php } else { ?>
|
||||
<a href="<?= $cur."&page=1" ?>">最初</a>
|
||||
<?php } ?>
|
||||
</span>
|
||||
<?php for ($i = 1; $i <= $sum; $i++) { ?>
|
||||
<span class="userbtn<?= $page == $i ? " now" : "" ?>">
|
||||
<?php if ($page == $i) { ?>
|
||||
<?= $i ?>
|
||||
<?php } else { ?>
|
||||
<a href="<?= $cur."&page=".$i ?>"><?= $i ?></a>
|
||||
<?php } ?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
<span class="userbtn<?= $page == $sum ? " now" : "" ?>">
|
||||
<?php if ($page == $sum) { ?>
|
||||
最後
|
||||
<?php } else { ?>
|
||||
<a href="<?= $cur."&page=".$sum ?>">最後</a>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
|
@ -0,0 +1,60 @@
|
|||
<img src="/userhead.php?id=<?= $id ?>" alt="<?= $title ?>" style="background-size: cover;" />
|
||||
<?php
|
||||
if ($now == "home") {
|
||||
?>
|
||||
<span class="userbtn now">トップ</span>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="/users/?id=<?= $id ?>" class="userbtn">トップ</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($res->bookmarkCount->public->illust > 0 || $res->bookmarkCount->public->novel > 0) {
|
||||
if ($now == "bookmark") {
|
||||
?>
|
||||
<span class="userbtn now">ブックマーク</span>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="/users/bookmarks/?id=<?= $id ?>" class="userbtn">ブックマーク</a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (count((array)$res->illusts) > 0) {
|
||||
if ($now == "illust") {
|
||||
?>
|
||||
<span class="userbtn now">イラスト</span>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="/users/illusts/?id=<?= $id ?>" class="userbtn">イラスト</a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (count((array)$res->manga) > 0) {
|
||||
if ($now == "manga") {
|
||||
?>
|
||||
<span class="userbtn now">漫画</span>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="/users/manga/?id=<?= $id ?>" class="userbtn">漫画</a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (count((array)$res->novels) > 0) {
|
||||
if ($now == "novel") {
|
||||
?>
|
||||
<span class="userbtn now">小説</span>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="/users/novels/?id=<?= $id ?>" class="userbtn">小説</a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
unset($title);
|
||||
unset($now);
|
||||
?>
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
require_once("../../api.php");
|
||||
require_once("../../include/lib.php");
|
||||
if (!isset($_GET["id"])) header("Location: /404.php");
|
||||
$id = (int)$_GET["id"];
|
||||
$res = get("illust/".$id);
|
||||
if (!isset($res->body)) {
|
||||
|
@ -15,20 +17,20 @@
|
|||
$icon = "";
|
||||
foreach ($res->userIllusts as $k => $v) {
|
||||
if (is_null($v)) continue;
|
||||
if (isset($v->profileImageUrl)) $icon = str_replace("https://", "", $v->profileImageUrl);
|
||||
if (isset($v->profileImageUrl)) $icon = imgprx($v->profileImageUrl);
|
||||
}
|
||||
?>
|
||||
|
||||
<?php include("../../include/header.php"); ?>
|
||||
<div style="text-align: center;">
|
||||
<a href="/proxy.php?url=<?= str_replace("https://", "", $res->urls->original) ?>">
|
||||
<img src="/proxy.php?url=<?= str_replace("https://", "", $res->urls->regular) ?>" alt="<?= $res->illustTitle ?>" />
|
||||
<a href="<?= imgprx($res->urls->original) ?>">
|
||||
<img src="<?= imgprx($res->urls->regular) ?>" alt="<?= $res->illustTitle ?>" />
|
||||
</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>
|
||||
<img src="<?= $icon ?>" alt="<?= $res->userName ?>" /> <a href="/users?id=<?= $res->userId ?>"><?= $res->userName ?></a>
|
||||
</p>
|
||||
<h2>コメント (<?= $res->commentCount ?>)</h2>
|
||||
<table>
|
||||
|
@ -37,7 +39,7 @@
|
|||
foreach ($com->body->comments as $c) {
|
||||
?>
|
||||
<tr>
|
||||
<td rowspan="2" style="vertical-align: top;"><img src="/proxy.php?url=<?= str_replace("https://", "", $c->img) ?>" alt="<?= $c->userName ?>" style="width: 40px; height: 40px;" /></td>
|
||||
<td rowspan="2" style="vertical-align: top;"><img src="<?= imgprx($c->img) ?>" alt="<?= $c->userName ?>" style="width: 40px; height: 40px;" /></td>
|
||||
<td style="padding-left: 12px;"><a href="/users/?id=<?= $c->userId ?>"><?= $c->userName ?></a> <?= $c->commentDate ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -68,7 +70,7 @@
|
|||
foreach ($rec->body->illusts as $r) {
|
||||
?>
|
||||
<a href="/artworks/?id=<?= $r->id ?>">
|
||||
<img src="/proxy.php?url=<?= str_replace("https://", "", $r->url) ?>" alt="<?= $r->alt ?>" />
|
||||
<img src="<?= imgprx($r->url) ?>" alt="<?= $r->alt ?>" />
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
require_once("../api.php");
|
||||
require_once("../include/lib.php");
|
||||
$res = (array)get("top/illust");
|
||||
$out = ["title" => "トップ", "desc" => ""];
|
||||
?>
|
||||
|
@ -9,7 +10,7 @@
|
|||
<?php
|
||||
foreach ($res["body"]->thumbnails->illust as $o) {
|
||||
?>
|
||||
<a href="/artworks?id=<?= $o->id ?>"><img src="/proxy.php?url=<?= str_replace("https://", "", $o->url) ?>" alt="<?= $o->alt ?>" /></a>
|
||||
<a href="/artworks?id=<?= $o->id ?>"><img src="<?= imgprx($o->url) ?>" alt="<?= $o->alt ?>" /></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
require_once("../../api.php");
|
||||
require_once("../../include/lib.php");
|
||||
$q = htmlspecialchars($_GET["q"]);
|
||||
if (!isset($q) || $q == "" || is_null($q)) {
|
||||
header("Location: /");
|
||||
|
@ -31,12 +32,12 @@
|
|||
?>
|
||||
<div class="searchres">
|
||||
<a href="/artworks/?id=<?= $r->id ?>">
|
||||
<img src="/proxy.php?url=<?= str_replace("https://", "", $r->url) ?>" alt="<?= $r->alt ?>" />
|
||||
<img src="<?= imgprx($r->url) ?>" alt="<?= $r->alt ?>" />
|
||||
<?= $r->title ?>
|
||||
</a>
|
||||
<br />
|
||||
<a href="/users/?id=<?= $r->userId ?>">
|
||||
<img src="/proxy.php?url=<?= str_replace("https://", "", $r->profileImageUrl) ?>" alt="<?= $r->userName ?>" style="width: 24px; height: 24px;" />
|
||||
<img src="<?= imgprx($r->profileImageUrl) ?>" alt="<?= $r->userName ?>" style="width: 24px; height: 24px;" />
|
||||
<?= $r->userName ?>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -10,6 +10,7 @@ body {
|
|||
|
||||
a {
|
||||
color: #ea5fea;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h2 {
|
||||
|
@ -47,6 +48,7 @@ h2 {
|
|||
color: #fcfcfc;
|
||||
font-size: 20px;
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.searchbar {
|
||||
|
@ -76,6 +78,35 @@ h2 {
|
|||
margin: auto;
|
||||
}
|
||||
|
||||
.userbtn {
|
||||
background: #ea5fea;
|
||||
color: #fcfcfc;
|
||||
padding: 4px;
|
||||
border: 1px solid #ffc8ff;
|
||||
border-radius: 2px;
|
||||
margin: 12px 4px 4px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.userbtn > a {
|
||||
color: #fcfcfc;
|
||||
}
|
||||
|
||||
.now {
|
||||
background: #a499a4;
|
||||
color: #4d4d4d;
|
||||
border: 1px solid #bdbdbd;
|
||||
}
|
||||
|
||||
.now > a {
|
||||
color: #4d4d4d;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
margin-top: 32px;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
require_once("../config.php");
|
||||
$id = (int)$_GET["id"];
|
||||
|
||||
header("Content-type: image/jpg");
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, "https://embed.pixiv.net/user_profile.php?id=".$id);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
?>
|
|
@ -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");
|
||||
?>
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
require_once("../../api.php");
|
||||
if (!isset($_GET["id"])) header("Location: /404.php");
|
||||
$id = (int)$_GET["id"];
|
||||
$res = get("user/".$id."/profile/all");
|
||||
if (!isset($res->body)) {
|
||||
|
@ -9,13 +10,21 @@
|
|||
$top = get("user/".$id."/profile/top");
|
||||
$res = $res->body;
|
||||
$top = $top->body;
|
||||
//print_r($top->extraData->meta);exit;
|
||||
$out = ["title" => $top->extraData->meta->title, "desc" => $top->extraData->meta->description];
|
||||
?>
|
||||
|
||||
<?php include("../../include/header.php"); ?>
|
||||
<img src="<?= $top->extraData->meta->ogp->image ?>" alt="<?= $top->extraData->meta->ogp->title ?>" />
|
||||
<?php
|
||||
include("../../include/header.php");
|
||||
$title = $top->extraData->meta->ogp->title;
|
||||
$now = "home";
|
||||
include("../../include/usermenu.php");
|
||||
unset($res);
|
||||
?>
|
||||
<hr />
|
||||
<p>
|
||||
<?= nl2br($top->extraData->meta->ogp->description) ?>
|
||||
<?= nl2br($top->extraData->meta->twitter->description) ?>
|
||||
</p>
|
||||
<?php
|
||||
unset($top);
|
||||
?>
|
||||
<?php include("../../include/footer.php"); ?>
|
||||
|
|
新しいイシューから参照