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, 0, 0, 0, 0, 0);
62 wprintf("<EM>%s</EM><br />\n", &buf[4]);
66 svprintf("BOXTITLE", WCS_STRING, "User list for %s",
67 serv_info.serv_humannode);
69 do_template("beginbox");
71 wprintf("<TABLE border=0 width=100%%>");
72 wprintf("<TR><TH>User Name</TH><TH>Number</TH><TH>Access Level</TH>");
73 wprintf("<TH>Last Login</TH><TH>Total Logins</TH><TH>Total Posts</TH></TR>\n");
75 while (serv_gets(buf), strcmp(buf, "000")) {
78 for (bptr = bio; bptr != NULL; bptr = bptr->next) {
79 if (!strcasecmp(fl, bptr->name))
83 wprintf("<TR BGCOLOR=\"#%s\"><TD>",
84 (bg ? "DDDDDD" : "FFFFFF")
87 wprintf("<A HREF=\"/showuser&who=");
95 wprintf("</TD><TD>%ld</TD><TD>%d</TD><TD>",
98 lc = extract_long(buf, 3);
99 tmbuf = (struct tm *) localtime(&lc);
100 wprintf("%02d/%02d/%04d ",
103 (tmbuf->tm_year + 1900));
106 wprintf("</TD><TD>%ld</TD><TD>%5ld</TD></TR>\n",
107 extract_long(buf, 4), extract_long(buf, 5));
111 wprintf("</CENTER>\n");
112 do_template("endbox");
113 DONE: wDumpContent(1);
118 * Display (non confidential) information about a particular user
126 output_headers(1, 1, 0, 0, 0, 0, 0);
128 svprintf("BOXTITLE", WCS_STRING, "User profile");
129 do_template("beginbox");
131 strcpy(who, bstr("who"));
132 serv_printf("OIMG _userpic_|%s", who);
142 wprintf("<CENTER><TABLE><TR><TD>");
144 wprintf("<IMG SRC=\"/image&name=_userpic_&parm=");
148 wprintf("</TD><TD><H1>%s</H1></TD></TR></TABLE></CENTER>\n", who);
149 serv_printf("RBIO %s", who);
152 fmout(NULL, "JUSTIFY");
154 wprintf("<br /><A HREF=\"/display_page&recp=");
157 "<IMG SRC=\"/static/page.gif\" ALIGN=MIDDLE BORDER=0>"
159 "Click here to page this user (send an instant message)"
162 do_template("endbox");