Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
HirotakaDango committed Jul 8, 2024
1 parent 281fb96 commit 68240df
Show file tree
Hide file tree
Showing 58 changed files with 1,130 additions and 610 deletions.
2 changes: 1 addition & 1 deletion profile/components/card_image_asc.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function updateProgress(event) {
if (!empty($tag)) {
?>
<a href="/tagged_images.php?tag=<?php echo urlencode($tag); ?>"
class="btn btn-sm btn-outline-dark mb-1 rounded-pill fw-bold">
class="btn btn-sm btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> mb-1 rounded-pill fw-bold">
<i class="bi bi-tags-fill"></i> <?php echo $tag; ?>
</a>
<?php
Expand Down
2 changes: 1 addition & 1 deletion profile/components/card_image_desc.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function updateProgress(event) {
if (!empty($tag)) {
?>
<a href="/tagged_images.php?tag=<?php echo urlencode($tag); ?>"
class="btn btn-sm btn-outline-dark mb-1 rounded-pill fw-bold">
class="btn btn-sm btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> mb-1 rounded-pill fw-bold">
<i class="bi bi-tags-fill"></i> <?php echo $tag; ?>
</a>
<?php
Expand Down
2 changes: 1 addition & 1 deletion profile/components/card_image_least.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function updateProgress(event) {
if (!empty($tag)) {
?>
<a href="/tagged_images.php?tag=<?php echo urlencode($tag); ?>"
class="btn btn-sm btn-outline-dark mb-1 rounded-pill fw-bold">
class="btn btn-sm btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> mb-1 rounded-pill fw-bold">
<i class="bi bi-tags-fill"></i> <?php echo $tag; ?>
</a>
<?php
Expand Down
2 changes: 1 addition & 1 deletion profile/components/card_image_like.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function updateProgress(event) {
if (!empty($tag)) {
?>
<a href="/tagged_images.php?tag=<?php echo urlencode($tag); ?>"
class="btn btn-sm btn-outline-dark mb-1 rounded-pill fw-bold">
class="btn btn-sm btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> mb-1 rounded-pill fw-bold">
<i class="bi bi-tags-fill"></i> <?php echo $tag; ?>
</a>
<?php
Expand Down
2 changes: 1 addition & 1 deletion profile/components/card_image_order_asc.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function updateProgress(event) {
if (!empty($tag)) {
?>
<a href="/tagged_images.php?tag=<?php echo urlencode($tag); ?>"
class="btn btn-sm btn-outline-dark mb-1 rounded-pill fw-bold">
class="btn btn-sm btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> mb-1 rounded-pill fw-bold">
<i class="bi bi-tags-fill"></i> <?php echo $tag; ?>
</a>
<?php
Expand Down
2 changes: 1 addition & 1 deletion profile/components/card_image_order_desc.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function updateProgress(event) {
if (!empty($tag)) {
?>
<a href="/tagged_images.php?tag=<?php echo urlencode($tag); ?>"
class="btn btn-sm btn-outline-dark mb-1 rounded-pill fw-bold">
class="btn btn-sm btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> mb-1 rounded-pill fw-bold">
<i class="bi bi-tags-fill"></i> <?php echo $tag; ?>
</a>
<?php
Expand Down
2 changes: 1 addition & 1 deletion profile/components/card_image_pop.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function updateProgress(event) {
if (!empty($tag)) {
?>
<a href="/tagged_images.php?tag=<?php echo urlencode($tag); ?>"
class="btn btn-sm btn-outline-dark mb-1 rounded-pill fw-bold">
class="btn btn-sm btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> mb-1 rounded-pill fw-bold">
<i class="bi bi-tags-fill"></i> <?php echo $tag; ?>
</a>
<?php
Expand Down
2 changes: 1 addition & 1 deletion profile/components/card_image_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function updateProgress(event) {
if (!empty($tag)) {
?>
<a href="/tagged_images.php?tag=<?php echo urlencode($tag); ?>"
class="btn btn-sm btn-outline-dark mb-1 rounded-pill fw-bold">
class="btn btn-sm btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> mb-1 rounded-pill fw-bold">
<i class="bi bi-tags-fill"></i> <?php echo $tag; ?>
</a>
<?php
Expand Down
27 changes: 5 additions & 22 deletions profile/components/delete_image_asc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,22 @@
.icon-stroke-3 { -webkit-text-stroke: 3px; }
</style>
<div class="position-absolute top-0 start-100 translate-middle">
<button type="button" class="btn btn-sm rounded-circle btn-light shadow" data-bs-dismiss="modal"><i class="bi bi-x icon-stroke-1"></i></button>
<button type="button" class="btn btn-sm rounded-circle btn-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/mode.php'); ?> shadow" data-bs-dismiss="modal"><i class="bi bi-x icon-stroke-1"></i></button>
</div>
<div class="row d-flex justify-content-center">
<div class="col-sm-6 mb-3 mb-sm-0">
<div class="card border-0 rounded-4 overflow-auto scrollable-div" style="max-height: 250px;">
<a class="w-100 h-100" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/image.php?artworkid=<?php echo $imageA['id']; ?>">
<img class="rounded-4 object-fit-cover shadow lazy-load" height="400" width="100%" data-src="http://<?php echo $_SERVER['HTTP_HOST']; ?>/thumbnails/<?php echo $imageA['filename']; ?>" alt="<?php echo $imageA['title']; ?>">
<div class="ratio ratio-1x1">
<img class="rounded-4 object-fit-cover shadow lazy-load" data-src="http://<?php echo $_SERVER['HTTP_HOST']; ?>/thumbnails/<?php echo $imageA['filename']; ?>" alt="<?php echo $imageA['title']; ?>">
</div>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="h-100">
<div class="card-body">
<h5 class="text-center fw-bold"><?php echo $imageA['title']?></h5>
<p class="card-text fw-medium">
<?php
if (!empty($imageA['imgdesc'])) {
$messageText = $imageA['imgdesc'];
$messageTextWithoutTags = strip_tags($messageText);
$pattern = '/\bhttps?:\/\/\S+/i';

$formattedText = preg_replace_callback($pattern, function ($matches) {
$url = htmlspecialchars($matches[0]);
return '<a href="' . $url . '">' . $url . '</a>';
}, $messageTextWithoutTags);

$formattedTextWithLineBreaks = nl2br($formattedText);
echo $formattedTextWithLineBreaks;
} else {
echo "Image description is empty.";
}
?>
</p>
</div>
</div>
</div>
Expand All @@ -65,7 +48,7 @@
<div class="btn-group w-100">
<input type="hidden" name="id" value="<?php echo $imageA['id']; ?>">
<button class="btn btn-outline-danger rounded-start-4 fw-bold" type="submit" value="Delete">delete</button>
<button type="button" class="btn btn-outline-dark rounded-end-4 fw-bold" data-bs-dismiss="modal">cancel</button>
<button type="button" class="btn btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> rounded-end-4 fw-bold" data-bs-dismiss="modal">cancel</button>
</div>
</div>
</div>
Expand Down
27 changes: 5 additions & 22 deletions profile/components/delete_image_desc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,22 @@
.icon-stroke-3 { -webkit-text-stroke: 3px; }
</style>
<div class="position-absolute top-0 start-100 translate-middle">
<button type="button" class="btn btn-sm rounded-circle btn-light shadow" data-bs-dismiss="modal"><i class="bi bi-x icon-stroke-1"></i></button>
<button type="button" class="btn btn-sm rounded-circle btn-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/mode.php'); ?> shadow" data-bs-dismiss="modal"><i class="bi bi-x icon-stroke-1"></i></button>
</div>
<div class="row d-flex justify-content-center">
<div class="col-sm-6 mb-3 mb-sm-0">
<div class="card border-0 rounded-4 overflow-auto scrollable-div" style="max-height: 250px;">
<a class="w-100 h-100" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/image.php?artworkid=<?php echo $imageD['id']; ?>">
<img class="rounded-4 object-fit-cover shadow lazy-load" height="400" width="100%" data-src="http://<?php echo $_SERVER['HTTP_HOST']; ?>/thumbnails/<?php echo $imageD['filename']; ?>" alt="<?php echo $imageD['title']; ?>">
<div class="ratio ratio-1x1">
<img class="rounded-4 object-fit-cover shadow lazy-load" data-src="http://<?php echo $_SERVER['HTTP_HOST']; ?>/thumbnails/<?php echo $imageD['filename']; ?>" alt="<?php echo $imageD['title']; ?>">
</div>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="h-100">
<div class="card-body">
<h5 class="text-center fw-bold"><?php echo $imageD['title']?></h5>
<p class="card-text fw-medium">
<?php
if (!empty($imageD['imgdesc'])) {
$messageText = $imageD['imgdesc'];
$messageTextWithoutTags = strip_tags($messageText);
$pattern = '/\bhttps?:\/\/\S+/i';

$formattedText = preg_replace_callback($pattern, function ($matches) {
$url = htmlspecialchars($matches[0]);
return '<a href="' . $url . '">' . $url . '</a>';
}, $messageTextWithoutTags);

$formattedTextWithLineBreaks = nl2br($formattedText);
echo $formattedTextWithLineBreaks;
} else {
echo "Image description is empty.";
}
?>
</p>
</div>
</div>
</div>
Expand All @@ -65,7 +48,7 @@
<div class="btn-group w-100">
<input type="hidden" name="id" value="<?php echo $imageD['id']; ?>">
<button class="btn btn-outline-danger rounded-start-4 fw-bold" type="submit" value="Delete">delete</button>
<button type="button" class="btn btn-outline-dark rounded-end-4 fw-bold" data-bs-dismiss="modal">cancel</button>
<button type="button" class="btn btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> rounded-end-4 fw-bold" data-bs-dismiss="modal">cancel</button>
</div>
</div>
</div>
Expand Down
29 changes: 6 additions & 23 deletions profile/components/delete_image_least.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
?>

<div>
<form action="<?php echo $url; ?>" method="post">
<form action="../../profile/delete.php?by=<?php echo isset($_GET['by']) ? $_GET['by'] : 'newest'; ?>&page=<?php echo $page; ?>" method="post">
<!-- Modal -->
<div class="modal fade" id="deleteImage_<?php echo $imageL['id']; ?>" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-fullscreen modal-dialog-centered" role="document">
Expand All @@ -24,39 +24,22 @@
.icon-stroke-3 { -webkit-text-stroke: 3px; }
</style>
<div class="position-absolute top-0 start-100 translate-middle">
<button type="button" class="btn btn-sm rounded-circle btn-light shadow" data-bs-dismiss="modal"><i class="bi bi-x icon-stroke-1"></i></button>
<button type="button" class="btn btn-sm rounded-circle btn-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/mode.php'); ?> shadow" data-bs-dismiss="modal"><i class="bi bi-x icon-stroke-1"></i></button>
</div>
<div class="row d-flex justify-content-center">
<div class="col-sm-6 mb-3 mb-sm-0">
<div class="card border-0 rounded-4 overflow-auto scrollable-div" style="max-height: 250px;">
<a class="w-100 h-100" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/image.php?artworkid=<?php echo $imageL['id']; ?>">
<img class="rounded-4 object-fit-cover shadow lazy-load" height="400" width="100%" data-src="http://<?php echo $_SERVER['HTTP_HOST']; ?>/thumbnails/<?php echo $imageL['filename']; ?>" alt="<?php echo $imageL['title']; ?>">
<div class="ratio ratio-1x1">
<img class="rounded-4 object-fit-cover shadow lazy-load" data-src="http://<?php echo $_SERVER['HTTP_HOST']; ?>/thumbnails/<?php echo $imageL['filename']; ?>" alt="<?php echo $imageL['title']; ?>">
</div>
</a>
</div>
</div>
<div class="col-sm-6">
<div class="h-100">
<div class="card-body">
<h5 class="text-center fw-bold"><?php echo $imageL['title']?></h5>
<p class="card-text fw-medium">
<?php
if (!empty($imageL['imgdesc'])) {
$messageText = $imageL['imgdesc'];
$messageTextWithoutTags = strip_tags($messageText);
$pattern = '/\bhttps?:\/\/\S+/i';

$formattedText = preg_replace_callback($pattern, function ($matches) {
$url = htmlspecialchars($matches[0]);
return '<a href="' . $url . '">' . $url . '</a>';
}, $messageTextWithoutTags);

$formattedTextWithLineBreaks = nl2br($formattedText);
echo $formattedTextWithLineBreaks;
} else {
echo "Image description is empty.";
}
?>
</p>
</div>
</div>
</div>
Expand All @@ -65,7 +48,7 @@
<div class="btn-group w-100">
<input type="hidden" name="id" value="<?php echo $imageL['id']; ?>">
<button class="btn btn-outline-danger rounded-start-4 fw-bold" type="submit" value="Delete">delete</button>
<button type="button" class="btn btn-outline-dark rounded-end-4 fw-bold" data-bs-dismiss="modal">cancel</button>
<button type="button" class="btn btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> rounded-end-4 fw-bold" data-bs-dismiss="modal">cancel</button>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 68240df

Please sign in to comment.