$Log$
+Revision 323.16 2002/03/26 18:23:23 ajc
+* Don't display room banner on screens that don't pertain to a particular room
+* Initial prep for add/change/delete user accounts screen
+
Revision 323.15 2002/03/22 04:33:08 ajc
* "vcard edit" button for _other_ users' My Citadel Config rooms as well
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
webserver: webserver.o context_loop.o tools.o \
cookie_conversion.o locate_host.o \
webcit.o auth.o tcp_sockets.o mainmenu.o serv_func.o who.o \
- roomops.o messages.o userlist.o paging.o sysmsgs.o vcard.o vcard_edit.o \
+ roomops.o messages.o userlist.o paging.o sysmsgs.o useredit.o \
+ vcard.o vcard_edit.o \
mime_parser.o graphics.o netconf.o siteconfig.o subst.o $(LIBOBJS)
$(CC) webserver.o context_loop.o tools.o cookie_conversion.o \
webcit.o auth.o tcp_sockets.o mainmenu.o serv_func.o who.o \
- roomops.o messages.o userlist.o paging.o sysmsgs.o \
+ roomops.o messages.o userlist.o paging.o sysmsgs.o useredit.o \
locate_host.o siteconfig.o subst.o vcard.o vcard_edit.o \
mime_parser.o graphics.o netconf.o \
$(LIBOBJS) $(LIBS) -o webserver
char buf[SIZ];
int a;
- output_headers(1);
+ output_headers(3);
strcpy(buf, bstr("user"));
if (strlen(buf) > 0)
char buf[SIZ];
int a;
- output_headers(1);
+ output_headers(3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
{
char buf[SIZ];
- output_headers(1);
+ output_headers(3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
display_error(&buf[4]);
return;
}
- output_headers(1);
+ output_headers(3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
wprintf("<B>Set/change %s</B>\n", description);
{
int a;
- output_headers(1);
+ output_headers(3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
wprintf("Edit site-wide configuration</A>\n");
if (WC->axlevel >= 6) {
+ wprintf("<LI><A HREF=\"/select_user_to_edit\">\n");
+ wprintf("Add, change, delete user accounts</A>\n");
+
wprintf("<LI><A HREF=\"/validate\">\n");
wprintf("Validate new users</A>\n");
void display_add_node(void)
{
- output_headers(1);
+ output_headers(3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
wprintf("<B>Add new node</B>");
strcpy(node, bstr("node"));
- output_headers(1);
+ output_headers(3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
wprintf("<B>Edit node configuration for ");
char buf[SIZ];
char node[SIZ];
- output_headers(1);
+ output_headers(3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
wprintf("<B>Network configuration</B>\n");
{
char node[SIZ];
- output_headers(1);
+ output_headers(3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=770000><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
wprintf("<B>Confirm delete</B>\n");
serv_puts(buf);
serv_gets(buf);
if (buf[0] == '1') {
- output_headers(1);
+ output_headers(3);
server_to_text();
wprintf("<A HREF=\"/display_netconf\">Back to menu</A>\n");
wDumpContent(1);
char buf[SIZ];
char closewin[SIZ];
- output_headers(1);
+ output_headers(3);
strcpy(recp, bstr("recp"));
strcpy(sc, bstr("sc"));
char buf[SIZ];
int i;
- output_headers(1);
+ output_headers(3);
serv_printf("CONF get");
serv_gets(buf);
--- /dev/null
+/*
+ * Administrative screen to add/change/delete user accounts
+ *
+ */
+
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <limits.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <string.h>
+#include <pwd.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
+#include "webcit.h"
+
+
+
+
+
+void select_user_to_edit(void)
+{
+ char buf[SIZ];
+ char username[SIZ];
+
+ output_headers(3); /* No room banner on this screen */
+
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
+ wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"<B>"
+ "Add/change/delete user accounts"
+ "</B></FONT></TD></TR></TABLE>\n");
+
+ wprintf("<TABLE border=0 CELLSPACING=10><TR VALIGN=TOP>"
+ "<TD>To edit an existing user account, select the user "
+ "name from the list and click 'Edit'.<BR><BR>");
+
+ wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/display_edituser\">\n");
+ wprintf("<SELECT NAME=\"username\" SIZE=10>\n");
+ serv_puts("LIST");
+ serv_gets(buf);
+ if (buf[0] == '1') {
+ while (serv_gets(buf), strcmp(buf, "000")) {
+ extract(username, buf, 0);
+ wprintf("<OPTION>");
+ escputs(username);
+ wprintf("\n");
+ }
+ }
+ wprintf("</SELECT><BR>\n");
+
+ wprintf("<input type=submit name=sc value=\"Edit\">");
+ wprintf("</FORM></CENTER>\n");
+
+ wprintf("</TD><TD>"
+ "To create a new user account, enter the desired "
+ "user name in the box below and click 'Create'.<BR><BR>");
+
+ wprintf("<CENTER><FORM METHOD=\"POST\" ACTION=\"/create_user\">\n");
+ wprintf("New user: ");
+ wprintf("<input type=text name=username><BR>\n"
+ "<input type=submit value=\"Create\">"
+ "</FORM></CENTER>\n");
+
+ wprintf("</TD></TR></TABLE>\n");
+
+ wDumpContent(1);
+}
+
strcpy(bptr->name, buf);
bio = bptr;
}
- output_headers(1);
+ output_headers(3);
serv_puts("LIST");
serv_gets(buf);
char buf[SIZ];
int have_pic;
- output_headers(1);
+ output_headers(3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
inetemail[0] = 0;
extrafields[0] = 0;
- output_headers(1);
+ output_headers(3);
strcpy(whatuser, "");
sprintf(buf, "MSG0 %s|1", bstr("msgnum") );
edit_vcard();
} else if (!strcasecmp(action, "submit_vcard")) {
submit_vcard();
+ } else if (!strcasecmp(action, "select_user_to_edit")) {
+ select_user_to_edit();
} else if (!strcasecmp(action, "diagnostics")) {
output_headers(1);
void edit_vcard(void);
void submit_vcard(void);
void striplt(char *);
+void select_user_to_edit(void);