* Templatized the "<BODY BACKGROUND=...>" type stuff that starts each page.
authorArt Cancro <ajc@citadel.org>
Sun, 17 Sep 2000 03:29:49 +0000 (03:29 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 17 Sep 2000 03:29:49 +0000 (03:29 +0000)
webcit/ChangeLog
webcit/mainmenu.c
webcit/roomops.c
webcit/static/background.html [new file with mode: 0644]
webcit/webcit.c

index 8ea52dd12ac8db9ae783cdebc6093f780176492e..b820f8766810db6f80873cb9fc6b83b6db9efb69 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 212.11  2000/09/17 03:29:45  ajc
+* Templatized the "<BODY BACKGROUND=...>" type stuff that starts each page.
+
 Revision 212.10  2000/09/14 11:43:37  error
 Replace occurrences of % throughout the HTML with %% so as to be friendly
 to HP/UX printf() and possibly others.
@@ -481,4 +484,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 4d28b103b47845662df0e2118f0375e2af414c22..4748d79c2852f0887740fcd85154cace157ff88d 100644 (file)
@@ -324,8 +324,6 @@ void do_generic(void)
  * that the menubar is being embedded in another page.
  */
 void display_menubar(int as_single_page) {
-       FILE *menubar_body;
-       char buf[256];
 
        if (as_single_page) {
                output_headers(0);
@@ -335,22 +333,11 @@ void display_menubar(int as_single_page) {
                        "<STYLE TYPE=\"text/css\">\n"
                        "BODY   { text-decoration: none; }\n"
                        "</STYLE>\n"
-                       "</HEAD>\n"
-                       "<BODY BACKGROUND=\"/image&name=background\" "
-                       "TEXT=\"#000000\" LINK=\"#FFFFFF\" "
-                       "ALINK=\"#FFFFFF\" VLINK=\"#FFFFFF\">\n");
+                       "</HEAD>\n");
+               do_template("background.html");
        }
 
-       menubar_body = fopen("static/menubar.html", "r");
-       if (menubar_body == NULL) {
-               wprintf("menubar<BR>%s", strerror(errno));
-       } else {
-               while (fgets(buf, sizeof(buf), menubar_body) != NULL) {
-                       wprintf("%s", buf);
-               }
-               fclose(menubar_body);
-       }
-               
+       do_template("menubar.html");
 
        if (as_single_page) {
                wDumpContent(2);
index 4ece0e836ad2e7a4c671e5a76c14dfc5a2111a59..008b75d338abde25e24106abf74da533a3743687 100644 (file)
@@ -394,8 +394,8 @@ void gotoroom(char *gname, int display_name)
 
                wprintf("<HTML><HEAD>\n"
                        "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n"
-                       "</HEAD>\n<BODY ");
-               wprintf("BACKGROUND=\"/image&name=background\" TEXT=\"#000000\" LINK=\"#004400\">\n");
+                       "</HEAD>\n");
+               do_template("background.html");
        }
        if (display_name != 2) {
                /* store ungoto information */
diff --git a/webcit/static/background.html b/webcit/static/background.html
new file mode 100644 (file)
index 0000000..657ea5f
--- /dev/null
@@ -0,0 +1,5 @@
+<BODY
+<?EXTRABODYPARMS>
+BACKGROUND="/image&name=background"
+TEXT="#000000" LINK="#000077"
+ALINK="#000077" VLINK="#000077">
index a854240f630160050c0ced623badbaf3de3e916b..9e68860a764d9e1b22ae90bed7402c7ad21a68b4 100644 (file)
@@ -355,12 +355,13 @@ void output_headers(int controlcode)
                 * were finished
                 */
 
-               wprintf("<BODY MARGINWIDTH=0 MARGINHEIGHT=0 ");
                if (!suppress_check) if (WC->HaveExpressMessages) {
-                       wprintf("onload=\"launch_page_popup()\" ");
+                       svprintf("extrabodyparms", WCS_STRING, "%s", 
+                               "onload=\"launch_page_popup()\" ");
                        WC->HaveExpressMessages = 0;
                }
-               wprintf("BACKGROUND=\"/image&name=background\" TEXT=\"#000000\" LINK=\"#004400\">\n");
+               do_template("background.html");
+               clear_local_substs();
 
        if (print_standard_html_head == 1) {
                wprintf("<A NAME=\"TheTop\"></A>"