View/Edit #47:tell_www_body

Switch to edit mode.

Name(s): tell_www_body
1:  "Syntax: /mail_agent?ng=789"
2:  "Syntax: /mail_agent?ng=6100&msg=123"
3:  if (ng = $www:parse_GET("ng"))
4:    ng = toobj(ng)
5:    if (!$mail_agent:is_recipient(ng))
6:      return $msg:mtell("www_error", "#" + $www:parse_GET("ng") + " is not a valid mail recipient.")
7:    elseif (!player:isa($webber))
8:      raise(E_PERM)
9:    elseif (ng:isa($player) ? !$perm_utils:controls(player.user, ng) | ng.readers != 1 && !ng:is_readable_by(player.user))
10:     return $msg:mtell("www_error", "You do not have permission to read mail on " + ng:nn())
11:   endif
12: else
13:   ng = $nothing
14: endif
15: msg = $www:parse_GET("msg")
16: msgid = $www:parse_GET("msgid")
17: if (valid(ng) && (msg || msgid))
18:   player:tell(this:www_read(ng, msg ? toint(msg) | ng:get_msgnum_from_id("<" + msgid + ">")) || "<I>Sorry, that message does not exist.</I>")
19: elseif (valid(ng))
20:   chunk = 41
21:   player:tell("<FONT FACE='sans-serif'>")
22:   if (ng:isa($player))
23:     player:tell("<h2>", ng:titlec(), "'s mail</h2>")
24:   else
25:     player:tell("<h2>", ng:titlec(), "</h2>")
26:   endif
27:   seq = ng:parse_message_seq($www:parse_GET("seq") || tostr("last:", chunk))
28:   table = $mail_agent:www_list(ng, seq, player.user)
29:   player:tell(table)
30:   player:tell("<P><FORM ACTION='/mail_agent'>")
31:   player:tell("<INPUT TYPE='hidden' NAME='ng' VALUE='", toint(ng), "'>")
32:   player:tell("  Advanced search: ", $html_utils:input_text("seq", $www:parse_GET("seq") || tostr("last:", chunk - 1), 10), " <INPUT TYPE='submit' VALUE='Go'>")
33:   player:tell("<A TARGET='_help' HREF='/help?message-sequences'><IMG SRC='", $www:fileURL($help_utils, "question_mark.jpg"), "' width=33 height=25 alt='[?]' BORDER=0></A>")
34:   player:tell("</FORM></P>")
35:   player:tell("<P><FORM ACTION='/mailer/send'><INPUT TYPE='hidden' NAME='to' VALUE='", $html_utils:literal_text(ng:nn()), "'><INPUT TYPE='submit' VALUE='Mail ", $html_utils:literal_text(ng.name), "'> Send mail to ", ng.name, ".</FORM></P>")
36:   player:tell("<B>Back to ", $www:link($newsgroups), ".</B>")
37:   player:tell("</FONT>")
38: else
39:   pass(@args)
40:   return player:tell("<P>You can also <a href=\"/newsgroups\">see a list of available newsgroups</a> or <a href=\"/mailer\">use the newsgroup mailer</a>.")
41: endif
42: "Last modified by Dax (#789) on Tue May  3 14:09:30 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]