$Log$
+Revision 625.13 2005/09/18 15:02:29 ajc
+* summary.c: summary screen is now updated using ajax instead of refreshing
+ the whole page. Not only does this look cleaner, but it also has the
+ happy side effect of not reloading all of the images.
+* webcit.c: new API calls begin_ajax_response() and end_ajax_response() for
+ wrapping inner div's
+* webcit.c: removed the "refresh30" parameter from output_headers() and
+ from all code that calls it. We don't need it anymore; refreshing the
+ entire page is, like, sooooo 2004. :)
+
Revision 625.12 2005/09/18 14:30:05 ajc
* Added a "random number" parameter to the wholist ajax refresh request,
because b0rken MSIE still insists on fetching from its cache even though
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
{
char buf[SIZ];
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div style=\"position:absolute; top:20px; left:20px; right:20px\">\n");
if (mesg != NULL) if (strlen(mesg) > 0) {
safestrncpy(WC->wc_roomname, "", sizeof WC->wc_roomname);
/* Calling output_headers() this way causes the cookies to be un-set */
- output_headers(1, 1, 0, 1, 0, 0, 0);
+ output_headers(1, 1, 0, 1, 0, 0);
wprintf("<center>");
serv_puts("MESG goodbye");
char buf[SIZ];
int a;
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
{
char buf[SIZ];
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
char buf[1024];
char name[128];
- output_headers(0, 0, 0, 0, 0, 0, 0);
+ output_headers(0, 0, 0, 0, 0, 0);
wprintf("Content-type: text/html\r\n"
"Server: %s\r\n"
void respond_to_request(void) {
char buf[SIZ];
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
void handle_rsvp(void) {
char buf[SIZ];
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
created_new_vtodo = 1;
}
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR>"
"<TD><IMG SRC=\"/static/taskmanag_48x.gif\"></TD>"
if (buf[0] != '1') {
wprintf("HTTP/1.0 404 %s\n", &buf[4]);
- output_headers(0, 0, 0, 0, 0, 0, 0);
+ output_headers(0, 0, 0, 0, 0, 0);
wprintf("Content-Type: text/plain\r\n");
wprintf("\r\n");
wprintf("%s\n", &buf[4]);
}
/* Begin output */
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
char floorname[SIZ];
int refcount;
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
display_main_menu();
return;
}
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ output_headers(1, 1, 0, 0, 0, 0);
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
if (!strcasecmp(key, "ib_citadel")) ib_citadel = atoi(value);
}
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
set_preference("iconbar", iconbar, 1);
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ output_headers(1, 1, 0, 0, 0, 0);
wprintf(
"<center><table border=1 bgcolor=\"#ffffff\"><tr><td>"
"<IMG SRC=\"/static/advanpage2_48x.gif\">"
}
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
*/
void display_main_menu(void)
{
- output_headers(1, 1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
wprintf("<div id=\"fix_scrollbar_bug\">"
"<TABLE WIDTH=100%%>"
*/
void display_aide_menu(void)
{
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
*/
void display_generic(void)
{
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
return;
}
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ output_headers(1, 1, 0, 0, 0, 0);
serv_printf("%s", bstr("g_cmd"));
serv_getln(buf, sizeof buf);
void display_menubar(int as_single_page) {
if (as_single_page) {
- output_headers(0, 0, 0, 0, 0, 0, 0);
+ output_headers(0, 0, 0, 0, 0, 0);
wprintf("<HTML>\n"
"<HEAD>\n"
"<TITLE>MenuBar</TITLE>\n"
targetdiv = bstr("targetdiv");
print_it = bstr("print_it");
- output_headers(1, 0, 0, 0, 0, 1, 0);
+ output_headers(1, 0, 0, 0, 1, 0);
begin_burst();
wprintf("<html><head>");
if (strlen(sortby) == 0) sortby = sortpref_value;
if (strlen(sortby) == 0) sortby = "msgid";
- output_headers(1, 1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
/* When in summary mode, always show ALL messages instead of just
* new or old. Otherwise, show what the user asked for.
* Otherwise proceed normally.
* Do a custom room banner with no navbar...
*/
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
embed_room_banner(NULL, navbar_none);
wprintf("</div>\n");
msgid = atol(bstr("msgid"));
- output_headers(1, 1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
sprintf(buf, "DELE %ld", msgid);
serv_puts(buf);
msgid = atol(bstr("msgid"));
- output_headers(1, 1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
wprintf("<div id=\"fix_scrollbar_bug\">"
"<table width=100%% border=0 bgcolor=\"#444455\"><tr><td>");
msgid = atol(bstr("msgid"));
- output_headers(1, 1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
if (strlen(bstr("move_button")) > 0) {
sprintf(buf, "MOVE %ld|%s", msgid, bstr("target_room"));
void display_add_node(void)
{
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
strcpy(node, bstr("node"));
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
char buf[SIZ];
char node[SIZ];
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
{
char node[SIZ];
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
serv_puts(buf);
serv_getln(buf, sizeof buf);
if (buf[0] == '1') {
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ output_headers(1, 1, 0, 0, 0, 0);
server_to_text();
wprintf("<A HREF=\"/display_netconf\">");
wprintf(_("Back to menu"));
strcpy(recp, bstr("recp"));
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
char buf[SIZ];
char closewin[SIZ];
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
char cl_text[SIZ];
char *output_data = NULL;
- output_headers(0, 0, 0, 0, 0, 0, 0);
+ output_headers(0, 0, 0, 0, 0, 0);
wprintf("Content-type: text/html; charset=utf-8\n");
wprintf("\n");
char send_this[SIZ];
char buf[SIZ];
- output_headers(0, 0, 0, 0, 0, 0, 0);
+ output_headers(0, 0, 0, 0, 0, 0);
wprintf("Content-type: text/html; charset=utf-8\n");
wprintf("\n");
wprintf("<HTML>"
*/
void display_preferences(void)
{
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
char buf[256];
wprintf("<div id=\"banner\">\n");
*/
void zapped_list(void)
{
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ output_headers(1, 1, 0, 0, 0, 0);
svprintf("BOXTITLE", WCS_STRING, _("Zapped (forgotten) rooms"));
do_template("beginbox");
er_flags = extract_int(&buf[4], 3);
er_floor = extract_int(&buf[4], 4);
- output_headers(1, 1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
/* print the tabbed dialog */
wprintf("<br />"
return;
}
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
*/
void display_private(char *rname, int req_pass)
{
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
display_private(bstr("gr_name"), 1);
return;
}
- output_headers(1, 1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
wprintf("%s\n", &buf[4]);
wDumpContent(1);
return;
*/
void display_zap(void)
{
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
void knrooms() {
char listviewpref[SIZ];
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
load_floorlist();
/* Determine whether the user is trying to change views */
return;
}
- output_headers(1, 1, 2, 0, 1, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
int mboxpolicy = 0;
int mboxvalue = 0;
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
do_template("endbox");
}
-
-/*
- * Display this user's summary page
- */
-void summary(void) {
- char title[256];
-
- output_headers(1, 1, 2, 0, 1, 0, 0);
- wprintf("<div id=\"banner\">\n");
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=#444455><TR>"
- "<TD><IMG SRC=\"/static/summscreen_48x.gif\"></TD><TD>"
- "<SPAN CLASS=\"titlebar\">"
- );
-
- snprintf(title, sizeof title, _("Summary page for %s"), WC->wc_username);
- escputs(title);
- wprintf("</SPAN></TD><TD>\n");
- wprintf("</TD><TD ALIGN=RIGHT><SPAN CLASS=\"titlebar\">");
- output_date();
- wprintf("</SPAN><br />");
- offer_start_page();
- wprintf("</TD></TR></TABLE>\n");
- wprintf("</div>\n<div id=\"content\">\n");
-
+void summary_inner_div(void) {
/*
* Now let's do three columns of crap. All portals and all groupware
* clients seem to want to do three columns, so we'll do three
/*
* End of columns
*/
- wprintf("</td></tr></table></div>\n");
+ wprintf("</td></tr></table>");
+}
+
+
+/*
+ * Display this user's summary page
+ */
+void summary(void) {
+ char title[256];
+
+ output_headers(1, 1, 2, 0, 0, 0);
+ wprintf("<div id=\"banner\">\n");
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=#444455><TR>"
+ "<TD><IMG SRC=\"/static/summscreen_48x.gif\"></TD><TD>"
+ "<SPAN CLASS=\"titlebar\">"
+ );
+
+ snprintf(title, sizeof title, _("Summary page for %s"), WC->wc_username);
+ escputs(title);
+ wprintf("</SPAN></TD><TD>\n");
+ wprintf("</TD><TD ALIGN=RIGHT><SPAN CLASS=\"titlebar\">");
+ output_date();
+ wprintf("</SPAN><br />");
+ offer_start_page();
+ wprintf("</TD></TR></TABLE>\n");
+
+ /*
+ * You guessed it ... we're going to refresh using ajax.
+ * In the future we might consider updating individual sections of the summary
+ * instead of the whole thing.
+ */
+ wprintf("</div>\n<div id=\"content\">\n");
+ summary_inner_div();
+ wprintf("</div>\n");
+
+ wprintf(
+ "<script type=\"text/javascript\"> \n"
+ " setInterval(\" new Ajax.Updater('content', '/summary_inner_div', "
+ " {method: 'get', parameters: Math.random() }); \", 60000); \n"
+ "</script> \n"
+ );
+
wDumpContent(1);
}
return;
}
if (with_room_banner) {
- output_headers(1, 1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
}
else {
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ output_headers(1, 1, 0, 0, 0, 0);
}
svprintf("BOXTITLE", WCS_STRING, _("Edit %s"), description);
char buf[SIZ];
char username[SIZ];
- output_headers(1, 1, 2, 0, 1, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<table width=100%% border=0 bgcolor=#444455><tr>"
"<td>"
return;
}
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
strcpy(bptr->name, buf);
bio = bptr;
}
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
strcpy(who, bstr("who"));
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR>"
"<TD><IMG SRC=\"/static/usermanag_48x.gif\"></TD>"
}
/* Display the form */
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
"<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">"
/* <div id="content"> either. */
int unset_cookies, /* 1 = session is terminating, so unset the cookies */
- int refresh30, /* 1 = automatically refresh page every 30 seconds */
int suppress_check, /* 1 = suppress check for instant messages */
int cache /* 1 = allow browser to cache this page */
) {
if (do_htmlhead) {
/* wprintf("\n"); */
begin_burst();
-
- if (refresh30) {
- svprintf("REFRESHTAG", WCS_STRING, "%s",
- "<meta http-equiv=\"refresh\" content=\"30\" />\n");
- }
- else {
- svprintf("REFRESHTAG", WCS_STRING, "%s",
- "<meta http-equiv=\"refresh\" content=\"500363689;\" />\n");
- }
-
do_template("head");
}
void http_transmit_thing(char *thing, size_t length, char *content_type,
int is_static) {
- output_headers(0, 0, 0, 0, 0, 0, is_static);
+ output_headers(0, 0, 0, 0, 0, is_static);
wprintf("Content-type: %s\r\n"
"Server: %s\r\n"
bytes = extract_long(&buf[4], 0);
content = malloc(bytes + 2);
extract_token(content_type, &buf[4], 3, '|', sizeof content_type);
- output_headers(0, 0, 0, 0, 0, 0, 0);
+ output_headers(0, 0, 0, 0, 0, 0);
read_server_binary(content, bytes);
serv_puts("CLOS");
serv_getln(buf, sizeof buf);
free(content);
} else {
wprintf("HTTP/1.0 404 %s\n", &buf[4]);
- output_headers(0, 0, 0, 0, 0, 0, 0);
+ output_headers(0, 0, 0, 0, 0, 0);
wprintf("Content-Type: text/plain\r\n");
wprintf("\r\n");
wprintf(_("An error occurred while retrieving this part: %s\n"), &buf[4]);
void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext)
{
wprintf("HTTP/1.0 200 OK\n");
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#%s\"><TR><TD>", titlebarcolor);
wprintf("<SPAN CLASS=\"titlebar\">%s</SPAN>\n", titlebarmsg);
* Display a blank page.
*/
void blank_page(void) {
- output_headers(1, 1, 0, 0, 1, 0, 0);
+ output_headers(1, 1, 0, 0, 0, 0);
wDumpContent(2);
}
set_preference("startpage", bstr("startpage"), 1);
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ output_headers(1, 1, 0, 0, 0, 0);
do_template("newstartpage");
wDumpContent(1);
}
}
+/*
+ * Convenience functions to wrap around asynchronous ajax responses
+ */
+void begin_ajax_response(void) {
+ output_headers(0, 0, 0, 0, 0, 0);
+
+ wprintf("Content-type: text/html; charset=UTF-8\r\n"
+ "Server: %s\r\n"
+ "Connection: close\r\n"
+ "Pragma: no-cache\r\n"
+ "Cache-Control: no-cache\r\n",
+ SERVER);
+ begin_burst();
+}
+
+void end_ajax_response(void) {
+ wprintf("\r\n");
+ wDumpContent(0);
+}
} else if (!strcasecmp(action, "who")) {
who();
} else if (!strcasecmp(action, "who_inner_html")) {
- who_inner_html();
+ begin_ajax_response();
+ who_inner_div();
+ end_ajax_response();
} else if (!strcasecmp(action, "knrooms")) {
knrooms();
} else if (!strcasecmp(action, "gotonext")) {
#endif
} else if (!strcasecmp(action, "summary")) {
summary();
+ } else if (!strcasecmp(action, "summary_inner_div")) {
+ begin_ajax_response();
+ summary_inner_div();
+ end_ajax_response();
} else if (!strcasecmp(action, "iconbar")) {
do_iconbar();
} else if (!strcasecmp(action, "display_customize_iconbar")) {
} else if (!strcasecmp(action, "bcc_autocomplete")) {
recp_autocomplete(bstr("bcc"));
} else if (!strcasecmp(action, "diagnostics")) {
- output_headers(1, 1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
wprintf("Session: %d<hr />\n", WC->wc_session);
wprintf("Command: <br /><PRE>\n");
escputs(cmd);
void serv_getln(char *strbuf, int bufsize);
void serv_puts(char *string);
void who(void);
-void who_inner_html(void);
+void who_inner_div(void);
void fmout(char *align);
void pullquote_fmout(void);
void wDumpContent(int);
int do_htmlhead,
int do_room_banner,
int unset_cookies,
- int refresh30,
int suppress_check,
int cache);
void wprintf(const char *format,...);
void do_listsub(void);
void toggle_self_service(void);
void summary(void);
+void summary_inner_div(void);
ssize_t write(int fd, const void *buf, size_t count);
void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum);
void display_calendar(long msgnum);
void display_preferences(void);
void set_preferences(void);
void recp_autocomplete(char *);
+void begin_ajax_response(void);
+void end_ajax_response(void);
#ifdef WEBCIT_WITH_CALENDAR_SERVICE
void display_edit_task(void);
}
-/*
- * AJAX-response version of wholist inner html
- */
-void who_inner_html(void) {
- output_headers(0, 0, 0, 0, 0, 0, 0);
-
- wprintf("Content-type: text/html; charset=UTF-8\r\n"
- "Server: %s\r\n"
- "Connection: close\r\n"
- "Pragma: no-cache\r\n"
- "Cache-Control: no-cache\r\n",
- SERVER);
- begin_burst();
-
- who_inner_div();
-
- wprintf("\r\n");
- wDumpContent(0);
-}
-
-
/*
* who is on?
*/
{
char title[256];
- output_headers(1, 1, 2, 0, 0, 0, 0);
+ output_headers(1, 1, 2, 0, 0, 0);
wprintf("<script type=\"text/javascript\">\n"
"function ConfirmKill() { \n"
wprintf(
"<script type=\"text/javascript\"> \n"
" setInterval(\" new Ajax.Updater('fix_scrollbar_bug', '/who_inner_html', "
- " {method: 'get', parameters: Math.random() }); \", 3000); \n"
+ " {method: 'get', parameters: Math.random() }); \", 30000); \n"
"</script> \n"
);
wDumpContent(1);
} else if (strlen(bstr("cancel_button")) > 0) {
http_redirect("/who");
} else {
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ output_headers(1, 1, 0, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");