From 45ba72a04728c610ff37a939f6f962aea9a97e4e Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 13 May 2003 04:37:36 +0000 Subject: [PATCH] * Begin migration to the new "rounded boxes" look --- webcit/auth.c | 10 ++-- webcit/graphics.c | 7 ++- webcit/mainmenu.c | 34 +++++++------ webcit/messages.c | 33 ++++++------- webcit/paging.c | 10 ++-- webcit/roomops.c | 21 +++++---- webcit/static/iconbar.html | 81 +++++++++++++++++-------------- webcit/static/login.html | 84 +++++++++++++-------------------- webcit/static/mainframeset.html | 4 +- webcit/static/navbar.html | 6 +-- webcit/static/style.css | 3 +- webcit/subst.c | 4 ++ webcit/useredit.c | 24 ++++++---- webcit/userlist.c | 25 +++++----- webcit/webcit.c | 13 ++++- webcit/who.c | 2 + 16 files changed, 192 insertions(+), 169 deletions(-) diff --git a/webcit/auth.c b/webcit/auth.c index fb763e68a..a764367c0 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -329,15 +329,14 @@ void display_changepw(void) output_headers(3); - wprintf("
"); - wprintf("Change your password\n"); - wprintf("
\n"); - + svprintf("BOXTITLE", WCS_STRING, "Change your password"); + do_template("beginbox"); wprintf("
"); serv_puts("MESG changepw"); serv_gets(buf); - if (buf[0] == '1') + if (buf[0] == '1') { fmout(NULL); + } wprintf("
\n"); wprintf("
\n"); @@ -348,6 +347,7 @@ void display_changepw(void) wprintf("\n"); wprintf("\n"); wprintf("\n"); + do_template("endbox"); wDumpContent(1); } diff --git a/webcit/graphics.c b/webcit/graphics.c index ab9d7709f..7616be447 100644 --- a/webcit/graphics.c +++ b/webcit/graphics.c @@ -37,7 +37,12 @@ void display_graphics_upload(char *description, char *check_cmd, char *uplurl) wprintf("
\n"); - wprintf("\n", uplurl, bstr("which_room")); + wprintf("\n", uplurl); + + 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"); diff --git a/webcit/mainmenu.c b/webcit/mainmenu.c index 850e10845..47ca39e2d 100644 --- a/webcit/mainmenu.c +++ b/webcit/mainmenu.c @@ -33,12 +33,10 @@ void display_main_menu(void) { output_headers(1); - wprintf("
Enter new password:
" - "Basic commands\n" - "
\n" - "
" - ); + svprintf("BOXTITLE", WCS_STRING, "Basic commands"); + do_template("beginbox"); + wprintf("
"); wprintf("
"); /* start of first column */ wprintf("
    "); @@ -88,12 +86,12 @@ void display_main_menu(void) wprintf("
\n"); wprintf("
\n"); + do_template("endbox"); wprintf("
"); - wprintf("
"); - wprintf("Interaction\n"); - wprintf("
\n"); + svprintf("BOXTITLE", WCS_STRING, "Interaction"); + do_template("beginbox"); wprintf("\n"); + do_template("endbox"); wprintf("
"); - wprintf("
"); - wprintf("Your info\n"); - wprintf("
\n"); + svprintf("BOXTITLE", WCS_STRING, "Your info"); + do_template("beginbox"); wprintf("\n"); - + do_template("endbox"); wprintf("
"); - wprintf("
"); - wprintf("Advanced room commands\n"); - wprintf("
\n"); + svprintf("BOXTITLE", WCS_STRING, "Advanced room commands"); + do_template("beginbox"); wprintf("\n"); + do_template("endbox"); wprintf("
"); if ((WC->axlevel >= 6) || (WC->is_room_aide)) { - wprintf("
"); - wprintf("Administrative functions\n"); - wprintf("
\n"); + svprintf("BOXTITLE", WCS_STRING, "Administrative functions"); + do_template("beginbox"); wprintf("\n"); + do_template("endbox"); } wprintf("
"); wDumpContent(2); diff --git a/webcit/messages.c b/webcit/messages.c index 74c17a471..d053a4be6 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -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("
\n" - "\""); - wprintf(" %s ", &buf[4]); - wprintf("from %s ", WC->wc_username); - if (strlen(bstr("recp")) > 0) - wprintf("to %s ", bstr("recp")); - wprintf("in %s> ", WC->wc_roomname); - wprintf("
\n"); + fmt_date(buf, now); + strcat(&buf[strlen(buf)], " from "); + stresc(&buf[strlen(buf)], WC->wc_username, 1); + if (strlen(bstr("recp")) > 0) { + strcat(&buf[strlen(buf)], " to "); + stresc(&buf[strlen(buf)], bstr("recp"), 1); + } + strcat(&buf[strlen(buf)], " in "); + stresc(&buf[strlen(buf)], WC->wc_roomname, 1); + svprintf("BOXTITLE", WCS_STRING, buf); + do_template("beginbox"); + + wprintf("
\n"); wprintf("\n", now); + wprintf("\""); wprintf("Subject (optional):" "" "
\n"); - wprintf("
\n"); @@ -1192,8 +1193,8 @@ void display_enter(void) "\n"); wprintf("
\n"); + do_template("endbox"); DONE: wDumpContent(1); - wprintf(""); } diff --git a/webcit/paging.c b/webcit/paging.c index ecad487ff..45514d545 100644 --- a/webcit/paging.c +++ b/webcit/paging.c @@ -33,16 +33,11 @@ void display_page(void) output_headers(3); - wprintf("
"); - wprintf("Page another user\n"); - wprintf("
\n"); - - wprintf("
This will send a page (instant message) " - "to %s.\n", recp); + svprintf("BOXTITLE", WCS_STRING, "Page: %s", recp); + do_template("beginbox"); wprintf("
\n"); - wprintf("\n"); @@ -2095,10 +2098,10 @@ void knrooms() { ( !strcasecmp(listviewpref, "folders") ? "SELECTED" : "" ) ); - wprintf("\n", - ( !strcasecmp(listviewpref, "boxes") ? "SELECTED" : "" ) + ( !strcasecmp(listviewpref, "table") ? "SELECTED" : "" ) ); wprintf("
\n"); wprintf("\n"); wprintf("\n"); + do_template("endbox"); wDumpContent(1); } diff --git a/webcit/roomops.c b/webcit/roomops.c index a93f4b0e8..bff0aec93 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -224,6 +224,7 @@ void tabular_room_list(void) int a; char buf[SIZ]; + do_template("beginbox_nt"); wprintf(""); wprintf(""); wprintf("\n"); @@ -259,6 +260,7 @@ void tabular_room_list(void) wprintf("\n"); } wprintf("
FloorRooms with new messagesRooms with no new messages
\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\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("
\n"); @@ -2106,7 +2109,7 @@ void knrooms() { wprintf("

\n"); /* Display the room list in the user's preferred format */ - if (!strcasecmp(listviewpref, "rooms")) { + if (!strcasecmp(listviewpref, "table")) { tabular_room_list(); } else { diff --git a/webcit/static/iconbar.html b/webcit/static/iconbar.html index 2254c9fb9..0c3b9345d 100644 --- a/webcit/static/iconbar.html +++ b/webcit/static/iconbar.html @@ -7,49 +7,58 @@ - + + +
+ + - - - - - - - - - + + + + -
+ +  +
 
- -
Rooms
-
-
- -
Users
-
-
- -
Advanced options
-
-
- - -
Log off
+
+ +
Rooms
+
+
+ +
Users
-

- - powered by
CITADEL/UX
-
+ +
Advanced options
+
+ + + + +
Log off
+
+ + + + + powered by
CITADEL/UX
+
+ + + + + diff --git a/webcit/static/login.html b/webcit/static/login.html index b0eb43d23..6e0c33852 100644 --- a/webcit/static/login.html +++ b/webcit/static/login.html @@ -1,55 +1,39 @@
+ - - -
+ + + - + + + + + + + + + + +
+

+
- - - - - - - - -
-

- - - - - - - - - - -
User name:
Password:
- - - - -

-

- If you already have an account - on , enter your user name - and password and click - "Login."
- If you are a new user, enter the name - and password you wish to use, and click - "New User."
- Please log off properly when finished.
- You must use a browser that supports - frames and cookies.
-

-
+ + + + + +
User name:
Password:
-

+

+ If you already have an account on , + enter your user name and password and click "Login."
+ If you are a new user, enter the name and password you wish to use, + and click "New User."
+ Please log off properly when finished.
+ You must use a browser that supports frames and cookies.
+

+
+ + diff --git a/webcit/static/mainframeset.html b/webcit/static/mainframeset.html index b0e340b0e..4f26b44f7 100644 --- a/webcit/static/mainframeset.html +++ b/webcit/static/mainframeset.html @@ -7,11 +7,11 @@ - + - + diff --git a/webcit/static/navbar.html b/webcit/static/navbar.html index 3141d6605..5447fd824 100644 --- a/webcit/static/navbar.html +++ b/webcit/static/navbar.html @@ -5,10 +5,10 @@ - + -
- +
diff --git a/webcit/static/style.css b/webcit/static/style.css index d21f761ba..6afbe87d6 100644 --- a/webcit/static/style.css +++ b/webcit/static/style.css @@ -112,7 +112,8 @@ a:active { } body { - background-image: url("/image&name=background"); + background: #aaaaaa; + color: #000000; } diff --git a/webcit/subst.c b/webcit/subst.c index 083f8e4e0..97d00ed6f 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -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); } diff --git a/webcit/useredit.c b/webcit/useredit.c index a415b869b..850b39058 100644 --- a/webcit/useredit.c +++ b/webcit/useredit.c @@ -39,16 +39,16 @@ void select_user_to_edit(char *message, char *preselect) if (message != NULL) wprintf(message); - wprintf("
"); - wprintf("" - "Add/change/delete user accounts" - "
\n"); + wprintf("
\n"); + + svprintf("BOXTITLE", WCS_STRING, "Edit or Delete users"); + do_template("beginbox"); - wprintf("" - "
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'.

"); - wprintf("
\n"); + wprintf("
" + "\n"); wprintf(""); wprintf(""); wprintf("
\n"); + do_template("endbox"); + + wprintf("
"); + + svprintf("BOXTITLE", WCS_STRING, "Add users"); + do_template("beginbox"); - wprintf("" - "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'.

"); wprintf("
\n"); @@ -80,6 +85,7 @@ void select_user_to_edit(char *message, char *preselect) "" "
\n"); + do_template("endbox"); wprintf("
\n"); wDumpContent(1); diff --git a/webcit/userlist.c b/webcit/userlist.c index e11b644f9..62190c1bb 100644 --- a/webcit/userlist.c +++ b/webcit/userlist.c @@ -57,12 +57,13 @@ void userlist(void) wprintf("%s
\n", &buf[4]); goto DONE; } - wprintf("
"); - wprintf("User list for "); - escputs(serv_info.serv_humannode); - wprintf("
\n"); - wprintf("
"); + svprintf("BOXTITLE", WCS_STRING, "User list for %s", + serv_info.serv_humannode); + + do_template("beginbox"); + wprintf("
"); + wprintf("
"); wprintf(""); wprintf("\n"); @@ -98,8 +99,10 @@ void userlist(void) extract_long(buf, 4), extract_long(buf, 5)); } - wprintf("
User NameNumberAccess LevelLast CallTotal CallsTotal Posts
\n"); - DONE:wDumpContent(1); + wprintf("
"); + wprintf("\n"); + do_template("endbox"); +DONE: wDumpContent(1); } @@ -114,10 +117,8 @@ void showuser(void) output_headers(3); - - wprintf("
"); - wprintf("User profile"); - wprintf("
\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) "  " "Click here to page this user (send an instant message)" "
\n"); + + do_template("endbox"); wDumpContent(1); } diff --git a/webcit/webcit.c b/webcit/webcit.c index 30374d37b..f068f8904 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -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")) { diff --git a/webcit/who.c b/webcit/who.c index e8ebb1d8c..983a635ef 100644 --- a/webcit/who.c +++ b/webcit/who.c @@ -53,6 +53,7 @@ void whobbs(void) offer_start_page(); wprintf("
\n"); + do_template("beginbox"); wprintf("
\n\n"); wprintf("\n"); wprintf("\n"); @@ -143,6 +144,7 @@ void whobbs(void) "\"(p)\" to send " "a page (instant message) to that user.
\n"); + do_template("endbox"); wDumpContent(1); } -- 2.30.2
Session IDUser Name