View/Edit #310:www_setup

Switch to edit mode.

Name(s): www_setup
1:  caller == this && player:isa($webber) || raise(E_PERM)
2:  if (prepstr == "/setup/children")
3:    return $www.exam:tell_children(this)
4:  elseif (prepstr == "/setup/contents")
5:    return $www.exam:tell_contents(this)
6:  endif
7:  if (!iobjstr)
8:    "Don't bother."
9:  elseif (player.referer && $www:previous_object() != this)
10:   "We have an unknown form refering a command to us..."
11:   $msg:mtell("www_error", "Warning!  Previous page doesn't appear to be this one!")
12:   player:tell("For security reasons the setup won't be changed.  Refering page: [", player.referer, "] <HR>")
13: elseif (player.user == $no_one)
14:   $msg:mtell("www_error", "You do not have permission to change the setup of this object.")
15: else
16:   player:tell("<B>Saving your audit configuration. Back to <A HREF=\"/audit\">/audit</A>...</B>")
17:   user_columns = {}
18:   for x in [1..this.max_columns]
19:     column = $www:parse_POST(tostr(x))
20:     if (column && column != "[none]")
21:       user_columns = {@user_columns, column}
22:     endif
23:   endfor
24:   user_sort = toint($www:parse_POST("sort"))
25:   if (user_sort)
26:     `user_sort = user_columns[user_sort] ! E_RANGE => ""'
27:   endif
28:   user_quota = !!$www:parse_POST("quota")
29:   user_create_recycle = !!$www:parse_POST("create_recycle")
30:   this:set_data(player.user, {user_columns, user_sort, user_quota, user_create_recycle})
31: endif
32: player:tell("<H1>Setup your audit display.</H1><FORM ACTION=\"/audit/setup\" METHOD=\"post\">")
33: {user_columns, user_sort, user_quota, user_create_recycle} = this:get_data(player.user)
34: player:tell("<H3>Choose the contents of the columns:</H3><TABLE BORDER=0 WIDTH=100%><TR><TD><OL>")
35: count = 1
36: for column in ({@user_columns, @$list_utils:make(this.max_columns, "[none]")}[1..this.max_columns])
37:   player:tell("<LI>", @$html_utils:input_select(count, {"[none]", @this.audit_columns}, column))
38:   count = count + 1
39: endfor
40: player:tell("</OL></TD><TD>")
41: player:tell("<UL><LI><I>#</I> - the object's number<LI><I>Name</I> - its name, with a link to the object<LI><I>Location</I> - the location's object number<LI><I>Parent</I> - the parent's object number<LI><I>$Type</I> - the type of object<LI><I>Expires</I> - how long it will last<LI><I>Bytes</I> - bytes used in memory<LI><I>Disk</I> - bytes used on disk<LI><I>Kids</I> - link to the table of kids<LI><I>RWF</I> - readable/writable/fertile bits<LI><I>. / : / !</I> - link to its code page<LI><I>Setup</I> - link to its setup page<LI><I>Recycle</I> - link that recycles the object</UL>")
42: player:tell("</TD></TR></TABLE>")
43: player:tell("<H3>Sort the audit table using which column:</H3>", @$html_utils:input_select("sort", {"[unsorted]", @$list_utils:range(this.max_columns)}, user_sort in user_columns))
44: player:tell("<H3>When showing other people's audits:</H3>")
45: player:tell($html_utils:input_checkbox("quota", 1, user_quota), "Show their quota grid.<BR>")
46: player:tell($html_utils:input_checkbox("create_recycle", 1, user_create_recycle), "Show create &amp; recycle forms.<P>")
47: player:tell($html_utils:input_submit("Change"), " ", $html_utils:input_reset())
48: player:tell("</FORM>")
49: "Last modified by Dax (#789) on Tue May  3 14:09:31 2005 MDT."

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

You are not logged in.

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