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.17 1996/12/04 07:15:11 per Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.18 1996/12/04 07:38:23 per Exp $";   inherit "roxenlib";   inherit "config/draw_things";      #include <confignode.h>   #include <module.h>      #define dR "00"   #define dG "20"   #define dB "50"   
Roxen.git/server/base_server/mainconfig.pike:140:         void create()   {    build_root(root);    init_ip_list();    call_out(init_ip_list, 0);   }      #define PUSH(X) do{res+=({(X)});}while(0) - #define BUTTON(ACTION,TEXT,ALIGN) PUSH("<a href=\"/(ACTION)"+(o?o->path(1):"/")+"?"+(bar++)+"\"><img border=0 hspacing=0 vspacing=0 src=/auto/button/"+replace(TEXT," ","%20")+" alt=\""+TEXT+"\""+(("ALIGN"-" ")=="left"?"":" align="+("ALIGN"-" "))+"></a>") + #define BUTTON(ACTION,TEXT,ALIGN) do{PUSH("<a href=\"/(ACTION)"+(o?o->path(1):"/")+"?"+(bar++)+"\"><img border=0 hspacing=0 vspacing=0 src=/auto/button/"+(lm?"lm/":"")+replace(TEXT," ","%20")+" alt=\""+TEXT+"\""+(("ALIGN"-" ")=="left"?"":" align="+("ALIGN"-" "))+"></a>");lm=0;}while(0)      inline string shutdown_restart(string save, int compact,void|object o)   {    return /*"<br clear=all>"*/"";   }      string default_head(string h, string|void save)   {    return ("<title>"+h+"</title>"+ BODY);   }
Roxen.git/server/base_server/mainconfig.pike:884:   object button_font = module_font;      mapping auto_image(string in, object id)   {    string key, value;    array trans = ({ (int)("0x"+dR),(int)("0x"+dG),(int)("0x"+dB) });    mapping r;    mixed e;    object i;    -  if(!id->pragma["no-cache"] && (r=cache_lookup("config_images", in))) -  return r; -  if(!sscanf(in, "%s/%s", key, value)) -  key=in; +  if(r=cache_lookup("config_images", in)) return r; +  if(!sscanf(in, "%s/%s", key, value)) key=in;       switch(key)    {    case "module":    i = draw_module_header(roxen->allmodules[value][0],    roxen->allmodules[value][2],    module_font);    break;       case "button": -  i=draw_config_button(value,button_font); +  int lm,rm; +  if(sscanf(value, "lm/%s", value)) lm=1; +  if(sscanf(value, "rm/%s", value)) rm=1; +  i=draw_config_button(value,button_font,lm,rm);    break;       case "fold":    case "fold2":    i = draw_fold((int)reverse(key));    break;       case "unfold":    case "unfold2":    i = draw_unfold((int)reverse(key));
Roxen.git/server/base_server/mainconfig.pike:1330:    PUSH("<a href=\""+ o->up->path(1)+"?"+(bar++)+"\">"    "<img src=/auto/back alt='[Up]' align=left hspace=0 border=0></a> ");       if(i=o->folded) o->folded=0;    PUSH(o->describe(1));    o->folded=i;       PUSH("</dl>");   // PUSH("<nobr><img height=15 src=/auto/button/ width=100% align=right>");    PUSH("<br clear=all>"); -  PUSH("<table width=100%><tr><td bgcolor=#"+bdR+bdG+bdB+">"); -  PUSH("<img src=/auto/button/>"); + // PUSH("<table width=100%><tr><td bgcolor=#"+bdR+bdG+bdB+">");    -  +  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)    {    BUTTON(delete, "Delete", left);    if(o->data->copies)
Roxen.git/server/base_server/mainconfig.pike:1355:       i=0;    if(o->type == NODE_MODULE_MASTER_COPY || o->type == NODE_MODULE_COPY    || o->type == NODE_MODULE_COPY_VARIABLES)    {    BUTTON(delete, "Delete", left);    BUTTON(refresh, "Reload", left);    }       if(o->type == NODE_CONFIGURATION) -  BUTTON(delete,"Remove virtual server", left); +  BUTTON(delete,"Delete this server", left);       if(nunfolded(o))    BUTTON(foldall, "Close all",left);    if(o->changed) -  BUTTON(unfoldmodified, "Open all modified", left); +  BUTTON(unfoldmodified, "Open modified", left);       if((o->changed||root->changed)) -  BUTTON(save, "Save changes", left); +  BUTTON(save, "Save", left);    BUTTON(restart, "Restart", left);    BUTTON(shutdown,"Shutdown", left);       -  PUSH("<img src=/auto/button/%20>"); +  PUSH("<img border=0 hspacing=0 vspacing=0 src=/auto/button/rm/%20>"); +     PUSH("</nobr><br clear=all>"); -  PUSH("</td></tr></table>"); + // PUSH("</td></tr></table>");    PUSH("<p align=right><a href=$docurl>"+roxen->real_version +"</a></body>");    return stores(res*"");   }