* Begin migration to the new "rounded boxes" look
authorArt Cancro <ajc@citadel.org>
Tue, 13 May 2003 04:37:36 +0000 (04:37 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 13 May 2003 04:37:36 +0000 (04:37 +0000)
16 files changed:
webcit/auth.c
webcit/graphics.c
webcit/mainmenu.c
webcit/messages.c
webcit/paging.c
webcit/roomops.c
webcit/static/iconbar.html
webcit/static/login.html
webcit/static/mainframeset.html
webcit/static/navbar.html
webcit/static/style.css
webcit/subst.c
webcit/useredit.c
webcit/userlist.c
webcit/webcit.c
webcit/who.c

index fb763e68a2b2821d75e66a5a9988f10d7e7ae34b..a764367c06e38f7045e18a85b737f08387615e49 100644 (file)
@@ -329,15 +329,14 @@ void display_changepw(void)
 
        output_headers(3);
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">Change your password</SPAN>\n");
-       wprintf("</TD></TR></TABLE>\n");
-
+       svprintf("BOXTITLE", WCS_STRING, "Change your password");
+       do_template("beginbox");
        wprintf("<CENTER>");
        serv_puts("MESG changepw");
        serv_gets(buf);
-       if (buf[0] == '1')
+       if (buf[0] == '1') {
                fmout(NULL);
+       }
 
        wprintf("<FORM ACTION=\"changepw\" METHOD=\"POST\">\n");
        wprintf("<CENTER><TABLE border><TR><TD>Enter new password:</TD>\n");
@@ -348,6 +347,7 @@ void display_changepw(void)
        wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Change\">\n");
        wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Cancel\">\n");
        wprintf("</CENTER>\n");
+       do_template("endbox");
        wDumpContent(1);
 }
 
index ab9d7709fb24e0e8dc89095eb59b8f92f13d4ca0..7616be44772e8f8aed99547d5a79ef7a8fc56459 100644 (file)
@@ -37,7 +37,12 @@ void display_graphics_upload(char *description, char *check_cmd, char *uplurl)
 
        wprintf("<CENTER>\n");
 
-       wprintf("<FORM ENCTYPE=\"multipart/form-data\" ACTION=\"%s&which_room=%s\" METHOD=\"POST\">\n", uplurl, bstr("which_room"));
+       wprintf("<FORM ENCTYPE=\"multipart/form-data\" ACTION=\"%s\" "
+               "METHOD=\"POST\" NAME=\"graphicsupload\">\n", uplurl);
+
+       wprintf("<INPUT TYPE=\"hidden\" NAME=\"which_room\" VALUE=\"");
+       urlescputs(bstr("which_room"));
+       wprintf("\">\n");
 
        wprintf("You can upload any image directly from your computer,\n");
        wprintf("as long as it is in GIF format (JPEG, PNG, etc. won't\n");
index 850e10845755dbfbd44ecd2b45f3b7a3a191ff76..47ca39e2d295f074322e36d95131ce851abdc99a 100644 (file)
@@ -33,12 +33,10 @@ void display_main_menu(void)
 {
        output_headers(1);
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770077\"><TR><TD>"
-               "<SPAN CLASS=\"titlebar\">Basic commands</SPAN>\n"
-               "</TD></TR></TABLE>\n"
-               "<CENTER><TABLE border=0><TR>"
-       );
+       svprintf("BOXTITLE", WCS_STRING, "Basic commands");
+       do_template("beginbox");
 
+       wprintf("<TABLE border=0 align=center><TR>");
        wprintf("<TD>");        /* start of first column */
 
        wprintf("<UL>");
@@ -88,12 +86,12 @@ void display_main_menu(void)
        wprintf("</UL>\n");
 
        wprintf("</TR></TABLE>\n");
