OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
3-31-025chanakya
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2025 11:18:49 AM
rwxr-xr-x
📄
.htaccess
860 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📁
.vscode
-
03/26/2025 03:47:57 AM
rwxr-xr-x
📁
CreateLeadPage
-
03/26/2025 04:16:47 AM
rwxr-xr-x
📄
ImageMagick-7.1.1-45-Q16-HDRI-x64-dll.exe
22.2 MB
03/26/2025 03:47:54 AM
rw-r--r--
📁
Xpress
-
03/26/2025 04:21:24 AM
rwxr-xr-x
📄
XpressPage.php
47.13 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
about.html
3.26 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
account.php
47.77 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
activate.php
2.19 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
add_channel.php
9.7 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
add_to_channel.php
980 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📁
admin
-
03/26/2025 04:16:40 AM
rwxr-xr-x
📄
analytics.php
37.71 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
assets
-
03/26/2025 04:16:41 AM
rwxr-xr-x
📁
audio
-
03/26/2025 03:48:03 AM
rwxr-xr-x
📄
businessLp.php
46.33 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
bussLp.php
57.87 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
card-news.php
6.2 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
channel.php
36.21 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
chattest.php
8.66 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
clients
-
03/26/2025 03:48:03 AM
rwxr-xr-x
📄
collections.php
94.62 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
comments.php
1.67 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
composer.json
65 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📄
composer.lock
4.03 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
contact.html
3.01 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
cookie.php
750 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📄
copytest.html
4.04 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
creamAdmin
-
03/26/2025 04:07:42 AM
rwxr-xr-x
📄
cream_dashboard.php
25.87 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
creamapi
-
03/26/2025 03:48:04 AM
rwxr-xr-x
📄
create.php
42.93 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
created_magazine.html
11.96 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
dashboard.php
55.52 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
data
-
03/26/2025 04:16:48 AM
rwxr-xr-x
📄
down.html
829 bytes
03/26/2025 03:47:46 AM
rw-r--r--
📁
education-podcasts
-
03/31/2025 06:36:42 AM
rwxr-xr-x
📁
featured_channels
-
03/26/2025 03:48:04 AM
rwxr-xr-x
📄
featured_channels.php
32.48 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
featured_topics.php
26.59 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
fetch_articles.php
1.83 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
fetch_liked_users.php
1.55 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
filter.php
4.91 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
follow_action.php
1.75 KB
03/26/2025 03:47:46 AM
rw-r--r--
📄
follow_dash.php
33.76 KB
03/26/2025 03:47:46 AM
rw-r--r--
📁
form-builder
-
03/26/2025 03:48:04 AM
rwxr-xr-x
📄
function.php
20.61 KB
03/26/2025 03:47:47 AM
rw-r--r--
📁
genai
-
03/26/2025 04:20:06 AM
rwxr-xr-x
📄
generated_article.php
11.86 KB
03/26/2025 03:47:47 AM
rw-r--r--
📄
get_recent_items.php
1.37 KB
03/26/2025 03:47:47 AM
rw-r--r--
📄
handle_channel.php
856 bytes
03/26/2025 03:47:47 AM
rw-r--r--
📁
hindiConverter
-
03/26/2025 04:15:50 AM
rwxr-xr-x
📄
homePin.php
68.38 KB
03/26/2025 03:47:47 AM
rw-r--r--
📁
hps
-
03/26/2025 03:48:05 AM
rwxr-xr-x
📄
impmy_collection.php
124.17 KB
03/26/2025 03:47:47 AM
rw-r--r--
📁
inc
-
03/26/2025 04:15:50 AM
rwxr-xr-x
📄
index.php
30.55 KB
03/26/2025 03:47:48 AM
rw-r--r--
📄
index1.php
61.34 KB
03/26/2025 03:47:50 AM
rw-r--r--
📄
influencer.php
11.72 KB
03/26/2025 03:47:54 AM
rw-r--r--
📁
interface
-
03/26/2025 03:48:05 AM
rwxr-xr-x
📁
kannada
-
03/26/2025 04:20:06 AM
rwxr-xr-x
📄
knobly_logo.png
9.45 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
landing_page.php
17.27 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
landing_signin.php
5.11 KB
03/26/2025 03:47:54 AM
rw-r--r--
📁
leadpage
-
03/26/2025 04:15:53 AM
rwxr-xr-x
📄
link.php
5.63 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
logInCheck.php
4.41 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
loggedInCheck.php
1.15 KB
03/26/2025 03:47:54 AM
rw-r--r--
📄
logo (1).svg
814 bytes
03/26/2025 03:47:55 AM
rw-r--r--
📄
logout.php
503 bytes
03/26/2025 03:47:55 AM
rw-r--r--
📄
magazine.html
4.46 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
magazine.php
23.57 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
more.php
9.21 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
my_collection.php
153.03 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
my_settings.php
17.44 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
navbar.php
3.36 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
new-page.php
10.46 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
newEditor.php
17.04 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
newsletter.php
24.31 KB
03/26/2025 03:47:55 AM
rw-r--r--
📁
pageLanding
-
03/26/2025 04:20:07 AM
rwxr-xr-x
📁
pages
-
03/26/2025 04:15:53 AM
rwxr-xr-x
📄
payment.php
29.86 KB
03/26/2025 03:47:55 AM
rw-r--r--
📁
pdf
-
03/26/2025 03:48:06 AM
rwxr-xr-x
📄
pdftk_server-2.02-win-setup.exe
2.91 MB
03/26/2025 03:47:56 AM
rw-r--r--
📄
post-details.php
37.75 KB
03/26/2025 03:47:55 AM
rw-r--r--
📄
premium.php
21.79 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
privacy.html
12.1 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
process
-
03/26/2025 03:48:11 AM
rwxr-xr-x
📄
process-plan.php
1.44 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
process.php
1.52 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
process_data.php
5.02 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
profile.php
37.8 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
profile_pic_upload.php
4.83 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
profile_test.php
19.78 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
reels
-
03/26/2025 04:20:08 AM
rwxr-xr-x
📄
refund.html
9.04 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
replyPost.php
3.93 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
report
-
03/26/2025 03:48:11 AM
rwxr-xr-x
📄
request_article.php
22.76 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
reset.html
4.7 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
save_profile.php
2.78 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
saved.php
34.28 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
saved_posts.php
49.25 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
search_bar.php
16.95 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
sendy
-
03/26/2025 04:21:20 AM
rwxr-xr-x
📄
settings.php
81.93 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
sharemarket.php
3.88 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
showcase.php
10.34 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
signInProcess.php
13.83 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
signInProcess_backup.php
11.18 KB
03/26/2025 03:47:56 AM
rw-r--r--
📁
social_media
-
03/26/2025 04:16:12 AM
rwxr-xr-x
📄
start.html
3.99 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
store_articles.php
1.04 KB
03/26/2025 03:47:56 AM
rw-r--r--
📄
stream.php
62.31 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
streamPush.php
29.82 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
streamb.php
40.75 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
streambb.php
47.34 KB
03/26/2025 03:47:57 AM
rw-r--r--
📁
texttovoice
-
03/26/2025 03:48:13 AM
rwxr-xr-x
📁
thumbsUp
-
03/26/2025 03:48:13 AM
rwxr-xr-x
📄
toggle_channel.php
2.28 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
udupi_sign_up.php
34.5 KB
03/26/2025 03:47:57 AM
rw-r--r--
📁
uploads
-
03/26/2025 04:06:46 AM
rwxr-xr-x
📄
usage.html
37.76 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
userActivity.php
9.79 KB
03/26/2025 03:47:57 AM
rw-r--r--
📁
vendor
-
03/26/2025 04:20:23 AM
rwxr-xr-x
📄
verify.php
744 bytes
03/26/2025 03:47:57 AM
rw-r--r--
📄
view.php
13.36 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
view_newsletter.php
1.58 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
xpress_landing_page.php
78.63 KB
03/26/2025 03:47:57 AM
rw-r--r--
📄
xpress_landingpage.html
11.15 KB
03/26/2025 03:47:57 AM
rw-r--r--
Editing: streamPush.php
Close
<? require_once('assets/php/db_config.php'); require_once('assets/php/function.php'); if (isset($_GET['id'])) { $postId = $_GET['id']; } else { die("Invalid post ID."); } function show_nav_bar() { global $creamdb; ?> <nav class="navbar navbar-expand-lg"> <div class="container d-flex "> <!-- <a class="navbar-brand" href="/stream.php"> <img src="/assets/img/logo.black.png" height="60px" alt="Logo"> </a> --> <a class="navbar-brand" href="https://knoblycream.com"> <img src="/assets/img/logo.black.png" srcset="/assets/img/logo.black.png 1200w, /assets/img/logo.black-large.png 1200w" sizes="(max-width: 600px), (min-width: 601px)" alt="Logo" class="navbar-logo"> </a> <div class="end-navbar"> <div class="nav-item dropdown " style="display:flex;"> <!-- <button id="toggle-mode" class="toggle-button"> <span id="theme-icon">☀</span> </button> --> <a class="nav-link dropdown-toggle" href="https://knoblycream.com" id="settingsDropdown" role="button" aria-expanded="false"> <span id="settings-text"> <div class="avatar"> <img src="data/profilePic/default.png" alt="Default Image" onerror="this.onerror=null; this.src='/data/profilePic/default.png';"> </div> </span> </a> </div> </div> </div> </nav> <? } function main_post_card($id, $userId, $chat, $postedOn, $editedOn, $media, $metaData) { global $readerdb, $creamdb; ?> <div class="mid_container all_post_container"> <div class="post" style="display:flex" data-id="<?= $id ?>"> <div class="con" style="justify-content: space-between; align-items: center;"> <div class="post-header d-flex align-items-center"> <div class="avatar me-2"> <a href="profile.php?userId=<?= $userId ?>"> <img src="<?= viewProfilePic($creamdb, $userId) ?>" alt="Default Image" onerror="this.onerror=null; this.src='assets/img/default.png';"> </a> </div> </div> </div> <div class="postWithMainContainer" style="width:82%"> <div class="usernameWithfollow"> <div class="namewithfollow" style="display: flex; justify-content: space-between;"> <div class="username-date mb-2"> <a href="profile.php?userId=<?= $userId ?>"> <h5 class="mb-0" style="line-height: 14px;"><?= showUserName($creamdb, $userId); ?></h5> </a> <span class="text-muted" style="font-size: 12px;"><?= formatToIST($postedOn); ?></span> <? if ($editedOn) { ?> <small class="text-muted">(Edited)</small> <? } ?> </div> </div> </div> <div class="post-content" tabindex="0" data-thumbnail="false"> <p id="fullContent_<?= $id ?>" style="margin:0px;"><?= convertLink(htmlspecialchars($chat)); ?></p> <?php if ($media) { // Split the comma-separated media string into an array $mediaArray = explode(',', $media); $mediaCount = count($mediaArray); if ($mediaCount < 2) { ?> <div class="stream-media"> <?php if (strpos($media, 'mp4') !== false || strpos($media, 'mov') !== false) { ?> <video controls onclick="openModal('video', '<?= htmlspecialchars($media); ?>',0)"> <source src="<?= htmlspecialchars($media); ?>" type="video/<?= strpos($media, 'mp4') !== false ? 'mp4' : 'quicktime'; ?>"> Your browser does not support the video tag. </video> <?php } else { ?> <img src="<?= htmlspecialchars($media); ?>" alt="Post media" onclick="openModal('image', '<?= htmlspecialchars($media); ?>',0)" style="cursor: pointer;"> <?php } ?> </div> <?php } else if ($mediaCount > 1) { ?> <div class="media-container"> <?php // Display the first 3 items normally $displayedMedia = 0; foreach ($mediaArray as $mediaItem) { $mediaItem = trim($mediaItem); if ($displayedMedia < 4) { ?> <div class="stream-media"> <?php if (strpos($mediaItem, 'mp4') !== false || strpos($mediaItem, 'mov') !== false) { ?> <video controls onclick="openModal('video', '<?= htmlspecialchars($media); ?>',<?= $displayedMedia ?>)"> <source src="<?= htmlspecialchars($mediaItem); ?>" type="video/<?= strpos($mediaItem, 'mp4') !== false ? 'mp4' : 'quicktime'; ?>"> Your browser does not support the video tag. </video> <?php } else { ?> <img src="<?= htmlspecialchars($mediaItem); ?>" alt="Post media" onclick="openModal('image', '<?= htmlspecialchars($media); ?>',<?= $displayedMedia ?>)" style="cursor: pointer;"> <?php } ?> </div> <?php $displayedMedia++; } } // If there are more than 3 items, show a "more" indicator in the fourth block if (($mediaCount > 4) && ($mediaCount != 4)) { ?> <div class="stream-media more"> <span class="more-count">+<?= $mediaCount - 3; ?> more</span> <!-- Optionally, you can make this span clickable to show remaining images/videos in a modal --> </div> <?php } ?> </div> <? } ?> <? } ?> </div> <? if (isset($metaData)) { $metaData = json_decode($metaData, true); if (isset($metaData['youtubeLink']) && ($metaData['youtubeLink'] != '')) { ?> <div style="width: 100%;" class="ytprew"><?= $metaData['youtubeLink']; ?></div> <? } else { ?> <div class="linkDisplay" style="width: 100%; height:auto;"> <div class="hyperlink mb-1" style="padding: 5px; background-color:#dedede; border-radius: 5px;"> <img style="width: 100%;" src="<?= $metaData['metaImage'] ?>" alt="Card image"> <div style="padding: 0px; flex-grow: 1;"> <? if (isset($metaData['metaTitle']) && $metaData['metaTitle'] != '') { ?> <b> <h3 id="linkHeading" style="font-size: 16px; margin: 0 0 5px; color: #333;"><?= $metaData['metaTitle'] ?></h3> </b> <? } if (isset($metaData['metaDesc']) && $metaData['metaDesc'] != '') { ?> <p id="linkDesc" style="margin: 0 0 10px; font-size: 14px; color: #555; line-height: 1.4;"> <?= $metaData['metaDesc'] ?> </p> <? } if (isset($metaData['metaUrl']) && $metaData['metaUrl'] != '') { ?> <a id="linkUrl" href="<?= $metaData['metaUrl'] ?>" style="font-size: 13px; color: #007bff; text-decoration: none;"> <?= (isset($metaData['metaDomain']) && $metaData['metaDomain'] != '') ? $metaData['metaDomain'] : $metaData['metaUrl'] ?> </a> <? } ?> </div> </div> </div> <? } } ?> <div class="actions d-flex mt-2" style="justify-content: space-between;"> <button class="btn reader-button viewButton flex" data-id='<?= $id ?>'> <i class="fa-solid fa-chart-column" style="padding-right: 4px; padding-top: 2px;"></i> <div class="viewCount" data-id="<?= $id ?>"> <?= getViewCount($readerdb, $id) ?> </div> </button> <!-- Like Button --> <button class="btn reader-button likeButton flex" data-id='<?= $id ?>'> <i class="fa-regular fa-thumbs-up" style="padding-right: 4px; padding-top: 2px;"></i> <div class="likeCount likedUsers" data-id="<?= $id ?>"> <?= getLikeCount($readerdb, $id) ?> </div> </button> <button class="btn reader-button flex btn-link"><i class="fa-regular fa-comments" style="padding-right: 4px; padding-top: 2px;"></i> <div class="replyCount"> <?= getReplyCount($readerdb, $id) ?> </div> </button> <button class="btn reader-button saveButton flex" data-id='<?= $id ?>'> <i class="fa-regular fa-bookmark" style="padding-right: 4px; padding-top: 2px;"></i> </button> </div> </div> </div> </div> <? } function show_main_post($postId) { global $readerdb; $sql = "SELECT * FROM reader_stream WHERE id= $postId"; $result = $readerdb->query($sql); if ($result->num_rows > 0) { // Fetch the first (and only) row $row = $result->fetch_assoc(); // Call the captureStream function with the data main_post_card($row['id'], $row['userId'], $row['chat'], $row['postedOn'], $row['editedOn'], $row['mediaPath'], $row['metadata']); } else { echo "No results found"; } } function show_reply_content($postId) { global $readerdb, $creamdb; // SQL query to get posts ordered by the most recent $sql = "SELECT * FROM reader_stream WHERE referenceId = $postId and deleteFlag=0"; $result = $readerdb->query($sql); if ($result->num_rows > 0) { ?> <div class="mid_container all_post_container"> <div class="header d-flex justify-content-between align-items-center "> <h1 class="fs-5 fw-bold text-white">Replies</h1> </div> <? while ($row = $result->fetch_assoc()) { ?> <div class="post" style="gap: 10px; position: relative;"> <div class="post-header d-flex align-items-center" style="justify-content: space-between;"> <div class="d-flex"> <div class="avatar me-3"> <img src="<?= viewProfilePic($creamdb, $row['userId']) ?>" alt="Default Image" onerror="this.onerror=null; this.src='assets/img/arvind.png';"> </div> <div class="username-date"> <!-- Assuming showUserName fetches the username from the database using the userId --> <h5 class="mb-0"><?= showUserName($creamdb, $row['userId']); ?></h5> <span class="text-muted"><?= formatToIST($row['postedOn']); ?></span> <?php if ($row['editedOn']) { ?> <small class="text-muted">(Edited)</small> <?php } ?> </div> </div> </div> <div class="post-content mt-3"> <p><?= htmlspecialchars($row['chat']); ?></p> <?php if ($row['mediaPath']): ?> <?php if (strpos($row['mediaPath'], 'mp4') !== false): ?> <video controls> <source src="<?= htmlspecialchars($row['mediaPath']); ?>" type="video/mp4"> Your browser does not support the video tag. </video> <?php else: ?> <img src="<?= htmlspecialchars($row['mediaPath']); ?>" alt="Post media"> <?php endif; ?> <?php endif; ?> </div> <div class="actions d-flex justify-content-end mt-2"> <!-- Like Button (Needs AJAX to dynamically update like count) --> <button class="btn reader-button likeButton flex" data-id='<?= $row['id'] ?>'> <i class="fa-regular fa-thumbs-up" style="padding-right: 4px; padding-top: 2px;"></i> <div class="likeCount likedUsers" data-id="<?= $row['id'] ?>"> <?= getLikeCount($readerdb, $row['id']) ?> </div> </button> <button class="btn reader-button flex btn-link"><i class="fa-regular fa-comments" style="padding-right: 4px; padding-top: 2px;"></i> <div class="replyCount"> <?= getReplyCount($readerdb, $row['id']) ?> </div> </button> </div> </div> <? } ?> </div> <? } else { ?> Be the first one to reply <? } } function fetch_title($postId) { global $readerdb; $sql = "SELECT chat FROM reader_stream WHERE id= $postId"; $result = $readerdb->query($sql); if ($result->num_rows > 0) { // Fetch the first (and only) row $row = $result->fetch_assoc(); if ($row['chat'] != null) { return substr($row['chat'], 0, 50) . "..."; } else { return "Knobly Cream"; } } else { return "Knobly Cream"; } } function fetch_meta_image($postId) { global $readerdb; $sql = "SELECT mediaPath FROM reader_stream WHERE id= $postId"; $result = $readerdb->query($sql); if ($result->num_rows > 0) { // Fetch the first (and only) row $row = $result->fetch_assoc(); if ($row['mediaPath'] != null) { $image = explode(",", $row['mediaPath']); if (count($image) >= 1) { return "https://knoblycream.com/" . $image[0]; } else { return "https://knoblycream.com/assets/img/logo.black.png"; } } else { return "https://knoblycream.com/assets/img/logo.black.png"; } } else { return "https://knoblycream.com/assets/img/logo.black.png"; } } $collectionLink = "https://knoblycream.com/streamPush.php?id=" . $postId; $collectionTitle = fetch_title($postId); $serverName = $_SERVER['SERVER_NAME']; $collectionImgCover = fetch_meta_image($postId); $newsLogo = fetch_meta_image($postId); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?= $collectionTitle ?></title> <!-- Facebook Meta Tags --> <meta property="og:url" content="<?= $collectionLink ?>" /> <meta property="og:type" content="website" /> <meta property="og:title" content="<?= $collectionTitle ?>" /> <meta property="og:description" content="<?= $collectionTitle ?>" /> <? if ($collectionImgCover <> '') { ?> <meta property="og:image" content="<?= $collectionImgCover ?>" /> <meta property="og:image:secure-url" itemprop="image" content="<?= $collectionImgCover ?>" /> <? } else { ?> <meta property="og:image" content="<?= $newsLogo ?>" /> <meta property="og:image:secure-url" itemprop="image" content="https://<?= $serverName ?>/data/logos/<?= $newsLogo ?>" /> <? } ?> <!-- Twitter Meta Tags --> <meta property="twitter:url" content="<?= $collectionLink ?>" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:title" content="<?= $companyName ?>" /> <meta name="twitter:description" content="" /> <? if ($collectionImgCover <> '') { ?> <meta name="twitter:image" content="<?= $collectionImgCover ?>" /> <? } else { ?> <meta name="twitter:image" content="<?= $newsLogo ?>" /> <? } ?> <!-- Add your stylesheets here, e.g., Bootstrap CSS --> <link href="assets/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="assets/css/all.min.css"> <link href="assets/css/bootstrap-icons.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://knoblycream.com/assets/css/styles.css"> <link rel="stylesheet" href="https://knoblycream.com/assets/css/stream.css"> <!-- Bootstrap JS and Bootstrap Icons --> <script src="assets/js/bootstrap.bundle.min.js"></script> <link href="assets/css/bootstrap-icons.min.css" rel="stylesheet"> <script src="assets/js/jquery-3.6.0.min.js"></script> <script src="https://knoblycream.com/assets/js/stream.js"></script> <!-- open model script --> <script> function openModal(type, path, count) { let str = path; let mediaPaths = str.split(","); event.stopPropagation(); const modalContent = $('#modalContent'); modalContent.empty(); // Clear existing content if (type === 'video') { const video = $('<video></video>').attr('controls', true).css({ 'max-width': '100%', 'max-height': '100%' }).attr('src', mediaPaths[count]); modalContent.append(video); } else if (type === 'image') { const imgContainer = $('<div></div>').css({ 'position': 'relative', 'overflow': 'auto', // Allow scrolling when zoomed in 'width': '100%', 'height': '100%', 'display': 'flex', 'justify-content': 'center', // Center the image horizontally 'align-items': 'center' // Center the image vertically }); const img = $('<img></img>').attr('src', mediaPaths[count]).css({ 'max-width': '100%', 'max-height': '100%', 'cursor': 'zoom-in', // Cursor will indicate zooming 'transition': 'transform 0.3s ease' // Smooth transition for scaling }).attr('id', 'zoomableImage'); imgContainer.append(img); modalContent.append(imgContainer); } // Initialize modal const modal = new bootstrap.Modal($('#mediaModal')[0]); modal.show(); } </script> <!-- likedusers --> <script> $(document).ready(function() { $('#saveModalEditButton').on('click', function() { saveEditedContent(); }); $('.reader-button').on('click', function() { alert("Login to knoblycream.com to view amazing features!!"); window.location.href = 'https://knoblycream.com'; }) }); $(document).on('click', '.likedUsers', function() { const postId = $(this).data('id'); // Get post ID from the button's data attribute $.ajax({ url: 'fetch_liked_users.php', type: 'POST', data: { postId: postId }, success: function(response) { console.log(response); // Debugging: Log the response const users = JSON.parse(response); if (users.error) { alert(users.error); } else if (users.message) { $('#likedUsersList').html('<li class="list-group-item text-center">' + users.message + '</li>'); } else { const userList = users.map(user => `<li class="list-group-item">${user}</li>`).join(''); $('#likedUsersList').html(userList); } const likedUsersModal = new bootstrap.Modal(document.getElementById('likedUsersModal')); likedUsersModal.show(); }, error: function() { alert('Error fetching likes.'); } }); }); </script> <script> const userId = <?= $gUserId ?>; $(document).ready(function() { // Handle like button clicks $(document).on('click', '.likeButton', function(e) { }); }); function toggleLike(button, feedId, userId) { var thumbsUpIcon = $(button).find('i'); // The <i> tag with the class indicating the like status var likeCountElement = $(button).find('.likeCount'); // The div where the like count is displayed var isLiked = thumbsUpIcon.hasClass('fa-solid'); var requestType = isLiked ? 'unlike' : 'like'; $.ajax({ url: '/assets/php/handler.php', type: 'POST', contentType: 'application/json', data: JSON.stringify({ request: requestType, userId: userId, feedId: feedId }), success: function(response) { if (response.status === "success") { if (requestType === 'like') { thumbsUpIcon.removeClass('fa-regular').addClass('fa-solid'); } else { thumbsUpIcon.removeClass('fa-solid').addClass('fa-regular'); } var updatedLikeCount = response.likeCount === null ? '' : response.likeCount; likeCountElement.text(updatedLikeCount); } else { console.error("Error message:", response.message); } }, error: function(jqXHR, textStatus, errorThrown) { console.error("Error:", textStatus, errorThrown); } }); } </script> <style> .dropcardMenu { width: fit-content; right: 7px; } .editYourPost { padding-bottom: 20px; } .ytprew iframe { width: 100% !important; } .first_right_container { margin-bottom: 65px; } </style> <!-- multiple images --> <style> .modal-content{ background-color: #333; } /* Media container */ .media-container { display: grid; grid-template-columns: repeat(2, 1fr); /* Default 3 columns */ gap: 10px; width: 100%; } /* Stream media styling */ .stream-media { position: relative; } .stream-media img, .stream-media video { width: 100%; height: 100%; object-fit: cover; object-position: center; } /* Specific styles for more block */ .stream-media.more { display: flex; justify-content: center; align-items: center; background-color: #f0f0f0; border: 1px solid #ddd; color: #777; font-size: 16px; } .stream-media.more .more-count { font-weight: bold; } /* Custom grid layouts based on the number of items */ <?php if ($mediaCount == 2) { ?>.media-container { grid-template-columns: repeat(2, 1fr); /* 2 items in half-half layout */ } <?php } elseif ($mediaCount == 3) { ?>.media-container { grid-template-columns: 1fr 2fr; /* 1:2 ratio layout */ } <?php } elseif ($mediaCount == 4) { ?>.media-container { grid-template-columns: repeat(4, 1fr); /* 4 items in 1/4 layout */ } <?php } elseif ($mediaCount == 1) { ?>.media-container { grid-template-columns: 1fr; /* Single item takes full width */ } <?php } ?> </style> </head> <body> <? show_nav_bar() ?> <div class="container"> <div class="m-3 " style="justify-self: center;"> <? show_main_post($postId) ?> <? show_reply_content($postId) ?> <div class="mid_container" onclick='window.location.href="https://knoblycream.com"'> Login to give a reply </div> </div> <!-- Bootstrap Modal --> <div class="modal fade" id="likedUsersModal" tabindex="-1" aria-labelledby="likedUsersModalLabel" aria-hidden="true"> <div class="modal-dialog" style="width:fit-content"> <div class="modal-content" style="margin-left: 50px;"> <div class="modal-header"> <h5 class="modal-title" id="likedUsersModalLabel">People who liked this post</h5> </div> <div class="modal-body"> <ul id="likedUsersList" class="list-group"> <!-- Usernames will be dynamically inserted here --> </ul> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> </div> <!-- Edit Post Modal --> <div class="modal fade" id="editPostModal" tabindex="-1" aria-labelledby="editPostModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="editPostModalLabel">Edit Post</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <!-- Textarea for editing content --> <textarea id="modalContentTextarea" class="form-control" rows="5" style="overflow-y: auto; max-height: 200px;"></textarea> </div> <div class="modal-footer"> <!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> --> <button type="button" id="saveModalEditButton" class="btn btn-primary">Save changes</button> </div> </div> </div> </div> <!-- Media Modal --> <div id="mediaModal" class="modal fade" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <button style="background-color:#333; position:absolute; right:20px;" type="button" class="btn-close zoomButton" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body text-center" style="position: relative;"> <div id="modalContent" style="max-width: auto; max-height: auto; transition: transform 0.3s ease;"> </div> </div> </div> </div> </div> <? include 'assets/php/footer.php' ?> <? include 'assets/php/bottom_navbar.php' ?> <!-- Include Bootstrap JS --> <script src="assets/js/bootstrap.bundle.min.js"></script> </body> </html>