lower case tags
[citadel.git] / webcit / userlist.c
index 176a175ebf5175d86f5aa4c540cd0277d0a8c7c6..0104f0449e4b325d0303f5ed7fb3b38ae3ba399e 100644 (file)
@@ -5,25 +5,6 @@
  *
  */
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <limits.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <string.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <pthread.h>
-#include <signal.h>
 #include "webcit.h"
 
 struct namelist {
@@ -36,8 +17,9 @@ struct namelist {
  */
 void userlist(void)
 {
-       char buf[SIZ];
-       char fl[SIZ];
+       char buf[256];
+       char fl[256];
+       char title[256];
        struct tm tmbuf;
        time_t lc;
        struct namelist *bio = NULL;
@@ -54,11 +36,12 @@ void userlist(void)
                        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\">User list for ");
-       escputs(serv_info.serv_humannode);
+               "<SPAN CLASS=\"titlebar\">");
+       snprintf(title, sizeof title, _("User list for %s"), serv_info.serv_humannode);
+       escputs(title);
        wprintf("</SPAN>"
                "</TD></TR></TABLE>\n"
                "</div>\n<div id=\"content\">\n"
@@ -73,8 +56,8 @@ void userlist(void)
 
        wprintf("<div id=\"fix_scrollbar_bug\">"
                "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
-       wprintf("<TR><TH>User Name</TH><TH>Number</TH><TH>Access Level</TH>");
-       wprintf("<TH>Last Login</TH><TH>Total Logins</TH><TH>Total Posts</TH></TR>\n");
+       wprintf(_("<TR><TH>User Name</TH><TH>Number</TH><TH>Access Level</TH>"
+               "<TH>Last Login</TH><TH>Total Logins</TH><TH>Total Posts</TH></TR>"));
 
        while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
                extract_token(fl, buf, 0, '|', sizeof fl);
@@ -88,7 +71,7 @@ void userlist(void)
                        (bg ? "DDDDDD" : "FFFFFF")
                );
                if (has_bio) {
-                       wprintf("<A HREF=\"/showuser&who=");
+                       wprintf("<a href=\"/showuser&who=");
                        urlescputs(fl);
                        wprintf("\">");
                        escputs(fl);
@@ -121,16 +104,19 @@ DONE:     wDumpContent(1);
  */
 void showuser(void)
 {
-       char who[SIZ];
-       char buf[SIZ];
+       char who[256];
+       char buf[256];
        int have_pic;
 
        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>"
-               "<SPAN CLASS=\"titlebar\">User profile</SPAN>"
+               "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR>"
+               "<TD><img src=\"/static/usermanag_48x.gif\"></TD>"
+               "<td align=left><SPAN CLASS=\"titlebar\">");
+       wprintf(_("User profile"));
+       wprintf("</SPAN>"
                "</TD></TR></TABLE>\n"
                "</div>\n<div id=\"content\">\n"
        );
@@ -150,7 +136,7 @@ void showuser(void)
 
        wprintf("<CENTER><TABLE><TR><TD>");
        if (have_pic == 1) {
-               wprintf("<IMG SRC=\"/image&name=_userpic_&parm=");
+               wprintf("<img src=\"/image&name=_userpic_&parm=");
                urlescputs(who);
                wprintf("\">");
        }
@@ -158,15 +144,15 @@ void showuser(void)
        serv_printf("RBIO %s", who);
        serv_getln(buf, sizeof buf);
        if (buf[0] == '1') {
-               fmout(NULL, "JUSTIFY");
+               fmout("JUSTIFY");
        }
-       wprintf("<br /><A HREF=\"/display_page?recp=");
+       wprintf("<br /><a href=\"/display_page?recp=");
        urlescputs(who);
        wprintf("\">"
-               "<IMG SRC=\"/static/page.gif\" ALIGN=MIDDLE BORDER=0>"
-               "&nbsp;&nbsp;"
-               "Click here to send an instant message to ");
-       escputs(who);
+               "<img src=\"/static/citadelchat_24x.gif\" "
+               "ALIGN=MIDDLE BORDER=0>&nbsp;&nbsp;");
+       snprintf(buf, sizeof buf, _("Click here to send an instant message to %s"), who);
+       escputs(buf);
        wprintf("</A>\n");
 
        wprintf("</td></tr></table></div>\n");