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.47 1997/08/12 06:31:59 per Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.48 1997/08/12 08:59:55 per Exp $";   inherit "roxenlib";   inherit "config/draw_things";      import Array;   import Stdio;      /* Work-around for Simulate.perror */   #define perror roxen_perror      #include <confignode.h>
Roxen.git/server/base_server/mainconfig.pike:520:    roxen->current_configuration = 0;    werror("CONFIG: Done.\n");    }       a=roxen->allmodules;    mods=sort_array(indices(a), lambda(string a, string b, mapping m) {    return m[a][0] > m[b][0];    }, a);       res = ({default_head("Add a module")+"\n\n"+ -  "<table><tr><td>&nbsp<td><h2>Select a module to add from the list below</h2>" }); +  status_row(node)+ +  display_tabular_header(node)+ +  "<table><tr><td>&nbsp<td><h2>Select a module to add" +  " from the list below, click on it's header to add it.</h2>" });       foreach(mods, q)    {    if(b = module_nomore(q, a[q][2], node->config()))    {    if(b->sname != q)    res += ({("<p>"+    (roxen->QUERY(BS)?"<h2>"+a[q][0]+"</h2>":    "<img alt=\""+a[q][0]+"\" src=/auto/module/" +a[q][2]+"/"+    q+" height=24 width=500>")+ "<br><blockquote>" + a[q][1] +
Roxen.git/server/base_server/mainconfig.pike:985:    i=draw_selected_button(value,button_font);    break;       case "unselected":    i=draw_unselected_button(value,button_font);    break;    }    if(i)    {    object o = open("roxen-images/"+img_key,"wct"); -  e=i->map_closest(i->select_colors(62)+({trans}))->togif(@trans); +  e=i->togif();    i=0;    if(o) { o->write(e); o=0; }   #ifdef DEBUG    else {perror("Cannot open file for "+in+"\n");}   #endif    return http_string_answer(e,"image/gif");    }    return 0;   }   
Roxen.git/server/base_server/mainconfig.pike:1112:       if(!o) // Bad node, perhaps an old bookmark or something.    {    id->referer = ({ });    return std_redirect(0, id);    } else if(o == root) {    // The URL is http://config-url/, not one of the top nodes, but    // _above_ them. This is supposed to be some nice introductory    // text about the configuration interface...    return http_string_answer(default_head("Roxen Challenger")+ +  status_row(root)+    display_tabular_header(root)+    read_bytes("etc/config.html"),"text/html");    }       if(sizeof(id->prestate))    {    switch(indices(id->prestate)[0])    {    // It is possible to mark variables as 'VAR_EXPERT', this    // will make it impossible to configure them whithout the
Roxen.git/server/base_server/mainconfig.pike:1244:    mv("configurations/"+o->data->name,    "configurations/"+id->variables->name);    o->data->name=id->variables->name;    }    break;       /* This only asks "do you really want to...", it does not delete    * the node */       case "delete": -  PUSH(default_head("Roxen Configuration")); +  PUSH(default_head("Roxen Configuration")+ +  status_row(o)+ +  display_tabular_header(o))   // PUSH("<hr noshade>");       switch(o->type)    {    case NODE_CONFIGURATION:    PUSH("<font size=+2>Do you really want to delete the configuration "+    o->data->name + ", all its modules and their copies?"    "\n\n<p></font>");    break;   
Roxen.git/server/base_server/mainconfig.pike:1512:    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);    -  if(!more_mode) -  BUTTON(morevars, "More settings", left); -  else -  BUTTON(nomorevars, "Less settings", left); -  +     if(!lm)    {    PUSH("<img border=0 alt=\"\" hspacing=0 vspacing=0 src=/auto/button/rm/%20>");    PUSH("</nobr><br clear=all>");    lm=1;    }    -  +  if(!more_mode) +  BUTTON(morevars, "More settings", left); +  else +  BUTTON(nomorevars, "Less settings", left); +     if((o->changed||root->changed))    {    BUTTON(save, "Save", left);    PUSH("<img border=0 alt=\"\" hspacing=0 vspacing=0 src=/auto/button/%20%20%20%20%20%20>");    }    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("</table>");    PUSH("</body>\n");    return stores(res*"");   }