+       do_template("endbox");
 
        wprintf("<TABLE WIDTH=100%%><TR VALIGN=TOP><TD>");
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">Interaction</SPAN>\n");
-       wprintf("</TD></TR></TABLE>\n");
+       svprintf("BOXTITLE", WCS_STRING, "Interaction");
+       do_template("beginbox");
 
        wprintf("<UL>");
        wprintf("<LI><A HREF=\"/whobbs\">\n");
@@ -106,12 +104,12 @@ void display_main_menu(void)
        wprintf("<FONT SIZE=-2>Generic server command</FONT></A>\n");
 
        wprintf("</UL>\n");
+       do_template("endbox");
 
        wprintf("</TD><TD>");
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">Your info</SPAN>\n");
-       wprintf("</TD></TR></TABLE>\n");
+       svprintf("BOXTITLE", WCS_STRING, "Your info");
+       do_template("beginbox");
 
        wprintf("<UL>");
        wprintf("<LI><A HREF=\"/display_editbio\">\n");
@@ -127,13 +125,12 @@ void display_main_menu(void)
        wprintf("Change your password</A>\n");
 
        wprintf("</UL>\n");
-
+       do_template("endbox");
 
        wprintf("</TD></TR><TR VALIGN=TOP><TD>");
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#000077\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">Advanced room commands</SPAN>\n");
-       wprintf("</TD></TR></TABLE>\n");
+       svprintf("BOXTITLE", WCS_STRING, "Advanced room commands");
+       do_template("beginbox");
 
        wprintf("<UL>");
        wprintf("<LI><A HREF=\"/display_private\">\n");
@@ -152,13 +149,13 @@ void display_main_menu(void)
        wprintf("List all forgotten rooms</A>\n");
 
        wprintf("</UL>\n");
+       do_template("endbox");
 
        wprintf("</TD><TD>");
 
        if ((WC->axlevel >= 6) || (WC->is_room_aide)) {
-               wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007777\"><TR><TD>");
-               wprintf("<SPAN CLASS=\"titlebar\">Administrative functions</SPAN>\n");
-               wprintf("</TD></TR></TABLE>\n");
+               svprintf("BOXTITLE", WCS_STRING, "Administrative functions");
+               do_template("beginbox");
 
                wprintf("<UL>");
                wprintf("<LI><A HREF=\"/display_editroom\">\n");
@@ -183,6 +180,7 @@ void display_main_menu(void)
                        wprintf("Reconfigure color scheme</A>\n");
                }
                wprintf("</UL>\n");
+               do_template("endbox");
        }
        wprintf("</TD></TR></TABLE>");
        wDumpContent(2);
index 74c17a471ea80cacd01e6656d1e4069561223a33..d053a4be6660b2f4e884a875ba3c7083185e4150 100644 (file)
@@ -1121,7 +1121,6 @@ void display_enter(void)
 {
        char buf[SIZ];
        long now;
-       struct tm *tm;
        struct wc_attachment *att;
 
        output_headers(1);
@@ -1143,19 +1142,19 @@ void display_enter(void)
        }
 
        now = time(NULL);
-       tm = (struct tm *) localtime(&now);
-       strcpy(buf, (char *) asctime(tm));
-       buf[strlen(buf) - 1] = 0;
-       strcpy(&buf[16], &buf[19]);
-       wprintf("</CENTER><FONT COLOR=\"#440000\">\n"
-               "<IMG SRC=\"static/enter.gif\" ALIGN=MIDDLE ALT=\" \" "
-               "onLoad=\"document.enterform.msgtext.focus();\" >");
-       wprintf("<B> %s ", &buf[4]);
-       wprintf("from %s ", WC->wc_username);
-       if (strlen(bstr("recp")) > 0)
-               wprintf("to %s ", bstr("recp"));
-       wprintf("in %s&gt; ", WC->wc_roomname);
-       wprintf("</B></FONT><BR><CENTER>\n");
+       fmt_date(buf, now);
+       strcat(&buf[strlen(buf)], " <I>from</I> ");
+       stresc(&buf[strlen(buf)], WC->wc_username, 1);
+       if (strlen(bstr("recp")) > 0) {
+               strcat(&buf[strlen(buf)], " <I>to</I> ");
+               stresc(&buf[strlen(buf)], bstr("recp"), 1);
+       }
+       strcat(&buf[strlen(buf)], " <I>in</I> ");
+       stresc(&buf[strlen(buf)], WC->wc_roomname, 1);
+       svprintf("BOXTITLE", WCS_STRING, buf);
+       do_template("beginbox");
+
+       wprintf("<CENTER>\n");
 
        wprintf("<FORM ENCTYPE=\"multipart/form-data\" "
                "METHOD=\"POST\" ACTION=\"/post\" "
@@ -1164,6 +1163,8 @@ void display_enter(void)
                bstr("recp"));
        wprintf("<INPUT TYPE=\"hidden\" NAME=\"postseq\" VALUE=\"%ld\">\n",
                now);
