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("<div id=\"fix_scrollbar_bug\">"
75 "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
76 wprintf("<TR><TH>User Name</TH><TH>Number</TH><TH>Access Level</TH>");
77 wprintf("<TH>Last Login</TH><TH>Total Logins</TH><TH>Total Posts</TH></TR>\n");
79 while (serv_gets(buf), strcmp(buf, "000")) {
80 extract_token(fl, buf, 0, '|', sizeof fl);
82 for (bptr = bio; bptr != NULL; bptr = bptr->next) {
83 if (!strcasecmp(fl, bptr->name))
87 wprintf("<TR BGCOLOR=\"#%s\"><TD>",
88 (bg ? "DDDDDD" : "FFFFFF")
91 wprintf("<A HREF=\"/showuser&who=");
99 wprintf("</TD><TD>%ld</TD><TD>%d</TD><TD>",
100 extract_long(buf, 2),
101 extract_int(buf, 1));
102 lc = extract_long(buf, 3);
103 tmbuf = (struct tm *) localtime(&lc);
104 wprintf("%02d/%02d/%04d ",
107 (tmbuf->tm_year + 1900));
110 wprintf("</TD><TD>%ld</TD><TD>%5ld</TD></TR>\n",
111 extract_long(buf, 4), extract_long(buf, 5));
114 wprintf("</table></div>\n");
115 DONE: wDumpContent(1);
120 * Display (non confidential) information about a particular user
128 strcpy(who, bstr("who"));
130 output_headers(1, 1, 2, 0, 0, 0, 0);
131 wprintf("<div id=\"banner\">\n"
132 "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
133 "<SPAN CLASS=\"titlebar\">User profile</SPAN>"
134 "</TD></TR></TABLE>\n"
135 "</div>\n<div id=\"content\">\n"
138 wprintf("<div id=\"fix_scrollbar_bug\">"
139 "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
141 serv_printf("OIMG _userpic_|%s", who);
151 wprintf("<CENTER><TABLE><TR><TD>");
153 wprintf("<IMG SRC=\"/image&name=_userpic_&parm=");
157 wprintf("</TD><TD><H1>%s</H1></TD></TR></TABLE></CENTER>\n", who);
158 serv_printf("RBIO %s", who);
161 fmout(NULL, "JUSTIFY");
163 wprintf("<br /><A HREF=\"/display_page&recp=");
166 "<IMG SRC=\"/static/page.gif\" ALIGN=MIDDLE BORDER=0>"
168 "Click here to send an instant message to ");
172 wprintf("</td></tr></table></div>\n");