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");
wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"New User\">\n");
wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Exit\">\n");
- /* Only offer the "check to disable frames" selection if frames haven't
- * already been disabled by the browser braindamage check.
- */
- if (noframes == 0) {
- wprintf("<BR><INPUT TYPE=\"checkbox\" NAME=\"noframes\">");
- wprintf("<FONT SIZE=-1> 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);
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! */
}
*/
void become_logged_in(char *user, char *pass, char *serv_response)
{
- logged_in = 1;
- extract(wc_username, &serv_response[4], 0);
- strcpy(wc_password, pass);
- axlevel = extract_int(&serv_response[4], 1);
- if (axlevel >= 6)
- is_aide = 1;
+ WC->logged_in = 1;
+ extract(WC->wc_username, &serv_response[4], 0);
+ strcpy(WC->wc_password, pass);
+ WC->axlevel = extract_int(&serv_response[4], 1);
+ if (WC->axlevel >= 6)
+ WC->is_aide = 1;
}
int need_regi = 0;
- /* Note that the initial value of noframes is set by the browser braindamage
- * check, so don't add an "else" clause here.
- */
- if (!strcasecmp(bstr("noframes"), "on"))
- noframes = 1;
-
if (!strcasecmp(bstr("action"), "Exit")) {
do_logout();
}
return;
}
}
- if (logged_in) {
+ if (WC->logged_in) {
serv_puts("CHEK");
serv_gets(buf);
if (buf[0] == '2') {
+ WC->new_mail = extract_int(&buf[4], 0);
need_regi = extract_int(&buf[4], 1);
- /* FIX also check for new mail etc. here */
+ WC->need_vali = extract_int(&buf[4], 2);
}
if (need_regi) {
display_reg(1);
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_");
}
{
char buf[256];
- strcpy(wc_username, "");
- strcpy(wc_password, "");
- strcpy(wc_roomname, "");
+ strcpy(WC->wc_username, "");
+ strcpy(WC->wc_password, "");
+ strcpy(WC->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");
int a;
printf("HTTP/1.0 200 OK\n");
- output_headers(1, "bottom");
+ output_headers(1);
strcpy(buf, bstr("user"));
if (strlen(buf) > 0)
- if (strlen(bstr("axlevel")) > 0) {
- serv_printf("VALI %s|%s", buf, bstr("axlevel"));
+ if (strlen(bstr("WC->axlevel")) > 0) {
+ serv_printf("VALI %s|%s", buf, bstr("WC->axlevel"));
serv_gets(buf);
if (buf[0] != '2') {
wprintf("<EM>%s</EM><BR>\n", &buf[4]);
wprintf("</CAPTION><TR>");
for (a = 0; a <= 6; ++a) {
wprintf(
- "<TD><A HREF=\"/validate&user=%s&axlevel=%d\">%s</A></TD>\n",
+ "<TD><A HREF=\"/validate&user=%s&WC->axlevel=%d\">%s</A></TD>\n",
urlesc(user), a, axdefs[a]);
}
wprintf("</TR></TABLE><CENTER><BR>\n");
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\"");
case 8:
wprintf("Telephone:</TD><TD><INPUT TYPE=\"text\" NAME=\"phone\" VALUE=\"%s\" MAXLENGTH=\"14\"><BR>\n", buf);
break;
- case 9:
+ case 10:
wprintf("E-Mail:</TD><TD><INPUT TYPE=\"text\" NAME=\"email\" VALUE=\"%s\" MAXLENGTH=\"31\"><BR>\n", buf);
break;
}
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\"");