+       wprintf("<IMG SRC=\"static/enter.gif\" ALIGN=MIDDLE ALT=\" \" "
+               "onLoad=\"document.enterform.msgtext.focus();\" >");
        wprintf("<FONT SIZE=-1>Subject (optional):</FONT>"
                "<INPUT TYPE=\"text\" NAME=\"subject\" VALUE=\"");
        escputs(bstr("subject"));
@@ -1172,7 +1173,7 @@ void display_enter(void)
                "<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Save message\">"
                "<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\"><BR>\n");
 
-       wprintf("<TEXTAREA NAME=\"msgtext\" wrap=soft ROWS=30 COLS=80 "
+       wprintf("<TEXTAREA NAME=\"msgtext\" wrap=soft ROWS=25 COLS=80 "
                "WIDTH=80>");
        escputs(bstr("msgtext"));
        wprintf("</TEXTAREA><BR>\n");
@@ -1192,8 +1193,8 @@ void display_enter(void)
                "<input type=\"submit\" name=\"attach\" value=\"Add\">\n");
 
        wprintf("</FORM></CENTER>\n");
+       do_template("endbox");
 DONE:  wDumpContent(1);
-       wprintf("</FONT>");
 }
 
 
index ecad487ffc0b42dfe00a4972a6f74e85deb96e13..45514d5457c903db50494424535d2c918bcc61e0 100644 (file)
@@ -33,16 +33,11 @@ void display_page(void)
 
        output_headers(3);
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">Page another user</SPAN>\n");
-       wprintf("</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=\"");
@@ -64,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);
 }
 
index a93f4b0e8f491d592b573c341dad26b64c4dd696..bff0aec93bdba1fc93f1396308b0e045a01966e0 100644 (file)
@@ -224,6 +224,7 @@ void tabular_room_list(void)
        int a;
        char buf[SIZ];
 
+       do_template("beginbox_nt");
        wprintf("<TABLE width=100%% border><TR><TH>Floor</TH>");
        wprintf("<TH>Rooms with new messages</TH>");
        wprintf("<TH>Rooms with no new messages</TH></TR>\n");
@@ -259,6 +260,7 @@ void tabular_room_list(void)
                        wprintf("</TD></TR>\n");
                }
        wprintf("</TABLE>\n");
+       do_template("endbox");
        wDumpContent(1);
 }
 
