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: profile.php
Close
<? include './assets/php/validate.logged.php'; include './assets/php/function.php'; include './inc/config.php'; include './assets/php/db_config.php'; include './assets/php/db_connect.php'; if (isset($_GET['userId'])) { $userId = $_GET['userId']; } else { $userId = $gUserId; } $blockStatus = blockStatus($userId); function buildCoverImgUrl($imgName) { return "data/covers/$imgName"; } function show_stream_content($userId) { global $conn, $db, $gUserId; // SQL query to get posts ordered by the most recent $sql = "SELECT * FROM reader_stream WHERE deleteFlag = 0 AND referenceId IS NULL AND userId = $userId ORDER BY postedOn DESC "; $result = $conn->query($sql); if ($result->num_rows > 0) { ?> <div class="tab-pane fade show active" id="posts" role="tabpanel" aria-labelledby="posts-tab"> <? while ($row = $result->fetch_assoc()) { $maxLength = 220; $content = $row['chat']; // $content = convertLink($row['chat']); $isTruncated = strlen($content) > $maxLength; $truncatedContent = $isTruncated ? substr($content, 0, $maxLength) . '...' : $content; ?> <div class="mid_container all_post_container"> <div class="post" style="display:flex"> <div class="con" style=" justify-content: space-between; align-items: center;"> <div class="post-header d-flex align-items-center"> <div class="avatar me-3"> <img src="<?= viewProfilePic($db, $row['userId']) ?>" alt="Default Image" onerror="this.onerror=null; this.src='assets/img/arvind.png';"> </div> </div> </div> <div class="postWithMainContainer" style="width: 80%;"> <div class="usernameWithfollow"> <div class="namewithfollow" style="display: flex; justify-content: space-between;"> <div class="username-date mb-2"> <!-- Assuming showUserName fetches the username from the database using the userId --> <h5 class="mb-0" style="line-height: 14px;"><?= showUserName($db, $row['userId']); ?></h5> <span class="text-muted" style="font-size: 12px;"><?= formatToIST($row['postedOn']); ?></span> <?php if ($row['editedOn']) { ?> <small class="text-muted">(Edited)</small> <?php } ?> </div> <div> <? if ($userId != $row['userId']) { ?> <button class="followButton" data-id="<?= $row['userId'] ?>"> <?= checkFollow($conn, $userId, $row['userId']) ? 'Following' : 'Follow' ?> </button> <? } ?> </div> </div> </div> <? if (isset($row['metadata'])) { $metaData = json_decode($row['metadata'], true); if (isset($metaData['youtubeLink']) && ($metaData['youtubeLink'] != '')) { ?> <div 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 src="<?= $metaData['metaImage'] ?>" alt="Card image"> <div style="padding: 0px; flex-grow: 1;"> <b> <h3 id="linkHeading" style="font-size: 16px; margin: 0 0 5px; color: #333;"><?= $metaData['metaTitle'] ?></h3> </b> <p id="linkDesc" style="margin: 0 0 10px; font-size: 14px; color: #555; line-height: 1.4;"> <?= $metaData['metaDesc'] ?> </p> <a id="linkUrl" href="<?= $metaData['metaUrl'] ?>" style="font-size: 13px; color: #007bff; text-decoration: none;"> <?= $metaData['metaDomain'] ?> </a> </div> </div> </div> <? } } ?> <a href="post-details.php?id=<?= $row['id'] ?>" style="text-decoration: none;"> <div class="post-content"> <!-- Display truncated content by default --> <p id="postContent_<?= $row['id'] ?>" style='margin:0px;'> <?= htmlspecialchars($truncatedContent); ?> </p> </div> </a> <? if ($isTruncated) { ?> <a href="post-details.php?id=<?= $row['id'] ?>" style="text-decoration: none;"> <p id="fullContent_<?= $row['id'] ?>" style="display: none; margin:0px;"><?= htmlspecialchars($content); ?></p> </a> <div> <button class="btn btn-link readMoreBtn" data-id="<?= $row['id'] ?>" onclick="toggleReadMore(<?= $row['id'] ?>)">Read More</button> </div> <? } ?> <? if ($row['mediaPath']) { ?> <? 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> <? } else { ?> <img src="<?= htmlspecialchars($row['mediaPath']); ?>" alt="Post media"> <? } } ?> </div> <? if ($gUserId == $row['userId']) { ?> <div class="menu-container"> <div alt="menu" width="100%" height="100%" id="menu-icon" <?= $row['id'] ?> onclick="toggleDropcardMenu(<?= $row['id'] ?>)">⋮</div> <!-- Dropcard Menu --> <div id="dropcardMenu_<?= $row['id'] ?>" class="dropcardMenu"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" onclick='editPost(<?= $row["id"] ?>, <?= json_encode($row["chat"]) ?>)' 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> <!-- <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 72 72"><path fill="#fff" d="M51.76 17H20.153v37.65c0 4.06 3.29 5.62 7.35 5.62H44.41c4.06 0 7.35-1.56 7.35-5.62zM31 16v-4h10v4"/><path fill="#9b9b9a" d="M51 37v20.621L48.3 60H33z"/><path fill="#fff" d="M17 16h38v4H17z"/><path fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M31 16v-4h10v4m10 9v31a4 4 0 0 1-4 4H25a4 4 0 0 1-4-4V25m-4-9h38v4H17zm24 12.25V55M31 28.25V55"/></svg> --> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" onclick="deletePost(<?= $row['id'] ?>)" 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> </div> <? } ?> </div> <div class="actions d-flex justify-content-end "> <!-- Like Button --> <button class="btn reader-button likeButton flex" data-id='<?= $row['id'] ?>'> <i class="<?= checkUserLike($conn, $row['id'], $userId) ?>" style="padding-right: 4px; padding-top: 2px;"></i> <div class="likeCount likedUsers" data-id="<?= $row['id'] ?>"> <?= getLikeCount($conn, $row['id']) ?> </div> </button> <!-- Comment Button --> <a style="position: relative;" href="post-details.php?id=<?= $row['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, $row['id']) ?> </div> </button> </a> </div> </div> <? } ?> </div> <? } } function buildViewUrl($title) { if ($title <> '') { $title = str_replace(' ', '-', $title); $title = str_replace('%', '', $title); $title = str_replace("'", "", $title); return $title; } else { return ''; } } function createArticleURL($title) { if ($title <> '') { $title = str_replace(' ', '-', $title); $title = str_replace('%', '', $title); $title = str_replace("'", "", $title); return $title; } else { return ''; } } function show_showcase($userId) { global $db; $sql = "SELECT * FROM user_landing WHERE user_id = $userId ORDER BY date_created DESC LIMIT 50"; $result = $db->query($sql); if ($result->num_rows > 0) { ?> <div class="tab-pane fade" id="showcase" role="tabpanel" aria-labelledby="showcase-tab"> <? while ($row = $result->fetch_assoc()) { $artsql = "SELECT * FROM user_collection WHERE id = $row[article_id] "; $artresult = $db->query($artsql); if ($artresult->num_rows > 0) { while ($artrow = $artresult->fetch_assoc()) { ?> <a href="<?= 'view/' . $artrow['id'] . '/' . createArticleURL($artrow['title']) ?>"> <div class="card my-3" data-bs-toggle="modal" data-bs-target="#newsModal" data-title="<?= htmlspecialchars($artrow['title']) ?>" data-image="<?= buildCoverImgUrl($artrow['cover_img']) ?>" data-description="<?= htmlspecialchars($artrow['description']) ?>" data-date="<?= $row['date_created'] ?>" data-url="<?= buildViewUrl($artrow['title']) ?>"> <img src="<?= buildCoverImgUrl($artrow['cover_img']) ?>" alt="<?= $artrow['title'] ?>"> <h4><?= $artrow['title'] ?></h4> <p><?= $row['date_created'] ?></p> </div> </a> <? } } } ?> </div> <? } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Profile Page with Modal</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/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="assets/css/styles.css"> <link rel="stylesheet" href="assets/css/stream.css"> <style> .readMoreBtn { color: #6d6e71 !important; background: none; border: none; padding: 0; cursor: pointer; color: blue !important; font-size: x-small !important; display: inline !important; } .readMoreBtn:hover { text-decoration: underline; } .hyperlink img { border-radius: 10px; /* margin-top: 10px; */ max-width: 100%; margin-bottom: 10px; } .linkDisplay .hyperlink img { object-fit: cover; border-radius: 5px; width: 30vw; } @media screen and (max-width:720px) { .linkDisplay .hyperlink img { object-fit: cover; border-radius: 5px; width: 100vw; } } .ytprew { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 20px auto; padding: 10px; /* border: 1px solid #ccc; */ border-radius: 8px; background-color: #f9f9f9; width: auto; /* Ensures the div doesn't stretch too wide */ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .ytprew iframe { width: 100%; max-width: 853px; /* Matches YouTube's default embed width */ height: 480px; border-radius: 8px; border: none; } .ytprew a { margin-top: 10px; color: #0073e6; text-decoration: none; font-weight: bold; } .ytprew a:hover { text-decoration: underline; color: #005bb5; } .ytprew p { margin: 10px 0 0; font-size: 14px; color: #555; text-align: center; } #ytPreview { display: none; } #content-section { display: flex; justify-content: center; width: 100%; } .tab-pane { width: 100%; } </style> <style> body { margin: 0; font-family: Arial, sans-serif; background-color: #121212; color: #ffffff; } .container { max-width: 800px; margin: 0 auto; } .navbar>.container, .navbar>.container-fluid, .navbar>.container-lg, .navbar>.container-md, .navbar>.container-sm, .navbar>.container-xl, .navbar>.container-xxl { display: flex; flex-wrap: inherit; align-items: center; justify-content: space-between !important; } .profile-section { display: flex; align-items: center; padding: 20px; border-bottom: 1px solid #333; } .profile-pic { width: 80px; height: 80px; border-radius: 50%; background-color: #444; overflow: hidden; display: flex; justify-content: center; align-items: center; font-size: 16px; margin-right: 20px; border: 2px solid #ffffff; } .profile-pic img { width: 100%; } .profile-info { flex-grow: 1; } .nav-section { /* display: flex; gap: 5px; justify-content: center; */ padding: 10px 0; /* background-color: #1e1e1e; */ } .nav-section-tabs { display: flex; justify-content: space-around; } .nav-section button { border: none; background-color: transparent; color: #ffffff; font-weight: bold; padding: 10px 20px; border-radius: 5px; cursor: pointer; } .nav-section button:active { /* border: none; */ border-bottom: #ffffff; background-color: transparent; color: #ffffff; font-weight: bold; padding: 10px 20px; border-radius: 5px; cursor: pointer; } .nav-section button:focus-visible { background-color: transparent; border-bottom: #ffffff; } .content-section { margin-top: 20px; display: flex; flex-direction: column; /* overflow-y: scroll; */ gap: 20px; } .card { background-color: #1e1e1e; padding: 15px; border-radius: 10px; text-align: left; cursor: pointer; max-width: 450px; } .card img { width: 100%; height: auto; object-fit: cover; border-radius: 5px; margin-bottom: 10px; } @media (min-width: 768px) and (max-width: 1024px) { .btn { font-size: 16px; padding: 0px 5px; } } body.dark-mode .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active { color: none !important; } body.light-mode .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active { color: none !important; } .postWithMainContainer img, .postWithMainContainer video { width: 100% !important; } </style> <style> .profile-section { display: flex; align-items: center; justify-content: space-between; /* Add space between profile info and the menu */ position: relative; } .menu-container { position: relative; cursor: pointer; } #menu-icon { font-size: 20px; color: #333; /* Adjust color as needed */ } .dropcardMenu { display: none; /* Initially hidden */ position: absolute; top: 100%; /* Position below the dots */ right: 0; /* background-color: #fff; */ box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); border-radius: 4px; padding: 10px; z-index: 1000; } .dropcardMenu svg { display: block; margin: 5px 0; cursor: pointer; color: #000; } .nav-tabs .nav-link.active { color: #db5919 !important; font-weight: bold !important; } .nav-tabs .nav-link { color: #000 !important; } .profile-container { flex-direction: column; height: 85vh; overflow-y: scroll; padding-bottom:55px } @media screen and (max-width:540px) { .profile-container { flex-direction: column } } .socialMainCont{ display: flex; justify-content: center; gap: 20px; } @media screen and (max-width:768px) { .socialMainCont{ display: flex; justify-content: center; /* height: 85vh; */ gap: 0px; } } </style> <script src="assets/js/jquery-3.6.0.min.js"></script> <script src="./assets/js/stream.js"></script> <!-- Bootstrap JS and Bootstrap Icons --> <script src="assets/js/bootstrap.bundle.min.js"></script> <!-- <script> $(document).ready(function() { // Listen for clicks on cards $('.card').on('click', function() { // Get data from card's attributes const title = $(this).data('title'); const image = $(this).data('image'); const description = $(this).data('description'); const date = $(this).data('date'); const url = $(this).data('url'); // Populate modal content $('#newsModalLabel').text(title); $('#modal-image').attr('src', image).attr('alt', title); $('#modal-description').text(description); $('#modal-date').text(date); $('#modal-url').attr('href', url); }); }); </script> --> <script> $(document).on('click', '.blockThisPost', function() { var blockId = $(this).data('userid'); // reportModal.show(); // $('#reportStreamId').val(reportId); blockAccount(blockId); }); $(document).on('click', '.unblockThisPost', function() { var blockId = $(this).data('userid'); // reportModal.show(); // $('#reportStreamId').val(reportId); unblockAccount(blockId); }); function blockAccount(userId) { // Ask the user for confirmation before proceeding if (confirm("Are you sure you want to block this account?")) { $.ajax({ url: 'assets/php/blockAccount.php', // The PHP script to handle the blocking method: 'POST', data: { act: 'block', userId: userId }, success: function(response) { // Check if the block operation was successful if (response.status === 'success') { alert("Blocked the account"); window.location.href = 'stream.php'; // Reload the page to reflect the changes } else { alert(response.message); // Show error message if blocking fails } }, error: function() { alert('There was an error while blocking the account.'); } }); } } function unblockAccount(userId) { // Ask the user for confirmation before proceeding if (confirm("Are you sure you want to unblock this account?")) { $.ajax({ url: 'assets/php/blockAccount.php', // The PHP script to handle the blocking method: 'POST', data: { act: 'unblock', userId: userId }, success: function(response) { // Check if the block operation was successful if (response.status === 'success') { alert("Unblocked the account"); window.location.reload(); // Reload the page to reflect the changes } else { alert(response.message); // Show error message if blocking fails } }, error: function() { alert('There was an error while unblocking the account.'); } }); } } </script> </head> <body> <? include 'assets/php/social_navbar.php' ?> <div class=" socialMainCont" style="padding-top:10px"> <!-- Left Section --> <div class="streamLeftbar"> <? include 'assets/php/sidebar.php' ?> </div> <div class="profile-container" > <!-- Profile Section --> <div class="profile-section"> <div class="profile-pic"> <img src="<?= viewProfilePic($db, $userId) ?>" alt=""> </div> <div class="profile-info"> <h1><?= showUserName($db, $userId) ?></h1> <p><?= showProfileBio($db, $userId) ?></p> </div> <!-- Add the 3-dot menu here --> <div class="menu-container"> <div alt="menu" width="100%" height="100%" id="menu-icon_<?= $userId ?>" onclick="toggleDropcardMenu(<?= $userId ?>)">⋮</div> <!-- Dropcard Menu --> <div id="dropcardMenu_<?= $userId ?>" class="dropcardMenu" style="min-width: fit-content; background-color: white; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); padding: 8px;"> <div class="reportThisAcc" id="reportBtn" style="display: flex; align-items: center; gap: 8px; cursor: pointer; transition: background-color 0.3s;"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <rect width="24" height="24" fill="none" /> <path fill="currentColor" d="M20.92 15.62a1.2 1.2 0 0 0-.21-.33l-3-3a1 1 0 0 0-1.42 1.42l1.3 1.29H12a1 1 0 0 0 0 2h5.59l-1.3 1.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l3-3a.9.9 0 0 0 .21-.33a1 1 0 0 0 0-.76M14 20H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5v3a3 3 0 0 0 3 3h4a1 1 0 0 0 .92-.62a1 1 0 0 0-.21-1.09l-6-6a1 1 0 0 0-.28-.19h-.09l-.28-.1H6a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h8a1 1 0 0 0 0-2M13 5.41L15.59 8H14a1 1 0 0 1-1-1Z" /> </svg> <p style="margin: 0; font-size: 14px; color: #333;">Report</p> </div> <? if (!$blockStatus) { ?> <div class="blockThisPost" style="display: flex; gap:4px; cursor:pointer;" data-userid=<?= $userId ?>> <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> <p style="margin: 0; font-size: 14px; color: #333;">Block</p> </div> <? } else { ?> <div class="unblockThisPost" style="display: flex; gap:4px; cursor:pointer;" data-userid=<?= $userId ?>> <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> <p style="margin: 0; font-size: 14px; color: #333;">Unblock</p> </div> <? } ?> </div> </div> </div> <? if ($blockStatus) { ?> You Have Blocked This Account <? } else { ?> <!-- Navigation Section (Tabs) --> <div class="nav-section"> <!-- Bootstrap Tab Navigation --> <ul class="nav nav-tabs nav-section-tabs" id="content-tabs" role="tablist"> <li class="nav-item" role="presentation"> <a class="nav-link active" id="posts-tab" data-bs-toggle="tab" href="#posts" role="tab" aria-controls="posts" aria-selected="true">Posts</a> </li> <li class="nav-item" role="presentation"> <a class="nav-link" id="showcase-tab" data-bs-toggle="tab" href="#showcase" role="tab" aria-controls="showcase" aria-selected="false">Showcase</a> </li> </ul> </div> <div class="tab-content" id="content-section"> <!-- Posts Tab --> <? show_stream_content($userId) ?> <!-- Showcase Tab --> <? show_showcase($userId) ?> </div> <? } ?> </div> </div> <div class="modal fade" id="reportModal" tabindex="-1" aria-labelledby="reportModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="reportModalLabel">Why are you reporting this post?</h5> </div> <div class="modal-body"> <div class="mb-3"> <label for="reportReason" class="form-label">Select a reason:</label> <select class="form-select" id="reportReason"> <option value="" selected disabled>Choose a reason</option> <option value="Nudity or sexual activity">Nudity or sexual activity</option> <option value="Scam, fraud or impersonation">Scam, fraud or impersonation</option> <option value="Suicide, self-injury">Suicide, self-injury</option> <option value="Hate speech or symbols">Hate speech or symbols</option> <option value="Eating disorders">Eating disorders</option> <option value="Sale of illegal or regulated goods">Sale of illegal or regulated goods</option> <option value="False information">False information</option> <option value="Intellectual property violation">Intellectual property violation</option> <option value="Violence, hate or exploitation">Violence, hate or exploitation</option> <option value="I just don't like it">I just don't like it</option> </select> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" id="submitReport" class="btn btn-primary">Submit</button> </div> </div> </div> </div> <!-- Modal --> <!-- <div id="reportModal" class="modal"> <div class="modal-content"> <span id="closeModal" class="close">×</span> <div class="mt-3"> <label for="reportReason" class="form-label">Reason for reporting the account:</label> <select class="form-select" id="reportReason" required> <option value="">Select a reason</option> <option value="no_longer_needed">1. I no longer need the account</option> <option value="privacy_concerns">2. Concerns about privacy</option> <option value="too_many_emails">3. Receiving too many emails</option> <option value="found_alternative">4. Found a better alternative</option> <option value="poor_customer_service">5. Poor customer service</option> <option value="high_cost">6. Too expensive</option> <option value="account_hacked">7. My account was hacked</option> <option value="no_features">8. Missing key features</option> <option value="dissatisfied">9. Dissatisfied with the service</option> <option value="other">10. Other</option> </select> </div> <button id="submitReport" class="btn btn-primary">Submit Report</button> </div> </div> --> <? include 'assets/php/footer.php' ?> <? include 'assets/php/bottom_navbar.php' ?> <!-- Modal --> <!-- <div class="modal fade" id="newsModal" tabindex="-1" aria-labelledby="newsModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="newsModalLabel"></h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <img src="" id="modal-image" class="img-fluid mb-3" alt="News Image"> <p id="modal-description"></p> <p class="datewithtime"><strong>Date: </strong><span id="modal-date"></span></p> <a href="#" id="modal-url" class="btn btn-primary">Read More</a> </div> </div> </div> </div> --> <script> // Initialize the modal when the document is ready $(function() { // Initialize the Bootstrap modal const reportModal = new bootstrap.Modal($("#reportModal")[0]); const username = "<?= showUserName($db, $userId); ?>" // Handle clicking on the 'reportThisPost' element $(document).on('click', '.reportThisAcc', function() { // Get the ID from the button's data-id attribute (if needed) var reportId = $(this).data('id'); // Show the modal reportModal.show(); }); // When the user clicks the submit button in the modal $("#submitReport").on("click", function() { var reportReason = $("#reportReason").val(); // Get the selected reason // Check if the user has selected a reason if (reportReason === "") { alert("Please select a reason for reporting."); return; // Prevent form submission if no reason is selected } // Send data using AJAX $.ajax({ url: "assets/php/report_account.php", // PHP script that will process the report method: "POST", data: { guserId: <?= $gUserId ?>, // PHP variable injected into JavaScript accountId: <?= $userId ?>, // PHP variable injected into JavaScript reason: reportReason, username: username }, success: function(response) { if (response.success === true) { alert("Report submitted successfully!"); reportModal.hide(); // Close the modal using Bootstrap's modal method } else { alert("Error submitting report. Please try again."); } }, error: function() { alert("There was an error with the request. Please try again."); } }); }); }); </script> <script src="assets/js/jquery-3.6.0.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script> </body> </html>