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 strcpy(who, bstr("who"));
129 output_headers(1, 1, 2, 0, 0, 0, 0);
130 wprintf("<div id=\"banner\">\n"
131 "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
132 "<SPAN CLASS=\"titlebar\">User profile</SPAN>"
133 "</TD></TR></TABLE>\n"
134 "</div>\n<div id=\"content\">\n"
137 wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
139 serv_printf("OIMG _userpic_|%s", who);
149 wprintf("<CENTER><TABLE><TR><TD>");
151 wprintf("<IMG SRC=\"/image&name=_userpic_&parm=");
155 wprintf("</TD><TD><H1>%s</H1></TD></TR></TABLE></CENTER>\n", who);
156 serv_printf("RBIO %s", who);
159 fmout(NULL, "JUSTIFY");
161 wprintf("<br /><A HREF=\"/display_page&recp=");
164 "<IMG SRC=\"/static/page.gif\" ALIGN=MIDDLE BORDER=0>"
166 "Click here to send an instant message to ");
170 wprintf("</td></tr></table></center>\n");