* Don't allow the creation of accounts with blank passwords.
* Don't allow users to change to a blank password.
* Fixed the positioning of a few more screens that accidentally got
partially hidden underneath the iconbar.
* Boldfaced the "Password changed." and other prompts.
* Removed the unreadable blue-on-blue links in the calendar day
view. They're redundant anyway, now: "Add new calendar event" and
"month view" are both in the banner bar.
* "New messages / All messages" are now "Read new messages / Read all
messages"
* "Save message" button is now "Post message" for public room posts,
and "Send message" for email.
* "Message has been posted" is now "Message has been sent" for email.
* Swapped positions of "Add users" and "Edit users" boxes.
* vCard editor: "Other Internet email addresses" is now "aliases"
* Renamed the "Users" button to "Who is online?"
$Log$
+Revision 602.3 2005/02/17 04:48:26 ajc
+* After setup is complete, tell them how to log in.
+* Don't allow the creation of accounts with blank passwords.
+* Don't allow users to change to a blank password.
+* Fixed the positioning of a few more screens that accidentally got
+ partially hidden underneath the iconbar.
+* Boldfaced the "Password changed." and other prompts.
+* Removed the unreadable blue-on-blue links in the calendar day
+ view. They're redundant anyway, now: "Add new calendar event" and
+ "month view" are both in the banner bar.
+* "New messages / All messages" are now "Read new messages / Read all
+ messages"
+* "Save message" button is now "Post message" for public room posts,
+ and "Send message" for email.
+* "Message has been posted" is now "Message has been sent" for email.
+* Swapped positions of "Add users" and "Edit users" boxes.
+* vCard editor: "Other Internet email addresses" is now "aliases"
+* Renamed the "Users" button to "Who is online?"
+
Revision 602.2 2005/02/16 05:40:31 ajc
* More display fixes
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
}
}
if (!strcasecmp(bstr("action"), "New User")) {
+ if (strlen(bstr("pass")) == 0) {
+ display_login("Blank passwords are not allowed.");
+ return;
+ }
serv_printf("NEWU %s", bstr("name"));
serv_gets(buf);
if (buf[0] == '2') {
char buf[SIZ];
int a;
- output_headers(1, 1, 0, 0, 0, 0, 0);
-
+ 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\">Validate new users</SPAN>"
+ "</TD></TR></TABLE>\n"
+ "</div>\n<div id=\"content\">\n"
+ );
+
strcpy(buf, bstr("user"));
if (strlen(buf) > 0)
if (strlen(bstr("axlevel")) > 0) {
return;
}
- wprintf("<center>");
- do_template("beginbox_nt");
+ wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<center>");
strcpy(user, &buf[4]);
wprintf("<br />\n");
wprintf("</CENTER>\n");
- do_template("endbox");
- wprintf("</CENTER>\n");
+ wprintf("</td></tr></table></center>\n");
wDumpContent(1);
}
{
char buf[SIZ];
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ 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\">Change your password</SPAN>"
+ "</TD></TR></TABLE>\n"
+ "</div>\n<div id=\"content\">\n"
+ );
+
+ if (strlen(WC->ImportantMessage) > 0) {
+ do_template("beginbox_nt");
+ wprintf("<SPAN CLASS=\"errormsg\">"
+ "%s</SPAN><br />\n", WC->ImportantMessage);
+ do_template("endbox");
+ strcpy(WC->ImportantMessage, "");
+ }
+
+ wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
- svprintf("BOXTITLE", WCS_STRING, "Change your password");
- do_template("beginbox");
wprintf("<CENTER><br />");
serv_puts("MESG changepw");
serv_gets(buf);
fmout(NULL, "CENTER");
}
- wprintf("<FORM ACTION=\"changepw\" METHOD=\"POST\">\n");
+ wprintf("<form name=\"changepwform\" action=\"changepw\" method=\"post\" onLoad=\"document.changepwform.action.disabled = true\">\n");
wprintf("<CENTER>"
"<table border=\"0\" cellspacing=\"5\" cellpadding=\"5\" "
"BGCOLOR=\"#EEEEEE\">"
wprintf("<TD><INPUT TYPE=\"password\" NAME=\"newpass1\" VALUE=\"\" MAXLENGTH=\"20\"></TD></TR>\n");
wprintf("<TR><TD>Enter it again to confirm:</TD>\n");
wprintf("<TD><INPUT TYPE=\"password\" NAME=\"newpass2\" VALUE=\"\" MAXLENGTH=\"20\"></TD></TR>\n");
+
wprintf("</TABLE><br />\n");
- wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Change\">\n"
+ wprintf("<INPUT type=\"submit\" name=\"action\" value=\"Change\">"
" "
- "<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Cancel\">\n");
- wprintf("</CENTER>\n");
- do_template("endbox");
+ "<INPUT type=\"submit\" name=\"action\" value=\"Cancel\">\n");
+ wprintf("</form></center>\n");
+ wprintf("</td></tr></table></center>\n");
wDumpContent(1);
}
display_main_menu();
return;
}
+
strcpy(newpass1, bstr("newpass1"));
strcpy(newpass2, bstr("newpass2"));
if (strcasecmp(newpass1, newpass2)) {
strcpy(WC->ImportantMessage,
"They don't match. Password was not changed.");
- display_main_menu();
+ display_changepw();
+ return;
+ }
+
+ if (strlen(newpass1) == 0) {
+ strcpy(WC->ImportantMessage,
+ "Blank passwords are not allowed.");
+ display_changepw();
return;
}
+
serv_printf("SETP %s", newpass1);
serv_gets(buf);
- strcpy(WC->ImportantMessage, &buf[4]);
- display_main_menu();
+ sprintf(WC->ImportantMessage, "%s", &buf[4]);
+ if (buf[0] == '2') {
+ display_main_menu();
+ }
+ else {
+ display_changepw();
+ }
}
wprintf("</TR></TABLE>\n");
/* End todays-date-with-left-and-right-arrows */
- wprintf("<br /><br /><CENTER><font color=#FFFFFF>"
- " <A HREF=\"/display_edit_event?msgnum=0"
- "&year=%d&month=%d&day=%d\">"
- "Add new calendar event</A>"
- "<br /><br />\n",
- year, month, day
- );
-
- wprintf("<A HREF=\"readfwd?calview=month&year=%d&month=%d&day=1\">"
- "Back to month view</A>\n", year, month);
+ /* In the future we might want to put a month-o-matic here */
wprintf("</FONT></CENTER>\n");
char floorname[SIZ];
int refcount;
- output_headers(1, 1, 2, 0, 0, 0, 0);
-
+ 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\">Add/change/delete floors</SPAN>"
+ "</TD></TR></TABLE>\n"
+ "</div>\n<div id=\"content\">\n"
+ );
+
if (prepend_html != NULL) {
+ wprintf("<br /><b><i>");
client_write(prepend_html, strlen(prepend_html));
+ wprintf("</i></b><br /><br />\n");
}
- serv_printf("LFLR"); /* FIXME put a real test here */
+ serv_printf("LFLR");
serv_gets(buf);
if (buf[0] != '1') {
- wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">Error</SPAN>\n");
wprintf("</TD></TR></TABLE>\n");
- wprintf("</div>\n<div id=\"content\">\n");
wprintf("%s<br />\n", &buf[4]);
wDumpContent(1);
return;
}
- svprintf("BOXTITLE", WCS_STRING, "Floor configuration");
- do_template("beginbox");
-
- wprintf("<TABLE BORDER=1 WIDTH=100%>\n"
+ wprintf("<center><TABLE BORDER=1 WIDTH=99%% bgcolor=\"#ffffff\">\n"
"<TR><TH>Floor number</TH>"
"<TH>Floor name</TH>"
"<TH>Number of rooms</TH></TR>\n"
"</FORM></TD>"
"<TD> </TD></TR>\n");
- wprintf("</TABLE>\n");
- do_template("endbox");
+ wprintf("</table></center>\n");
wDumpContent(1);
}
serv_gets(buf);
if (buf[0] == '2') {
- sprintf(message, "<B><I>Floor has been deleted."
- "</I></B><br /><br />\n");
+ sprintf(message, "Floor has been deleted.");
}
else {
- sprintf(message, "<B><I>%s</I></B>><br />", &buf[4]);
+ sprintf(message, "%s", &buf[4]);
}
display_floorconfig(message);
serv_printf("CFLR %s|1", floorname);
serv_gets(buf);
- sprintf(message, "<B><I>%s</I></B>><br />", &buf[4]);
+ if (buf[0] == '2') {
+ sprintf(message, "New floor has been created.");
+ } else {
+ sprintf(message, "%s", &buf[4]);
+ }
display_floorconfig(message);
}
serv_printf("EFLR %d|%s", floornum, floorname);
serv_gets(buf);
- sprintf(message, "<B><I>%s</I></B>><br />", &buf[4]);
+ sprintf(message, "%s", &buf[4]);
display_floorconfig(message);
}
"SRC=\"/static/users-icon.gif\">");
}
if (ib_displayas != IB_PICONLY) {
- wprintf("Users");
+ wprintf("Who is online?");
}
wprintf("</A></li>\n");
}
"<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
"SRC=\"/static/users-icon.gif\" ALT=\" \">"
"</TD><TD>"
- "<B>Users</B><br />"
+ "<B>Who is online?</B><br />"
"Clicking this icon displays a list of all users "
"currently logged in."
"</TD></TR>\n",
serv_gets(buf);
if (buf[0] == '4') {
post_mime_to_server();
- sprintf(WC->ImportantMessage,
- "Message has been posted.\n");
+ if (strlen(bstr("recp")) > 0) {
+ sprintf(WC->ImportantMessage, "Message has been sent.\n");
+ }
+ else {
+ sprintf(WC->ImportantMessage, "Message has been posted.\n");
+ }
dont_post = atol(bstr("postseq"));
} else {
sprintf(WC->ImportantMessage,
" "
);
- wprintf("<input type=\"submit\" name=\"sc\" value=\"Save message\">"
- " "
+ wprintf("<input type=\"submit\" name=\"sc\" value=\"");
+ if (strlen(bstr("recp")) > 0) {
+ wprintf("Send message");
+ } else {
+ wprintf("Post message");
+ }
+ wprintf("\"> "
"<input type=\"submit\" name=\"sc\" value=\"Cancel\">\n");
/* begin richedit box */
strcpy(recp, bstr("recp"));
- output_headers(1, 1, 0, 0, 0, 0, 0);
-
- svprintf("BOXTITLE", WCS_STRING, "Page: %s", recp);
- do_template("beginbox");
+ 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\">Send instant message</SPAN>"
+ "</TD></TR></TABLE>\n"
+ "</div>\n<div id=\"content\">\n"
+ );
+
+ wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
+
+ wprintf("Send an instant message to: ");
+ escputs(recp);
+ wprintf("<br>\n");
wprintf("<FORM METHOD=\"POST\" ACTION=\"/page_user\">\n");
wprintf("<br /><A HREF=\"javascript:window.close();\"Cancel</A>\n");
wprintf("</FORM></CENTER>\n");
- do_template("endbox");
+ wprintf("</td></tr></table></center>\n");
wDumpContent(1);
}
char buf[SIZ];
char closewin[SIZ];
- output_headers(1, 1, 0, 0, 0, 0, 0);
-
+ 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\">Add or edit an event</SPAN>"
+ "</TD></TR></TABLE>\n"
+ "</div>\n<div id=\"content\">\n"
+ );
+
strcpy(recp, bstr("recp"));
strcpy(sc, bstr("sc"));
strcpy(closewin, bstr("closewin"));
"<td>"
"<A HREF=\"/readnew\">"
"<img align=\"middle\" src=\"/static/readmsgs.gif\" border=\"0\">"
- "<span class=\"navbar_link\">New messages</span></A>"
+ "<span class=\"navbar_link\">Read new messages</span></A>"
"</td>\n"
);
}
"<img align=\"middle\" src=\"/static/readmsgs.gif\" "
"border=\"0\">"
"<span class=\"navbar_link\">"
- "All messages"
+ "Read all messages"
"</span></a></td>\n"
);
break;
if (navbar_style == navbar_default) wprintf(
"<td>"
- "<A HREF=\"/skip\">"
+ "<A HREF=\"/skip\" "
+ "TITLE=\"Leave all messages marked as unread, go to next room with unread messages\">"
"<span class=\"navbar_link\">Skip this room</span>"
"<img align=\"middle\" src=\"/static/forward.gif\" border=\"0\"></A>"
"</td>\n"
if (navbar_style == navbar_default) wprintf(
"<td>"
- "<A HREF=\"/gotonext\">"
+ "<A HREF=\"/gotonext\" "
+ "TITLE=\"Mark all messages as read, go to next room with unread messages\">"
"<span class=\"navbar_link\">Goto next room</span>"
"<img align=\"middle\" src=\"/static/forward.gif\" border=\"0\"></A>"
"</td>\n"
display_main_menu();
return;
}
- output_headers(1, 1, 0, 0, 0, 0, 0);
- svprintf("BOXTITLE", WCS_STRING, "Create a new room");
- do_template("beginbox");
+
+ 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\">Create a new room</SPAN>"
+ "</TD></TR></TABLE>\n"
+ "</div>\n<div id=\"content\">\n"
+ );
+
+ wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
wprintf("<FORM METHOD=\"POST\" ACTION=\"/entroom\">\n");
}
wprintf("</SELECT>\n");
+ wprintf("<LI>Default view for room: ");
+ wprintf("<SELECT NAME=\"er_view\" SIZE=\"1\">\n");
+ for (i=0; i<(sizeof viewdefs / sizeof (char *)); ++i) {
+ wprintf("<OPTION %s VALUE=\"%d\">",
+ ((i == 0) ? "SELECTED" : ""), i );
+ escputs(viewdefs[i]);
+ wprintf("</OPTION>\n");
+ }
+ wprintf("</SELECT>\n");
+
wprintf("<LI>Type of room:<UL>\n");
wprintf("<LI><INPUT TYPE=\"radio\" NAME=\"type\" VALUE=\"public\" ");
wprintf("> Personal (mailbox for you only)\n");
wprintf("</UL>\n");
- wprintf("<LI>Default view for room: "); /* FOO */
- wprintf("<SELECT NAME=\"er_view\" SIZE=\"1\">\n");
- for (i=0; i<(sizeof viewdefs / sizeof (char *)); ++i) {
- wprintf("<OPTION %s VALUE=\"%d\">",
- ((i == 0) ? "SELECTED" : ""), i );
- escputs(viewdefs[i]);
- wprintf("</OPTION>\n");
- }
- wprintf("</SELECT>\n");
-
wprintf("<CENTER>\n");
wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"OK\">");
wprintf(" ");
if (buf[0] == '1') {
fmout(NULL, "CENTER");
}
- do_template("endbox");
+ wprintf("</td></tr></table></center>\n");
wDumpContent(1);
}
char setup_directory[SIZ];
char init_entry[SIZ];
int using_web_installer = 0;
-
+char suggested_url[SIZ];
/*
* Set an entry in inittab to the desired state
#endif
char hostname[128];
char portname[128];
+ struct utsname my_utsname;
/* Determine the fully qualified path name of webserver */
snprintf(looking_for, sizeof looking_for, "%s/webserver", setup_directory);
"select another port.");
sprintf(http_port, "2000");
set_value(question, http_port);
+ uname(&my_utsname);
+ sprintf(suggested_url, "http://%s:%s/", my_utsname.nodename, http_port);
#ifdef HAVE_OPENSSL
snprintf(question, sizeof question,
int main(int argc, char *argv[])
{
int a;
- char aaa[128];
+ char aaa[256];
int info_only = 0;
+ strcpy(suggested_url, "http://<your_host_name>:<port>/");
/* set an invalid setup type */
setup_type = (-1);
if (a == 0) start_the_service();
sleep(1);
}
- important_message("Setup finished",
- "Setup is finished. You may now log in.");
+ sprintf(aaa,
+ "Setup is finished. You may now log in.\n"
+ "Point your web browser at %s\n", suggested_url);
+ important_message("Setup finished", aaa);
}
else {
important_message("Setup finished",
left:0px;
width: 15%;
height:100%;
- background: #ffffff;
+ background: #eeeecc;
}
* html #iconbar {
width: 100%;
padding: 0 0 1em 0;
margin-bottom: 1em;
- background-color: #ffffff;
+ background-color: #eeeecc;
color: #aaaaaa;
font-size: 8pt;
}
#button li a {
display: block;
- background-color: #FFFFFF;
+ background-color: #eeeecc;
color: #000000;
text-decoration: none;
width: 100%;
}
#button li a:hover {
- background-color: #aaaaaa;
- color: #fff;
+ background-color: #ddddff;
+ color: #000000;
}
a:link {
.errormsg {
color: #AA0000;
background: none;
+ font-weight: bold;
font-style: italic;
}
wprintf("<TABLE border=0 CELLSPACING=10><TR VALIGN=TOP><TD>\n");
+ svprintf("BOXTITLE", WCS_STRING, "Add users");
+ do_template("beginbox");
+
+ wprintf("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");
+
+ do_template("endbox");
+
+ wprintf("</TD><TD>");
+
svprintf("BOXTITLE", WCS_STRING, "Edit or Delete users");
do_template("beginbox");
wprintf("</FORM></CENTER>\n");
do_template("endbox");
- wprintf("</TD><TD>");
-
- svprintf("BOXTITLE", WCS_STRING, "Add users");
- do_template("beginbox");
-
- wprintf("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");
-
- do_template("endbox");
wprintf("</TD></TR></TABLE>\n");
wDumpContent(1);
char buf[SIZ];
int have_pic;
- output_headers(1, 1, 0, 0, 0, 0, 0);
+ 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"
+ );
- svprintf("BOXTITLE", WCS_STRING, "User profile");
- do_template("beginbox");
+ wprintf("<center><table border=0 width=99%% bgcolor=\"#ffffff\"><tr><td>\n");
- strcpy(who, bstr("who"));
serv_printf("OIMG _userpic_|%s", who);
serv_gets(buf);
if (buf[0] == '2') {
wprintf("\">"
"<IMG SRC=\"/static/page.gif\" ALIGN=MIDDLE BORDER=0>"
" "
- "Click here to page this user (send an instant message)"
- "</A>\n");
+ "Click here to send an instant message to ");
+ escputs(who);
+ wprintf("</A>\n");
- do_template("endbox");
+ wprintf("</td></tr></table></center>\n");
wDumpContent(1);
}
escputs(primary_inetemail);
wprintf("\"><br />"
"</TD><TD VALIGN=TOP>"
- "Other Internet e-mail addresses<br />"
+ "Internet e-mail aliases<br />"
"<TEXTAREA NAME=\"other_inetemail\" ROWS=5 COLS=40 WIDTH=40>");
escputs(other_inetemail);
wprintf("</TEXTAREA></TD></TR></TABLE><br />\n");
if (do_room_banner == 1) {
wprintf("<div id=\"content\">\n");
-
if (strlen(WC->ImportantMessage) > 0) {
do_template("beginbox_nt");
wprintf("<SPAN CLASS=\"errormsg\">"