@@ -1814,7 +1816,7 @@ void do_folder_view(struct folder *fold, int max_folders, int num_floors) {
        int levels, oldlevels;
        int i, t;
 
-       /* Output */
+       do_template("beginbox_nt");
        levels = 0;
        oldlevels = 0;
        for (i=0; i<max_folders; ++i) {
@@ -1846,6 +1848,7 @@ void do_folder_view(struct folder *fold, int max_folders, int num_floors) {
                }
                wprintf("<BR>\n");
        }
+       do_template("endbox");
 }
 
 /*
@@ -2057,7 +2060,7 @@ void knrooms() {
        get_preference("roomlistview", listviewpref);
 
        if ( (strcasecmp(listviewpref, "folders"))
-          && (strcasecmp(listviewpref, "boxes")) ) {
+          && (strcasecmp(listviewpref, "table")) ) {
                strcpy(listviewpref, "rooms");
        }
 
@@ -2068,12 +2071,12 @@ void knrooms() {
        if (!strcasecmp(listviewpref, "rooms")) {
                wprintf("Room list");
        }
-       if (!strcasecmp(listviewpref, "boxes")) {
-               wprintf("Room list");
-       }
        if (!strcasecmp(listviewpref, "folders")) {
                wprintf("Folder list");
        }
+       if (!strcasecmp(listviewpref, "table")) {
+               wprintf("Room list");
+       }
        wprintf("</SPAN></TD>\n");
 
 
@@ -2095,10 +2098,10 @@ void knrooms() {
                ( !strcasecmp(listviewpref, "folders") ? "SELECTED" : "" )
        );
 
-       wprintf("<OPTION %s VALUE=\"/knrooms&view=boxes\">"
-               "View as portal"
+       wprintf("<OPTION %s VALUE=\"/knrooms&view=table\">"
+               "Classic table view"
                "</OPTION>\n",
-               ( !strcasecmp(listviewpref, "boxes") ? "SELECTED" : "" )
+               ( !strcasecmp(listviewpref, "table") ? "SELECTED" : "" )
        );
 
        wprintf("</SELECT></FORM></TD><TD>\n");
@@ -2106,7 +2109,7 @@ void knrooms() {
        wprintf("</TD></TR></TABLE><BR>\n");
 
        /* Display the room list in the user's preferred format */
