Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
36193322
Commit
36193322
authored
10 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Add comment section.
parent
0519d19d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/root/ecwebv3/pages/disabled/episode.ssjs
+50
-3
50 additions, 3 deletions
web/root/ecwebv3/pages/disabled/episode.ssjs
with
50 additions
and
3 deletions
web/root/ecwebv3/pages/disabled/episode.ssjs
+
50
−
3
View file @
36193322
//HIDDEN:Episode
//HIDDEN:Episode
load
(
'
webInit.ssjs
'
);
load
(
webIni
.
WebDirectory
+
"
/lib/forum.ssjs
"
);
// TODO: Move into exec/load somewhere...
function
encode_xml
(
str
)
{
str
=
str
.
toString
();
str
=
str
.
replace
(
/&/g
,
'
&
'
);
str
=
str
.
replace
(
/</g
,
'
<
'
);
str
=
str
.
replace
(
/>/g
,
'
>
'
);
str
=
str
.
replace
(
/"/g
,
'
"
'
);
str
=
str
.
replace
(
/'/g
,
'
'
'
);
return
str
;
}
if
(
js
.
global
.
podcast_get_info
==
undefined
)
if
(
js
.
global
.
podcast_get_info
==
undefined
)
js
.
global
.
load
(
"
podcast_routines.js
"
);
js
.
global
.
load
(
"
podcast_routines.js
"
);
if
(
js
.
global
.
podcast_opts
==
undefined
)
{
if
(
js
.
global
.
podcast_opts
==
undefined
)
{
...
@@ -14,13 +30,44 @@ if (!base.open()) {
...
@@ -14,13 +30,44 @@ if (!base.open()) {
print
(
'
Error opening message base!
'
);
print
(
'
Error opening message base!
'
);
exit
(
1
);
exit
(
1
);
}
}
var
hdrs
=
podcast_load_headers
(
base
,
podcast_opts
.
From
,
podcast_opts
.
To
);
var
all_hdrs
=
{};
var
hdrs
=
podcast_load_headers
(
base
,
podcast_opts
.
From
,
podcast_opts
.
To
,
all_hdrs
);
var
index
=
http_request
.
query
.
episode
[
0
]
-
1
;
var
index
=
http_request
.
query
.
episode
[
0
]
-
1
;
if
(
index
<
0
||
index
>
hdrs
.
length
)
{
if
(
index
<
0
||
index
>
hdrs
.
length
)
{
print
(
"
Invalid episode!
"
);
print
(
"
Invalid episode!
"
);
exit
(
1
);
exit
(
1
);
}
}
var
item_info
=
podcast_get_info
(
base
,
hdrs
[
index
]);
var
item_info
=
podcast_get_info
(
base
,
hdrs
[
index
]);
print
(
'
<h1>
'
+
item_info
.
title
+
'
</h1>
'
);
print
(
'
<h1>
'
+
strftime
(
"
%B %e %Y
"
,
hdrs
[
index
].
when_written_time
)
+
"
"
+
item_info
.
title
+
'
</h1>
'
);
print
(
'
<audio controls="controls"><source src="
'
+
item_info
.
enclosure
+
'
"></audio>
'
);
print
(
'
<audio controls="controls"><source src="
'
+
item_info
.
enclosure
.
url
+
'
"></audio>
'
);
print
(
'
<p>
'
+
item_info
.
description
+
'
</p>
'
);
print
(
'
<p>
'
+
item_info
.
description
+
'
</p>
'
);
print
(
'
<h2>Comments</h2>
'
);
var
i
;
var
body
;
for
(
i
in
all_hdrs
)
{
if
(
all_hdrs
[
i
].
thread_id
!=
hdrs
[
index
].
thread_id
)
continue
;
if
(
all_hdrs
[
i
].
thread_id
==
i
)
continue
;
print
(
'
<div>
'
+
html_encode
(
all_hdrs
[
i
].
subject
,
false
,
false
,
false
)
+
'
— <i>
'
+
all_hdrs
[
i
].
from
+
'
</i>
'
+
system
.
timestr
(
all_hdrs
[
i
].
when_written_time
)
+
'
'
+
system
.
zonestr
(
all_hdrs
[
i
].
when_written_zone
)
+
'
<br>
'
);
body
=
base
.
get_msg_body
(
all_hdrs
[
i
].
number
,
true
);
body
=
word_wrap
(
body
,
65535
,
79
);
body
=
html_encode
(
body
,
false
,
false
,
false
);
body
=
body
.
replace
(
/
\r?\n
/g
,
'
<br>
'
);
print
(
body
);
print
(
'
</div><br>
'
);
}
if
(
user
.
number
!=
0
&&
msg_area
.
sub
[
base
.
cfg
.
code
].
can_post
)
{
print
(
'
<div id="comment-post">
'
);
print
(
'
<form id="comment-form">
'
);
print
(
'
<input type="hidden" name="postmessage" value="true" />
'
);
print
(
'
<input type="hidden" name="sub" value="
'
+
base
.
cfg
.
code
+
'
" />
'
);
print
(
'
<input type="hidden" name="irt" value="
'
+
hdrs
[
index
].
number
+
'
" />
'
);
print
(
'
<input type="hidden" name="to" value="
'
+
hdrs
[
index
].
to
+
'
" />
'
);
print
(
'
<input type="hidden" name="from" value="
'
+
user
.
alias
+
'
" />
'
);
print
(
'
Subject: <input class="border" type="text" name="subject" value="
'
+
hdrs
[
index
].
subject
+
'
" />
'
);
print
(
'
<textarea class="border" name="body" cols="80" rows="10"></textarea><br />
'
);
print
(
'
<input type="button" value="Submit" onClick="submitForm(
\'
http://
'
+
http_request
.
host
+
'
/
'
+
webIni
.
appendURL
+
'
forum-async.ssjs
\'
,
\'
comment-post
\'
,
\'
comment-form
\'
)">
'
);
print
(
'
</form>
'
);
print
(
'
</div>
'
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment