*/
void url(char *buf)
{
- int pos, len;
- int start, end;
+ int len;
+ char *start, *end, *pos;
char urlbuf[SIZ];
char outbuf[1024];
- start = (-1);
- len = end = strlen(buf);
- for (pos = 0; pos < len; ++pos) {
- if (!strncasecmp(&buf[pos], "http://", 7))
+ start = NULL;
+ len = strlen(buf);
+ end = buf + len;
+ for (pos = buf; (pos < end) && (start == NULL); ++pos) {
+ if (!strncasecmp(pos, "http://", 7))
start = pos;
- if (!strncasecmp(&buf[pos], "ftp://", 6))
+ if (!strncasecmp(pos, "ftp://", 6))
start = pos;
}
- if (start < 0)
+ if (start == NULL)
return;
- for (pos = len; pos > start; --pos) {
- if ( (!isprint(buf[pos]))
- || (isspace(buf[pos]))
- || (buf[pos] == '{')
- || (buf[pos] == '}')
- || (buf[pos] == '|')
- || (buf[pos] == '\\')
- || (buf[pos] == '^')
- || (buf[pos] == '[')
- || (buf[pos] == ']')
- || (buf[pos] == '`')
- || (buf[pos] == '<')
- || (buf[pos] == '>')
- || (buf[pos] == '(')
- || (buf[pos] == ')')
+ for (pos = buf+len; pos > start; --pos) {
+ if ( (!isprint(*pos))
+ || (isspace(*pos))
+ || (*pos == '{')
+ || (*pos == '}')
+ || (*pos == '|')
+ || (*pos == '\\')
+ || (*pos == '^')
+ || (*pos == '[')
+ || (*pos == ']')
+ || (*pos == '`')
+ || (*pos == '<')
+ || (*pos == '>')
+ || (*pos == '(')
+ || (*pos == ')')
) {
end = pos;
}
}
- strncpy(urlbuf, &buf[start], end - start);
- urlbuf[end - start] = 0;
+ strncpy(urlbuf, start, end - start);
+ urlbuf[end - start] = '\0';
- strncpy(outbuf, buf, start);
- sprintf(&outbuf[start], "%ca href=%c%s%c TARGET=%c%s%c%c%s%c/A%c",
+ if (start != buf)
+ strncpy(outbuf, buf, start - buf );
+ sprintf(&outbuf[start-buf], "%ca href=%c%s%c TARGET=%c%s%c%c%s%c/A%c",
LB, QU, urlbuf, QU, QU, TARGET, QU, RB, urlbuf, LB, RB);
- strcat(outbuf, &buf[end]);
+ strcat(outbuf, end);
if ( strlen(outbuf) < 250 )
strcpy(buf, outbuf);
}
}
wprintf("<tt>");
url(buf);
- msgescputs(buf);
+ msgescputs1(buf);
wprintf("</tt><br />");
}
wprintf("</i><br />");
);
}
+
+ /**
+ * Set the "is_bbview" variable if it appears that we are looking at
+ * a classic bulletin board view.
+ */
+ if ((!is_tasks) && (!is_calendar) && (!is_addressbook)
+ && (!is_notes) && (!is_singlecard) && (!is_summary)) {
+ is_bbview = 1;
+ }
+
+ /**
+ * If we're not currently looking at ALL requested
+ * messages, then display the selector bar
+ */
+ if (is_bbview) {
+ /** begin bbview scroller */
+ wprintf("<form name=\"msgomatic\" class=\"selector_top\" >");
+ wprintf(_("Reading #"), lowest_displayed, highest_displayed);
+
+ wprintf("<select name=\"whichones\" size=\"1\" "
+ "OnChange=\"location.href=msgomatictop.whichones.options"
+ "[selectedIndex].value\">\n");
+
+ if (bbs_reverse) {
+ for (b=nummsgs-1; b>=0; b = b - maxmsgs) {
+ hi = b + 1;
+ lo = b - maxmsgs + 2;
+ if (lo < 1) lo = 1;
+ wprintf("<option %s value="
+ "\"%s"
+ "?startmsg=%ld"
+ "?maxmsgs=%d"
+ "?summary=%d\">"
+ "%d-%d</option> \n",
+ ((WC->msgarr[lo-1] == startmsg) ? "selected" : ""),
+ oper,
+ WC->msgarr[lo-1],
+ maxmsgs,
+ is_summary,
+ hi, lo);
+ }
+ }
+ else {
+ for (b=0; b<nummsgs; b = b + maxmsgs) {
+ lo = b + 1;
+ hi = b + maxmsgs + 1;
+ if (hi > nummsgs) hi = nummsgs;
+ wprintf("<option %s value="
+ "\"%s"
+ "?startmsg=%ld"
+ "?maxmsgs=%d"
+ "?summary=%d\">"
+ "%d-%d</option> \n",
+ ((WC->msgarr[b] == startmsg) ? "selected" : ""),
+ oper,
+ WC->msgarr[lo-1],
+ maxmsgs,
+ is_summary,
+ lo, hi);
+ }
+ }
+
+ wprintf("<option value=\"%s?startmsg=%ld"
+ "?maxmsgs=9999999?summary=%d\">",
+ oper,
+ WC->msgarr[0], is_summary);
+ wprintf(_("All"));
+ wprintf("</option>");
+ wprintf("</select> ");
+ wprintf(_("of %d messages."), nummsgs);
+
+ /** forward/reverse */
+ wprintf(" <select name=\"direction\" size=\"1\" "
+ "OnChange=\"location.href=msgomatictop.direction.options"
+ "[selectedIndex].value\">\n"
+ );
+
+ wprintf("<option %s value=\"%s?sortby=forward\">",
+ (bbs_reverse ? "" : "selected"),
+ oper
+ );
+ wprintf(_("oldest to newest"));
+ wprintf("</option>\n");
+
+ wprintf("<option %s value=\"%s?sortby=reverse\">",
+ (bbs_reverse ? "selected" : ""),
+ oper
+ );
+ wprintf(_("newest to oldest"));
+ wprintf("</option>\n");
+
+ wprintf("</select></form>\n");
+ /** end bbview scroller */
+ }
+
+
+
for (a = 0; a < nummsgs; ++a) {
if ((WC->msgarr[a] >= startmsg) && (num_displayed < maxmsgs)) {
}
}
- /**
- * Set the "is_bbview" variable if it appears that we are looking at
- * a classic bulletin board view.
- */
- if ((!is_tasks) && (!is_calendar) && (!is_addressbook)
- && (!is_notes) && (!is_singlecard) && (!is_summary)) {
- is_bbview = 1;
- }
/** Output loop */
if (displayed_msgs != NULL) {
*/
if (is_bbview) {
/** begin bbview scroller */
- wprintf("<form name=\"msgomatic\">");
+ wprintf("<form name=\"msgomatic\" class=\"selector_bottom\" >");
wprintf(_("Reading #"), lowest_displayed, highest_displayed);
wprintf("<select name=\"whichones\" size=\"1\" "
}
wprintf("<option value=\"%s?startmsg=%ld"
- "?maxmsgs=9999999?summary=%d\">"
- "ALL"
- "</option> ",
+ "?maxmsgs=9999999?summary=%d\">",
oper,
WC->msgarr[0], is_summary);
-
+ wprintf(_("All"));
+ wprintf("</option>");
wprintf("</select> ");
wprintf(_("of %d messages."), nummsgs);
"[selectedIndex].value\">\n"
);
- wprintf("<option %s value=\"%s?sortby=forward\">oldest to newest</option>\n",
+ wprintf("<option %s value=\"%s?sortby=forward\">",
(bbs_reverse ? "" : "selected"),
oper
);
+ wprintf(_("oldest to newest"));
+ wprintf("</option>\n");
- wprintf("<option %s value=\"%s?sortby=reverse\">newest to oldest</option>\n",
+ wprintf("<option %s value=\"%s?sortby=reverse\">",
(bbs_reverse ? "selected" : ""),
oper
);
+ wprintf(_("newest to oldest"));
+ wprintf("</option>\n");
wprintf("</select></form>\n");
/** end bbview scroller */
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
- wprintf("<TABLE WIDTH=100%% BORDER=0><TR><TD>");
- wprintf("<SPAN CLASS=\"titlebar\">");
+ wprintf("<h1>");
wprintf(_("Confirm move of message"));
- wprintf("</SPAN>\n");
- wprintf("</TD></TR></TABLE>\n");
- wprintf("</div>\n<div id=\"content\">\n");
+ wprintf("</h1>");
+ wprintf("</div>\n");
+
+ wprintf("<div id=\"content\" class=\"service\">\n");
wprintf("<CENTER>");