Skip to content
Snippets Groups Projects
Commit 9d934e86 authored by echicken's avatar echicken
Browse files

Authenticated users can send and receive email.

(To do: delete email, change read/unread status.)
parent b963c8bb
No related branches found
No related tags found
No related merge requests found
......@@ -154,7 +154,7 @@ function addReply(url, sub, thread, number) {
out += "<input type='hidden' name='postmessage' value='true' />";
out += "<input type='hidden' name='sub' value='" + sub + "' />";
out += "<input type='hidden' name='irt' value='" + number + "' />";
out += "To:<br /><input class='border' type='text' name='to' value='" + response.header.from + "' /><br />";
out += "To:<br /><input class='border' type='text' name='to' value='" + response.header.from + "'" + ((sub == "mail")?" readonly":"") + " /><br />";
out += "From:<br />";
out += "<select name='from'>";
out += "<option value='" + response.user.alias + "'>" + response.user.alias + "</option>";
......@@ -180,7 +180,7 @@ function addPost(url, sub, alias, name, sig) {
out += "<input type='hidden' name='postmessage' value='true' />";
out += "<input type='hidden' name='sub' value='" + sub + "' />";
out += "<input type='hidden' name='irt' value='0' />";
out += "To:<br /><input class='border' type='text' name='to' value='All' /><br />";
out += "To:<br /><input class='border' type='text' name='to' value='" + ((sub == "mail")?"":"All") + "' /><br />";
out += "From:<br />";
out += "<select name='from'>";
out += "<option value='" + alias + "'>" + alias + "</option>";
......
......@@ -15,7 +15,7 @@ if(http_request.query.hasOwnProperty('board')) {
print("</script>");
}
if(http_request.query.hasOwnProperty('sub')) {
if(http_request.query.hasOwnProperty('sub') && http_request.query.sub != 'mail') {
print("<script type='text/javascript'>");
print("loadThreads('http://" + system.inet_addr + ":" + webIni.HTTPPort + "/forum-async.ssjs', '" + http_request.query.sub + "', " + ((http_request.query.hasOwnProperty('thread'))?false:true) + ");");
if(http_request.query.hasOwnProperty('thread'))
......
//HIDDEN
// Private email page for ecwebv3
// echicken -at- bbs.electronicchicken.com
load('webInit.ssjs');
load("../web/lib/forum.ssjs");
if(user.alias != webIni.WebGuest) {
print("<span class='title'>Email</span><br /><br />");
print("<div class='border box msg'>");
print(format( "<a class='ulLink' onclick='addPost(\"http://%s:%s/%s/forum-async.ssjs\", \"%s\", \"%s\", \"%s\", \"%s\")'>Compose a new email</a>",
system.inet_addr, webIni.HTTPPort, webIni.appendURL, "mail", user.alias, user.name, ""
)
);
print("<div id='sub-mail-newMsgBox'></div>");
print("</div>");
print("<div id='sub-mail' style='display:none;'></div>");
print("<div id='sub-mail-info' class='border box msg' style='display:none;'></div>");
print("<script type='text/javascript'>");
print("loadThreads('http://" + system.inet_addr + ":" + webIni.HTTPPort + "/forum-async.ssjs', 'mail', " + ((http_request.query.hasOwnProperty('thread'))?false:true) + ");");
if(http_request.query.hasOwnProperty('thread'))
print("loadThread('http://" + system.inet_addr + ":" + webIni.HTTPPort + "/forum-async.ssjs', 'mail', '" + http_request.query.thread + "', " + false + ");");
print("</script>");
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment