]> code.citadel.org Git - citadel.git/blobdiff - webcit/paging.c
* Begin migration to the new "rounded boxes" look
[citadel.git] / webcit / paging.c
index 9cdb897ebe304761f675185881ea5c70674e56bb..45514d5457c903db50494424535d2c918bcc61e0 100644 (file)
@@ -33,17 +33,11 @@ void display_page(void)
 
        output_headers(3);
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
-       wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
-       wprintf("<B>Page another user</B>\n");
-       wprintf("</FONT></TD></TR></TABLE>\n");
-
-       wprintf("<CENTER>This will send a page (instant message) "
-               "to %s.\n", recp);
+       svprintf("BOXTITLE", WCS_STRING, "Page: %s", recp);
+       do_template("beginbox");
 
        wprintf("<FORM METHOD=\"POST\" ACTION=\"/page_user\">\n");
 
-
        wprintf("<TABLE border=0 width=100%%><TR><TD>\n");
 
        wprintf("<INPUT TYPE=\"hidden\" NAME=\"recp\" VALUE=\"");
@@ -65,6 +59,7 @@ void display_page(void)
        wprintf("<BR><A HREF=\"javascript:window.close();\"Cancel</A>\n");
 
        wprintf("</FORM></CENTER>\n");
+       do_template("endbox");
        wDumpContent(1);
 }
 
@@ -78,7 +73,7 @@ void page_user(void)
        char buf[SIZ];
        char closewin[SIZ];
 
-       output_headers(1);
+       output_headers(3);
 
        strcpy(recp, bstr("recp"));
        strcpy(sc, bstr("sc"));
@@ -91,7 +86,7 @@ void page_user(void)
                serv_gets(buf);
 
                if (buf[0] == '4') {
-                       text_to_server(bstr("msgtext"));
+                       text_to_server(bstr("msgtext"), 0);
                        serv_puts("000");
                        wprintf("<EM>Message has been sent to ");
                        escputs(recp);
@@ -120,24 +115,28 @@ void do_chat(void)
 
        output_headers(1);
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>");
-       wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
-       wprintf("<B>Real-time chat</B>\n");
-       wprintf("</FONT></TD></TR></TABLE>\n");
-
-       wprintf("A chat window should be appearing on your screen ");
-       wprintf("momentarily.  When you're ");
-       wprintf("done, type <TT>/quit</TT> to exit.  You can also ");
-       wprintf("type <TT>/help</TT> for more commands.\n");
-
-       wprintf("<applet codebase=\"/static\" ");
-       wprintf("code=\"wcchat\" width=2 height=2>\n");
-       wprintf("<PARAM NAME=username VALUE=\"%s\">\n", WC->wc_username);
-       wprintf("<PARAM NAME=password VALUE=\"%s\">\n", WC->wc_password);
-       wprintf("<PARAM NAME=roomname VALUE=\"%s\">\n", WC->wc_roomname);
-       wprintf("<H2>Oops!</H2>Looks like your browser doesn't support Java, ");
-       wprintf("so you won't be able to access Chat.  Sorry.\n");
-       wprintf("</applet>\n");
+       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#000077\"><TR><TD>");
+       wprintf("<SPAN CLASS=\"titlebar\">Real-time chat</SPAN>\n");
+       wprintf("</TD></TR></TABLE>\n");
+
+       if (!strcasecmp(ctdlhost, "uds")) {
+               wprintf("<I>Sorry ... chat is not available here.</i></BR>\n");
+       }
+       else {
+               wprintf("A chat window should be appearing on your screen ");
+               wprintf("momentarily.  When you're ");
+               wprintf("done, type <TT>/quit</TT> to exit.  You can also ");
+               wprintf("type <TT>/help</TT> for more commands.\n");
+       
+               wprintf("<applet codebase=\"/static\" ");
+               wprintf("code=\"wcchat\" width=2 height=2>\n");
+               wprintf("<PARAM NAME=username VALUE=\"%s\">\n", WC->wc_username);
+               wprintf("<PARAM NAME=password VALUE=\"%s\">\n", WC->wc_password);
+               wprintf("<PARAM NAME=roomname VALUE=\"%s\">\n", WC->wc_roomname);
+               wprintf("<H2>Oops!</H2>Looks like your browser doesn't support Java, ");
+               wprintf("so you won't be able to access Chat.  Sorry.\n");
+               wprintf("</applet>\n");
+       }
        wDumpContent(1);
 }
 
@@ -157,11 +156,10 @@ void page_popup(void)
 
                extract(pagefrom, &buf[4], 3);
 
-               wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
-               wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\""
-                       "<B>Express message from ");
+               wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>");
+               wprintf("<SPAN CLASS=\"titlebar\">Express message from ");
                escputs(pagefrom);
-               wprintf("</B></FONT></TD></TR></TABLE>\n");
+               wprintf("</SPAN></TD></TR></TABLE>\n");
                
                fmout(NULL);
        }