{
begin_burst();
output_headers(1, 0, 0, 0, 1, 0);
- do_template("login", NULL);
+ do_template("login");
end_burst();
}
get_preference("floordiv_expanded", &FloorDiv);
WCC->floordiv_expanded = FloorDiv;
FreeStrBuf(&Buf);
+ FlushRoomlist();
}
if (havebstr("exit_action")) {
begin_burst();
output_headers(1, 0, 0, 0, 1, 0);
- do_template("authpopup_finished", NULL);
+ do_template("authpopup_finished");
end_burst();
return;
}
if (WC->logged_in) {
begin_burst();
output_headers(1, 0, 0, 0, 1, 0);
- do_template("authpopup_finished", NULL);
+ do_template("authpopup_finished");
end_burst();
}
} else {
begin_burst();
output_headers(1, 0, 0, 0, 1, 0);
wc_printf("<html><body>");
- do_template("openid_manual_create", NULL);
+ do_template("openid_manual_create");
wc_printf("</body></html>");
end_burst();
}
long HKLen;
const char *HKey;
HashPos *Cursor;
+ int len;
Cursor = GetNewHashPos (WCC->Hdr->urlstrings, 0);
while (GetNextHashPos(WCC->Hdr->urlstrings, Cursor, &HKLen, &HKey, &U)) {
serv_puts("000");
linecount = 0;
- while (StrBuf_ServGetln(Buf), strcmp(ChrPtr(Buf), "000"))
+ while (len = StrBuf_ServGetln(Buf),
+ ((len >= 0) &&
+ ((len != 3) || strcmp(ChrPtr(Buf), "000") )))
{
if (linecount == 0) result = NewStrBufDup(Buf);
if (!strcasecmp(ChrPtr(result), "authenticate")) {
if (WC->logged_in) {
begin_burst();
output_headers(1, 0, 0, 0, 1, 0);
- do_template("authpopup_finished", NULL);
+ do_template("authpopup_finished");
end_burst();
} else {
begin_burst();
begin_burst();
output_headers(1, 0, 0, 0, 1, 0);
wc_printf("<html><body>");
- do_template("openid_manual_create", NULL);
+ do_template("openid_manual_create");
wc_printf("</body></html>");
end_burst();
}
FlushStrBuf(WCC->wc_username);
FlushStrBuf(WCC->wc_password);
FlushStrBuf(WCC->wc_fullname);
+ FlushRoomlist();
serv_puts("LOUT");
serv_getln(buf, sizeof buf);
char buf[SIZ];
int a;
- output_headers(1, 1, 2, 0, 0, 0);
- wc_printf("<div id=\"banner\">\n");
- wc_printf("<h1>");
- wc_printf(_("Validate new users"));
- wc_printf("</h1>");
- wc_printf("</div>\n");
+ output_headers(1, 1, 1, 0, 0, 0);
- wc_printf("<div id=\"content\" class=\"service\">\n");
+ do_template("beginbox_1");
+ StrBufAppendBufPlain(WC->WBuf, _("Validate new users"), -1, 0);
+ do_template("beginbox_2");
/* If the user just submitted a validation, process it... */
safestrncpy(buf, bstr("user"), sizeof buf);
wc_printf("</div>\n");
wc_printf("</td></tr></table>\n");
+ do_template("endbox");
wDumpContent(1);
}
wc_printf("</div>\n");
wc_printf("</form>\n");
- do_template("endbox", NULL);
+ do_template("endbox");
wDumpContent(1);
}
}
+/*
+ * toggle the session over to a different language
+ */
+void switch_language(void) {
+ set_selected_language(bstr("lang"));
+ pop_destination();
+}
+
+
void _display_reg(void) {
display_reg(0);
}
WebcitAddUrlHandler(HKEY("do_logout"), "", 0, do_logout, ANONYMOUS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);
WebcitAddUrlHandler(HKEY("ajax_login_username_password"), "", 0, ajax_login_username_password, AJAX|ANONYMOUS);
WebcitAddUrlHandler(HKEY("ajax_login_newuser"), "", 0, ajax_login_newuser, AJAX|ANONYMOUS);
+ WebcitAddUrlHandler(HKEY("switch_language"), "", 0, switch_language, ANONYMOUS);
RegisterConditional(HKEY("COND:AIDE"), 2, ConditionalAide, CTX_NONE);
RegisterConditional(HKEY("COND:LOGGEDIN"), 2, ConditionalIsLoggedIn, CTX_NONE);
RegisterConditional(HKEY("COND:MAY_CREATE_ROOM"), 2, ConditionalHaveAccessCreateRoom, CTX_NONE);