Roxen.git / server / base_server / mainconfig.pike

version» Context lines:

Roxen.git/server/base_server/mainconfig.pike:1:   inherit "config/builders"; - string cvs_version = "$Id: mainconfig.pike,v 1.71 1997/08/14 20:11:01 thomas Exp $"; - inherit "roxenlib"; + string cvs_version = "$Id: mainconfig.pike,v 1.72 1997/08/18 00:37:45 per Exp $"; + //inherit "roxenlib";   inherit "config/draw_things";      import Array;   import Stdio;   string status_row(object node);   string display_tabular_header(object node);   object get_template(string t);      /* Work-around for Simulate.perror */   #define perror roxen_perror
Roxen.git/server/base_server/mainconfig.pike:396:    if(!allvars["delete_"+i])    {    if(allvars["other_"+i] && (allvars["other_"+i] != op[i][2]))    {    allvars["ip_number_"+i] = allvars["other_"+i];    ip_number_list += ({ allvars["other_"+i] });    }    op[i][0] = (int)allvars["port_"+i]||op[i][0];    op[i][1] = allvars["protocol_"+i]||op[i][1];    op[i][2] = allvars["ip_number_"+i]||op[i][2]; -  op[i][3] = allvars["arguments_"+i]||op[i][3]; +  +  if(allvars["key_"+i] || allvars["cert_"+i]) +  op[i][3] = +  (allvars["key_"+i]?"key-file "+allvars["key_"+i]+"\n":"")+ +  (allvars["cert_"+i]?"cert-file "+allvars["cert_"+i]+"\n":"");    } else // Delete this port.    op[i]=0;    }    return op - ({ 0 });       case TYPE_DIR_LIST:    array foo;    foo=map((var-" ")/",", lambda(string var, object node) {    if (!strlen( var ) || file_size( var ) != -2)    {
Roxen.git/server/base_server/mainconfig.pike:878:    if((auth[0] == roxen->QUERY(ConfigurationUser))    && crypt(auth[1], roxen->QUERY(ConfigurationPassword)))    return 1;   }      mapping initial_configuration(object id)   {    object n2;    string res, error;    +  if(id->variables->nope) +  return std_redirect(root, id); +  +     if(id->prestate->initial && id->variables->pass)    {    error="";    if(id->variables->pass != id->variables->pass2)    error = "You did not type the same password twice.\n";    if(!strlen(id->variables->pass))    error += "You must specify a password.\n";    if(!strlen(id->variables->user))    error += "You must specify a username.\n";    if(!strlen(error))
Roxen.git/server/base_server/mainconfig.pike:922:    return std_redirect(root, id);    }    }       res = default_head("Welcome to Roxen Challenger");       res += read_bytes("etc/welcome.html");    if(error && strlen(error))    res += "<blockquote>\n<p><b>"+error+"</b>";    -  res += ("<pre>" -  "<font size=\"+1\">" +  res += ("<table border=0 bgcolor=black><tr><td><table cellspacing=0 border=0 cellpadding=3 bgcolor=#e0e0ff>" +  "<tr><td colspan=2><center><h1>Please complete this form.</h1></center>" +  "</td></tr>"    "<form action=\"/(initial)/Globals/\">" -  " User name <input name=user type=string>\n" -  " Password <input name=pass type=password>\n" -  " Again <input name=pass2 type=password>\n" +  "<tr><td align=right>User name</td><td><input name=user type=string></td></tr>\n" +  "<tr><td align=right>Password</td><td><input name=pass type=password></td></tr>\n" +  "<tr><td align=right>Again</td><td><input name=pass2 type=password></td></tr>\n"   // Avoid this trap for people who like to shoot themselves in the foot.   // /Peter   // "IP-pattern <input name=pattern type=string>\n" -  " <input type=submit value=\"Use these values\">\n" -  "</form></font></pre></blockquote>"); +  "<tr><td align=left><input type=submit value=\" Ok \">\n</td>" +  "<td align=right><input type=submit name=nope value=\" Cancel \"></td></tr>\n" +  "</form></table></table></blockquote>");       return stores(res);   }      object module_of(object node)   {    while(node)    {    if(node->type == NODE_MODULE_COPY)    return node->data;
Roxen.git/server/base_server/mainconfig.pike:1178:    else    cnt++;    }    return res[0..strlen(res)-8];   }      string status_row(object node)   {    return ("<table width=\"100%\" bgcolor=\"#dddddd\" border=0 cellpadding=0"    " cellspacing=0>\n" -  "<tr><td valign=middle align=left><a href=\"$docurl\">" -  "<img border=0 src=\"/image/roxen-small.gif\" alt=\"Roxen\"></a>" +  "<tr><td valign=middle align=left><a href=\"$docurl"+ +  node->path(1)+"\">" +  "<img border=0 src=\"/image/roxen-icon-gray.gif\" alt=\"\"></a>"    "</td>\n<td align=right valign=center>" + describe_node_path(node) +    "</td>\n<td>&nbsp;</td></tr>\n</table><br>");   }      mapping logged = ([ ]);      void check_login(object id)   {    if(logged[id->remoteaddr]+1000<time())    report_notice("Administrator logged on from "+