+/*
+ * $Id$
+ *
+ * Display a list of all accounts on a Citadel system.
+ *
+ */
+
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include "webcit.h"
-
-
-
struct namelist {
struct namelist *next;
char name[32];
*/
void userlist(void)
{
- char buf[256];
- char fl[256];
+ char buf[SIZ];
+ char fl[SIZ];
struct tm *tmbuf;
long lc;
struct namelist *bio = NULL;
struct namelist *bptr;
int has_bio;
+ int bg = 0;
serv_puts("LBIO");
serv_gets(buf);
strcpy(bptr->name, buf);
bio = bptr;
}
- output_headers(1);
+ output_headers(1, 1, 2, 0, 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);
+ wprintf("</SPAN>"
+ "</TD></TR></TABLE>\n"
+ "</div>\n<div id=\"content\">\n"
+ );
serv_puts("LIST");
serv_gets(buf);
if (buf[0] != '1') {
- wprintf("<EM>%s</EM><BR>\n", &buf[4]);
+ wprintf("<EM>%s</EM><br />\n", &buf[4]);
goto DONE;
}
- wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
- wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
- wprintf("<B>User list for ");
- escputs(serv_info.serv_humannode);
- wprintf("</B></FONT></TD></TR></TABLE>\n");
- wprintf("<CENTER><TABLE border>");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<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 Call</TH><TH>Total Calls</TH><TH>Total Posts</TH></TR>\n");
+ wprintf("<TH>Last Login</TH><TH>Total Logins</TH><TH>Total Posts</TH></TR>\n");
while (serv_gets(buf), strcmp(buf, "000")) {
extract(fl, buf, 0);
if (!strcasecmp(fl, bptr->name))
has_bio = 1;
}
- wprintf("<TR><TD>");
+ bg = 1 - bg;
+ wprintf("<TR BGCOLOR=\"#%s\"><TD>",
+ (bg ? "DDDDDD" : "FFFFFF")
+ );
if (has_bio) {
wprintf("<A HREF=\"/showuser&who=");
urlescputs(fl);
extract_long(buf, 4), extract_long(buf, 5));
}
- wprintf("</TABLE></CENTER>\n");
- DONE:wDumpContent(1);
+ wprintf("</table></div>\n");
+DONE: wDumpContent(1);
}
*/
void showuser(void)
{
- char who[256];
- char buf[256];
+ char who[SIZ];
+ char buf[SIZ];
int have_pic;
- output_headers(1);
+ strcpy(who, bstr("who"));
+ output_headers(1, 1, 2, 0, 0, 0, 0);
+ wprintf("<div id=\"banner\">\n"
+ "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+ "<SPAN CLASS=\"titlebar\">User profile</SPAN>"
+ "</TD></TR></TABLE>\n"
+ "</div>\n<div id=\"content\">\n"
+ );
- wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
- wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"<B>User profile");
- wprintf("</B></FONT></TD></TR></TABLE>\n");
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
- strcpy(who, bstr("who"));
serv_printf("OIMG _userpic_|%s", who);
serv_gets(buf);
if (buf[0] == '2') {
wprintf("</TD><TD><H1>%s</H1></TD></TR></TABLE></CENTER>\n", who);
serv_printf("RBIO %s", who);
serv_gets(buf);
- if (buf[0] == '1')
- fmout(NULL);
+ if (buf[0] == '1') {
+ fmout(NULL, "JUSTIFY");
+ }
+ wprintf("<br /><A HREF=\"/display_page&recp=");
+ urlescputs(who);
+ wprintf("\">"
+ "<IMG SRC=\"/static/page.gif\" ALIGN=MIDDLE BORDER=0>"
+ " "
+ "Click here to send an instant message to ");
+ escputs(who);
+ wprintf("</A>\n");
+
+ wprintf("</td></tr></table></div>\n");
wDumpContent(1);
}