removed a bunch of blank comment lines
[citadel.git] / webcit / setup_wizard.c
index bc2b2277a722261bdff60371e6dd13eb7fbfd921..bbac2183c53eee8f0dde127ef9a972bcc2e70586 100644 (file)
@@ -1,14 +1,9 @@
 /*
- * $Id$
- *
  * First-time setup wizard
  */
 
 #include "webcit.h"
 
-
-/*
- */
 void do_setup_wizard(void)
 {
        char *step;
@@ -19,38 +14,40 @@ 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();
                return;
        }
 
-       output_headers(1, 1, 2, 0, 0, 0);
+       output_headers(1, 1, 1, 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");
+       wc_printf("<div id=\"room_banner_override\">\n");
+       wc_printf("<img src=\"static/citadel-logo.gif\" WIDTH=64 HEIGHT=64");
+       wc_printf("<h1>&nbsp;First time setup</h1>");
+       wc_printf("</div>\n");
 
-       wprintf("<div class=\"fix_scrollbar_bug\">"
-               "<form method=\"post\" action=\"setup_wizard\">\n"
-       );
+       wc_printf("<div id=\"content\" class=\"service\">\n");
 
-       wprintf("<div align=center>"
+       wc_printf("<form method=\"post\" action=\"setup_wizard\">\n");
+       wc_printf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
+
+       wc_printf("<div align=center>"
                "This is where the setup wizard will be placed.<br>\n"
                "For now, just click Finish.<br><br>\n"
        );
 
-       wprintf("<INPUT TYPE=\"submit\" NAME=\"step\" VALUE=\"Next\">\n");
-       wprintf("<INPUT TYPE=\"submit\" NAME=\"step\" VALUE=\"Finish\">\n");
+       wc_printf("<INPUT TYPE=\"submit\" NAME=\"step\" VALUE=\"Next\">\n");
+       wc_printf("<INPUT TYPE=\"submit\" NAME=\"step\" VALUE=\"Finish\">\n");
 
-       wprintf("</form></div></div>\n");
+       wc_printf("</form></div>\n");
        wDumpContent(1);
 }
 
-
+void 
+InitModule_SETUP_WIZARD
+(void)
+{
+       WebcitAddUrlHandler(HKEY("setup_wizard"), "", 0, do_setup_wizard, 0);
+}