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.26 1996/12/07 11:37:42 neotron Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.27 1996/12/10 00:15:40 per Exp $";   inherit "roxenlib";   inherit "config/draw_things";      #include <confignode.h>   #include <module.h>      #define dR "00"   #define dG "06"   #define dB "30"      #define bdR "00"   #define bdG "50"   #define bdB "90"       - #define BODY "<body "+(roxen->QUERY(BG)?"background=/image/background.gif ":"")+"bgcolor=#"+dR+dG+dB+" text=#ffffff link=#ffffaa vlink=#ffffaa alink=#f0e0f0><blockquote>" + #define BODY "<body "+(roxen->QUERY(BG)?"background=/image/background.gif ":"")+"bgcolor=#"+dR+dG+dB+" text=#ffffff link=#ffffaa vlink=#ffffaa alink=#f0e0f0>"      #define TABLEP(x, y) (id->supports->tables ? x : y)   #define PUSH(X) do{res+=({(X)});}while(0)      int bar=time(1);      class Node {    inherit "struct/node";       mixed original;
Roxen.git/server/base_server/mainconfig.pike:414:    object o;    foreach(roxen->configurations, o)    res += "<option>Copy of '"+o->name+"'";    return res;   }      string new_configuration_form()   {    return replace(default_head("")+read_bytes("etc/newconfig.html"), ({"$COPIES","$configurl"}),    ({configuration_list(),CONFIG_URL})) + -  "\n\n</blockquote></body>"; +  "\n\n</body>";   }      mapping module_nomore(string name, int type, object conf)   {    mapping module;    object o;   // perror("Module: "+name+"\n");    if((module = conf->modules[name])    && (!module->copies && module->enabled))    return module;
Roxen.git/server/base_server/mainconfig.pike:535:    "\">Disable that module</a> if you want this one insted</i>"    "\n<p><br><p>")});    } else {    res += ({"<p><a href=/(newmodule)"+node->path(1)+"?"+q+"=1>"+    (roxen->QUERY(BS)?"<h2>"+a[q][0]+"</h2>":    "<img border=0 alt=\""+a[q][0]+"\" src=/auto/module/"+    q+" width=500>")+    "</a><br>"+a[q][1]+"<p><br><p>"});    }    } -  return res*""+"</td></tr></table></blockquote>"; +  return res*""+"</td></tr></table>";   }      mapping new_module(object id, object node)   {    string varname;       if(!sizeof(id->variables))    return stores(new_module_form(id, node));       varname=indices(id->variables)[0];
Roxen.git/server/base_server/mainconfig.pike:682:    return 1;   }      mapping new_configuration(object id)   {    if(!sizeof(id->variables))    return stores(new_configuration_form());       if(!id->variables->name)    return stores(default_head("Bad luck")+ -  "<h1>No configuration name?</h1>" +  "<blockquote><h1>No configuration name?</h1>"    "Either you entered no name, or your WWW-browser "    "failed to include it in the request</blockquote>");       id->variables->name=(replace(id->variables->name,"\000"," ")/" "-({""}))*" ";    if(!low_enable_configuration(id->variables->name, id->variables->type))    return stores(default_head("Bad luck") + -  "<h1>Illegal configuration name</h1>" +  "<blockquote><h1>Illegal configuration name</h1>"    "The name of the configuration must contain characters"    " other than space and tab, it should not end with "    "~, and it must not be 'CVS', 'Global Variables' or "    "'global variables', nor the name of an existing "    "configuration, and the character '/' cannot be included</blockquote>");    return std_redirect(root->descend("Configurations"), id);   }      int conf_auth_ok(mixed auth)   {
Roxen.git/server/base_server/mainconfig.pike:758:       root->save();    return std_redirect(root, id);    }    }       res = default_head("Welcome to Roxen Challenger");       res += read_bytes("etc/welcome.html");    if(error && strlen(error)) -  res += "\n<p><b>"+error+"</b>"; +  res += "<blockquote>\n<p><b>"+error+"</b>";       res += ("<pre>"    "<font size=+1>"    "<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"   // Avoid this trap for people that likes to shoot themselevs in the foot.   // /Peter   // "IP-pattern <input name=pattern type=string>\n"
Roxen.git/server/base_server/mainconfig.pike:1364:    PUSH("<a href=\""+ o->up->path(1)+"?"+(bar++)+"\">"    "<img src=/auto/back alt='[Up]' align=left hspace=0 border=0></a>\n");       if(i=o->folded) o->folded=0;    string tmp = o->describe(1);    if(!id->supports->font)    tmp = parse_html(tmp, ([]),(["font":remove_font, ]));    PUSH(tmp);    o->folded=i;    -  PUSH("</dl><p><br clear=all><p>\n"); +  PUSH("</dl>"); +  PUSH("<p><br clear=all><p>\n");       int lm=1;       if(o->type == NODE_CONFIGURATIONS)    BUTTON(newconfig, "New virtual server", left);       if(o->type == NODE_CONFIGURATION)    BUTTON(newmodule, "New module", left);       if(o->type == NODE_MODULE)
Roxen.git/server/base_server/mainconfig.pike:1399:    if(o->type == NODE_CONFIGURATION)    BUTTON(delete,"Delete this server", left);       if(nunfolded(o))    BUTTON(foldall, "Fold all",left);    if(o->changed)    BUTTON(unfoldmodified, "Unfold modified", left);       if(nfolded(o))    BUTTON(unfoldlevel, "Unfold level", left); -  else if(nfoldedr(o)) -  BUTTON(unfoldall, "Unfold all", left); + // else if(nfoldedr(o)) + // BUTTON(unfoldall, "Unfold all", left);          if((o->changed||root->changed))    BUTTON(save, "Save", left);       BUTTON(restart, "Restart", left);    BUTTON(shutdown,"Shutdown", left);          PUSH("<img border=0 alt=\"\" hspacing=0 vspacing=0 src=/auto/button/rm/%20>");    PUSH("</nobr><br clear=all>"); -  PUSH("<p align=right><font size=-1 color=blue><a href=$docurl><font color=blue>"+roxen->real_version +"</font></a></font></p>"); + // PUSH("<p align=right><font size=-1 color=blue><a href=$docurl><font color=blue>"+roxen->real_version +"</font></a></font></p>");    PUSH("</body>\n");    return stores(res*"");   }