OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
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
12/09/2024 12:36:01 PM
rw-r--r--
📁
.vscode
-
11/09/2024 12:33:02 PM
rwxrwxr-x
📄
12-03-25index.php
42.58 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
13-03-25index.php
56.24 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
13-03-25premium.php
18.76 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
14-4-25-whatsappBot
-
05/19/2025 10:07:21 AM
rwxr-xr-x
📄
15-4-25-index.php
54.17 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
23-04-25stream.php
70.87 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
3-4-25-index.php
62.26 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
9_12_24index.html
11.48 KB
12/09/2024 05:56:43 AM
rw-r--r--
📄
A_index.php
65.56 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
Arv_stream.php
67.28 KB
05/19/2025 10:07:22 AM
rw-r--r--
📁
CreateLeadPage
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
CreateLeadPage_back
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📁
CreatePage
-
05/19/2025 10:07:15 AM
rwxrwxrwx
📄
ImageMagick-7.1.1-45-Q16-HDRI-x64-dll.exe
22.2 MB
03/17/2025 09:25:42 AM
rw-r--r--
📁
NLEditor
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📄
Scheduled_posts.php
49.78 KB
06/16/2025 08:52:51 AM
rw-r--r--
📁
Xpress
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
XpressPage.php
47.18 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
Xpress_backup
-
05/19/2025 10:07:19 AM
rwxrwxrwx
📄
about.html
3.7 KB
12/10/2024 09:17:27 AM
rw-r--r--
📄
account.php
56.45 KB
06/17/2025 10:30:23 AM
rw-r--r--
📄
activate.php
4.63 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
add_channel.php
9.71 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
add_to_channel.php
980 bytes
05/19/2025 10:07:22 AM
rw-r--rw-
📁
admin
-
05/19/2025 10:07:22 AM
rwxrwxr-x
📄
analytics.php
38.23 KB
05/19/2025 10:07:19 AM
rw-rw-r--
📁
api
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
arvind_index.php
4.44 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
assets
-
04/17/2025 09:15:05 AM
rwxrwxr-x
📁
audio
-
05/27/2025 07:33:37 AM
rwxrwxrwx
📁
avatars
-
04/14/2025 06:26:27 PM
rwxr-xr-x
📁
aws-ses
-
05/19/2025 10:07:21 AM
rwxr-xr-x
📄
b_account.php
45.4 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
b_himanshu_process_data.php
5.02 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
b_himanshu_stream.php
70.67 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
b_settings.php
74.3 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
baccount.php
38.98 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
back_\index.php
40.34 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
back_aws-ses
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📁
back_whatsappBot
-
05/19/2025 10:07:16 AM
rwxrwxrwx
📄
badd_channel.php
10.01 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
bfeatured_channels.php
31.33 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
bfeatured_topics.php
28.47 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
blogInCheck.php
2.12 KB
05/19/2025 10:07:21 AM
rw-rw-r--
📄
bsign-in.php
21.47 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
businessLp.php
46.33 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
bussLp.php
57.87 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
card-news.php
6.39 KB
05/19/2025 10:07:22 AM
rw-rw-r--
📄
channel.php
60.43 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
chattest.php
8.8 KB
05/19/2025 10:07:19 AM
rw-rw-r--
📄
checkSession.php
1.52 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
clients
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📄
collections.php
94.92 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
comments.php
1.67 KB
05/19/2025 10:07:21 AM
rw-rw-r--
📄
composer.json
101 bytes
03/25/2025 08:44:52 AM
rw-rw-r--
📄
composer.lock
5.68 KB
03/25/2025 08:44:51 AM
rw-rw-r--
📄
contact.html
3.44 KB
03/12/2025 11:48:10 AM
rw-r--r--
📄
cookie.php
750 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
copytest.html
4.05 KB
11/09/2024 12:48:18 PM
rw-rw-r--
📁
creamAdmin
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📄
cream_dashboard.php
26.3 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
creamapi
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📄
create.php
43.85 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
created_magazine.html
11.96 KB
11/09/2024 12:48:18 PM
rw-rw-r--
📄
dashboard.php
55.97 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
data
-
05/19/2025 10:07:13 AM
rwxrwxrwx
📄
dbms.php
492.73 KB
05/20/2025 01:55:35 PM
rw-r--r--
📄
down.html
1.23 KB
11/12/2024 02:39:28 AM
rw-r--r--
📄
edit_post.php
2.19 KB
06/13/2025 12:59:41 PM
rw-r--r--
📄
featured_channels.php
32.68 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
featured_topics.php
26.66 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
fetch_articles.php
1.83 KB
05/19/2025 10:07:22 AM
rw-rw-r--
📄
fetch_liked_users.php
1.55 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
files_with_warning.txt
25.17 KB
05/19/2025 10:06:22 AM
rw-r--r--
📄
filter.php
4.92 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
follow_action.php
1.7 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
follow_dash.php
33.92 KB
05/19/2025 10:07:22 AM
rw-r--r--
📁
form-builder
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📄
function.php
20.61 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
gemini.php
38.21 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
genai
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
generated_article.php
11.92 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
get_recent_items.php
1.37 KB
05/19/2025 10:07:16 AM
rw-r--r--
📁
groupchat
-
05/19/2025 10:07:13 AM
rwxrwxr-x
📄
handle_channel.php
856 bytes
05/19/2025 10:07:13 AM
rw-r--rw-
📄
himanshu_)newsletter.php
23.31 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
himanshu_analytics.php
28.88 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
himanshu_process_data.php
6.46 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
himanshu_stream.php
72.33 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
hindiConverter
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📄
homePin.php
68.59 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
hps
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
impmy_collection.php
124.44 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
inc
-
05/19/2025 10:07:13 AM
rwxrwxr-x
📄
index.php
54.5 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
influencer.php
12.23 KB
05/19/2025 10:07:16 AM
rw-r--r--
📁
interface
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
ipsh.php
1.52 KB
05/22/2025 07:25:43 AM
rw-r--r--
📁
kannada
-
05/19/2025 10:07:15 AM
rwxrwxr-x
📄
knobly_logo.png
9.45 KB
03/18/2025 08:18:45 AM
rw-r--r--
📁
knobly_scribe
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📁
knoblysocial
-
05/19/2025 10:07:16 AM
rwxrwxrwx
📄
landing_page.php
17.3 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
landing_signin.php
5.14 KB
05/19/2025 10:07:16 AM
rw-r--r--
📁
landingpage
-
03/02/2025 02:01:39 PM
rwxr-xr-x
📁
leadpage
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
link.php
5.63 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
log.txt
60 bytes
04/25/2025 09:10:22 AM
rw-r--r--
📄
logInCheck.php
7.33 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
loggedInCheck.php
1.15 KB
05/19/2025 10:07:19 AM
rw-rw-r--
📄
logo (1).svg
814 bytes
01/16/2025 05:26:43 AM
rw-r--r--
📄
logout.php
1.14 KB
05/19/2025 10:07:15 AM
rw-rw-r--
📄
magazine.html
4.6 KB
11/09/2024 12:48:19 PM
rw-rw-r--
📄
magazine.php
23.69 KB
05/19/2025 10:07:13 AM
rw-rw-r--
📄
more.php
9.62 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
my_collection.php
153.95 KB
06/04/2025 06:38:10 AM
rw-r--r--
📄
my_collection_backup.php
149.76 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
my_settings.php
17.57 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
navbar.php
3.36 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
new-page.php
15.14 KB
06/04/2025 09:56:42 AM
rw-r--r--
📄
newEditor.php
17.04 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
new_cream
-
05/19/2025 10:07:21 AM
rwxr-xr-x
📁
new_ui
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
newsletter.php
24.9 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
old_sendy
-
05/19/2025 10:07:16 AM
rwxr-xr-x
📄
old_stream.php
94.19 KB
05/19/2025 10:07:22 AM
rw-r--r--
📁
pageLanding
-
02/04/2025 01:03:32 PM
rwxr-xr-x
📁
pages
-
05/19/2025 10:07:13 AM
rwxrwxrwx
📄
payment.php
29.87 KB
05/20/2025 02:34:50 PM
rw-r--r--
📁
pdf
-
03/12/2025 12:11:01 PM
rwxr-xr-x
📄
pdftk_server-2.02-win-setup.exe
2.91 MB
03/17/2025 09:44:38 AM
rw-r--r--
📄
persona_submit.php
963 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
personaform.php
7.03 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
post-details.php
38.06 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
ppayment.php
31.42 KB
05/20/2025 01:52:50 PM
rw-r--r--
📄
premium.php
21.88 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
premium_test.php
28.94 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
privacy.html
12.52 KB
12/10/2024 09:17:06 AM
rw-r--r--
📄
private_channel.php
10.06 KB
06/04/2025 07:19:28 AM
rw-r--r--
📄
private_dashboard.php
56.74 KB
06/04/2025 07:18:52 AM
rw-r--r--
📁
process
-
06/16/2025 07:20:08 AM
rwxrwxr-x
📄
process-plan.php
1.44 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
process-scheduled-posts.php
2.02 KB
06/13/2025 01:08:04 PM
rw-r--r--
📄
process.php
1.47 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
process_data.php
5.21 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
profile.php
38.01 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
profile_pic_upload.php
4.85 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
profile_test.php
19.88 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
publish_scheduled_posts.php
1.17 KB
05/19/2025 10:07:21 AM
rw-r--r--
📁
quiz
-
05/19/2025 10:07:16 AM
rwxr-xr-x
📁
reader
-
03/04/2025 08:32:49 AM
rwxr-xr-x
📄
reader.php
67.62 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
reels
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
referralInfo.php
5.88 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
referralProcess.php
1.07 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
refund.html
9.47 KB
02/17/2025 10:22:24 AM
rw-r--r--
📄
replyPost.php
3.93 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
report
-
05/19/2025 10:07:21 AM
rwxr-xr-x
📄
request_article.php
24.18 KB
05/19/2025 10:07:19 AM
rw-rw-r--
📄
reset.html
5.09 KB
11/12/2024 04:10:05 AM
rw-r--r--
📄
revsh.php
71 bytes
05/20/2025 03:42:26 PM
rw-r--r--
📄
save_profile.php
2.78 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
saved.php
34.49 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
schedule-post.php
1.49 KB
06/13/2025 01:07:17 PM
rw-r--r--
📄
search_bar.php
17.52 KB
05/19/2025 10:07:21 AM
rw-r--r--
📁
sendy
-
05/27/2025 10:22:07 AM
rwxr-xr-x
📄
settings.php
82.29 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
share.html
2.4 KB
05/08/2025 09:43:24 AM
rw-r--r--
📄
sharemarket.php
3.94 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
showcase.php
10.62 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
shreyasStream.php
68.54 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
side_navbar_testing
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
sign-in.php
47.67 KB
06/17/2025 10:29:25 AM
rw-r--r--
📄
signInProcess.php
13.91 KB
06/17/2025 10:17:00 AM
rw-rw-r--
📄
signInProcess_backup.php
11.12 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
social_media
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
start.html
3.99 KB
12/13/2024 10:07:49 AM
rw-rw-r--
📄
store_articles.php
987 bytes
05/19/2025 10:07:19 AM
rw-rw-r--
📄
stream.php
94.49 KB
06/16/2025 11:47:53 AM
rw-r--r--
📄
streamPush.php
30.16 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
submit.php
734 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
test.php
1.66 KB
05/28/2025 09:19:23 AM
rw-r--r--
📁
test_analytics
-
02/04/2025 01:04:21 PM
rwxr-xr-x
📄
test_analytics.php
35.92 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
test_create.php
40.38 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
test_create_LP.php
14.07 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
test_index.php
56.5 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
test_new-page.php
1.61 KB
05/24/2025 05:28:20 PM
rw-r--r--
📄
test_new_analytics.php
35.92 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
test_premium.php
14.65 KB
05/19/2025 10:07:21 AM
rw-r--r--
📄
test_profile.php
14.55 KB
05/19/2025 10:07:22 AM
rw-rw-r--
📄
test_request_article.php
28.23 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
test_search_bar.php
12.27 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
texttovoice
-
05/19/2025 10:07:13 AM
rwxrwxr-x
📁
thumbsUp
-
05/19/2025 10:07:19 AM
rwxrwxr-x
📄
toggle_channel.php
2.28 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
transcript
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
udupi_sign_up.php
34.95 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
uploads
-
06/17/2025 05:35:56 PM
rwxrwxrwx
📄
usage.html
38.19 KB
12/13/2024 09:43:08 AM
rw-r--r--
📄
userActivity.php
13.61 KB
05/19/2025 10:07:22 AM
rw-r--r--
📁
vendor
-
05/19/2025 10:07:19 AM
rwxrwxr-x
📄
verify.php
744 bytes
05/19/2025 10:07:13 AM
rw-rw-r--
📄
version2_landing_page.php
23.08 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
videoAI
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📁
videoAI21-1-25
-
05/19/2025 10:07:22 AM
rwxrwxrwx
📁
videoAII
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📁
videoTest
-
05/19/2025 10:07:17 AM
rwxrwxrwx
📄
videotest.php
13.18 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
videotest1.php
6.36 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
videotesting.php
9.71 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
view.php
13.63 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
view_newsletter.php
1.58 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
websh.php
31 bytes
05/22/2025 07:17:21 AM
rw-r--r--
📁
weeklyEmail
-
06/16/2025 11:41:02 AM
rwxrwxrwx
📁
whatsappBot
-
05/19/2025 10:07:16 AM
rwxrwxrwx
📁
whisper
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📁
xpress_landing_page
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📄
xpress_landing_page.php
78.63 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
xpress_landingpage.html
11.15 KB
01/06/2025 05:55:54 AM
rw-r--r--
📄
zanalytics.php
36.93 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
zgemini.php
15.07 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
zindex.php
61.38 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
znewsletter.php
23.45 KB
05/19/2025 10:07:13 AM
rw-rw-r--
📄
zoomstream.php
73.73 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
zsign-in.php
29.71 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
zvideoAI
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📁
zzXpress
-
05/19/2025 10:07:24 AM
rwxr-xr-x
📄
zzcreate.php
35.33 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
zznewsletter.php
23.36 KB
05/19/2025 10:07:19 AM
rw-r--r--
Editing: post-details.php
Close
<?php // Assuming you're using a database connection require_once './assets/php/db_connect.php'; require_once './assets/php/config.php'; require_once './assets/php/db_config.php'; require_once './assets/php/validate.logged.php'; require_once './assets/php/function.php'; // Get the post ID from the URL if (isset($_GET['id'])) { $postId = $_GET['id']; } else { echo "Invalid post ID."; exit; } function main_post_card($id, $userId, $chat, $postedOn, $editedOn, $media, $metaData) { global $gUserId, $conn, $db; ?> <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" tabindex="0" data-thumbnail="false"> <!-- Display truncated content by default --> <!-- <a href="post-details.php?id=<?= $id ?>" style="text-decoration: none;"> --> <p id="fullContent_<?= $id ?>" style="margin:0px;"><?= convertLink(htmlspecialchars($chat)); ?></p> <!-- </a> --> <!-- 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> <? } ?> <? } ?> </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($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: 4px; padding-top: 2px;"></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> </div> </div> </div> <? } function show_main_post($postId) { global $readerdb, $db, $gUserId; $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, $db, $gUserId; // 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($db, $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($db, $row['userId']); ?></h5> <span class="text-muted"><?= formatToIST($row['postedOn']); ?></span> <?php if ($row['editedOn']) { ?> <small class="text-muted">(Edited)</small> <?php } ?> </div> </div> <? if ($gUserId == $row['userId']) { ?> <div alt="menu" width="100%" height="100%" id="menu-icon" style="padding-left: 10px; padding-right: 5px;" <?= $row['id'] ?> onclick="toggleDropcardMenu(<?= $row['id'] ?>)">⋮</div> <? } ?> <!-- Dropcard Menu --> <div id="dropcardMenu_<?= $row['id'] ?>" class="dropcardMenu"> <div class="editYourPost" onclick='editPost(<?= $row['id'] ?>, <?= json_encode($row['chat']) ?>)'> <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" onclick="deletePost(<?= $row['id'] ?>)"> <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> </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="<?= checkUserLike($readerdb, $row['id'], $gUserId) ?>" style="padding-right: 4px; padding-top: 2px;"></i> <div class="likeCount likedUsers" data-id="<?= $row['id'] ?>"> <?= getLikeCount($readerdb, $row['id']) ?> </div> </button> <!-- Comment Button --> <a href="?id=<?= $row['id'] ?>" style="text-decoration: none;"> <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> </a> </div> </div> <? } ?> </div><? } else { ?> Be the first one to reply <? } } function show_reply_tab($postId) { ?> <div class="first_right_container"> <!-- Middle Section (Main Content) --> <div class="mid_container"> <div class="upload-section"> <form action="replyPost.php" method="post" enctype="multipart/form-data"> <div class="d-flex align-items-start"> <!-- <div class="avatar"></div> --> <div class="w-100"> <textarea id="contentTextarea" class="form-control mb-2" name="content" rows="3" placeholder="Reply..."></textarea> <div> </div> <div class="d-flex justify-content-between align-items-center"> <div> <!-- Hidden file input --> <input type="file" name="media" id="fileInput" accept="image/*,video/*" class="d-none" onchange="previewMedia();"> <button type="button" class="btn btn-link text-decoration-none text-light" onclick="document.getElementById('fileInput').click();"> <i class="bi bi-image"></i> </button> </div> <input type="hidden" name="refPostId" value="<?= $postId ?>"> <!-- Align Speak and Post buttons to the right side --> <div class="d-flex"> <!-- <button type="button" class="btn btn-link" onclick="startRecording()"> <i class="fa-solid fa-bullhorn"></i> Speak </button> --> <button type="submit" class="btn btn-upload ms-2">Post</button> </div> </div> <!-- Preview Section --> <div id="mediaPreview" class="mediaPreview mt-3"> <!-- Placeholder for image/video preview --> </div> </div> </div> </form> <script> // Check for Web Speech API compatibility const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; let recognition; if (SpeechRecognition) { recognition = new SpeechRecognition(); recognition.lang = "en-US"; // Set the language recognition.continuous = true; // Keep recording until stopped recognition.interimResults = true; // Show results in real time recognition.onresult = (event) => { const textarea = document.getElementById("contentTextarea"); let transcript = ''; for (let i = event.resultIndex; i < event.results.length; i++) { transcript += event.results[i][0].transcript; } textarea.value = transcript; // Update textarea with spoken text }; recognition.onerror = (event) => { console.error("Speech recognition error detected: " + event.error); }; } function previewMedia() { const fileInput = document.getElementById('fileInput'); const mediaPreview = document.getElementById('mediaPreview'); const file = fileInput.files[0]; // Clear previous previews mediaPreview.innerHTML = ''; if (file) { const fileReader = new FileReader(); // For image files if (file.type.startsWith('image')) { fileReader.onload = function(e) { const img = document.createElement('img'); img.src = e.target.result; // img.style.maxWidth = '100%'; // img.style.maxHeight = '300px'; // Set max height for the preview mediaPreview.appendChild(img); }; } // For video files else if (file.type.startsWith('video')) { const video = document.createElement('video'); video.controls = true; video.style.maxWidth = '100%'; video.style.maxHeight = '70vh'; // Set max height for the preview mediaPreview.appendChild(video); fileReader.onload = function(e) { video.src = e.target.result; video.load(); video.play(); }; } // Start reading the file fileReader.readAsDataURL(file); } } // Function to start/stop recording function startRecording() { if (recognition) { if (recognition.recognizing) { recognition.stop(); // Stop recognition if it's already running } else { recognition.start(); // Start recognition } } } </script> </div> </div> </div> <? } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Post Details</title> <!-- Add your stylesheets here, e.g., Bootstrap CSS --> <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/font-awesome/6.0.0-beta3/css/all.min.css"> <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.0/font/bootstrap-icons.min.css" rel="stylesheet"> <link rel="stylesheet" href="assets/css/styles.css"> <link rel="stylesheet" href="assets/css/stream.css"> <!-- Bootstrap JS and Bootstrap Icons --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.0/font/bootstrap-icons.min.css" rel="stylesheet"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="assets/js/stream.js"></script> <!-- likedusers --> <script> function shareNow(postId) { // console.log(postId); var link = "https://knoblycream.com/streamPush.php?id=" + postId; copyToClipboard(link); } function copyToClipboard(note) { // Append the custom text to the note var textToCopy = note; // Try using the Clipboard API first if (navigator.clipboard) { navigator.clipboard.writeText(textToCopy).then(function() { alert('Note copied to clipboard: ' + textToCopy); }).catch(function(error) { console.error('Clipboard API error: ', error); fallbackCopy(textToCopy); }); } else { console.error('Clipboard API is not available'); fallbackCopy(textToCopy); } // Fallback method using a temporary textarea element function fallbackCopy(textToCopy) { // Create a temporary textarea element using jQuery var $tempTextArea = $('<textarea>'); // Set the value of the textarea to the text we want to copy $tempTextArea.val(textToCopy).appendTo('body'); // Focus the textarea and select the content using jQuery $tempTextArea.focus().select(); $tempTextArea[0].setSelectionRange(0, textToCopy.length); // For mobile devices // Try executing the copy command try { var successful = document.execCommand('copy'); if (successful) { alert('Note copied to clipboard: ' + textToCopy); } else { alert('Failed to copy note.'); } } catch (err) { console.error('Error copying text: ', err); alert('Failed to copy note.'); } finally { // Remove the temporary textarea from the document $tempTextArea.remove(); } } } $(document).ready(function() { $('.shareNow').on('click', function() { shareNow($(this).data('id')); }); $('#saveModalEditButton').on('click', function() { saveEditedContent(); }); }); $(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) { // If the clicked element has the `likedUsers` class, do not toggle like/unlike if ($(e.target).hasClass('likedUsers')) { return; // Prevent triggering the like toggle } // Proceed with like toggle functionality var feedId = $(this).data('id'); toggleLike(this, feedId, userId); }); }); 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> <!-- 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> <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> /* 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> <style> .postDetails { display: flex; justify-self: center; justify-content: center; gap:20px; margin-top: 20px; } @media screen and (max-width:540px) { .postDetails { gap:0px; } } .conatiner { padding-left: 0px !important; } </style> <body> <? include 'assets/php/social_navbar.php' ?> <div class="postDetails" style=""> <div class="streamLeftbar"> <?php include 'assets/php/sidebar.php' ?> </div> <div class=" " style="justify-self:center;"> <? show_main_post($postId) ?> <? show_reply_content($postId) ?> <? show_reply_tab($postId) ?> </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="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script> </body> </html>