+ /* Fetch messages from remote locations */
+ if (!strcmp(tab, "feeds")) {
+ wprintf("<div class=\"tabcontent\">");
+
+ wprintf("<i>");
+ wprintf(_("Retrieve messages from these remote POP3 accounts and store them in this room:"));
+ wprintf("</i><br />\n");
+
+ wprintf("<table class=\"altern\" border=0 cellpadding=5>"
+ "<tr class=\"even\"><th>");
+ wprintf(_("Remote host"));
+ wprintf("</th><th>");
+ wprintf(_("User name"));
+ wprintf("</th><th>");
+ wprintf(_("Password"));
+ wprintf("</th><th>");
+ wprintf(_("Keep messages on server?"));
+ wprintf("</th><th>");
+ wprintf(_("Interval"));
+ wprintf("</th><th> </th></tr>");
+
+ serv_puts("GNET");
+ serv_getln(buf, sizeof buf);
+ bg = 1;
+ if (buf[0]=='1') while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
+ extract_token(cmd, buf, 0, '|', sizeof cmd);
+ if (!strcasecmp(cmd, "pop3client")) {
+ safestrncpy(recp, &buf[11], sizeof recp);
+
+ bg = 1 - bg;
+ wprintf("<tr class=\"%s\">",
+ (bg ? "even" : "odd")
+ );
+
+ wprintf("<td>");
+ extract_token(pop3_host, buf, 1, '|', sizeof pop3_host);
+ escputs(pop3_host);
+ wprintf("</td>");
+
+ wprintf("<td>");
+ extract_token(pop3_user, buf, 2, '|', sizeof pop3_user);
+ escputs(pop3_user);
+ wprintf("</td>");
+
+ wprintf("<td>*****</td>"); /* Don't show the password */
+
+ wprintf("<td>%s</td>", extract_int(buf, 4) ? _("Yes") : _("No"));
+
+ wprintf("<td>%ld</td>", extract_long(buf, 5)); // Fetching interval
+
+ wprintf("<td class=\"button_link\">");
+ wprintf(" <a href=\"netedit&cmd=remove&tab=feeds&line=pop3client|");
+ urlescputs(recp);
+ wprintf("\">");
+ wprintf(_("(remove)"));
+ wprintf("</a></td>");
+
+ wprintf("</tr>");
+ }
+ }
+
+ wprintf("<form method=\"POST\" action=\"netedit\">\n"
+ "<tr>"
+ "<input type=\"hidden\" name=\"tab\" value=\"feeds\">"
+ "<input type=\"hidden\" name=\"prefix\" value=\"pop3client|\">\n");
+ wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
+ wprintf("<td>");
+ wprintf("<input type=\"text\" id=\"add_as_pop3host\" NAME=\"line_pop3host\">\n");
+ wprintf("</td>");
+ wprintf("<td>");
+ wprintf("<input type=\"text\" id=\"add_as_pop3user\" NAME=\"line_pop3user\">\n");
+ wprintf("</td>");
+ wprintf("<td>");
+ wprintf("<input type=\"password\" id=\"add_as_pop3pass\" NAME=\"line_pop3pass\">\n");
+ wprintf("</td>");
+ wprintf("<td>");
+ wprintf("<input type=\"checkbox\" id=\"add_as_pop3keep\" NAME=\"line_pop3keep\" VALUE=\"1\">");
+ wprintf("</td>");
+ wprintf("<td>");
+ wprintf("<input type=\"text\" id=\"add_as_pop3int\" NAME=\"line_pop3int\" MAXLENGTH=\"5\">");
+ wprintf("</td>");
+ wprintf("<td>");
+ wprintf("<input type=\"submit\" NAME=\"add_button\" VALUE=\"%s\">", _("Add"));
+ wprintf("</td></tr>");
+ wprintf("</form></table>\n");
+
+ wprintf("<hr>\n");
+
+ wprintf("<i>");
+ wprintf(_("Fetch the following RSS feeds and store them in this room:"));
+ wprintf("</i><br />\n");
+
+ wprintf("<table class=\"altern\" border=0 cellpadding=5>"
+ "<tr class=\"even\"><th>");
+ wprintf("<img src=\"static/rss_16x.png\" width=\"16\" height=\"16\" alt=\" \"> ");
+ wprintf(_("Feed URL"));
+ wprintf("</th><th>");
+ wprintf("</th></tr>");
+
+ serv_puts("GNET");
+ serv_getln(buf, sizeof buf);
+ bg = 1;
+ if (buf[0]=='1') while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
+ extract_token(cmd, buf, 0, '|', sizeof cmd);
+ if (!strcasecmp(cmd, "rssclient")) {
+ safestrncpy(recp, &buf[10], sizeof recp);
+
+ bg = 1 - bg;
+ wprintf("<tr class=\"%s\">",
+ (bg ? "even" : "odd")
+ );
+
+ wprintf("<td>");
+ extract_token(pop3_host, buf, 1, '|', sizeof pop3_host);
+ escputs(pop3_host);
+ wprintf("</td>");
+
+ wprintf("<td class=\"button_link\">");
+ wprintf(" <a href=\"netedit&cmd=remove&tab=feeds&line=rssclient|");
+ urlescputs(recp);
+ wprintf("\">");
+ wprintf(_("(remove)"));
+ wprintf("</a></td>");
+
+ wprintf("</tr>");
+ }
+ }
+
+ wprintf("<form method=\"POST\" action=\"netedit\">\n"
+ "<tr>"
+ "<input type=\"hidden\" name=\"tab\" value=\"feeds\">"
+ "<input type=\"hidden\" name=\"prefix\" value=\"rssclient|\">\n");
+ wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
+ wprintf("<td>");
+ wprintf("<input type=\"text\" id=\"add_as_pop3host\" size=\"72\" "
+ "maxlength=\"256\" name=\"line_pop3host\">\n");
+ wprintf("</td>");
+ wprintf("<td>");
+ wprintf("<input type=\"submit\" name=\"add_button\" value=\"%s\">", _("Add"));
+ wprintf("</td></tr>");
+ wprintf("</form></table>\n");
+
+ wprintf("</div>");
+ }
+
+
+ /* end content of whatever tab is open now */