viewdefs[7] = _("Calendar List");
}
+/**
+ * \brief Determine which views are allowed as the default for creating a new room.
+ *
+ * \param which_view The view ID being queried.
+ */
+int is_view_allowed_as_default(int which_view)
+{
+ switch(which_view) {
+ case VIEW_BBS: return(1);
+ case VIEW_MAILBOX: return(1);
+ case VIEW_ADDRESSBOOK: return(1);
+ case VIEW_CALENDAR: return(1);
+ case VIEW_TASKS: return(1);
+ case VIEW_NOTES: return(1);
+ case VIEW_WIKI: return(0); /**< because it isn't finished yet */
+ case VIEW_CALBRIEF: return(0);
+ default: return(0); /**< should never get here */
+ }
+}
+
/**
* \brief load the list of floors
}
+/**
+ * \brief Free a session's march list
+ *
+ * \param wcf Pointer to session being cleared
+ */
+void free_march_list(struct wcsession *wcf)
+{
+ struct march *mptr;
+
+ while (wcf->march != NULL) {
+ mptr = wcf->march->next;
+ free(wcf->march);
+ wcf->march = mptr;
+ }
+
+}
+
+
+
/**
* \brief remove a room from the march list
*/
"\">"
);
}
- else if (WC->wc_view == VIEW_CALENDAR) {
+ else if ( (WC->wc_view == VIEW_CALENDAR) || (WC->wc_view == VIEW_CALBRIEF) ) {
wprintf("<img height=48 width=48 src=\""
"static/calarea_48x.gif"
"\">"
*/
if (
(i == WC->wc_view)
- || (i == WC->wc_default_view) /**< default */
- || ( (i == 0) && (WC->wc_default_view == 1) ) /**< mail or bulletin */
- || ( (i == 1) && (WC->wc_default_view == 0) ) /**< mail or bulletin */
- || ( (i == 7) && (WC->wc_default_view == 3) ) /**< calendar */
+ || (i == WC->wc_default_view) /**< default */
+ || ( (i == 0) && (WC->wc_default_view == 1) ) /**< mail or bulletin */
+ || ( (i == 1) && (WC->wc_default_view == 0) ) /**< mail or bulletin */
+ /** || ( (i == 7) && (WC->wc_default_view == 3) ) (calendar list temporarily disabled) */
) {
wprintf("<OPTION %s VALUE=\"changeview?view=%d\">",
/**
- * \brief view room banner
- * \param got what???
- * \param navbar_style
+ * \brief Display a search box
+ */
+void embed_search_o_matic(void) {
+ wprintf("<form name=\"searchomatic\" action=\"do_search\">\n"
+ "<span class=\"room_banner_new_messages\">");
+ wprintf(_("Search: "));
+ wprintf("<input "
+ "type=\"text\" name=\"query\" size=\"20\" maxlength=\"128\" "
+ "style=\"font-size: 7pt; background: #444455; color: #ddddcc;\">\n"
+ );
+ wprintf("</select></span></form>\n");
+}
+
+
+/**
+ * \brief Embed the room banner
+ *
+ * \param got The information returned from a GOTO server command
+ * \param navbar_style Determines which navigation buttons to display
+ *
*/
void embed_room_banner(char *got, int navbar_style) {
char buf[256];
svcallback("ROOMPIC", embed_room_graphic);
svcallback("ROOMINFO", readinfo);
svcallback("VIEWOMATIC", embed_view_o_matic);
+ svcallback("SEARCHOMATIC", embed_search_o_matic);
svcallback("START", offer_start_page);
do_template("roombanner");
"</span></a></td>\n", _("Month view")
);
break;
+ case VIEW_CALBRIEF:
+ wprintf(
+ "<td>"
+ "<a href=\"readfwd?calview=month\">"
+ "<img align=\"middle\" src=\"static/monthview2_24x.gif\" "
+ "border=\"0\">"
+ "<span class=\"navbar_link\">"
+ "%s"
+ "</span></a></td>\n", _("Calendar list")
+ );
+ break;
case VIEW_TASKS:
wprintf(
"<td>"
);
break;
case VIEW_CALENDAR:
- wprintf(
- "<td><a href=\"display_enter\">"
+ case VIEW_CALBRIEF:
+ wprintf("<td><a href=\"display_enter");
+ if (strlen(bstr("year")) > 0) wprintf("?year=%s", bstr("year"));
+ if (strlen(bstr("month")) > 0) wprintf("?month=%s", bstr("month"));
+ if (strlen(bstr("day")) > 0) wprintf("?day=%s", bstr("day"));
+ wprintf("\">"
"<img align=\"middle\" src=\"static/addevent_24x.gif\" "
"border=\"0\"><span class=\"navbar_link\">"
"%s"
*/
void gotonext(void)
{
- char buf[SIZ];
+ char buf[256];
struct march *mptr, *mptr2;
char next_room[128];
*/
void slrp_highest(void)
{
- char buf[SIZ];
+ char buf[256];
- /* set pointer */
serv_puts("SLRP HIGHEST");
serv_getln(buf, sizeof buf);
- if (buf[0] != '2') {
- wprintf("<EM>%s</EM><br />\n", &buf[4]);
- return;
- }
}
"<TD> </TD>\n");
if (!strcmp(tab, "admin")) {
- wprintf("<TD BGCOLOR=\"#FFFFFF\"><SPAN CLASS=\"tablabel\">");
+ wprintf("<TD class=\"roomops_cell_label\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=\"#CCCCCC\"><a href=\"display_editroom&tab=admin\">");
+ wprintf("<TD class=\"roomops_cell_edit\"><a href=\"display_editroom&tab=admin\">");
}
wprintf(_("Administration"));
if (!strcmp(tab, "admin")) {
wprintf("<TD> </TD>\n");
if (!strcmp(tab, "config")) {
- wprintf("<TD BGCOLOR=\"#FFFFFF\"><SPAN CLASS=\"tablabel\">");
+ wprintf("<TD class=\"roomops_cell_label\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=\"#CCCCCC\"><a href=\"display_editroom&tab=config\">");
+ wprintf("<TD class=\"roomops_cell_edit\"><a href=\"display_editroom&tab=config\">");
}
wprintf(_("Configuration"));
if (!strcmp(tab, "config")) {
wprintf("<TD> </TD>\n");
if (!strcmp(tab, "expire")) {
- wprintf("<TD BGCOLOR=\"#FFFFFF\"><SPAN CLASS=\"tablabel\">");
+ wprintf("<TD class=\"roomops_cell_label\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=\"#CCCCCC\"><a href=\"display_editroom&tab=expire\">");
+ wprintf("<TD class=\"roomops_cell_edit\"><a href=\"display_editroom&tab=expire\">");
}
wprintf(_("Message expire policy"));
if (!strcmp(tab, "expire")) {
wprintf("<TD> </TD>\n");
if (!strcmp(tab, "access")) {
- wprintf("<TD BGCOLOR=\"#FFFFFF\"><SPAN CLASS=\"tablabel\">");
+ wprintf("<TD class=\"roomops_cell_label\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=\"#CCCCCC\"><a href=\"display_editroom&tab=access\">");
+ wprintf("<TD class=\"roomops_cell_edit\"><a href=\"display_editroom&tab=access\">");
}
wprintf(_("Access controls"));
if (!strcmp(tab, "access")) {
wprintf("<TD> </TD>\n");
if (!strcmp(tab, "sharing")) {
- wprintf("<TD BGCOLOR=\"#FFFFFF\"><SPAN CLASS=\"tablabel\">");
+ wprintf("<TD class=\"roomops_cell_label\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=\"#CCCCCC\"><a href=\"display_editroom&tab=sharing\">");
+ wprintf("<TD class=\"roomops_cell_edit\"><a href=\"display_editroom&tab=sharing\">");
}
wprintf(_("Sharing"));
if (!strcmp(tab, "sharing")) {
wprintf("<TD> </TD>\n");
if (!strcmp(tab, "listserv")) {
- wprintf("<TD BGCOLOR=\"#FFFFFF\"><SPAN CLASS=\"tablabel\">");
+ wprintf("<TD class=\"roomops_cell_label\"><SPAN CLASS=\"tablabel\">");
}
else {
- wprintf("<TD BGCOLOR=\"#CCCCCC\"><a href=\"display_editroom&tab=listserv\">");
+ wprintf("<TD class=\"roomops_cell_edit\"><a href=\"display_editroom&tab=listserv\">");
}
wprintf(_("Mailing list service"));
if (!strcmp(tab, "listserv")) {
/** begin content of whatever tab is open now */
wprintf("<div class=\"fix_scrollbar_bug\">"
- "<TABLE border=0 width=100%% bgcolor=\"#FFFFFF\">\n"
+ "<TABLE class=\"roomops_background\">\n"
"<TR><TD>\n");
if (!strcmp(tab, "admin")) {
serv_puts("GETA");
serv_getln(buf, sizeof buf);
if (buf[0] != '2') {
- wprintf("<EM>%s</EM>\n", &buf[4]);
+ wprintf("<em>%s</em>\n", &buf[4]);
} else {
extract_token(er_roomaide, &buf[4], 0, '|', sizeof er_roomaide);
wprintf("<INPUT TYPE=\"text\" NAME=\"er_roomaide\" VALUE=\"%s\" MAXLENGTH=\"25\">\n", er_roomaide);
wprintf("</I></B></TD></TR>\n"
"<TR><TD VALIGN=TOP>\n");
- wprintf("<TABLE border=0 cellpadding=5><TR BGCOLOR=\"#CCCCCC\"><TD>");
+ wprintf("<TABLE border=0 cellpadding=5><TR class=\"roomops_cell\"><TD>");
wprintf(_("Remote node name"));
wprintf("</TD><TD>");
wprintf(_("Remote room name"));
wprintf("</TABLE>\n");
wprintf("</TD><TD VALIGN=TOP>\n");
- wprintf("<TABLE border=0 cellpadding=5><TR BGCOLOR=\"#CCCCCC\"><TD>");
+ wprintf("<TABLE border=0 cellpadding=5><TR class=\"roomops_cell\"><TD>");
wprintf(_("Remote node name"));
wprintf("</TD><TD>");
wprintf(_("Remote room name"));
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
- "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+ "<TABLE class=\"roomops_banner\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
wprintf(_("Create a new room"));
wprintf("</SPAN>"
);
wprintf("<div class=\"fix_scrollbar_bug\">"
- "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
+ "<table class=\"roomops_background\"><tr><td>\n");
wprintf("<form name=\"create_room_form\" method=\"POST\" action=\"entroom\">\n");
" } "
"\">\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");
+ if (is_view_allowed_as_default(i)) {
+ wprintf("<OPTION %s VALUE=\"%d\">",
+ ((i == 0) ? "SELECTED" : ""), i );
+ escputs(viewdefs[i]);
+ wprintf("</OPTION>\n");
+ }
}
wprintf("</SELECT>\n");
{
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n"
- "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+ "<TABLE class=\"roomops_banner\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">");
wprintf(_("Go to a hidden room"));
wprintf("</SPAN>"
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
+ wprintf("<TABLE class=\"roomops_zap\"><TR><TD>");
wprintf("<SPAN CLASS=\"titlebar\">");
wprintf(_("Zap (forget/unsubscribe) the current room"));
wprintf("</SPAN>\n");
else if (fold[i].view == VIEW_CALENDAR) {
wprintf("'static/calarea_16x.gif'");
}
+ else if (fold[i].view == VIEW_CALBRIEF) {
+ wprintf("'static/calarea_16x.gif'");
+ }
else if (fold[i].view == VIEW_TASKS) {
wprintf("'static/taskmanag_16x.gif'");
}
else if (fold[i].view == VIEW_CALENDAR) {
icon = "calarea_16x.gif" ;
}
+ else if (fold[i].view == VIEW_CALBRIEF) {
+ icon = "calarea_16x.gif" ;
+ }
else if (fold[i].view == VIEW_TASKS) {
icon = "taskmanag_16x.gif" ;
}
/** title bar */
wprintf("<div id=\"banner\">\n"
- "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
+ "<TABLE class=\"roomops_banner\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">"
);
if (!strcasecmp(listviewpref, "rooms")) {