-       if (!strcasecmp(listviewpref, "rooms")) {
+       if (!strcasecmp(listviewpref, "table")) {
                tabular_room_list();
        }
        else {
index 2254c9fb95fb29d008e509691e9e8d21fb63f79e..0c3b9345dac431bf217dd8a6bed31eb536f25aae 100644 (file)
@@ -7,49 +7,58 @@
 </HEAD>
 <BODY>
 
-<TABLE BORDER="0" CELLSPACING="3" CELLPADDING="3">
+<?=beginbox_nt>
+
+<table border=0 cellspacing=0 cellpadding=0><TR><TD>
+
+<IMG BORDER="0" WIDTH="64" HEIGHT="64" SRC="/image&name=hello" ALT="&nbsp;">
+</TD>
+</TR>
+
 <TR>
-       <TD><IMG BORDER="0" WIDTH="64" HEIGHT="64" SRC="/image&name=hello" ALT="&nbsp;"></TD>
-</TR><TR>
-       <TD ALIGN="CENTER">
-               <SPAN CLASS="iconbar_link">
-               <A HREF="/knrooms" TITLE="Shows a list of all Rooms that you have access to" TARGET="workspace"><IMG 
-                       BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/rooms-icon.gif"><BR>Rooms</A>
-               </SPAN>
-       </TD>
-</TR><TR>
-       <TD ALIGN="CENTER">
-               <SPAN CLASS="iconbar_link">
-               <A HREF="/whobbs" TITLE="See who is online right now" TARGET="workspace"><IMG 
-                       BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/users-icon.gif"><BR>Users</A>
-               </SPAN>
-       </TD>
-</TR><TR>
-       <TD ALIGN="CENTER">
-               <SPAN CLASS="iconbar_link">
-               <A HREF="/display_main_menu" TITLE="Advanced Options Menu: Advanced Room commands, Account Info, and Chat" TARGET="workspace"><IMG 
-                       BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/advanced-icon.gif"><BR>Advanced options</A>
-               </SPAN>
-       </TD>
-</TR><TR>
-       <TD ALIGN="CENTER">
-               <SPAN CLASS="iconbar_link">
-               <A HREF="/termquit" TITLE="Log off" TARGET="_top"
-                       onClick="return confirm('Do you really want to log off?');">
-               <IMG BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/exit-icon.gif"><BR>Log off</A>
+<TD ALIGN="CENTER">
+       <SPAN CLASS="iconbar_link">
+       <A HREF="/knrooms" TITLE="Shows a list of all Rooms that you have access to" TARGET="workspace"><IMG 
+               BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/rooms-icon.gif"><BR>Rooms</A>
+       </SPAN>
+</TD>
+</TR>
+
+<TR>
+<TD ALIGN="CENTER">
+       <SPAN CLASS="iconbar_link">
+       <A HREF="/whobbs" TITLE="See who is online right now" TARGET="workspace"><IMG 
+               BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/users-icon.gif"><BR>Users</A>
                </SPAN>
        </TD>
 </TR><TR>
        <TD ALIGN="CENTER">
-               <BR><BR>
-               <SPAN CLASS="powered_by">
-               <A HREF="http://uncensored.citadel.org/citadel" TITLE="Find out more about Citadel/UX" TARGET="aboutcit"
-                       onMouseOver="window.status='Find out more about Citadel/UX'; return true;">powered by<BR><IMG
-                       BORDER="0" WIDTH="64" HEIGHT="64" SRC="/static/citadel-logo.jpg" ALT="CITADEL/UX"></A>
-               </SPAN>
+       <SPAN CLASS="iconbar_link">
+       <A HREF="/display_main_menu" TITLE="Advanced Options Menu: Advanced Room commands, Account Info, and Chat" TARGET="workspace"><IMG 
+               BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/advanced-icon.gif"><BR>Advanced options</A>
+       </SPAN>
        </TD>
 </TR>
-</TABLE>
+<TR>
+<TD ALIGN="CENTER">
+       <SPAN CLASS="iconbar_link">
+       <A HREF="/termquit" TITLE="Log off" TARGET="_top"
+               onClick="return confirm('Do you really want to log off?');">
+       <IMG BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/exit-icon.gif"><BR>Log off</A>
+       </SPAN>
+</TD>
+</TR><TR>
+<TD ALIGN="CENTER">
+       <SPAN CLASS="powered_by">
+       <A HREF="http://uncensored.citadel.org/citadel" TITLE="Find out more about Citadel/UX" TARGET="aboutcit"
+               onMouseOver="window.status='Find out more about Citadel/UX'; return true;">powered by<BR><IMG
+               BORDER="0" WIDTH="64" HEIGHT="64" SRC="/static/citadel-logo.jpg" ALT="CITADEL/UX"></A>
+       </SPAN>
+</TD>
+
+</TR></TABLE>
+
+<?=endbox>
 
 </BODY>
 </HTML>
index b0eb43d23a38e7721305f9160f65631c15b17480..6e0c33852cf8580070497902198219e48038e744 100644 (file)
@@ -1,55 +1,39 @@
 <CENTER>
+<?=beginbox_nt>
 <FONT COLOR="#FF0000"><?MESG></FONT>
-<table border=0 width="100%" height="100%">
-        <tr>
-                <td valign="middle" align="center">     
+<TABLE border=0>
+<TR>
+<td align=center>
+       <p><?HELLO></p>
+       <form action="/login" method="POST">
 
-                <table bgcolor="#eeeeee">
-                        <tr>
-                                <td align=center>
-                               <p><?HELLO></p>
-                               <form action="/login" method="POST">
-                                <table border="1">
-                                        <tr>
-                                                <td>User name:</td>
-                                                <td> <input type="text"
-                                               name="name" maxlength="25"></td>
-                                        </tr>
-                                        <tr>
-                                                <td>Password:</td>
-                                                <td> <input type="password"
-                                               name="pass" maxlength="20"></td>
-                                        </tr>
-                                </table>
-                               <input type="submit" name="action"
-                               value="Login">
-                               <input type="submit" name="action"
-                               value="New User">
-                               <input type="submit" name="action"
-                               value="Exit">
-                               </form>
-                               </td>
-                               <td align="center"><P><IMG
-                               SRC="/image&name=hello"></p></TD>
-                       </tr>
-                       <tr>
-                               <td colspan="2">
-                                <p>
-                                <b>If you already have an account
-                               on <?SERV_HUMANNODE></b>, enter your user name
-                               and password and click
-                                &quot;Login.&quot;<br>
-                                <b>If you are a new user</b>, enter the name
-                               and password you wish to use, and click
-                               &quot;New User.&quot;<br>
-                                Please log off properly when finished.<br>
-                                You must use a browser that supports
-                               <i>frames</i> and <i>cookies</i>.<br>
-                                </p>
-                                </td>
-                        </tr>
-                </table>
+       <table border="1">
+               <TR><TD>User name:</TD>
+               <TD><input type="text" name="name" maxlength="25"></TD></TR>
+               <TR><TD>Password:</TD>
+               <TD><input type="password" name="pass" maxlength="20"></TD></TR>
+       </TABLE>
 
-                </td>
-        </tr>
+       <input type="submit" name="action" value="Login">
+       <input type="submit" name="action" value="New User">
+       <input type="submit" name="action" value="Exit">
+       </form>
+
+       </td>
+       <td align="center"><P><IMG SRC="/image&name=hello"></p></TD>
+       </tr>
+       <tr>
+               <td colspan="2">
+               <p>
+               <b>If you already have an account on <?SERV_HUMANNODE></b>,
+               enter your user name and password and click &quot;Login.&quot;<br>
+               <b>If you are a new user</b>, enter the name and password you wish to use,
+               and click &quot;New User.&quot;<br>
+               Please log off properly when finished.<br>
+               You must use a browser that supports <i>frames</i> and <i>cookies</i>.<br>
+               </p>
+               </td>
+</tr>
 </table>
+<?=endbox>
+</CENTER>
index b0e340b0ee6127dbfed1b68ec9e78b56aa17ecf0..4f26b44f7edc8b89641f55f4935b263a960e3837 100644 (file)
@@ -7,11 +7,11 @@
 </HEAD>
 
 <FRAMESET COLS="80, *" FRAMESPACING="0" BORDER="FALSE" FRAMEBORDER="0">
-       <FRAME NAME="left" SRC="/static/iconbar.html" SCROLLING="no">
+       <FRAME NAME="left" SRC="do_template?template=iconbar" SCROLLING="no">
        <FRAMESET ROWS="*, 45" FRAMESPACING=0 BORDER="FALSE" FRAMEBORDER="0">
                <FRAME NAME="workspace" SRC="<?STARTPAGE>">
                <FRAMESET COLS="*, 1" FRAMESPACING="0" BORDER="FALSE" FRAMEBORDER="0">
-                       <FRAME NAME="bottom" SRC="/static/navbar.html" SCROLLING="no">
+                       <FRAME NAME="bottom" SRC="do_template?template=navbar" SCROLLING="no">
                        <FRAME NAME="ka" SRC="/blank" SCROLLING="no">
                </FRAMESET>
        </FRAMESET>
index 3141d6605d5574f5c13ea3110b3a40bc4c3a7bdf..5447fd824d3c8c56254ded0576d5e22c7c08664a 100644 (file)
@@ -5,10 +5,10 @@
        <META HTTP-EQUIV="Content-Language" CONTENT="en">
        <LINK REL="StyleSheet" HREF="/static/style.css" TYPE="text/css" MEDIA="screen">
 </HEAD>
-<BODY BGCOLOR="#AAAAAA">
+<BODY BGCOLOR="#FFFFFF">
 
-<CENTER>
-<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
+<TABLE BGCOLOR="#FFFFFF" BORDER="0"
+ CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
 <TR>
        <TD>
                <A HREF="/ungoto" TARGET="workspace">
index d21f761baa2a0817b7b43a21ecc1506474b1aea8..6afbe87d68bfabc872b10b05b4efa178e04cdc15 100644 (file)
@@ -112,7 +112,8 @@ a:active {
 }
 
 body {
-  background-image: url("/image&name=background");
+  background: #aaaaaa;
+  <!-- background-image: url("/image&name=background"); -->
   color: #000000;
 }
 
index 083f8e4e03719c48ebfdbad99aac56b9fbc35922..97d00ed6fc9bbcf4365fd0e6ead8df1b91a2b833 100644 (file)
@@ -140,6 +140,10 @@ void print_value_of(char *keyname) {
        struct wcsubst *ptr;
        void *fcn();
 
+       if (keyname[0] == '=') {
+               do_template(&keyname[1]);
+       }
+
        if (!strcasecmp(keyname, "SERV_PID")) {
                wprintf("%d", serv_info.serv_pid);
        }
index a415b869bbd5b2998b7a8c1077f58281e3ad360a..850b39058636e5e0f9bc2c65d287ac5ab822cc89 100644 (file)
@@ -39,16 +39,16 @@ void select_user_to_edit(char *message, char *preselect)
 
        if (message != NULL) wprintf(message);
 
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">"
-               "Add/change/delete user accounts"
-               "</SPAN></TD></TR></TABLE>\n");
+       wprintf("<TABLE border=0 CELLSPACING=10><TR VALIGN=TOP><TD>\n");
+
+       svprintf("BOXTITLE", WCS_STRING, "Edit or Delete users");
+       do_template("beginbox");
 
-       wprintf("<TABLE border=0 CELLSPACING=10><TR VALIGN=TOP>"
-               "<TD>To edit an existing user account, select the user "
+       wprintf("To edit an existing user account, select the user "
                "name from the list and click 'Edit'.<BR><BR>");
        
-        wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/display_edituser\">\n");
+        wprintf("<CENTER>"
+               "<FORM METHOD=\"POST\" ACTION=\"/display_edituser\">\n");
         wprintf("<SELECT NAME=\"username\" SIZE=10>\n");
         serv_puts("LIST");
         serv_gets(buf);
@@ -69,9 +69,14 @@ void select_user_to_edit(char *message, char *preselect)
         wprintf("<input type=submit name=sc value=\"Edit configuration\">");
         wprintf("<input type=submit name=sc value=\"Edit address book entry\">");
         wprintf("</FORM></CENTER>\n");
+       do_template("endbox");
+
+       wprintf("</TD><TD>");
+
+       svprintf("BOXTITLE", WCS_STRING, "Add users");
+       do_template("beginbox");
 
-       wprintf("</TD><TD>"
-               "To create a new user account, enter the desired "
+       wprintf("To create a new user account, enter the desired "
                "user name in the box below and click 'Create'.<BR><BR>");
 
         wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/create_user\">\n");
@@ -80,6 +85,7 @@ void select_user_to_edit(char *message, char *preselect)
                "<input type=submit value=\"Create\">"
                "</FORM></CENTER>\n");
 
+       do_template("endbox");
        wprintf("</TD></TR></TABLE>\n");
 
        wDumpContent(1);
index e11b644f98e237440e8b01120ae1bcf2805f7523..62190c1bb3ecd0ec3863d43292b5e795365901af 100644 (file)
@@ -57,12 +57,13 @@ void userlist(void)
                wprintf("<EM>%s</EM><BR>\n", &buf[4]);
                goto DONE;
        }
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">User list for ");
-       escputs(serv_info.serv_humannode);
-       wprintf("</SPAN></TD></TR></TABLE>\n");
 
