View/Edit #302!setup.msp

File name: setup.msp
<% player:isa($webber) || raise(E_PERM);
set_task_perms(player.user.wizard ? this.owner | player.user); %>
<% "Remove the next line if you want to allow anyone to access setup.";
if(!player.user:controls(this)) return $www.error:unauthorized();endif%>
<!DOCTYPE HTML PUBLIC "<%=this.www_doctype_fpi%>" "<%=this.www_doctype_uri%>">
<HTML><HEAD>
  <META NAME="robots" CONTENT="noindex">
  <TITLE><%=$name%>: <%=this.name%></TITLE>
  <LINK href="http://static.moo.ca/web.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY <%=this.www_body_args%>>
<H1>Setup for <%=$www:link(this, this:nn())%></H1>
<%
if (player.referer && $www:previous_object() != this && iobj)
  "We have an unknown form refering a command to us.";
  $msg:mtell("www_error", "Warning!  Previous page doesn't appear to be this one!");
  player:tell("For security reasons the command will not be executed.  Refering page: [", player.referer, "]");
  iobj = {};
endif
for element in (iobj)
  "Loop through all the form elements being returned, and set any properties with the name of the element name.";
  {name, value} = element;
  try
    mode = typeof(oldval = this:("_get_" + name)());
    if (mode == $INT) value = toint(value);
    elseif (mode == $FLOAT) value = tofloat(value);
    endif
    if (!equal(value, oldval))
      this:("_set_"+name)(value);
      player:tell("<B>", $su:capitalize(name), " changed.</B><BR>");
    endif
  except (E_PROPNF)
    "That wasn't the name of a property on this object.";
  endtry
endfor%>

<FORM ACTION="/<%=toint(this)%>/setup" METHOD="post">
<B>Name:&nbsp;&nbsp;&nbsp;&nbsp;</B> <INPUT TYPE="text" NAME="name" SIZE="60" VALUE="<%=$html_utils:literal_text(this.name)%>"><BR>
<B>Description:</B><BR>
<%text = this:_get_description();
  text = {tostr("<TEXTAREA NAME=\"description\" ROWS=\"", length({@text}) + 4, "\" COLS=\"75\" WRAP=\"virtual\">"), @$html_utils:literal_text(text), "</TEXTAREA><BR>"};
  text[1..2] = {text[1] + text[2]};
  length(text) > 1 && (text[$ - 1..$] = {text[$ - 1] + text[$]});
  player:tell(text); %>
<INPUT TYPE="submit" VALUE="Change"> <INPUT TYPE="reset">
</FORM>
Modify the access limitations with <A HREF="/ticketmaster?obj=<%=toint(this)%>">TicketMaster</A>.
<H3>Pages on <%=this:title()%>:</H3>
<%=this:page_list()%>
<% this:tell_www_tail(@args); %>
</BODY></HTML>

http://files.moo.ca:8081/3/0/2/setup.msp
Size: 2,312 bytes.
File perms: Readable


You are not logged in.

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