From: Art Cancro Date: Thu, 10 Mar 2005 04:51:54 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: v7.86~4975 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=d91f6c21ee762d93dbae1bc32360742be827e85f;p=citadel.git *** empty log message *** --- diff --git a/webcit/Makefile.in b/webcit/Makefile.in index 225d91817..09f5f833e 100644 --- a/webcit/Makefile.in +++ b/webcit/Makefile.in @@ -38,7 +38,7 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \ calendar.o calendar_tools.o calendar_view.o event.o \ availability.o iconbar.o crypto.o inetconf.o notes.o \ groupdav_main.o groupdav_get.o groupdav_propfind.o \ - groupdav_delete.o groupdav_put.o http_datestring.o \ + groupdav_delete.o groupdav_put.o http_datestring.o setup_wizard.o \ $(LIBOBJS) $(CC) webserver.o context_loop.o tools.o cookie_conversion.o \ webcit.o auth.o tcp_sockets.o mainmenu.o serv_func.o who.o listsub.o \ @@ -48,7 +48,7 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \ summary.o calendar.o calendar_tools.o calendar_view.o event.o \ availability.o ical_dezonify.o iconbar.o crypto.o inetconf.o notes.o \ groupdav_main.o groupdav_get.o groupdav_propfind.o groupdav_delete.o \ - groupdav_put.o http_datestring.o \ + groupdav_put.o http_datestring.o setup_wizard.o \ $(LIBOBJS) $(LIBS) $(LDFLAGS) -o webserver .c.o: diff --git a/webcit/auth.c b/webcit/auth.c index a837c275f..b7d6b64a2 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -154,15 +154,47 @@ void do_login(void) void do_welcome(void) { - char startpage[SIZ]; + char buf[SIZ]; + FILE *fp; + int i; + + /* + * See if we have to run the first-time setup wizard + */ + if (!setup_wizard) { + sprintf(wizard_filename, "setupwiz.%s.%s", ctdlhost, ctdlport); + for (i=0; i +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "webcit.h" + + + +/* + */ +void do_setup_wizard(void) +{ + + output_headers(1, 1, 2, 0, 1, 0, 0); + + wprintf("
\n"); + wprintf("
"); + wprintf("\""); + wprintf(" First time setup"); + wprintf(""); + offer_start_page(); + wprintf("
\n"); + wprintf("
\n" + "
\n"); + + wprintf("
"); + + wprintf("wow"); + + wprintf("
\n" + "
" + "Click on a name to read user info. Click on " + "\"(p)\" to send " + "a page (instant message) to that user.
\n"); + wDumpContent(1); +} + + diff --git a/webcit/webcit.c b/webcit/webcit.c index 9264b6309..be1c6a68f 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -1354,6 +1354,8 @@ void session_loop(struct httprequest *req) display_inetconf(); } else if (!strcasecmp(action, "save_inetconf")) { save_inetconf(); + } else if (!strcasecmp(action, "setup_wizard")) { + do_setup_wizard(); } else if (!strcasecmp(action, "diagnostics")) { output_headers(1, 1, 1, 0, 0, 0, 0); diff --git a/webcit/webcit.h b/webcit/webcit.h index c7ab8d30d..779e3da5d 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -255,7 +255,9 @@ extern char *axdefs[]; extern char *ctdlhost, *ctdlport; extern char *server_cookie; extern int is_https; - +extern int setup_wizard; +extern char wizard_filename[PATH_MAX]; +void do_setup_wizard(void); void stuff_to_cookie(char *cookie, int session, char *user, char *pass, char *room); diff --git a/webcit/webserver.c b/webcit/webserver.c index a25ea478c..70078b4c6 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -61,6 +61,8 @@ char *server_cookie = NULL; char *ctdlhost = DEFAULT_HOST; char *ctdlport = DEFAULT_PORT; +int setup_wizard = 0; +char wizard_filename[PATH_MAX]; /* * This is a generic function to set up a master socket for listening on