-       wprintf("<CENTER><TABLE border>");
+       svprintf("BOXTITLE", WCS_STRING, "User list for %s",
+                       serv_info.serv_humannode);
+
+       do_template("beginbox");
+       wprintf("<CENTER>");
+       wprintf("<TABLE border>");
        wprintf("<TR><TH>User Name</TH><TH>Number</TH><TH>Access Level</TH>");
        wprintf("<TH>Last Call</TH><TH>Total Calls</TH><TH>Total Posts</TH></TR>\n");
 
@@ -98,8 +99,10 @@ void userlist(void)
                        extract_long(buf, 4), extract_long(buf, 5));
 
        }
-       wprintf("</TABLE></CENTER>\n");
-      DONE:wDumpContent(1);
+       wprintf("</TABLE>");
+       wprintf("</CENTER>\n");
+       do_template("endbox");
+DONE:  wDumpContent(1);
 }
 
 
@@ -114,10 +117,8 @@ void showuser(void)
 
        output_headers(3);
 
-
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">User profile");
-       wprintf("</SPAN></TD></TR></TABLE>\n");
+       svprintf("BOXTITLE", WCS_STRING, "User profile");
+       do_template("beginbox");
 
        strcpy(who, bstr("who"));
        serv_printf("OIMG _userpic_|%s", who);
