OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
new_ui
/
assets
/
php
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📁
PHPMailer
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
blockAccount.php
2.23 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
bottom_navbar.php
5.67 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
ch_config.php
9.37 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
ch_db_config.php
3.44 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
common.js
46.89 KB
05/16/2025 04:32:09 AM
rw-r--r--
📄
config.php
9.37 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
db_config.php
3.43 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
db_connect.php
293 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
db_gallery.php
294 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
delete_account.php
3.5 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
edit_post.php
2.23 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
event_scrollbar.php
4.63 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
footer.php
1.12 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
function.php
23.34 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
getEditContent.php
860 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
go_backbar.php
2.32 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
handler.php
3.51 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
indexFooter.php
1.05 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
mail.php
2.67 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
navbar.php
22.77 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
new_social_navbar.php
1.07 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
new_social_sidebar.php
5.59 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
original-function.php
30.55 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
process_data.php
3.87 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
readert_validate.logged.php
481 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
report_account.php
1.42 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
report_stream.php
2.08 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
savePost.php
2.38 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
sidebar.php
19.68 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
siginupProcess.php
5.24 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
simplepie
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
stream.php
62.49 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
stream_post_handler.php
3.68 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
validate.logged.php
1.31 KB
05/19/2025 10:07:13 AM
rw-r--r--
Editing: original-function.php
Close
<? function return_cream_subscription($userId) { global $creamdb; $sql = "SELECT plan, plan_type FROM cream_subscription WHERE userId = ? AND NOW() BETWEEN start_date AND end_date"; if ($stmt = $creamdb->prepare($sql)) { $stmt->bind_param("i", $userId); if ($stmt->execute()) { $result = $stmt->get_result(); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); return $row['plan']; } else { return "Free"; } } } } function show_head_tag($title, $styles, $scripts) { ?> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?= $title ?></title> <!-- Stylesheets (consolidated and updated versions) --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.1/aos.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> <link rel="stylesheet" href="assets/css/styles.css"> <link rel="stylesheet" href="assets/css/magnific-popup.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css"> <!-- Scripts (consolidated and correct order) --> <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-oPtiPLlX2OsQI6V1PYcwZcVv+5zUmfpfkKmG+MJof2A=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <script src="assets/js/magnific-popup.min.js"></script> <?= $styles ?> <?= $scripts ?> </head> <style> .ytprew iframe { width: 100% !important; } </style> <? } function viewProfilePic($db, $userId) { $sql = "SELECT profile_pic FROM user WHERE id = ?"; $link = ""; $path = "https://www.knoblycream.com/data/profilePic/"; if ($stmt = $db->prepare($sql)) { $stmt->bind_param("i", $userId); $stmt->execute(); $stmt->bind_result($link); if ($stmt->fetch()) { if ($link == null) { return $path . "default.png"; } return $path . $link; } else { return null; } $stmt->close(); } else { return "Error preparing statement: " . $db->error; } } function formatToIST($datetime) { // Create a DateTime object in UTC $date = new DateTime($datetime, new DateTimeZone('UTC')); // Set the timezone to IST (Asia/Kolkata) $date->setTimezone(new DateTimeZone('Asia/Kolkata')); // Get the day of the month $day = $date->format('d'); // Add ordinal suffix to the day $suffix = ['st', 'nd', 'rd', 'th']; if ($day % 10 == 1 && $day != 11) { $day .= $suffix[0]; } elseif ($day % 10 == 2 && $day != 12) { $day .= $suffix[1]; } elseif ($day % 10 == 3 && $day != 13) { $day .= $suffix[2]; } else { $day .= $suffix[3]; } // Format the date in the desired format with the suffix, month abbreviation, and time $formattedDate = $date->format('jS M, Y') . ' ' . $date->format('g:ia'); // 1:05pm format return $formattedDate; } function checkUserSave($conn, $postId, $userId) { $saveCheck = 0; $sql = "SELECT COUNT(*) AS saveCheck FROM stream_saved WHERE post_id = ? AND user_id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("ii", $postId, $userId); $stmt->execute(); $stmt->bind_result($saveCheck); $stmt->fetch(); $stmt->close(); if ($saveCheck === 0) { return "fa-regular fa-bookmark"; } else { return "fa-solid fa-bookmark"; } } function checkUserLike($conn, $postId, $userId) { $likeCount = 0; $sql = "SELECT COUNT(*) AS likeCount FROM reader_stream_like WHERE streamId = ? AND userId = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("ii", $postId, $userId); $stmt->execute(); $stmt->bind_result($likeCount); $stmt->fetch(); $stmt->close(); if ($likeCount === 0) { return "fa-regular fa-thumbs-up"; } else { return "fa-solid fa-thumbs-up"; } } function getReplyCount($conn, $postId) { $replyCount = 0; $sql = "SELECT COUNT(*) AS replyCount FROM reader_stream WHERE referenceId = ? and deleteFlag=0"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $postId); $stmt->execute(); $stmt->bind_result($replyCount); $stmt->fetch(); $stmt->close(); if ($replyCount === 0) { return null; } else { return $replyCount; } } function getLikeCount($conn, $postId) { $likeCount = 0; $sql = "SELECT COUNT(*) AS likeCount FROM reader_stream_like WHERE streamId = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $postId); $stmt->execute(); $stmt->bind_result($likeCount); $stmt->fetch(); $stmt->close(); if ($likeCount === 0) { return null; } else { return $likeCount; } } function getViewCount($conn, $postId) { $viewCount = 0; $sql = "SELECT COUNT(*) AS viewCount FROM stream_analytics WHERE streamId = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $postId); $stmt->execute(); $stmt->bind_result($viewCount); $stmt->fetch(); $stmt->close(); if ($viewCount === 0) { return null; } else { return ($viewCount * 10) + rand(0, 9); } } function checkFollow($conn, $userId, $accId) { $followCount = 0; $sql = "SELECT COUNT(*) AS follow FROM reader_stream_follow WHERE follower_id = ? AND following_id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("ii", $userId, $accId); $stmt->execute(); $stmt->bind_result($followCount); $stmt->fetch(); $stmt->close(); if ($followCount === 0) { return false; } else { return true; } } function showUserName($db, $userId) { $sql = "SELECT full_name FROM user WHERE id = ?"; $fullName = ""; if ($stmt = $db->prepare($sql)) { $stmt->bind_param("i", $userId); $stmt->execute(); $stmt->bind_result($fullName); if ($stmt->fetch()) { return $fullName; } else { return null; } $stmt->close(); } else { return "Error preparing statement: " . $db->error; } } function showProfileBio($db, $userId) { $sql = "SELECT bio FROM user WHERE id = ?"; $bio = ""; if ($stmt = $db->prepare($sql)) { $stmt->bind_param("i", $userId); $stmt->execute(); $stmt->bind_result($bio); if ($stmt->fetch()) { return $bio; } else { return null; } $stmt->close(); } else { return "Error preparing statement: " . $db->error; } } function fetch_publisher_title($conn, $rss_id) { $stmt = $conn->prepare("SELECT rss_publisher FROM rss_feeds_url WHERE rss_id = ?"); $stmt->bind_param("i", $rss_id); $stmt->execute(); $result = $stmt->get_result(); $row = $result->fetch_assoc(); return $row['rss_publisher']; } function fetch_featured_topic_name($conn, $ft_id) { $stmt = $conn->prepare("SELECT category FROM reader_category WHERE id = ?"); $stmt->bind_param("i", $ft_id); $stmt->execute(); $result = $stmt->get_result(); $row = $result->fetch_assoc(); return $row['category']; } function convertLink($data) { // Regular expression pattern to match URLs (HTTP, HTTPS, FTP) // $url_pattern = '/(?:https?|ftp):\/\/(?:[a-zA-Z0-9-]+\.)?(?:[a-zA-Z0-9-]+\.[a-zA-Z]{2,})(?:\/[^\s]*)?/'; $url_pattern = '/(?:https?|ftp):\/\/(?:[a-zA-Z0-9-]+\.)?(?:[a-zA-Z0-9-]+\.[a-zA-Z]{2,})(?:\/[^\s\)]*)?/'; // Callback function to replace URLs with <a> tags $text_with_links = preg_replace_callback($url_pattern, function ($matches) { // Get the matched URL $url = $matches[0]; // Return the <a> tag with the URL as both the href and the link text return "<a href=\"$url\" target=\"_blank\" onclick=\"event.stopPropagation();\" style=\"color: #007bff; text-decoration: underline;\">$url</a>"; }, $data); // Output the modified string with links return $text_with_links; } function generate_stream_card($id, $userId, $chat, $postedOn, $editedOn, $media, $metaData) { global $gUserId, $conn, $db; $maxLength = 320; $isTruncated = isset($chat) ? (strlen($chat) > $maxLength) : false; // $isTruncated = mb_strlen($chat) > $maxLength; $truncatedContent = $isTruncated ? substr($chat, 0, $maxLength) . '...' : $chat; ?> <style> .channels_list { min-width: 270px; top: 44px; padding: 10px 5px; z-index: 2; right: 30%; position: absolute; border-radius: 5px; } body.dark-mode .channels_list { color: rgb(0, 0, 0); background-color: white; } .channels_list button { background-color: #FFFFED; } body.light-mode .channels_list { color: #000; background-color: #fafafa; } </style> <script> function enhancePostContent(id) { const contentElement = document.getElementById("postContent_" + id); if (!contentElement) return; let text = contentElement.innerHTML; const platformLinks = { facebook: "https://facebook.com/", instagram: "https://instagram.com/", twitter: "https://twitter.com/", youtube: "https://youtube.com/", github: "https://github.com/" }; const platformAliases = { facebook: ["fb", "facebook", "facebk"], instagram: ["in", "insta", "instagram"], twitter: ["x", "twitter"], youtube: ["yt", "youtube", "youTube"], github: ["gh", "github", "git"] }; const aliasToPlatform = {}; for (const [platform, aliases] of Object.entries(platformAliases)) { aliases.forEach(alias => { aliasToPlatform[alias.toLowerCase()] = platform; }); } text = text.replace(/@([A-Za-z0-9_.\-'\s]+)\s+in\s+(\w+)/gi, (match, rawUsername, platformAlias) => { const platformKey = aliasToPlatform[platformAlias.toLowerCase()]; if (!platformKey || !platformLinks[platformKey]) return match; const cleanUsername = rawUsername.trim(); const encodedUsername = encodeURIComponent(cleanUsername.replace(/\s+/g, '')); const url = platformLinks[platformKey] + encodedUsername; return `<a href="${url}" target="_blank">@${cleanUsername}</a> in ${platformAlias}`; }); contentElement.innerHTML = text; } // Call it on initial load enhancePostContent(<?= $id ?>); </script> <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($db, $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($db, $userId); ?></h5> </a> <span class="text-muted" style="font-size: 12px;"><?= formatToIST($postedOn); ?></span> <? if ($editedOn) { ?> <small class="text-muted">(Edited)</small> <? } ?> </div> <div> <? if ($gUserId != $userId) { ?> <button class="followButton" onclick="" data-id="<?= $userId ?>" style="margin-right : 15px"> <?= checkFollow($conn, $gUserId, $userId) ? 'Following' : 'Follow' ?> </button> <? } ?> </div> </div> </div> <!-- <div class="post-content" onclick="window.location.href='post-details.php?id=<?= $id ?>'" tabindex="0" data-thumbnail="false"> --> <div class="post-content" tabindex="0" data-thumbnail="false"> <!-- Display truncated content by default --> <a href="post-details.php?id=<?= $id ?>" style="text-decoration: none;"> <? // Check if the content does not have a link if ($truncatedContent != null && !preg_match('/(?:https?|ftp):\/\/(?:[a-zA-Z0-9-]+\.)?(?:[a-zA-Z0-9-]+\.[a-zA-Z]{2,})(?:\/[^\s\)]*)?/', $truncatedContent)) { ?> <p id="postContent_<?= $id ?>" style="margin: 0px;"> <?= convertLink(htmlspecialchars($truncatedContent)); ?> </p> <? } ?> </a> <!-- Full content hidden initially --> <?php if ($isTruncated) { ?> <a href="post-details.php?id=<?= $id ?>" style="text-decoration: none;"> <p id="fullContent_<?= $id ?>" style="display: none; margin:0px;"><?= convertLink(htmlspecialchars($chat)); ?></p> </a> <div> <button class="btn btn-link readMoreBtn" data-id="<?= $id ?>" onclick="toggleReadMore(<?= $id ?>)">Read More</button> </div> <?php } ?> <!-- Image/Video Display Section --> <?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> <?php } ?> <?php } ?> </div> <? if (isset($metaData)) { $metaData = json_decode($metaData, true); if (isset($metaData['youtubeLink']) && ($metaData['youtubeLink'] != '')) { ?> <div class="ytprew"><?= $metaData['youtubeLink']; ?></div> <? } else { ?> <div class="hyperlink mb-1"> <?php if (!empty($metaData['metaImage'])) { ?> <img src="<?= htmlspecialchars($metaData['metaImage'], ENT_QUOTES, 'UTF-8') ?>" alt="Card image"> <?php } ?> <div style="padding: 0px; flex-grow: 1;"> <?php if (isset($metaData['metaTitle']) && $metaData['metaTitle'] != "No Title Found") { ?> <h3 id="linkHeading" style="font-size: 16px; margin: 0 0 5px;"> <b><?= htmlspecialchars($metaData['metaTitle'], ENT_QUOTES, 'UTF-8') ?></b> </h3> <?php } if (isset($metaData['metaDesc']) && ($metaData['metaDesc']) != "No Description Found") { ?> <p id="linkDesc" style="margin: 0 0 10px; font-size: 14px; line-height: 1.4;"> <?= htmlspecialchars($metaData['metaDesc'], ENT_QUOTES, 'UTF-8') ?> </p> <? } if (!empty($metaData['metaUrl'])) { ?> <a id="linkUrl" href="<?= htmlspecialchars($metaData['metaUrl'], ENT_QUOTES, 'UTF-8') ?>" style="font-size: 13px; color: #007bff; text-decoration: none;"> <?= !empty($metaData['metaDomain']) ? htmlspecialchars($metaData['metaDomain'], ENT_QUOTES, 'UTF-8') : htmlspecialchars($metaData['metaUrl'], ENT_QUOTES, 'UTF-8') ?> </a> <?php } ?> </div> </div> <? } } ?> <div class="actions d-flex mt-2" style="justify-content: space-between;"> <button class="btn reader-button viewButton flex" style="cursor: default;" data-id='<?= $id ?>'> <i class="fa-solid fa-chart-column" style="padding-right: 4px; padding-top: 4px;"></i> <div class="viewCount" data-id="<?= $id ?>"> <?= getViewCount($conn, $id) ?> </div> </button> <!-- Like Button --> <button class="btn reader-button likeButton flex" data-id='<?= $id ?>'> <i class="<?= checkUserLike($conn, $id, $gUserId) ?>" style="padding-right: 9px; padding-top: 4px;"></i> <div class="likeCount likedUsers" data-id="<?= $id ?>"> <?= getLikeCount($conn, $id) ?> </div> </button> <!-- Comment Button --> <a style="position: relative;" href="post-details.php?id=<?= $id ?>"> <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($conn, $id) ?> </div> </button> </a> <button class="btn reader-button saveButton flex" data-id='<?= $id ?>'> <i class="<?= checkUserSave($conn, $id, $gUserId) ?>" style="padding-right: 4px; padding-top: 2px;"></i> </button> <button class="btn p-1 reader-button copyButton shareNow" data-id='<?= $id ?>'> <i class="fa-solid fa-arrow-up-from-bracket"></i> </button> <!-- <div id="channelList_<?= $id ?>"></div> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16" onclick="fetchChannelData(<?= $id ?>)"> <path fill="currentColor" d="M2 2.25q-.19 0-.37.04A2 2 0 0 1 3.5 1h5a2 2 0 0 1 2 2v2q-.513 0-1 .09V3a1 1 0 0 0-1-1h-5a1 1 0 0 0-.798.397A1.7 1.7 0 0 0 2 2.25M5.207 9H3.5a1 1 0 0 1-1-1V5.678a1.75 1.75 0 0 1-1 0V8a2 2 0 0 0 2 2h1.522a5.5 5.5 0 0 1 .185-1M4 4.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5M4.5 6a.5.5 0 0 0 0 1H6a.5.5 0 0 0 0-1zM2.75 4a.75.75 0 1 1-1.5 0a.75.75 0 0 1 1.5 0M15 10.5a4.5 4.5 0 1 1-9 0a4.5 4.5 0 0 1 9 0m-4-2a.5.5 0 0 0-1 0V10H8.5a.5.5 0 0 0 0 1H10v1.5a.5.5 0 0 0 1 0V11h1.5a.5.5 0 0 0 0-1H11z" /> </svg> --> <div class="dropdown"> <div class="channel_svg" style="position: relative; cursor: pointer;"> <!-- <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16" onclick="fetchChannelData(<?= $id ?>)"> <path fill="currentColor" d="M2 2.25q-.19 0-.37.04A2 2 0 0 1 3.5 1h5a2 2 0 0 1 2 2v2q-.513 0-1 .09V3a1 1 0 0 0-1-1h-5a1 1 0 0 0-.798.397A1.7 1.7 0 0 0 2 2.25M5.207 9H3.5a1 1 0 0 1-1-1V5.678a1.75 1.75 0 0 1-1 0V8a2 2 0 0 0 2 2h1.522a5.5 5.5 0 0 1 .185-1M4 4.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5M4.5 6a.5.5 0 0 0 0 1H6a.5.5 0 0 0 0-1zM2.75 4a.75.75 0 1 1-1.5 0a.75.75 0 0 1 1.5 0M15 10.5a4.5 4.5 0 1 1-9 0a4.5 4.5 0 0 1 9 0m-4-2a.5.5 0 0 0-1 0V10H8.5a.5.5 0 0 0 0 1H10v1.5a.5.5 0 0 0 1 0V11h1.5a.5.5 0 0 0 0-1H11z" /> </svg> --> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" onclick="fetchChannelData(<?= $id ?>)"> <g fill="none" stroke="#605f5f" stroke-width="1"> <path d="M12.875 5C9.225 5 7.4 5 6.242 6.103a4 4 0 0 0-.139.139C5 7.4 5 9.225 5 12.875V17c0 .943 0 1.414.293 1.707S6.057 19 7 19h4.125c3.65 0 5.475 0 6.633-1.103a4 4 0 0 0 .139-.139C19 16.6 19 14.775 19 11.125" /> <path stroke-linecap="round" stroke-linejoin="round" d="M9 10h6m-6 4h3m7-6V2m-3 3h6" /> </g> </svg> <div style="display:none" class="channels_list" id="channelList_<?= $id ?>"></div> </div> </div> </div> </div> <div class="menu-container"> <div alt="menu" width="100%" height="100%" id="menu-icon" style="padding-left: 10px; padding-right: 5px;" <?= $id ?> onclick="toggleDropcardMenu(<?= $id ?>)">⋮</div> <!-- Dropcard Menu --> <div id="dropcardMenu_<?= $id ?>" class="dropcardMenu stremDropcard"> <? if ($gUserId == $userId) { ?> <div class="editYourPost streamPost" onclick='editPost(<?= $id ?>)'> <p style="width:75%; margin-bottom: 0;">Edit this Post</p> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" style="cursor: pointer;"> <path width="24" height="24" d="m5 16l-1 4l4-1L19.586 7.414a2 2 0 0 0 0-2.828l-.172-.172a2 2 0 0 0-2.828 0zM15 6l3 3m-5 11h8" /> </svg> </div> <div class="deleteYourPost streamPost" onclick="deletePost(<?= $id ?>)"> <p style="width:75%; margin-bottom: 0;">Delete this Post</p> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" style="cursor: pointer;"> <path width="24" height="24" d="M18 19a3 3 0 0 1-3 3H8a3 3 0 0 1-3-3V7H4V4h4.5l1-1h4l1 1H19v3h-1zM6 7v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2V7zm12-1V5h-4l-1-1h-3L9 5H5v1zM8 9h1v10H8zm6 0h1v10h-1z" /> </svg> </div> <? } else { ?> <div class="reportThisPost streamPost" data-id=<?= $id ?>> <p style="width:75%; margin-bottom: 0;">Report this Post</p> <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"> <path fill="currentColor" d="M10 18h8v2h-8zm0-5h12v2H10zm0 10h5v2h-5z" /> <path fill="currentColor" d="M25 5h-3V4a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v1H7a2 2 0 0 0-2 2v21a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M12 4h8v4h-8Zm13 24H7V7h3v3h12V7h3Z" /> </svg> </div> <div class="blockThisPost streamPost" data-userid=<?= $userId ?>> <p style="width:75%; margin-bottom: 0;">Block this Account</p> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <path fill="currentColor" d="M11.5 4a3.5 3.5 0 1 0 0 7a3.5 3.5 0 0 0 0-7M6 7.5a5.5 5.5 0 1 1 11 0a5.5 5.5 0 0 1-11 0m12 7a3.5 3.5 0 0 0-3.08 5.165l4.745-4.744A3.5 3.5 0 0 0 18 14.5m3.08 1.835l-4.745 4.744a3.5 3.5 0 0 0 4.745-4.745M12.5 18a5.5 5.5 0 1 1 11 0a5.5 5.5 0 0 1-11 0M8 16a4 4 0 0 0-4 4h7.05v2H2v-2a6 6 0 0 1 6-6h3v2z" /> </svg> </div> <? } ?> </div> </div> </div> </div> <? } function captureStream($id, $userId, $chat, $postedOn, $editedOn, $media, $metaData) { ob_start(); generate_stream_card($id, $userId, $chat, $postedOn, $editedOn, $media, $metaData); return ob_get_clean(); } function blockStatus($userId) { global $creamdb, $gUserId; $blockCount = false; $sql = "SELECT COUNT(*) FROM block_acc WHERE userId = ? AND blockedUserId = ?"; if ($stmt = $creamdb->prepare($sql)) { $stmt->bind_param("ii", $gUserId, $userId); $stmt->execute(); $stmt->bind_result($blockCount); $stmt->fetch(); $stmt->close(); return $blockCount > 0; } else { return false; } } function display_channel_names() { global $readerdb, $gUserId; // Query to fetch channels created by the user $sql = "SELECT name FROM channels WHERE created_by = ?"; $stmt = $readerdb->prepare($sql); if ($stmt) { $stmt->bind_param('i', $gUserId); if ($stmt->execute()) { $result = $stmt->get_result(); // Get the result set if ($result->num_rows > 0) { // Loop through the results and display channel names while ($row = $result->fetch_assoc()) { echo htmlspecialchars($row['name']) . "<br>"; } } else { echo "No channels found."; } } else { echo "Error executing query: " . $stmt->error; } $stmt->close(); } else { echo "Error preparing statement: " . $readerdb->error; } } ?>