* add a Display name to our handlers; this will be used by DAV handlers.
[citadel.git] / webcit / setup_wizard.c
index f173bd17efa7bb47a124abb9883f237734f06603..66deb8c1214b5640c80958c87ab06585b1286bf0 100644 (file)
@@ -19,7 +19,7 @@ void do_setup_wizard(void)
        if (!strcasecmp(step, "Finish")) {
                fp = fopen(wizard_filename, "w");
                if (fp != NULL) {
-                       fprintf(fp, "%d\n", serv_info.serv_rev_level);
+                       fprintf(fp, "%d\n", WC->serv_info->serv_rev_level);
                        fclose(fp);
                }
                do_welcome();
@@ -29,17 +29,16 @@ void do_setup_wizard(void)
        output_headers(1, 1, 2, 0, 0, 0);
 
        wprintf("<div id=\"banner\">\n");
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
-       wprintf("<img src=\"/static/citadel-logo.gif\" WIDTH=64 HEIGHT=64 ALT=\" \" ALIGN=MIDDLE>");
-       wprintf("<SPAN CLASS=\"titlebar\">&nbsp;First time setup");
-       wprintf("</SPAN></TD><TD ALIGN=RIGHT>");
-       wprintf("</TD></TR></TABLE>\n");
-       wprintf("</div>\n"
-               "<div id=\"content\">\n");
-
-       wprintf("<div id=\"fix_scrollbar_bug\">"
-               "<form method=\"post\" action=\"/setup_wizard\">\n"
+       wprintf("<img src=\"static/citadel-logo.gif\" WIDTH=64 HEIGHT=64");
+       wprintf("<h1>&nbsp;First time setup</h1>");
+       wprintf("</div>\n");
+
+       wprintf("<div id=\"content\" class=\"service\">\n");
+
+       wprintf("<div class=\"fix_scrollbar_bug\">"
+               "<form method=\"post\" action=\"setup_wizard\">\n"
        );
+       wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
 
        wprintf("<div align=center>"
                "This is where the setup wizard will be placed.<br>\n"
@@ -53,4 +52,9 @@ void do_setup_wizard(void)
        wDumpContent(1);
 }
 
-
+void 
+InitModule_SETUP_WIZARD
+(void)
+{
+       WebcitAddUrlHandler(HKEY("setup_wizard"), "", 0, do_setup_wizard, 0);
+}