Linux ubuntu 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025 x86_64
nginx/1.24.0
: 67.217.245.49 | : 216.73.216.153
Cant Read [ /etc/named.conf ]
8.3.6
www-data
Bypass.pw
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
mangalegend /
public_html /
[ HOME SHELL ]
Name
Size
Permission
Action
404.php
5.35
KB
-rw-rw-r--
752080a790.php
6.42
KB
-rw-rw-r--
99ec2cfd235e6eff303e.txt
20
B
-rw-rw-r--
actions.php
4.3
KB
-rw-rw-r--
ads.txt
3
B
-rw-rw-r--
datasource.php
3.09
KB
-rw-rw-r--
dbhelper.php
31.2
KB
-rw-rw-r--
discord.webp
5.65
KB
-rw-rw-r--
footer.php
94.91
KB
-rw-rw-r--
genre.php
16.81
KB
-rw-rw-r--
head.php
877
B
-rw-rw-r--
header.php
27.22
KB
-rw-rw-r--
history.php
8.39
KB
-rw-rw-r--
home.php
49.2
KB
-rw-rw-r--
index.php
21.64
KB
-rw-rw-r--
install_webapp.php
6.63
KB
-rw-rw-r--
manifest.json
442
B
-rw-rw-r--
most-viewed.php
11.23
KB
-rw-rw-r--
new-manga.php
16.71
KB
-rw-rw-r--
privacy-policy.php
13.92
KB
-rw-rw-r--
pubfuture_script.php
123
B
-rw-rw-r--
read-manga.php
47.96
KB
-rw-rw-r--
reading.php
46.61
KB
-rw-rw-r--
robots.txt
72
B
-rw-rw-r--
search.php
17.36
KB
-rw-rw-r--
seo.php
1.33
KB
-rw-rw-r--
sitemap.xml
880.79
KB
-rw-rw-r--
style_css.php
99.57
KB
-rw-rw-r--
terms-of-service.php
25.23
KB
-rw-rw-r--
weekly-manga.php
17.44
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : reading.php
<!DOCTYPE html> <html lang="en" data-fp="5h93d476r16"> <?php if (session_status() === PHP_SESSION_NONE) { session_start(); } $discord = $_SESSION['discord_user'] ?? null; require_once(__DIR__ . "/dbhelper.php"); $dbhelper = new DBHelper(); if (empty($_GET['chapter'])) { echo '<script> location.replace("404.php"); </script>'; } $manga = $dbhelper->getMangaInfoByChapterId($_GET['chapter'])[0]; if (empty($manga['id'])) { echo '<script> location.replace("404.php"); </script>'; } $chapter = $dbhelper->getChapterInfo($_GET['chapter'])[0]; $chapters = $dbhelper->getMangaChapters($manga['id']); $chapter_images = $dbhelper->getMangaChapterImages($_GET['chapter']); $relatedMangas = $dbhelper->getRelatedMangas($manga['id']); $encryptionKey = $dbhelper->getEncryptionKey(); $manga_id = $manga['id']; $chapter_id = $chapter['id']; $comments = $dbhelper->getCommentsWithReplies($manga_id, $chapter_id); $hasComments = !empty($comments); ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title><?= $manga['title'] ?> Manga Free <?= 'Chapter ' . $chapter['name'] ?> On MangaLegend</title> <meta data-n-head="ssr" name="viewport" content="width=device-width, initial-scale=1"> <meta data-n-head="ssr" name="format-detection" content="telephone=no"> <meta data-n-head="ssr" name="viewport" content="width=device-width, initial-scale=1"> <meta data-n-head="ssr" data-hid="robots" name="robots" content="index, follow, all"> <meta data-n-head="ssr" data-hid="googlebot" name="googlebot" content="index, follow, all"> <link data-n-head="ssr" rel="icon" variant="image/x-icon" href="/favicon.ico?v=1"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css"> <link data-n-head="ssr" rel="canonical" href="https://mangalegend.com/<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($manga['title']))) . '/' . $_GET['chapter'] ?>"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script> <meta data-n-head="ssr" data-hid="title" name="title" content="<?= $manga['title'] ?> Manga Free <?= 'Chapter ' . $chapter['name'] ?> On MangaLegend"> <meta data-n-head="ssr" data-hid="og:title" property="og:title" name="og:title" content="<?= $manga['title'] ?> Manga Free <?= 'Chapter ' . $chapter['name'] ?> On MangaLegend"> <meta data-n-head="ssr" data-hid="description" name="description" content="Read <?= $manga['title'] ?> Manga Free <?= 'Chapter ' . $chapter['name'] ?> On MangaLegend, Catch the latest manga releases chapter with high-quality images. Online read NOW!"> <meta data-n-head="ssr" data-hid="og:description" property="og:description" name="og:description" content="Read <?= $manga['title'] ?> Manga Free <?= 'Chapter ' . $chapter['name'] ?> On MangaLegend, Catch the latest manga releases chapter with high-quality images. Online read NOW!"> <meta data-n-head="ssr" data-hid="og:site_name" property="og:site_name" content="mangalegend.com"> <meta data-n-head="ssr" data-hid="og:url" name="og:url" content="https://mangalegend.com/"> <meta data-n-head="ssr" data-hid="i18n-og" property="og:locale" content="en"> <meta data-n-head="ssr" data-hid="og:image" property="og:image" content="https://mangalegend.com/manga_og.jpg" /> <link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.27/dist/sweetalert2.min.css" rel="stylesheet"> <?php //include('head.php'); ?> <?php include('pubfuture_script.php'); ?> </head> <?php include('style_css.php'); ?> <body class="dark-mode"> <style> #button { display: inline-block; background-color: #ff9c00; width: 40px; height: 40px; text-align: center; border-radius: 20px; position: fixed; bottom: 10px; right: 10px; transition: background-color .3s, opacity .5s, visibility .5s; opacity: 0; visibility: hidden; z-index: 1000; } #button::after { content: "\f077"; font-family: FontAwesome; font-weight: normal; font-style: normal; font-size: 1.5em; line-height: 40px; color: #fff; } #button:hover { cursor: pointer; background-color: #333; } #button:active { background-color: #555; } #button.show { opacity: 0.6; visibility: visible; } @media (min-width: 500px) { #button { margin: 30px; } } .owl-theme img { height: 160px; overflow: hidden; } .owl-carousel .owl-prev, .owl-carousel .owl-next { position: absolute; top: 40%; transform: translateY(-50%); background-color: rgb(212, 212, 212, 0.8) !important; color: #000 !important; font-size: 1.5em !important; width: 40px; height: 40px; border-radius: 100% !important; font-weight: bold; padding: 15px !important; text-align: center; } .owl-carousel .owl-prev:hover, .owl-carousel .owl-next:hover { background-color: rgb(212, 212, 212, 0.8) !important; color: #000 !important; } .owl-carousel .owl-prev { left: -30px; } .owl-carousel .owl-next { right: -30px; } .owl-theme .owl-dots .owl-dot.active span { background: #ff9c00 !important; width: 25px; transition: 0.2s ease-in-out; } .owl-theme .owl-dots .owl-dot:hover span { background: #ff9c00 !important; transition: 0.2s ease-in-out; } /* Responsive design custom css */ .desktop-view { display: block; } .mobile-view { display: none; } @media only screen and (max-width:480px) { .owl-theme .owl-dots .owl-dot { display: none; } .owl-carousel .owl-prev, .owl-carousel .owl-next { width: 30px; height: 30px; font-size: 14px !important; top: 45%; box-shadow: 0px 0px 0px 0px #000; } .owl-carousel .owl-prev { left: 0px; } .owl-carousel .owl-next { right: 0px; } .desktop-view { display: none; } .mobile-view { display: block; } } .myButtonad { position: relative; z-index: 1; /* Ensure button is above the layer initially */ } /* Style for the clickable overlay layer */ .click-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0); z-index: 999; /* Make sure the layer is on top of the button */ cursor: pointer; display:none; } .d-none { display: none !important; } </style> <a id="button"></a> <div id="__nuxt"> <!----> <div id="__layout"> <div class="default-container" data-v-5fa6951a=""> <?php include('header.php'); ?> <div id="main-container" class="content-container" data-v-5fa6951a=""> <div data-v-a833353c="" data-v-5fa6951a=""> <div id="reading_view" class="container column" data-v-ca6cf050="" data-v-a833353c=""> <div class="column align-center px-3" data-v-ca6cf050="" data-v-a833353c=""> <h1 data-v-ca6cf050="" data-v-a833353c="" style="text-decoration: none!important; color: #ff9c00!important;"> <?= $manga['title'] . ' ' . $chapter['name'] ?> </h1> <!----> <br> <div data-v-ca6cf050="" data-v-e1935f7a="" data-v-e49fcc30="" class="section-container p-3 py-0" style="text-align:center;"> <script> (function(vxvxvi){ var d = document, s = d.createElement('script'), l = d.scripts[d.scripts.length - 1]; s.settings = vxvxvi || {}; s.src = "\/\/euphoric-square.com\/bCX.VAsidyGNlZ0-YRWacI\/deWmr9IuLZ\/USlXkDPyTiYo1-M_jREm5nOXDGIztiNsjSUdyqMhT\/kX4EMUwR"; s.async = true; s.referrerPolicy = 'no-referrer-when-downgrade'; l.parentNode.insertBefore(s, l); })({}) </script> </div> <!--<div data-v-ca6cf050="" data-v-e1935f7a="" data-v-e49fcc30="" class="section-container p-3 py-0 desktop-view"> <div id="pf-12511-1" style="left: -125px!important;"> <script> window.pubfuturetag = window.pubfuturetag || []; window.pubfuturetag.push({ unit: "673d4ccfe7f6e2003fff4bb2", id: "pf-12511-1" }) </script> </div> </div> <div data-v-ca6cf050="" data-v-e1935f7a="" data-v-e49fcc30="" class="section-container p-3 py-0 mobile-view"> <div id="pf-12509-1"> <script> window.pubfuturetag = window.pubfuturetag || []; window.pubfuturetag.push({ unit: "673d4c9fe7f6e2003fff4b40", id: "pf-12509-1" }) </script> </div> </div>--> <br> <div class="social-container" data-v-25b99098="" data-v-a833353c="" data-v-ca6cf050=""> <button class="mr-2 social-btn row align-center btn-default btn-default " style="background-color:#3a66c5;" data-v-70910ec7="" data-v-25b99098="" onclick="window.open('https:\/\/www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmangalegend.com/<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($manga['title']))) ?>', '_system', 'location=yes');"> <svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-facebook" data-v-70910ec7="" data-v-25b99098=""> <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z" data-v-70910ec7="" data-v-25b99098=""></path> </svg> <span class="social-name ml-1 text inverse tiny" data-v-70d8a0c4="" data-v-25b99098="" data-v-70910ec7="">facebook </span> </button> <button class="mr-2 social-btn row align-center btn-default btn-default " style="background-color:#159bef;" data-v-70910ec7="" data-v-25b99098="" onclick="window.open('https:\/\/twitter.com/intent/tweet?url=mangalegend.com/<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($manga['title']))) ?>');"> <svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-twitter" data-v-70910ec7="" data-v-25b99098=""> <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z" data-v-70910ec7="" data-v-25b99098=""></path> </svg> <span class="social-name ml-1 text inverse tiny" data-v-70d8a0c4="" data-v-25b99098="" data-v-70910ec7="">twitter </span> </button> <button class="mr-2 social-btn row align-center btn-default btn-default " style="background-color:#06c576;" data-v-70910ec7="" data-v-25b99098="" onclick="window.open('https:\/\/wa.me/?text=https:\/\/mangalegend.com/<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($manga['title']))) ?>');"> <span class="row align-center" data-v-25b99098="" data-v-6a8dae3e=""> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" width="15px" height="15px" fill="white"> <path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"> </path> </svg> </span> <span class="social-name ml-1 text inverse tiny" data-v-70d8a0c4="" data-v-25b99098="" data-v-70910ec7="">whatsapp </span> </button> <!--<button class="mr-2 social-btn row align-center btn-default btn-default " style="background-color:#de1b3a;" data-v-70910ec7="" data-v-25b99098=""> <span class="row align-center" data-v-25b99098="" data-v-6a8dae3e=""> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" width="15px" height="15px" fill="white"> <path d="M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"></path> </svg> </span> <span class="social-name ml-1 text inverse tiny" data-v-70d8a0c4="" data-v-25b99098="" data-v-70910ec7="">pinterest </span> </button>--> </div> </div> <div class="row breadcrumb-container mb-3 mt-3" data-v-6be35aa8="" data-v-a833353c="" data-v-ca6cf050=""> <a href="/" title="Mangalegend" class="link no-decoration row align-center mr-2" data-v-74ec4422="" data-v-6be35aa8=""> <span class="one-line text grey small" data-v-70d8a0c4="" data-v-6be35aa8="">MangaLegend</span> <svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-light feather feather-chevron-right" data-v-6be35aa8=""> <polyline points="9 18 15 12 9 6" data-v-6be35aa8=""></polyline> </svg> </a> <a href="/<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($manga['title']))) ?>" title="<?= $manga['title'] ?>" class="link no-decoration row align-center mr-2" data-v-74ec4422="" data-v-6be35aa8=""> <span class="one-line text grey small" data-v-70d8a0c4="" data-v-6be35aa8=""><?= $manga['title'] ?></span> <svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-light feather feather-chevron-right" data-v-6be35aa8=""> <polyline points="9 18 15 12 9 6" data-v-6be35aa8=""></polyline> </svg> </a> <a href="/<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($manga['title']))) . '/' . $chapter['id'] ?>" title="<?= $chapter['name'] ?>" class="link no-decoration row align-center mr-2" data-v-74ec4422="" data-v-6be35aa8=""> <span class="one-line text grey small" data-v-70d8a0c4="" data-v-6be35aa8=""><?= $chapter['name'] ?></span> <!----> </a> </div> <div class="row px-3 actions" data-v-501cca07="" data-v-a833353c="" data-v-ca6cf050=""> <div class="select-dropdown one-line chapters-dropdown" data-v-ba01de24="" data-v-501cca07=""> <select id="top_chapter_selection" data-v-ba01de24="" onchange="topGotoChapter()"> <?php foreach ($chapters as $c) { ?> <option value="<?= $c['id'] ?>" data-v-ba01de24="" <?php if ($c['id'] == $_GET['chapter']) { echo 'selected'; } ?>> <?= $c['name'] ?> </option> <?php } ?> </select> </div> <span class="flex-fill" data-v-501cca07=""></span> <!----> <button class="ml-3 row align-center btn-default btn-primary prev-btn" data-v-70910ec7="" data-v-501cca07="" onclick="gotoPrevChapter()" style="display:none;"> <svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left" data-v-70910ec7="" data-v-7fe6aad4=""> <polyline points="15 18 9 12 15 6" data-v-70910ec7="" data-v-7fe6aad4=""> </polyline> </svg> Prev </button> <button class="ml-3 row align-center btn-default btn-primary home-btn" data-v-70910ec7="" data-v-501cca07="" onclick="location.href='https:/\/\mangalegend.com/home.php';"> <i class="fa fa-home"></i> </button> <button class="ml-3 row align-center btn-default btn-primary next-btn myButtonad" data-v-70910ec7="" data-v-501cca07="" onclick="gotoNextChapter(event)" style="display:none;"> Next <svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right" data-v-70910ec7="" data-v-501cca07=""> <polyline points="9 18 15 12 9 6" data-v-70910ec7="" data-v-501cca07=""> </polyline> </svg> </button> </div> <div data-v-a833353c="" data-v-ca6cf050="" class="row"> <div data-v-a833353c="" data-v-ca6cf050="" class="reading-container"> <?php $counter = 0; foreach ($chapter_images as $ci) { ?> <?php if ($counter < 6) { ?> <img data-v-a1ebd7c8="" data-v-a833353c="" src="<?= '/simage.php?url=' . urlencode(base64_encode(openssl_encrypt($dbhelper->getImageSource() . $ci['path'], 'AES-256-CBC', $encryptionKey, 0, $encryptionKey))) ?>" alt="<?= $manga['title'] ?>" title="<?= $manga['title'] ?>" loading="lazy"> <?php } else { ?> <div data-v-a1ebd7c8="" data-v-a833353c="" data-v-ca6cf050=""> <img data-v-a1ebd7c8="" data-v-a833353c="" src="<?= '/simage.php?url=' . urlencode(base64_encode(openssl_encrypt($dbhelper->getImageSource() . $ci['path'], 'AES-256-CBC', $encryptionKey, 0, $encryptionKey))) ?>" alt="<?= $manga['title'] ?>" title="<?= $manga['title'] ?>" loading="lazy"> </div> <?php } ?> <?php $counter++; } ?> </div> </div> <div class="row px-3 actions" data-v-501cca07="" data-v-a833353c="" data-v-ca6cf050=""> <div class="select-dropdown one-line chapters-dropdown" data-v-ba01de24="" data-v-501cca07=""> <select id="bottom_chapter_selection" data-v-ba01de24="" onchange="bottomGotoChapter()"> <?php foreach ($chapters as $c) { ?> <option value="<?= $c['id'] ?>" data-v-ba01de24="" <?php if ($c['id'] == $_GET['chapter']) { echo 'selected'; } ?>> <?= $c['name'] ?> </option> <?php } ?> </select> </div> <span class="flex-fill" data-v-501cca07=""></span> <!----> <button class="ml-3 row align-center btn-default btn-primary prev-btn" data-v-70910ec7="" data-v-501cca07="" onclick="gotoPrevChapter()" style="display:none;"> <svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left" data-v-70910ec7="" data-v-7fe6aad4=""> <polyline points="15 18 9 12 15 6" data-v-70910ec7="" data-v-7fe6aad4=""> </polyline> </svg> Prev </button> <button class="ml-3 row align-center btn-default btn-primary home-btn" data-v-70910ec7="" data-v-501cca07="" onclick="location.href='https:/\/\mangalegend.com/home.php';"> <i class="fa fa-home"></i> </button> <button class="ml-3 row align-center btn-default btn-primary next-btn myButtonad" data-v-70910ec7="" data-v-501cca07="" onclick="gotoNextChapter()" style="display:none;"> Next <svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right" data-v-70910ec7="" data-v-501cca07=""> <polyline points="9 18 15 12 9 6" data-v-70910ec7="" data-v-501cca07=""> </polyline> </svg> </button> </div> <!--<br><br> <div data-v-ca6cf050="" data-v-e1935f7a="" data-v-e49fcc30="" class="section-container p-3 py-1" style="text-align:center;"> <div id="pf-15297-1" data-format="display"> <script> window.pubfuturetag = window.pubfuturetag || []; window.pubfuturetag.push({ unit: "6846ae97acfb7803296c127b", id: "pf-15297-1" }) </script> </div> </div>--> <br> <div id="comments-section" class="mt-4 p-3"> <h3>Comments</h3> <!-- First Comment Box --> <?php if ($discord): ?> <button class="btn btn-success mb-3" onclick="openNewCommentSwal()">Add New Comment</button> <?php else: ?> <p class="text-muted desktop">Please <a href="/discord_login.php" style="color:#ff9c00;">log in with Discord</a> to comment.</p> <?php endif; ?> <!-- Comments List --> <?php if (!$hasComments): ?> <p class="text-muted">No comments yet — be the first to comment!</p> <?php endif; ?> <?php function renderComments($parent_id, $grouped, $discord, $level = 0) { if (empty($grouped[$parent_id])) return; foreach ($grouped[$parent_id] as $comment): $avatar = $comment['discord_avatar'] ? "https://cdn.discordapp.com/avatars/{$comment['discord_id']}/{$comment['discord_avatar']}.png" : "/discord.webp"; $commentId = $comment['id']; ?> <div class="comment p-3 border rounded mb-3 ms-<?= min($level * 2, 5) ?>" data-comment-id="<?= $commentId ?>" style="background-color: rgba(0, 0, 0, 0.5);"> <div class="d-flex align-items-start"> <img src="<?= $avatar ?>" class="rounded-circle me-3" width="40" height="40"> <div class="flex-grow-1"> <strong><?= htmlspecialchars($comment['discord_username']) ?></strong> <small class="text-muted d-block"><?= date('M j, Y H:i', strtotime($comment['created'])) ?></small> <p class="mb-2"><?= nl2br(htmlspecialchars($comment['content'])) ?></p> <?php if ($discord): ?> <button class="btn btn-sm btn-outline-secondary" onclick="openReplySwal(<?= $commentId ?>)">Reply</button> <?php endif; ?> <?php if (!empty($grouped[$commentId])): ?> <button class="btn btn-sm btn-link text-primary toggle-replies" data-comment-id="<?= $commentId ?>"> Show Replies (<?= count($grouped[$commentId]) ?>) </button> <div class="replies mt-2 ms-3 border-start ps-3 d-none" id="replies-<?= $commentId ?>"> </div> <?php endif; ?> </div> </div> </div> <?php endforeach; } ?> <?php $commentsGrouped = $dbhelper->getAllCommentsByChapter($manga_id, $chapter_id); renderComments(null, $commentsGrouped, $discord); ?> </div> <div class="container relative section-list mt-3 related-series" data-v-ca6cf050="" data-v-e1935f7a="" data-v-a833353c=""> <div class="section-container p-3" data-v-189babae="" data-v-e1935f7a="" data-v-ca6cf050=""> <div data-v-189babae=""> <h2 class="section-title" data-v-189babae=""> Related Series </h2> <div class="divider mb-2" data-v-189babae=""></div> </div> <section class="wraper section-list container mt-3" data-v-ca6cf050="" data-v-e1935f7a="" data-v-a833353c=""> <div class="owl-carousel owl-theme image-slider1"> <?php foreach ($relatedMangas as $rm) { ?> <div class="item"> <div class="manga-item column" data-v-4b575bc4="" data-v-e1935f7a="" data-v-189babae=""> <a href="../<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($rm['title']))) ?>" title="<?= $rm['title'] ?>" class="link no-decoration horizontal" data-v-74ec4422="" data-v-4b575bc4=""> <img src="<?= $dbhelper->getImageSource() . $rm['display_image'] ?>" alt="<?= $rm['title'] ?>" title="<?= $rm['title'] ?>" class="mb-2 horizontal" data-v-a1ebd7c8="" data-v-4b575bc4=""> </a> <a href="../<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($rm['title']))) ?>" title="<?= $rm['title'] ?>" class="link no-decoration one-line" data-v-74ec4422="" data-v-4b575bc4=""><?= $rm['title'] ?> </a> <a href="../<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($rm['title']))) . '/' . $rm['latest_chapter_id'] ?>" title="<?= $rm['latest_chapter'] ?>" class="link no-decoration my-1 text-light text-small one-line" data-v-74ec4422="" data-v-4b575bc4=""> <?= $rm['latest_chapter'] ?> </a> <div data-v-56107fc8="" data-v-4b575bc4="" class="row align-center"> <svg data-v-56107fc8="" xmlns="http://www.w3.org/2000/svg" width="12px" height="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star star-default <?php if ($rm['rating'] > 0) { echo 'star-checked'; } ?>"> <polygon data-v-56107fc8="" points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"> </polygon> </svg> <svg data-v-56107fc8="" xmlns="http://www.w3.org/2000/svg" width="12px" height="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star star-default <?php if ($rm['rating'] > 1) { echo 'star-checked'; } ?>"> <polygon data-v-56107fc8="" points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"> </polygon> </svg> <svg data-v-56107fc8="" xmlns="http://www.w3.org/2000/svg" width="12px" height="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star star-default <?php if ($rm['rating'] > 2) { echo 'star-checked'; } ?>"> <polygon data-v-56107fc8="" points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"> </polygon> </svg> <svg data-v-56107fc8="" xmlns="http://www.w3.org/2000/svg" width="12px" height="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star star-default <?php if ($rm['rating'] > 3) { echo 'star-checked'; } ?>"> <polygon data-v-56107fc8="" points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"> </polygon> </svg> <svg data-v-56107fc8="" xmlns="http://www.w3.org/2000/svg" width="12px" height="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star star-default <?php if ($rm['rating'] > 4) { echo 'star-checked'; } ?>"> <polygon data-v-56107fc8="" points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"> </polygon> </svg> <span data-v-70d8a0c4="" data-v-56107fc8="" class="ml-2 text grey normal" style="font-size: 9.6px;"><?= intval($rm['rating']) ?></span> </div> </div> </div> <?php } ?> </div> </section> </div> </div> </div> </div> <?php //include('footer.php'); ?> </div> <div role="alert" class="snackbar-error snackbar-container snackbar-hide" data-v-143f642f="" data-v-5fa6951a=""> <div class="flex relative row align-center px-3" data-v-143f642f=""> <div class="snackbar-indicator indicator-error" data-v-143f642f=""></div> <svg xmlns="http://www.w3.org/2000/svg" width="50px" height="50px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-alert-circle color-error" data-v-143f642f=""> <circle cx="12" cy="12" r="10" data-v-143f642f=""></circle> <line x1="12" y1="8" x2="12" y2="12" data-v-143f642f=""></line> <line x1="12" y1="16" x2="12.01" y2="16" data-v-143f642f=""></line> </svg> <div class="column px-4 py-3" data-v-143f642f=""> <span class="bold text inverse large" data-v-70d8a0c4="" data-v-143f642f="">Failed </span> <span class="mt-2 text inverse normal" data-v-70d8a0c4="" data-v-143f642f=""></span> </div> </div> </div> <div class="snackbar-bg" data-v-aa051a02="" data-v-5fa6951a=""> <div class="snackbar snackbar-container snackbar-hide" data-v-aa051a02=""> <div class="flex relative row align-center px-3" data-v-aa051a02=""> <div class="column px-4 py-3" data-v-aa051a02=""> <span bold="" class="mt-2 text dark normal" data-v-70d8a0c4="" data-v-aa051a02="">You need to <a href="https://mangalegend.com/sign-in" data-v-70d8a0c4="" data-v-aa051a02="">login</a> to use this function.</span> <div class="cancel mt-3" data-v-aa051a02="">Cancel</div> </div> </div> </div> </div> <div data-v-78a91c7e="" data-v-5fa6951a=""></div> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.27/dist/sweetalert2.all.min.js"></script> <script> $(function() { var obj = { name: "<?= $manga['title'] ?>", chapter: "<?= $chapter['name'] ?>", display_image: "<?= '/simage.php?url=' . urlencode(base64_encode(openssl_encrypt($dbhelper->getImageSource() . $manga['display_image'], 'AES-256-CBC', $encryptionKey, 0, $encryptionKey))) ?>", url: "/<?= preg_replace('/[^a-z0-9-]/', '', str_replace(' ', '-', strtolower($manga['title']))) . '/' . $chapter['id'] ?>" }; localStorage.setItem("<?= $manga['title'] ?>", JSON.stringify(obj)); var selectedIndex = $('#top_chapter_selection').prop('selectedIndex'); if (selectedIndex === 0) { $('.btn-primary.next-btn').css('display', 'none'); } else { $('.btn-primary.next-btn').css('display', ''); } if (selectedIndex === $('#top_chapter_selection option').length - 1) { $('.btn-primary.prev-btn').css('display', 'none'); } else { $('.btn-primary.prev-btn').css('display', ''); } }); function topGotoChapter() { var selected = $('#top_chapter_selection').val(); //window.open('https://webbed-leadership.com/IFcS2v', '_blank'); location.href = selected; } function bottomGotoChapter() { var selected = $('#bottom_chapter_selection').val(); //window.open('https://webbed-leadership.com/IFcS2v', '_blank'); location.href = selected; } function gotoNextChapter() { var selected = $('#bottom_chapter_selection').prop('selectedIndex') $('#bottom_chapter_selection').prop('selectedIndex', selected - 1); var selVal = $('#bottom_chapter_selection option:selected').val(); if (selVal > -1) { location.href = selVal; } } function gotoPrevChapter() { var selected = $('#bottom_chapter_selection').prop('selectedIndex') $('#bottom_chapter_selection').prop('selectedIndex', selected + 1); var selVal = $('#bottom_chapter_selection option:selected').val(); if (selVal > -1) { location.href = selVal; } } var btn = $("#button"); $(".content-container[data-v-5fa6951a]").scroll(function() { if ($(".content-container[data-v-5fa6951a]").scrollTop() > 300) { btn.addClass("show"); } else { btn.removeClass("show"); } }); btn.click(function(e) { e.preventDefault(); $(".content-container[data-v-5fa6951a]").animate({ scrollTop: 0 }, "300"); }); $(".image-slider1").owlCarousel({ margin: 5, loop: true, autoplay: true, nav: true, dots: false, navText: ["<i class='fa fa-chevron-left'></i>", "<i class='fa fa-chevron-right'></i>"], responsive: { 0: { items: 3 }, 600: { items: 7, merge: true, }, 1000: { items: 9 } } }); const images = document.querySelectorAll('img'); for (let img of images) { img.onload = ({ target }) => setTimeout(() => { target.classList.add('loaded') }, 200) } var btntop = $("#headwrap"); $(".content-container[data-v-5fa6951a]").scroll(function() { if ($(".content-container[data-v-5fa6951a]").scrollTop() > 300) { btntop.addClass("hidetop"); } else { btntop.removeClass("hidetop"); } }); function showReplyForm(commentId) { document.querySelectorAll('.reply-form').forEach(e => e.remove()); const parent = document.querySelector('[data-comment-id="' + commentId + '"]'); const form = document.createElement('div'); form.className = 'reply-form mt-2'; form.innerHTML = ` <textarea class="form-control mb-2" rows="2" placeholder="Write your reply..."></textarea> <button class="btn btn-sm btn-primary" onclick="submitReply(${commentId})">Post Reply</button> `; parent.appendChild(form); } function submitReply(parentId) { let content; if (parentId === null) { const textarea = document.querySelector('#new-comment'); if (!textarea) { console.error("New comment textarea not found."); return; } content = textarea.value.trim(); } else { const form = document.querySelector(`[data-comment-id="${parentId}"] .reply-form`); if (!form) { console.error("Reply form not found for comment ID:", parentId); return; } const textarea = form.querySelector('textarea'); if (!textarea) { console.error("Textarea not found in reply form."); return; } content = textarea.value.trim(); } if (!content) { Swal.fire({ icon: 'warning', title: 'Comment cannot be empty.', showConfirmButton: true }); return; } const params = { action: 'add_comment', manga_id: <?= json_encode($manga_id) ?>, chapter_id: <?= json_encode($chapter_id) ?>, parent_id: parentId, content: content }; $.ajax({ url: '/actions.php', dataType: 'text', type: 'post', contentType: 'application/x-www-form-urlencoded', data: $.param(params), success: function(data, textStatus, jQxhr) { console.log(data) try { var result = JSON.parse(data); if (result.success) { Swal.fire({ icon: 'success', title: result.message || 'Comment posted!', showConfirmButton: false, timer: 1000 }); // Clear the input if (parentId === null) { document.querySelector('#new-comment').value = ''; } else { const form = document.querySelector(`[data-comment-id="${parentId}"] .reply-form`); if (form) form.remove(); // Remove reply box } // Re-fetch main comments (or just replies if it's a reply) if (parentId === null) { // New top-level comment, re-fetch entire thread refreshComments(); } else { const target = document.querySelector(`#replies-${parentId}`); const button = document.querySelector(`.toggle-replies[data-comment-id="${parentId}"]`); if (target) { $(target).html('<div class="loading text-muted small">Loading...</div>'); loadReplies(parentId, target, button); } } } else { Swal.fire({ icon: 'error', title: result.message || 'Failed to post comment.', showConfirmButton: true }); } } catch (e) { console.log(e); console.error('Invalid JSON:', data); } }, error: function(jqXhr, textStatus, errorThrown) { console.log(errorThrown); Swal.fire({ icon: 'error', title: 'Server error', text: 'Failed to submit comment.', showConfirmButton: true }); } }); } function openNewCommentSwal() { Swal.fire({ title: 'Write your comment', input: 'textarea', inputAttributes: { 'aria-label': 'Type your comment here' }, showCancelButton: true, confirmButtonText: 'Post Comment', cancelButtonText: 'Cancel', inputValidator: (value) => { if (!value.trim()) { return 'Comment cannot be empty'; } }, preConfirm: (content) => { return new Promise((resolve) => { const params = { action: 'add_comment', manga_id: <?= json_encode($manga_id) ?>, chapter_id: <?= json_encode($chapter_id) ?>, parent_id: null, content: content.trim() }; $.ajax({ url: '/actions.php', type: 'POST', data: $.param(params), success: function(data) { try { const result = JSON.parse(data); if (result.success) { resolve(); Swal.fire({ icon: 'success', title: 'Comment posted!', timer: 1000, showConfirmButton: false }); refreshComments(); // Reload main comment list } else { Swal.showValidationMessage(result.message || 'Failed to post comment.'); } } catch (e) { console.error(e); Swal.showValidationMessage('Invalid server response.'); } }, error: function() { Swal.showValidationMessage('Server error. Could not post comment.'); } }); }); } }); } function openReplySwal(commentId) { Swal.fire({ title: 'Write your reply', input: 'textarea', inputAttributes: { 'aria-label': 'Type your reply here' }, showCancelButton: true, confirmButtonText: 'Post Reply', cancelButtonText: 'Cancel', inputValidator: (value) => { if (!value.trim()) { return 'Reply cannot be empty'; } }, preConfirm: (replyText) => { return new Promise((resolve) => { const params = { action: 'add_comment', manga_id: <?= json_encode($manga_id) ?>, chapter_id: <?= json_encode($chapter_id) ?>, parent_id: commentId, content: replyText.trim() }; $.ajax({ url: '/actions.php', type: 'POST', data: $.param(params), success: function(data) { try { const result = JSON.parse(data); if (result.success) { resolve(); // ✅ Close prompt Swal.fire({ icon: 'success', title: 'Reply posted!', timer: 1000, showConfirmButton: false }); // ✅ Force reload the replies const $target = $(`#replies-${commentId}`); const $button = $(`.toggle-replies[data-comment-id="${commentId}"]`); $target.html('<div class="loading text-muted small">Loading...</div>'); // Important: remove data-loaded so loadReplies re-fetches $target.removeAttr('data-loaded'); loadReplies(commentId, $target[0], $button[0]); } else { Swal.showValidationMessage(result.message || 'Failed to post reply.'); } } catch (e) { console.error(e); Swal.showValidationMessage('Invalid server response.'); } }, error: function() { Swal.showValidationMessage('Server error. Could not post reply.'); } }); }); } }); } function refreshComments() { const params = { action: 'load_replies', parent_id: null, // This tells PHP to load top-level comments manga_id: <?= json_encode($manga_id) ?>, chapter_id: <?= json_encode($chapter_id) ?> }; $.post('/actions.php', $.param(params), function(data) { try { const result = JSON.parse(data); if (result.success) { const commentContainer = document.querySelector('#comments-section'); if (commentContainer) { $(commentContainer).html(result.html); } } } catch (e) { console.error("Error parsing comment reload:", e); } }); } function loadReplies(commentId, target, button) { const params = { action: 'load_replies', parent_id: commentId, manga_id: <?= $manga_id ?>, chapter_id: <?= $chapter_id ?> }; $.ajax({ url: '/actions.php', type: 'POST', dataType: 'json', contentType: 'application/x-www-form-urlencoded', data: $.param(params), success: function(result) { if (result.success) { const html = result.html.trim(); if (html === "") { $(target).html('<div class="text-muted small">No replies.</div>').removeClass('d-none'); $(button).text('No Replies'); } else { $(target).html(html).removeClass('d-none').attr('data-loaded', '1'); $(button).text('Hide Replies'); } } else { Swal.fire({ icon: 'error', title: result.message || 'Failed to load replies.' }); } }, error: function() { Swal.fire({ icon: 'error', title: 'Server error', text: 'Unable to load replies.' }); } }); } document.addEventListener('DOMContentLoaded', () => { // Select all buttons with the class 'myAdButton' const buttons = document.querySelectorAll('.myButtonad'); buttons.forEach((button) => { // Create the overlay layer const layer = document.createElement('div'); layer.className = 'click-layer'; // Use class instead of ID for multiple layers // Style the button to be relative button.style.position = 'relative'; // Append the layer inside the button button.appendChild(layer); // Add click event listener to the overlay layer.addEventListener('click', () => { window.open('https://webbed-leadership.com/IFcS2v', '_blank'); layer.remove(); // Remove the layer after one click }); }); $(document).on('click', '.toggle-replies', function() { const commentId = $(this).data('comment-id'); const $target = $(`#replies-${commentId}`); const $button = $(this); if ($target.data('loaded')) { if ($target.hasClass('d-none')) { $target.removeClass('d-none'); $button.text('Hide Replies'); } else { $target.addClass('d-none'); $button.text(`Show Replies (${$target.children().length})`); } } else { loadReplies(commentId, $target[0], this); } }); function slideDown(el) { el.style.removeProperty('display'); let height = el.scrollHeight; el.style.height = '0px'; el.classList.remove('d-none'); requestAnimationFrame(() => { el.style.transition = 'height 0.3s ease'; el.style.height = height + 'px'; el.addEventListener('transitionend', function handler() { el.style.removeProperty('height'); el.style.removeProperty('transition'); el.removeEventListener('transitionend', handler); }); }); } function slideUp(el) { el.style.height = el.scrollHeight + 'px'; requestAnimationFrame(() => { el.style.transition = 'height 0.3s ease'; el.style.height = '0px'; el.addEventListener('transitionend', function handler() { el.classList.add('d-none'); el.style.removeProperty('height'); el.style.removeProperty('transition'); el.removeEventListener('transitionend', handler); }); }); } }); </script> <?php include('script.php'); ?> </body> </html>
Close