4 * Display a list of all accounts on a Citadel system.
14 #include <sys/types.h>
16 #include <sys/socket.h>
19 #include <netinet/in.h>
30 struct namelist *next;
35 * display the userlist
43 struct namelist *bio = NULL;
44 struct namelist *bptr;
51 while (serv_gets(buf), strcmp(buf, "000")) {
52 bptr = (struct namelist *) malloc(sizeof(struct namelist));
54 strcpy(bptr->name, buf);
57 output_headers(1, 1, 2, 0, 0, 0, 0);
58 wprintf("<div id=\"banner\">\n"
59 "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
60 "<SPAN CLASS=\"titlebar\">User list for ");
61 escputs(serv_info.serv_humannode);
63 "</TD></TR></TABLE>\n"
64 "</div>\n<div id=\"content\">\n"
70 wprintf("<EM>%s</EM><br />\n", &buf[4]);
74 wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
75 wprintf("<TR><TH>User Name</TH><TH>Number</TH><TH>Access Level</TH>");
76 wprintf("<TH>Last Login</TH><TH>Total Logins</TH><TH>Total Posts</TH></TR>\n");
78 while (serv_gets(buf), strcmp(buf, "000")) {
81 for (bptr = bio; bptr != NULL; bptr = bptr->next) {
82 if (!strcasecmp(fl, bptr->name))
86 wprintf("<TR BGCOLOR=\"#%s\"><TD>",
87 (bg ? "DDDDDD" : "FFFFFF")
90 wprintf("<A HREF=\"/showuser&who=");
98 wprintf("</TD><TD>%ld</TD><TD>%d</TD><TD>",
100 extract_int(buf, 1));
101 lc = extract_long(buf, 3);
102 tmbuf = (struct tm *) localtime(&lc);
103 wprintf("%02d/%02d/%04d ",
106 (tmbuf->tm_year + 1900));
109 wprintf("</TD><TD>%ld</TD><TD>%5ld</TD></TR>\n",
110 extract_long(buf, 4), extract_long(buf, 5));
113 wprintf("</table></center>\n");
114 DONE: wDumpContent(1);
119 * Display (non confidential) information about a particular user
127 output_headers(1, 1, 0, 0, 0, 0, 0);
129 svprintf("BOXTITLE", WCS_STRING, "User profile");
130 do_template("beginbox");
132 strcpy(who, bstr("who"));
133 serv_printf("OIMG _userpic_|%s", who);
143 wprintf("<CENTER><TABLE><TR><TD>");
145 wprintf("<IMG SRC=\"/image&name=_userpic_&parm=");
149 wprintf("</TD><TD><H1>%s</H1></TD></TR></TABLE></CENTER>\n", who);
150 serv_printf("RBIO %s", who);
153 fmout(NULL, "JUSTIFY");
155 wprintf("<br /><A HREF=\"/display_page&recp=");
158 "<IMG SRC=\"/static/page.gif\" ALIGN=MIDDLE BORDER=0>"
160 "Click here to page this user (send an instant message)"
163 do_template("endbox");