]> code.citadel.org Git - citadel.git/blobdiff - webcit/auth.c
* Ditched the frames mode completely. It wasn't working properly in,
[citadel.git] / webcit / auth.c
index 624844a4c6ae548e22da011b224fe81f70540df5..738de528d28b942569c516c82290677d81331986 100644 (file)
@@ -36,7 +36,7 @@ void display_login(char *mesg)
        char buf[256];
 
        printf("HTTP/1.0 200 OK\n");
-       output_headers(1, "_top");
+       output_headers(3);
 
        /* Da banner */
        wprintf("<CENTER><TABLE border=0 width=100%><TR><TD>\n");
@@ -68,10 +68,6 @@ void display_login(char *mesg)
        wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"New User\">\n");
        wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Exit\">\n");
 
-       wprintf("<BR><INPUT TYPE=\"checkbox\" NAME=\"noframes\">");
-       wprintf("<FONT SIZE=-1>&nbsp;Check here to disable frames</FONT>\n");
-       wprintf("</FORM></CENTER>\n");
-
        /* Da instructions */
        wprintf("<LI><EM>If you already have an account on %s,",
                serv_info.serv_humannode);
@@ -84,7 +80,7 @@ void display_login(char *mesg)
        wprintf("<LI>You must use a browser that supports <i>cookies</i>.<BR>\n");
        wprintf("</EM></UL>\n");
 
-       wDumpContent(1);
+       wDumpContent(0);        /* No menu here; not logged in yet! */
 }
 
 
@@ -110,11 +106,6 @@ void do_login(void)
        int need_regi = 0;
 
 
-       if (!strcasecmp(bstr("noframes"), "on"))
-               noframes = 1;
-       else
-               noframes = 0;
-
        if (!strcasecmp(bstr("action"), "Exit")) {
                do_logout();
        }
@@ -152,8 +143,9 @@ void do_login(void)
                serv_puts("CHEK");
                serv_gets(buf);
                if (buf[0] == '2') {
+                       new_mail = extract_int(&buf[4], 0);
                        need_regi = extract_int(&buf[4], 1);
-                       /* FIX also check for new mail etc. here */
+                       need_vali = extract_int(&buf[4], 2);
                }
                if (need_regi) {
                        display_reg(1);
@@ -168,18 +160,7 @@ void do_login(void)
 
 void do_welcome(void)
 {
-
-       if (noframes) {
-               printf("HTTP/1.0 200 OK\n");
-               output_headers(1, "_top");
-               wprintf("<CENTER><H1>");
-               escputs(wc_username);
-               wprintf("</H1>\n");
-               /* FIX add user stats here */
-               wDumpContent(1);
-       } else {
-               output_static("frameset.html");
-       }
+       smart_goto("_BASEROOM_");
 }
 
 
@@ -192,7 +173,7 @@ void do_logout(void)
        strcpy(wc_roomname, "");
 
        printf("HTTP/1.0 200 OK\n");
-       output_headers(2, "_top");      /* note "2" causes cookies to be unset */
+       output_headers(2);      /* note "2" causes cookies to be unset */
 
        wprintf("<CENTER>");
        serv_puts("MESG goodbye");
@@ -224,7 +205,7 @@ void validate(void)
        int a;
 
        printf("HTTP/1.0 200 OK\n");
-       output_headers(1, "bottom");
+       output_headers(1);
 
        strcpy(buf, bstr("user"));
        if (strlen(buf) > 0)
@@ -303,7 +284,7 @@ void display_reg(int during_login)
        int a;
 
        printf("HTTP/1.0 200 OK\n");
-       output_headers(1, "bottom");
+       output_headers(1);
 
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
        wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
@@ -407,7 +388,7 @@ void display_changepw(void)
        char buf[256];
 
        printf("HTTP/1.0 200 OK\n");
-       output_headers(1, "bottom");
+       output_headers(1);
 
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=770000><TR><TD>");
        wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");