@@ -149,5 +150,7 @@ void showuser(void)
                "&nbsp;&nbsp;"
                "Click here to page this user (send an instant message)"
                "</A>\n");
+
+       do_template("endbox");
        wDumpContent(1);
 }
index 30374d37b6bd3263785ad7ffccd7c7c6c22fecb7..f068f8904e6709adc347bb844b4e55f05fe20392 100644 (file)
@@ -600,6 +600,13 @@ void blank_page(void) {
 }
 
 
+/*
+ * A template has been requested
+ */
+void url_do_template(void) {
+       do_template(bstr("template"));
+}
+
 
 
 /*
@@ -775,9 +782,11 @@ void session_loop(struct httprequest *req)
                                      c_username, c_password, c_roomname);
                }
                else if (!strncasecmp(buf, "Content-length: ", 16)) {
+                       lprintf(9, "%s\n", buf);
                        ContentLength = atoi(&buf[16]);
                }
                else if (!strncasecmp(buf, "Content-type: ", 14)) {
+                       lprintf(9, "%s\n", buf);
                        safestrncpy(ContentType, &buf[14], sizeof ContentType);
                }
                else if (!strncasecmp(buf, "User-agent: ", 12)) {
@@ -793,7 +802,6 @@ void session_loop(struct httprequest *req)
        }
 
        if (ContentLength > 0) {
-               lprintf(5, "Content length: %d\n", ContentLength);
                content = malloc(ContentLength + SIZ);
                memset(content, 0, ContentLength + SIZ);
                sprintf(content, "Content-type: %s\n"
@@ -814,6 +822,7 @@ void session_loop(struct httprequest *req)
                        addurls(&content[body_start]);
                } else if (!strncasecmp(ContentType, "multipart", 9)) {
                        content_end = content + ContentLength;
+                       lprintf(9, "Calling MIME parser\n");
                        mime_parser(content, content_end, *upload_handler,
                                        NULL, NULL, NULL, 0);
                }
@@ -946,6 +955,8 @@ void session_loop(struct httprequest *req)
                do_welcome();
        } else if (!strcasecmp(action, "blank")) {
                blank_page();
+       } else if (!strcasecmp(action, "do_template")) {
+               url_do_template();
        } else if (!strcasecmp(action, "display_main_menu")) {
                display_main_menu();
        } else if (!strcasecmp(action, "whobbs")) {
index e8ebb1d8caa1b88df24c070731a23ab85f1d5bcd..983a635efd1cc434727265dd5025cd80b6126cda 100644 (file)
@@ -53,6 +53,7 @@ void whobbs(void)
        offer_start_page();
        wprintf("</TD></TR></TABLE>\n");
 
+       do_template("beginbox");
        wprintf("<CENTER><TABLE BORDER=1 WIDTH=100%%>\n<TR>\n");
        wprintf("<TH>Session ID</TH>\n");
        wprintf("<TH>User Name</TH>\n");
@@ -143,6 +144,7 @@ void whobbs(void)
                "<IMG ALIGN=MIDDLE SRC=\"/static/page.gif\" ALT=\"(p)\" "
                "BORDER=0> to send "
                "a page (instant message) to that user.<BR></CENTER>\n");
+       do_template("endbox");
        wDumpContent(1);
 }