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: follow_dash.php
Close
<?php include './assets/php/db_connect.php'; include './inc/config.php'; include './assets/php/validate.logged.php'; include './assets/php/function.php'; function show_stream_content() { global $conn, $gUserId; // Ensure $gUserId is defined and accessible // SQL query to get posts ordered by the most recent $sql = "SELECT rs.* FROM reader_stream rs INNER JOIN reader_stream_follow rf ON rs.userId = rf.following_id WHERE rf.follower_id = ? AND rs.deleteFlag = 0 AND rs.referenceId IS NULL ORDER BY rs.postedOn DESC, rs.id DESC"; // Prepare the statement and bind the parameters $stmt = $conn->prepare($sql); $stmt->bind_param("i", $gUserId); // Bind the userId parameter $stmt->execute(); // Get the result of the prepared statement $result = $stmt->get_result(); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { generate_stream_card($row['id'], $row['userId'], $row['chat'], $row['postedOn'], $row['editedOn'], $row['mediaPath'], $row['metadata']); } } else { // Optionally handle the case when no posts are found echo "No posts available."; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Knobly Cream</title> <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"> <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; } @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; } </style> <style> #modalContent img { display: block; margin: 0 auto; } #modalContent video { display: block; margin: 0 auto; } @media screen and (max-width:540px) { .navaigation_main { display: none; } } </style> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- Bootstrap JS and Bootstrap Icons --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <script src="assets/js/stream.js"></script> <script> const userId = <?= $gUserId ?>; let tempUrl = ''; let letUrl = true; let dotInterval; var myModal; $(document).ready(function() { // Initialize the height on page load var $textarea = $('#contentTextarea'); if ($textarea.length) { adjustTextareaHeight($textarea[0]); } $('.followButton').on('click', function() { const targetUserId = $(this).data('id'); // ID of the user to follow/unfollow toggleFollow(this, userId, targetUserId); // Pass `this` (the button element) as the first parameter }); $('#saveModalEditButton').on('click', function() { saveEditedContent(); }); // likedUsers $(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.'); } }); }); // Handle like button clicks $(document).on('click', '.likeButton', function(e) { event.stopPropagation(); // 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); }); $('#contentTextarea').on('input', function() { var content = $('#contentTextarea').val().trim(); console.log(content); // Updated regular expression to match full URLs, including subdomains and paths var url_pattern = /(?:https?|ftp):\/\/(?:[a-zA-Z0-9-]+\.)?(?:[a-zA-Z0-9-]+\.[a-zA-Z]{2,})(?:\/[^\s]*)?/g; var youtube_pattern = /(?:v=|youtu\.be\/|embed\/)([a-zA-Z0-9_-]+)/; // Attempt to match all URLs within the content var matchedUrls = content.match(url_pattern); var youtubeUrl = content.match(youtube_pattern); if (youtubeUrl) { youtubeUrl.forEach(function(url) { console.log('Matched URL:', url); // Log each matched URL }); if (tempUrl != youtubeUrl[0]) { letUrl = true; tempUrl = youtubeUrl[0]; removeMeta(); // Show the loading animation $('#loadingIcon').show(); // $('#postedContent').html(''); // Clear any previous metadata // Send the first matched URL to the server for metadata fetching $.ajax({ url: 'link.php', // Submit to the same page type: 'POST', data: { ytUrl: youtubeUrl[0] }, // Send the first matched URL success: function(response) { // Hide the loading animation $('#loadingIcon').hide(); if (response.iframe) { $('#ytPreview').html(response.iframe); $('#hiddenYTLink').val(response.iframe || ''); $('#hiddenTitle').val(response.title || ''); $('#ytPreview').show(); } else { return; } }, error: function() { // Hide the loading animation on error $('#loadingIcon').hide(); console.log("Error fetching Youtube Link"); } }); } } else if (matchedUrls) { // Log all matched URLs to the console (for testing purposes) matchedUrls.forEach(function(url) { console.log('Matched URL:', url); // Log each matched URL }); if (tempUrl != matchedUrls[0]) { letUrl = true; tempUrl = matchedUrls[0]; removeYT(); // Show the loading animation $('#loadingIcon').show(); // $('#postedContent').html(''); // Clear any previous metadata // Send the first matched URL to the server for metadata fetching $.ajax({ url: 'link.php', // Submit to the same page type: 'POST', data: { url: matchedUrls[0] }, // Send the first matched URL success: function(response) { // Hide the loading animation $('#loadingIcon').hide(); $('#linkPreview').show(); if (response.url) { $('#linkPreview #linkHeading').html(response.title || ''); // Set heading text $('#linkPreview #linkDesc').html(response.description || ''); // Set description text $('#linkPreview #linkUrl').attr('href', response.url || ''); // Set link URL $('#linkPreview #linkUrl').html(response.domain || ''); $('#hiddenTitle').val(response.title || ''); $('#hiddenDesc').val(response.description || ''); $('#hiddenUrl').val(response.url || ''); $('#hiddenDomain').val(response.domain || ''); if (response.image) { $('#linkPreview img').attr('src', response.image); // Set image source $('#hiddenImage').val(response.image); } } else { return; } }, error: function() { // Hide the loading animation on error $('#loadingIcon').hide(); console.log("Error fetching the metadata"); } }); } } else { // Clear content and hide the loading animation if no valid URL is found $('#loadingIcon').hide(); } if (tempUrl != youtubeUrl[0]) { removeYT(); } if (tempUrl != matchedUrls[0]) { removeMeta() } if (youtubeUrl[0] == '') { removeYT(); } if (matchedUrls[0] == '') { removeMeta(); } }); }); function removeMeta() { $('#linkPreview').hide(); $('#hiddenTitle').val(''); $('#hiddenDesc').val(''); $('#hiddenUrl').val(''); $('#hiddenDomain').val(''); $('#hiddenImage').val(''); } function removeYT() { $('ytPreview').html(''); $('#ytPreview').hide(); } // The uploadPost function can now use myModal because it's in a broader scope function uploadPost() { // Collect the data from the inputs var content = $("#contentTextarea").val(); // Textarea content var fileInput = $("#fileInput")[0].files[0]; // The selected file var hiddenTitle = $("#hiddenTitle").val(); var hiddenDesc = $("#hiddenDesc").val(); var hiddenUrl = $("#hiddenUrl").val(); var hiddenImage = $("#hiddenImage").val(); var hiddenDomain = $("#hiddenDomain").val(); var hiddenYTLink = $("#hiddenYTLink").val(); // Create a FormData object to send data (use FormData if sending files) var formData = new FormData(); // Conditionally append fields if they have values if (content) formData.append("content", content); if (fileInput) formData.append("media", fileInput); // Attach the file if selected if (hiddenTitle) formData.append("hiddenTitle", hiddenTitle); if (hiddenDesc) formData.append("hiddenDesc", hiddenDesc); if (hiddenUrl) formData.append("hiddenUrl", hiddenUrl); if (hiddenImage) formData.append("hiddenImage", hiddenImage); if (hiddenDomain) formData.append("hiddenDomain", hiddenDomain); if (hiddenYTLink) formData.append("hiddenYTLink", hiddenYTLink); // Show loading spinner $("#loadingIcon").show(); // Send the data to PHP via AJAX $.ajax({ url: 'process_data.php', // The PHP page where you want to process the data type: 'POST', data: formData, processData: false, // Important for sending files contentType: false, // Important for sending files success: function(response) { // Hide loading spinner after response $("#loadingIcon").hide(); if (response.status === 'success') { alert("Posted successfully!"); myModal.hide(); // Use myModal here to hide the modal after successful post window.location.reload(); } else { alert("Error: " + response.message); } }, error: function(xhr, status, error) { $("#loadingIcon").hide(); alert("An error occurred: " + error); } }); } // Close the dropdown menu if the user clicks anywhere outside the menu or the icon $(document).click(function(event) { var $isClickInsideMenu = $(event.target).closest('.dropcardMenu'); var $isClickInsideIcon = $(event.target).closest('.menu-container'); // Close the dropdown if the click is outside the menu and icon if ($isClickInsideMenu.length === 0 && $isClickInsideIcon.length === 0) { closeAllDropcardMenus(); } }); // Add event listeners to Edit and Delete buttons to close the dropdown when clicked $('.editBtn').click(function() { closeAllDropcardMenus(); }); $('.dropcardMenu a button').click(function() { closeAllDropcardMenus(); }); // Attach the `oninput` event for dynamic resizing $(document).on('input', '#contentTextarea', function() { adjustTextareaHeight(this); }); $(function() { // Initialize the modal when the document is ready myModal = new bootstrap.Modal($("#uploadModal")[0]); // Event listener for showing the modal (for example, when the plus button is clicked) $("#plusButton").on("click", function() { myModal.show(); // Show the modal }); }); </script> <script> function openModal(type, path) { 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', path); 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', path).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(); // Add zoom functionality if (type === 'image') { const zoomableImage = $('#zoomableImage'); const imgContainer = zoomableImage.parent(); let scaleValue = 1; // Start with the image at its original size (100%) // Click event to zoom in (only zoom in, no zoom out) zoomableImage.on('click', function() { if (scaleValue < 2) { // Zoom in by 50% up to a max scale of 2 (200%) scaleValue += 0.5; // Zoom in by 50% zoomableImage.css('cursor', 'zoom-out'); // Change cursor to zoom-out after zooming in } zoomableImage.css('transform', `scale(${scaleValue})`); }); // Enable scrolling to zoom in (no zoom out) zoomableImage.on('wheel', function(event) { event.preventDefault(); // Zoom in when scrolling up if (scaleValue < 2 && event.originalEvent.deltaY < 0) { // Zoom in if scale < 2 and scroll up scaleValue += 0.1; // Zoom in by 10% } scaleValue = Math.min(scaleValue, 2); // Limit the zoom to 200% zoomableImage.css('transform', `scale(${scaleValue})`); }); // Allow dragging functionality after zooming in (scroll to move the image) let isDragging = false; let startX, startY, scrollLeft, scrollTop; imgContainer.on('mousedown', function(e) { if (scaleValue > 1) { // Enable dragging only when zoomed in isDragging = true; startX = e.pageX - imgContainer.offset().left; startY = e.pageY - imgContainer.offset().top; scrollLeft = imgContainer.scrollLeft(); scrollTop = imgContainer.scrollTop(); } }); imgContainer.on('mouseleave mouseup', function() { isDragging = false; }); imgContainer.on('mousemove', function(e) { if (!isDragging) return; e.preventDefault(); const moveX = e.pageX - startX; const moveY = e.pageY - startY; imgContainer.scrollLeft(scrollLeft - moveX); imgContainer.scrollTop(scrollTop - moveY); }); } } </script> <!-- <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 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> --> <style> @media screen and (max-width:768px) { .streamLeftbar { height: 1vh !important; } } .streamLeftbar { height: 85vh; overflow-y: auto; } .first_right_container { height: 85vh; overflow-y: scroll; padding-bottom: 55px; } </style> </head> <body> <? include 'assets/php/social_navbar.php' ?> <div class="container follow_dashboard"> <!-- Left Section --> <div class="streamLeftbar"> <?php include 'assets/php/sidebar.php' ?> </div> <div class="first_right_container"> <? show_stream_content() ?> </div> <button id="plusButton" class="btn btn-primary "> <i class="fa fa-plus"></i> </button> </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> <!-- likedUsers 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> <!-- Upload Modal --> <div class="modal fade" id="uploadModal" tabindex="-1" aria-labelledby="uploadModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="uploadModalLabel">Share</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" style="background-color:#555"></button> </div> <div class="modal-body"> <!-- Your upload form goes here --> <div class="upload-section"> <div class="d-flex align-items-start"> <div class="w-100"> <div id="loadingIndicator" style="display: none; font-size: 14px; color: gray;">Generating<span id="dots">...</span></div> <div style="display: flex; align-items: center; gap: 10px;"> <textarea id="contentTextarea" class="form-control mb-2" placeholder="What would you like to share?" style="flex: 1; overflow: hidden; resize: none;" oninput="adjustTextareaHeight(this)"></textarea> </div> <div class="d-flex justify-content-between align-items-center"> <div> <input type="file" id="fileInput" accept="image/*,video/*" class="d-none" onchange="previewMedia();"> <button type="button" class="btn btn-link text-decoration-none text-light bg-none" onclick="document.getElementById('fileInput').click();"> <i class="bi bi-image" style="color:#000;"></i> </button> </div> <div class="d-flex"> <button type="button" onclick="fetchGenAIContent()" style="text-decoration: none; border:none; border-radius:5px"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <g fill="none" fill-rule="evenodd"> <path d="m12.594 23.258l-.012.002l-.071.035l-.02.004l-.014-.004l-.071-.036q-.016-.004-.024.006l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.016-.018m.264-.113l-.014.002l-.184.093l-.01.01l-.003.011l.018.43l.005.012l.008.008l.201.092q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.003-.011l.018-.43l-.003-.012l-.01-.01z" /> <path fill="currentColor" d="M19 19a1 1 0 0 1 .117 1.993L19 21h-7a1 1 0 0 1-.117-1.993L12 19zm.631-14.632a2.5 2.5 0 0 1 0 3.536L8.735 18.8a1.5 1.5 0 0 1-.44.305l-3.804 1.729c-.842.383-1.708-.484-1.325-1.326l1.73-3.804a1.5 1.5 0 0 1 .304-.44L16.096 4.368a2.5 2.5 0 0 1 3.535 0m-2.12 1.414L6.677 16.614l-.589 1.297l1.296-.59L18.217 6.49a.5.5 0 1 0-.707-.707M6 1a1 1 0 0 1 .946.677l.13.378a3 3 0 0 0 1.869 1.87l.378.129a1 1 0 0 1 0 1.892l-.378.13a3 3 0 0 0-1.87 1.869l-.129.378a1 1 0 0 1-1.892 0l-.13-.378a3 3 0 0 0-1.869-1.87l-.378-.129a1 1 0 0 1 0-1.892l.378-.13a3 3 0 0 0 1.87-1.869l.129-.378A1 1 0 0 1 6 1m0 3.196A5 5 0 0 1 5.196 5q.448.355.804.804q.355-.448.804-.804A5 5 0 0 1 6 4.196" /> </g> </svg> </button> <button class="btn btn-upload ms-2" onclick="uploadPost()"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <path fill="none" stroke="currentColor" d="m6.998 10.247l.435.76c.277.485.415.727.415.993s-.138.508-.415.992l-.435.761c-1.238 2.167-1.857 3.25-1.375 3.788c.483.537 1.627.037 3.913-.963l6.276-2.746c1.795-.785 2.693-1.178 2.693-1.832s-.898-1.047-2.693-1.832L9.536 7.422c-2.286-1-3.43-1.5-3.913-.963s.137 1.62 1.375 3.788Z" /> </svg> </button> </div> </div> <div id="mediaPreview" class="mt-3"></div> <div id="linkPreview" class="mt-3" style="display: none; width: 100%; height:auto;"> <div class="hyperlink" style="padding: 10px;"> <img src="" alt="Card image"> <div style="padding: 0px; flex-grow: 1;"> <h3 id="linkHeading" style="font-size: 16px; margin: 0 0 5px; color: #333;"></h3> <p id="linkDesc" style="margin: 0 0 10px; font-size: 14px; color: #555; line-height: 1.4;"></p> <a id="linkUrl" href="" style="font-size: 13px; color: #007bff; text-decoration: none;"></a> </div> </div> </div> <div id="ytPreview" class="mt-3 ytprew"></div> <div id="loadingIcon" class="text-center" style="display:none;"> <div class="spinner-border" role="status"> <span class="sr-only">Loading...</span> </div> </div> <div> <input type="hidden" id="hiddenTitle"> <input type="hidden" id="hiddenDesc"> <input type="hidden" id="hiddenUrl"> <input type="hidden" id="hiddenImage"> <input type="hidden" id="hiddenDomain"> <input type="hidden" id="hiddenYTLink"> </div> </div> </div> </div> </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' ?> </body> </html>