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
e01abdca
Commit
e01abdca
authored
20 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added a few more comments.
parent
fd408203
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/root/formmail.ssjs
+8
-5
8 additions, 5 deletions
web/root/formmail.ssjs
with
8 additions
and
5 deletions
web/root/formmail.ssjs
+
8
−
5
View file @
e01abdca
...
...
@@ -32,6 +32,7 @@ var config_fields = {
value_fmt_string
:
1
,
};
// Parse config fields and set defaults
var
value_fmt_string
=
"
%-10s = %s
"
;
if
(
http_request
.
query
.
value_fmt_string
&&
strip_ctrl
(
http_request
.
query
.
value_fmt_string
).
length
)
...
...
@@ -53,6 +54,10 @@ var return_link_title = "Click here to return to " + return_link_url.toString().
if
(
http_request
.
query
.
return_link_title
&&
http_request
.
query
.
return_link_title
.
length
)
return_link_title
=
strip_ctrl
(
http_request
.
query
.
return_link_title
);
var
title
=
"
Thank You
"
;
if
(
http_request
.
query
.
title
)
title
=
http_request
.
query
.
title
;
// Test for required form fields here
var
redirect
;
if
(
http_request
.
query
.
redirect
)
...
...
@@ -70,10 +75,6 @@ if(http_request.query.required) {
results
(
LOG_ERR
,
"
Missing the following form fields:
"
+
missing
.
join
(
"
,
"
),
true
);
}
var
title
=
"
Thank You
"
;
if
(
http_request
.
query
.
title
)
title
=
http_request
.
query
.
title
;
// Send HTTP/HTML results here
function
results
(
level
,
text
,
missing
)
{
...
...
@@ -109,6 +110,7 @@ function results(level, text, missing)
exit
();
}
// Return the optionally-configured HTML body attributes
function
body_attributes
()
{
var
i
;
...
...
@@ -122,6 +124,7 @@ function body_attributes()
return
result
;
}
// Search an array for a specific value
function
find
(
val
,
list
)
{
var
n
;
...
...
@@ -184,7 +187,6 @@ if(http_request.query.recipient)
recipient
=
http_request
.
query
.
recipient
[
0
].
split
(
/
\s
*,
\s
*/
);
var
rcpt_list
=
[];
for
(
i
in
recipient
)
{
var
rcpt
=
{
to
:
strip_ctrl
(
recipient
[
i
])
};
...
...
@@ -201,6 +203,7 @@ for(i in recipient) {
rcpt_list
.
push
(
rcpt
);
}
// Save and send e-mail message(s)
if
(
!
msgbase
.
save_msg
(
hdr
,
client
,
body
,
rcpt_list
))
results
(
LOG_ERR
,
format
(
"
%s saving message
"
,
msgbase
.
error
));
...
...
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