Roxen.git
/
server
/
base_server
/
mainconfig.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/mainconfig.pike:1:
inherit "config/builders";
-
string cvs_version = "$Id: mainconfig.pike,v 1.
25
1996/12/
06
23
:
01
:
16
per
Exp $";
+
string cvs_version = "$Id: mainconfig.pike,v 1.
26
1996/12/
07
11
:
37
:
42
neotron
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>"
+
#define BODY "<body "+(roxen->QUERY(BG)?"background=/image/background.gif ":"")+"bgcolor=#"+dR+dG+dB+" text=#ffffff link=#ffffaa vlink=#ffffaa alink=#f0e0f0>
<blockquote>
"
#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:412:
{ string res=""; object o; foreach(roxen->configurations, o) res += "<option>Copy of '"+o->name+"'"; return res; } string new_configuration_form() {
-
return replace(default_head("")
+"<blockquote>"
+read_bytes("etc/newconfig.html"), ({"$COPIES","$configurl"}),
+
return replace(default_head("")+read_bytes("etc/newconfig.html"), ({"$COPIES","$configurl"}),
({configuration_list(),CONFIG_URL})) + "\n\n</blockquote></body>"; } mapping module_nomore(string name, int type, object conf) { mapping module; object o; // perror("Module: "+name+"\n"); if((module = conf->modules[name])
Roxen.git/server/base_server/mainconfig.pike:510:
roxen->rescan_modules(); perror("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"+
-
"<
blockquote><
table width=500><tr><td width=500>"
+
"<table width=500><tr><td width=500>"
"<h2>Select a module to add from the list below</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/"+
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")+
-
"<
blockquote><
h1>No configuration name?</h1>"
+
"<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") +
-
"<
blockquote><
h1>Illegal configuration name</h1>"
+
"<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:754:
n2 = node->descend("Configuration interface", 1)->descend("User", 1); n2->data[VAR_VALUE] = roxen->QUERY(ConfigurationUser); n2->change(1); root->save(); return std_redirect(root, id); } }
-
res = default_head("Welcome to Roxen Challenger")
+ "<blockquote>"
;
+
res = default_head("Welcome to Roxen Challenger");
res += read_bytes("etc/welcome.html"); if(error && strlen(error)) res += "\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"
Roxen.git/server/base_server/mainconfig.pike:1002:
o = find_node(id->not_query); // Find the requested node (from the filename) 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("")
+display
_tabular_header(root)+read_bytes("etc/config.html"),"text/html");
+
return http_string_answer(default_head("
Roxen Challenger
")
+
+
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 // 'expert' mode. It can be useful. case "expert": expert_mode = 1; break;