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.22 1996/12/05 16:01:58 per Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.23 1996/12/06 15:57:24 per Exp $";   inherit "roxenlib";   inherit "config/draw_things";      #include <confignode.h>   #include <module.h>      #define dR "00"   #define dG "06"   #define dB "30"   
Roxen.git/server/base_server/mainconfig.pike:19:      #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; -  int changed; +  int changed, moredocs;       int bar=previous_object()->bar;    function saver = lambda(object o) { if(o->changed) o->change(-o->changed); };       string|array error;       void change(int i)    {    changed += i;    if(up) up->change(i);
Roxen.git/server/base_server/mainconfig.pike:59:    string describe(int i)    {    array (string) res=({""});    object node,prevnode;    mixed tmp;       if(describer)    tmp = describer(this_object());   #ifdef NODE_DEBUG    else +  {    perror("No describer in node "+path(1)+"\n"); -  +  return 0; +  }   #endif    if(arrayp(tmp) && sizeof(tmp)) -  PUSH(tmp[0] + (!i?"<dt>"+show_me(tmp[1]):tmp[1]) + "\n"); +  PUSH(tmp[0] + "<dt>" + (i?tmp[i]:show_me(tmp[1])) + "\n");    else if(stringp(tmp) && strlen(tmp)) -  PUSH((i?tmp:"<dt>"+show_me(tmp)) + "\n"); +  PUSH("<dt>"+(i?tmp:show_me(tmp)) + "\n");    else if(!tmp)    return "";       if(!folded)    { -  int sdl = 0; /* Add slash-dl to the end.. */ -  +     PUSH("<dl><dd>\n");    node = down;    while(node)    {    if(!objectp(node)) // ERROR! Destructed node in tree!    {    if(objectp(prevnode))    prevnode->next=0;    node=0;    break;    }    prevnode = node;    node = node->next;    PUSH(prevnode->describe()); - // PUSH("<br>"); +     }    PUSH("</dl>\n\n");    }    return res*"";    }          object config()    {    object node;
Roxen.git/server/base_server/mainconfig.pike:914:    break;       case "selected":    i=draw_selected_button(value,button_font);    break;       case "unselected":    i=draw_unselected_button(value,button_font);    break;    } +  if(i) +  {    i->map_closest(i->select_colors(64)+({trans})); -  if(i) r = http_string_answer(i->togif(@trans),"image/gif"); +  r = http_string_answer(i->togif(@trans),"image/gif"); +  }    i=0;    cache_set("config_images", in, r);    return r;   }         string remove_font(string t, mapping m, string c)   {    return "<b>"+c+"</b>";   }
Roxen.git/server/base_server/mainconfig.pike:1017:    // will make it impossible to configure them whithout the    // 'expert' mode. It can be useful.    case "expert": expert_mode = 1; break;    case "noexpert": expert_mode = 0; break;       // Fold and unfold nodes, this is _very_ simple, once all the    // supporting code was writte.    case "fold": o->folded=1; break;    case "unfold": o->folded=0; break;    +  case "moredocs": o->moredocs=1; break; +  case "lessdocs": o->moredocs=0; break; +     case "foldall":    o->map(lambda(object o) { o->folded=1; });    break;          case "unfoldmodified":    o->map(lambda(object o) { if(o->changed) o->folded=0; });    break;      
Roxen.git/server/base_server/mainconfig.pike:1343:    o->change(-1);    else if(!o->changed)    o->change(1);    }    break;    }    return std_redirect(o, id);    }       PUSH(default_head("Roxen server configuration", root->changed?o->path(1):0)); -  PUSH("<blockquote>\n"); - // PUSH("<table width=\"100%\" cellpadding=0 cellspacing=0>\n"); - // PUSH("<tr><td>\n"); +  PUSH("<dl>\n");    PUSH("\n"+display_tabular_header( o )+"\n"); -  PUSH("<br>"); - // PUSH("</td></tr><tr><td width=\"100%\" bgcolor=#000000><br>"); -  +  PUSH("<p>");    if(o->up != root && o->up)    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("</td></tr></table>\n"); - // PUSH("<br clear=all>\n"); +  PUSH("</dl><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:1410:       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("<a href=$docurl>"+roxen->real_version +"</a>" +  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"); -  PUSH("</blockquote>\n"); +     return stores(res*"");   }