3 function batch_edit_cbox($elem, $label = false) {
4 print "<input type=\"checkbox\" title=\"".__("Check to enable field")."\"
5 onchange=\"batchFeedsToggleField(this, '$elem', '$label')\">";
8 function module_pref_feeds($link) {
10 global $update_intervals;
11 global $purge_intervals;
12 global $update_methods;
14 $subop = $_REQUEST["subop"];
15 $quiet = $_REQUEST["quiet"];
16 $mode = $_REQUEST["mode"];
18 if ($subop == "massSubscribe") {
19 $ids = split(",", db_escape_string($_REQUEST["ids"]));
21 $subscribed = array();
23 foreach ($ids as $id) {
26 $result = db_query($link, "SELECT feed_url,title FROM ttrss_feeds
28 } else if ($mode == 2) {
29 $result = db_query($link, "SELECT id,feed_url,title FROM ttrss_archived_feeds
30 WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]);
31 $orig_id = db_escape_string(db_fetch_result($result, 0, "id"));
34 $feed_url = db_escape_string(db_fetch_result($result, 0, "feed_url"));
35 $title = db_escape_string(db_fetch_result($result, 0, "title"));
37 $title_orig = db_fetch_result($result, 0, "title");
39 $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
40 feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]);
42 if (db_num_rows($result) == 0) {
44 $result = db_query($link,
45 "INSERT INTO ttrss_feeds (owner_uid,feed_url,title,cat_id)
46 VALUES ('".$_SESSION["uid"]."', '$feed_url', '$title', NULL)");
47 } else if ($mode == 2) {
48 $result = db_query($link,
49 "INSERT INTO ttrss_feeds (id,owner_uid,feed_url,title,cat_id)
50 VALUES ('$orig_id','".$_SESSION["uid"]."', '$feed_url', '$title', NULL)");
52 array_push($subscribed, $title_orig);
56 if (count($subscribed) > 0) {
57 $msg = "<b>".__('Subscribed to feeds:')."</b>".
58 "<ul class=\"nomarks\">";
60 foreach ($subscribed as $title) {
61 $msg .= "<li>$title</li>";
65 print format_notice($msg);
69 if ($subop == "browse") {
71 if (!ENABLE_FEED_BROWSER
) {
72 print __("Feed browser is administratively disabled.");
76 print "<div id=\"infoBoxTitle\">".__('Feed Browser')."</div>";
78 print "<div class=\"infoBoxContents\">";
80 $browser_search = db_escape_string($_REQUEST["search"]);
82 //print "<p>".__("Showing top 25 registered feeds, sorted by popularity:")."</p>";
84 print "<form onsubmit='return false;' display='inline' name='feed_browser' id='feed_browser'>";
87 <div style='float : right'>
88 <img style='display : none'
89 id='feed_browser_spinner' src='images/indicator_white.gif'>
90 <input name=\"search\" size=\"20\" type=\"search\"
91 onfocus=\"javascript:disableHotkeys();\"
92 onblur=\"javascript:enableHotkeys();\"
93 onchange=\"javascript:updateFeedBrowser()\" value=\"$browser_search\">
94 <input type=\"submit\" class=\"button\"
95 onclick=\"javascript:updateFeedBrowser()\" value=\"".__('Search')."\">
98 print " <select name=\"mode\" onchange=\"updateFeedBrowser()\">
99 <option value='1'>" . __('Popular feeds') . "</option>
100 <option value='2'>" . __('Feed archive') . "</option>
105 print " <select name=\"limit\">";
107 foreach (array(25, 50, 100, 200) as $l) {
108 $issel = ($l == $limit) ?
"selected" : "";
109 print "<option $issel>$l</option>";
115 <input type=\"submit\" class=\"button\"
116 onclick=\"updateFeedBrowser()\" value=\"".__('Show')."\">";
120 $owner_uid = $_SESSION["uid"];
122 print "<ul class='browseFeedList' id='browseFeedList'>";
123 $subscribe_btn_disabled = print_feed_browser($link, $search, 25) == 0 ?
"disabled" : "";
126 print "<div align='center'>
127 <input type=\"submit\" class=\"button\" id=\"feed_browser_subscribe\"
128 $subscribe_btn_disabled
129 onclick=\"feedBrowserSubscribe()\" value=\"".__('Subscribe')."\">
130 <input type='submit' class='button'
131 onclick=\"closeInfoBox()\" value=\"".__('Cancel')."\"></div>";
137 if ($subop == "editfeed") {
138 $feed_id = db_escape_string($_REQUEST["id"]);
140 $result = db_query($link,
141 "SELECT * FROM ttrss_feeds WHERE id = '$feed_id' AND
142 owner_uid = " . $_SESSION["uid"]);
144 $title = htmlspecialchars(db_fetch_result($result,
147 $icon_file = ICONS_DIR
. "/$feed_id.ico";
149 if (file_exists($icon_file) && filesize($icon_file) > 0) {
150 $feed_icon = "<img width=\"16\" height=\"16\"
151 src=\"" . ICONS_URL
. "/$feed_id.ico\">";
156 print "<div id=\"infoBoxTitle\">".__('Feed Editor')."</div>";
158 print "<div class=\"infoBoxContents\">";
160 print "<form id=\"edit_feed_form\" onsubmit=\"return false\">";
162 print "<input type=\"hidden\" name=\"id\" value=\"$feed_id\">";
163 print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
164 print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">";
166 print "<div class=\"dlgSec\">".__("Feed")."</div>";
167 print "<div class=\"dlgSecCont\">";
171 print "<input style=\"font-size : 16px\" size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"
172 name=\"title\" value=\"$title\">";
176 $feed_url = db_fetch_result($result, 0, "feed_url");
177 $feed_url = htmlspecialchars(db_fetch_result($result,
182 print __('URL:') . " ";
183 print "<input size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"
184 name=\"feed_url\" value=\"$feed_url\">";
188 if (get_pref($link, 'ENABLE_FEED_CATS')) {
190 $cat_id = db_fetch_result($result, 0, "cat_id");
194 print __('Place in category:') . " ";
196 $parent_feed = db_fetch_result($result, 0, "parent_feed");
198 if (sprintf("%d", $parent_feed) > 0) {
199 $disabled = "disabled";
204 print_feed_cat_select($link, "cat_id", $cat_id, $disabled);
211 print __('Link to feed:') . " ";
213 $tmp_result = db_query($link, "SELECT COUNT(id) AS count
214 FROM ttrss_feeds WHERE parent_feed = '$feed_id'");
216 $linked_count = db_fetch_result($tmp_result, 0, "count");
218 $parent_feed = db_fetch_result($result, 0, "parent_feed");
220 if ($linked_count > 0) {
221 $disabled = "disabled";
226 print "<select $disabled name=\"parent_feed\">";
228 print "<option value=\"0\">".__('Not linked')."</option>";
230 if (get_pref($link, 'ENABLE_FEED_CATS')) {
232 $cat_qpart = "AND cat_id = '$cat_id'";
234 $cat_qpart = "AND cat_id IS NULL";
238 $tmp_result = db_query($link, "SELECT id,title FROM ttrss_feeds
239 WHERE id != '$feed_id' AND owner_uid = ".$_SESSION["uid"]." AND
240 (SELECT COUNT(id) FROM ttrss_feeds AS T2 WHERE T2.id = ttrss_feeds.parent_feed) = 0
241 $cat_qpart ORDER BY title");
243 if (db_num_rows($tmp_result) > 0) {
244 print "<option disabled>--------</option>";
247 while ($tmp_line = db_fetch_assoc($tmp_result)) {
248 if ($tmp_line["id"] == $parent_feed) {
249 $is_selected = "selected";
254 $linked_title = truncate_string(htmlspecialchars($tmp_line["title"]), 40);
256 printf("<option $is_selected value='%d'>%s</option>",
257 $tmp_line["id"], $linked_title);
265 print "<div class=\"dlgSec\">".__("Update")."</div>";
266 print "<div class=\"dlgSecCont\">";
268 /* Update Interval */
270 $update_interval = db_fetch_result($result, 0, "update_interval");
272 print_select_hash("update_interval", $update_interval, $update_intervals);
276 if (ALLOW_SELECT_UPDATE_METHOD
) {
277 $update_method = db_fetch_result($result, 0, "update_method");
279 print " " . __('using') . " ";
280 print_select_hash("update_method", $update_method, $update_methods);
283 $purge_interval = db_fetch_result($result, 0, "purge_interval");
285 if (FORCE_ARTICLE_PURGE
== 0) {
291 print __('Article purging:') . " ";
293 print_select_hash("purge_interval", $purge_interval, $purge_intervals);
296 print "<input type='hidden' name='purge_interval' value='$purge_interval'>";
301 print "<div class=\"dlgSec\">".__("Authentication")."</div>";
302 print "<div class=\"dlgSecCont\">";
304 $auth_login = htmlspecialchars(db_fetch_result($result, 0, "auth_login"));
308 print "<tr><td>" . __('Login:') . "</td><td>";
310 print "<input size=\"20\" onkeypress=\"return filterCR(event, feedEditSave)\"
311 name=\"auth_login\" value=\"$auth_login\">";
313 print "</tr><tr><td>" . __("Password:") . "</td><td>";
315 $auth_pass = htmlspecialchars(db_fetch_result($result, 0, "auth_pass"));
317 print "<input size=\"20\" type=\"password\" name=\"auth_pass\"
318 onkeypress=\"return filterCR(event, feedEditSave)\"
319 value=\"$auth_pass\">";
321 print "</td></tr></table>";
324 print "<div class=\"dlgSec\">".__("Options")."</div>";
325 print "<div class=\"dlgSecCont\">";
327 print "<div style=\"line-height : 100%\">";
329 $private = sql_bool_to_bool(db_fetch_result($result, 0, "private"));
332 $checked = "checked";
337 print "<input type=\"checkbox\" name=\"private\" id=\"private\"
338 $checked> <label for=\"private\">".__('Hide from "Other Feeds"')."</label>";
340 $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
343 $checked = "checked";
348 print "<br/><input type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
349 $checked> <label for=\"rtl_content\">".__('Right-to-left content')."</label>";
351 $hidden = sql_bool_to_bool(db_fetch_result($result, 0, "hidden"));
354 $checked = "checked";
359 print "<br/><input type=\"checkbox\" id=\"hidden\" name=\"hidden\"
360 $checked> <label for=\"hidden\">".__('Hide from my feed list')."</label>";
362 $include_in_digest = sql_bool_to_bool(db_fetch_result($result, 0, "include_in_digest"));
364 if ($include_in_digest) {
365 $checked = "checked";
370 print "<br/><input type=\"checkbox\" id=\"include_in_digest\"
371 name=\"include_in_digest\"
372 $checked> <label for=\"include_in_digest\">".__('Include in e-mail digest')."</label>";
375 $always_display_enclosures = sql_bool_to_bool(db_fetch_result($result, 0, "always_display_enclosures"));
377 if ($always_display_enclosures) {
378 $checked = "checked";
383 print "<br/><input type=\"checkbox\" id=\"always_display_enclosures\"
384 name=\"always_display_enclosures\"
385 $checked> <label for=\"always_display_enclosures\">".__('Always display image attachments')."</label>";
388 $cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images"));
391 $checked = "checked";
396 if (ENABLE_SIMPLEPIE
&& SIMPLEPIE_CACHE_IMAGES
) {
400 $disabled = "disabled";
401 $label_class = "class='insensitive'";
404 print "<br/><input type=\"checkbox\" id=\"cache_images\"
405 name=\"cache_images\" $disabled
406 $checked> <label $label_class for=\"cache_images\">".
407 __('Cache images locally')."</label>";
415 $title = htmlspecialchars($title, ENT_QUOTES
);
417 print "<div class='dlgButtons'>
418 <div style=\"float : left\">
419 <input type='submit' class='button'
420 onclick='return unsubscribeFeed($feed_id, \"$title\")' value=\"".__('Unsubscribe')."\">
422 <input type=\"submit\" class=\"button\"
423 onclick=\"return feedEditSave()\" value=\"".__('Save')."\">
424 <input type='submit' class='button'
425 onclick=\"return feedEditCancel()\" value=\"".__('Cancel')."\">
431 if ($subop == "editfeeds") {
433 $feed_ids = db_escape_string($_REQUEST["ids"]);
435 print "<div id=\"infoBoxTitle\">".__('Multiple Feed Editor')."</div>";
437 print "<div class=\"infoBoxContents\">";
439 print "<form id=\"batch_edit_feed_form\" onsubmit=\"return false\">";
441 print "<input type=\"hidden\" name=\"ids\" value=\"$feed_ids\">";
442 print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
443 print "<input type=\"hidden\" name=\"subop\" value=\"batchEditSave\">";
445 print "<div class=\"dlgSec\">".__("Feed")."</div>";
446 print "<div class=\"dlgSecCont\">";
450 print "<input disabled style=\"font-size : 16px\" size=\"35\" onkeypress=\"return filterCR(event, feedEditSave)\"
451 name=\"title\" value=\"$title\">";
453 batch_edit_cbox("title");
459 print __('URL:') . " ";
460 print "<input disabled size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"
461 name=\"feed_url\" value=\"$feed_url\">";
463 batch_edit_cbox("feed_url");
467 if (get_pref($link, 'ENABLE_FEED_CATS')) {
471 print __('Place in category:') . " ";
473 print_feed_cat_select($link, "cat_id", $cat_id, "disabled");
475 batch_edit_cbox("cat_id");
481 print "<div class=\"dlgSec\">".__("Update")."</div>";
482 print "<div class=\"dlgSecCont\">";
484 /* Update Interval */
486 print_select_hash("update_interval", $update_interval, $update_intervals,
489 batch_edit_cbox("update_interval");
493 if (ALLOW_SELECT_UPDATE_METHOD
) {
494 print " " . __('using') . " ";
495 print_select_hash("update_method", $update_method, $update_methods,
497 batch_edit_cbox("update_method");
502 if (FORCE_ARTICLE_PURGE
!= 0) {
506 print __('Article purging:') . " ";
508 print_select_hash("purge_interval", $purge_interval, $purge_intervals,
511 batch_edit_cbox("purge_interval");
515 print "<div class=\"dlgSec\">".__("Authentication")."</div>";
516 print "<div class=\"dlgSecCont\">";
518 print __('Login:') . " ";
519 print "<input disabled size=\"15\" onkeypress=\"return filterCR(event, feedEditSave)\"
520 name=\"auth_login\" value=\"$auth_login\">";
522 batch_edit_cbox("auth_login");
524 print " " . __("Password:") . " ";
526 print "<input disabled size=\"15\" type=\"password\" name=\"auth_pass\"
527 onkeypress=\"return filterCR(event, feedEditSave)\"
528 value=\"$auth_pass\">";
530 batch_edit_cbox("auth_pass");
533 print "<div class=\"dlgSec\">".__("Options")."</div>";
534 print "<div class=\"dlgSecCont\">";
536 print "<div style=\"line-height : 100%\">";
538 print "<input disabled type=\"checkbox\" name=\"private\" id=\"private\"
539 $checked> <label id=\"private_l\" class='insensitive' for=\"private\">".__('Hide from "Other Feeds"')."</label>";
541 print " "; batch_edit_cbox("private", "private_l");
543 print "<br/><input disabled type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
544 $checked> <label class='insensitive' id=\"rtl_content_l\" for=\"rtl_content\">".__('Right-to-left content')."</label>";
546 print " "; batch_edit_cbox("rtl_content", "rtl_content_l");
548 print "<br/><input disabled type=\"checkbox\" id=\"hidden\" name=\"hidden\"
549 $checked> <label class='insensitive' id=\"hidden_l\" for=\"hidden\">".__('Hide from my feed list')."</label>";
551 print " "; batch_edit_cbox("hidden", "hidden_l");
553 print "<br/><input disabled type=\"checkbox\" id=\"include_in_digest\"
554 name=\"include_in_digest\"
555 $checked> <label id=\"include_in_digest_l\" class='insensitive' for=\"include_in_digest\">".__('Include in e-mail digest')."</label>";
557 print " "; batch_edit_cbox("include_in_digest", "include_in_digest_l");
559 print "<br/><input disabled type=\"checkbox\" id=\"always_display_enclosures\"
560 name=\"always_display_enclosures\"
561 $checked> <label id=\"always_display_enclosures_l\" class='insensitive' for=\"always_display_enclosures\">".__('Always display image attachments')."</label>";
563 print " "; batch_edit_cbox("always_display_enclosures", "always_display_enclosures_l");
565 print "<br/><input disabled type=\"checkbox\" id=\"cache_images\"
566 name=\"cache_images\"
567 $checked> <label class='insensitive' id=\"cache_images_l\"
568 for=\"cache_images\">".
569 __('Cache images locally')."</label>";
572 if (ENABLE_SIMPLEPIE
&& SIMPLEPIE_CACHE_IMAGES
) {
573 print " "; batch_edit_cbox("cache_images", "cache_images_l");
581 print "<div class='dlgButtons'>
582 <input type=\"submit\" class=\"button\"
583 onclick=\"return feedsEditSave()\" value=\"".__('Save')."\">
584 <input type='submit' class='button'
585 onclick=\"return feedEditCancel()\" value=\"".__('Cancel')."\">
591 if ($subop == "editSave" ||
$subop == "batchEditSave") {
593 $feed_title = db_escape_string(trim($_POST["title"]));
594 $feed_link = db_escape_string(trim($_POST["feed_url"]));
595 $upd_intl = db_escape_string($_POST["update_interval"]);
596 $purge_intl = db_escape_string($_POST["purge_interval"]);
597 $feed_id = db_escape_string($_POST["id"]); /* editSave */
598 $feed_ids = db_escape_string($_POST["ids"]); /* batchEditSave */
599 $cat_id = db_escape_string($_POST["cat_id"]);
600 $auth_login = db_escape_string(trim($_POST["auth_login"]));
601 $auth_pass = db_escape_string(trim($_POST["auth_pass"]));
602 $parent_feed = db_escape_string($_POST["parent_feed"]);
603 $private = checkbox_to_sql_bool(db_escape_string($_POST["private"]));
604 $rtl_content = checkbox_to_sql_bool(db_escape_string($_POST["rtl_content"]));
605 $hidden = checkbox_to_sql_bool(db_escape_string($_POST["hidden"]));
606 $include_in_digest = checkbox_to_sql_bool(
607 db_escape_string($_POST["include_in_digest"]));
608 $cache_images = checkbox_to_sql_bool(
609 db_escape_string($_POST["cache_images"]));
610 $update_method = (int) db_escape_string($_POST["update_method"]);
612 $always_display_enclosures = checkbox_to_sql_bool(
613 db_escape_string($_POST["always_display_enclosures"]));
615 if (get_pref($link, 'ENABLE_FEED_CATS')) {
616 if ($cat_id && $cat_id != 0) {
617 $category_qpart = "cat_id = '$cat_id',";
618 $category_qpart_nocomma = "cat_id = '$cat_id'";
620 $category_qpart = 'cat_id = NULL,';
621 $category_qpart_nocomma = 'cat_id = NULL';
624 $category_qpart = "";
625 $category_qpart_nocomma = "";
628 if ($parent_feed && $parent_feed != 0) {
629 $parent_qpart = "parent_feed = '$parent_feed'";
631 $parent_qpart = 'parent_feed = NULL';
634 if (ENABLE_SIMPLEPIE
&& SIMPLEPIE_CACHE_IMAGES
) {
635 $cache_images_qpart = "cache_images = $cache_images,";
637 $cache_images_qpart = "";
640 if ($subop == "editSave") {
642 $result = db_query($link, "UPDATE ttrss_feeds SET
643 $category_qpart $parent_qpart,
644 title = '$feed_title', feed_url = '$feed_link',
645 update_interval = '$upd_intl',
646 purge_interval = '$purge_intl',
647 auth_login = '$auth_login',
648 auth_pass = '$auth_pass',
650 rtl_content = $rtl_content,
653 include_in_digest = $include_in_digest,
654 always_display_enclosures = $always_display_enclosures,
655 update_method = '$update_method'
656 WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
658 if (get_pref($link, 'ENABLE_FEED_CATS')) {
659 # update linked feed categories
660 $result = db_query($link, "UPDATE ttrss_feeds SET
661 $category_qpart_nocomma WHERE parent_feed = '$feed_id' AND
662 owner_uid = " . $_SESSION["uid"]);
664 } else if ($subop == "batchEditSave") {
665 $feed_data = array();
667 foreach (array_keys($_POST) as $k) {
668 if ($k != "op" && $k != "subop" && $k != "ids") {
669 $feed_data[$k] = $_POST[$k];
673 db_query($link, "BEGIN");
675 foreach (array_keys($feed_data) as $k) {
681 $qpart = "title = '$feed_title'";
685 $qpart = "feed_url = '$feed_link'";
688 case "update_interval":
689 $qpart = "update_interval = '$upd_intl'";
692 case "purge_interval":
693 $qpart = "purge_interval = '$purge_intl'";
697 $qpart = "auth_login = '$auth_login'";
701 $qpart = "auth_pass = '$auth_pass'";
705 $qpart = "private = '$private'";
709 $qpart = "hidden = '$hidden'";
712 case "include_in_digest":
713 $qpart = "include_in_digest = '$include_in_digest'";
716 case "always_display_enclosures":
717 $qpart = "always_display_enclosures = '$always_display_enclosures'";
721 $qpart = "cache_images = '$cache_images'";
725 $qpart = "rtl_content = '$rtl_content'";
728 case "update_method":
729 $qpart = "update_method = '$update_method'";
733 $qpart = $category_qpart_nocomma;
740 "UPDATE ttrss_feeds SET $qpart WHERE id IN ($feed_ids)
741 AND owner_uid = " . $_SESSION["uid"]);
746 db_query($link, "COMMIT");
751 if ($subop == "remove") {
753 $ids = split(",", db_escape_string($_REQUEST["ids"]));
755 foreach ($ids as $id) {
756 remove_feed($link, $id, $_SESSION["uid"]);
760 if ($subop == "clear") {
761 $id = db_escape_string($_REQUEST["id"]);
762 clear_feed_articles($link, $id);
765 if ($subop == "rescore") {
766 $ids = split(",", db_escape_string($_REQUEST["ids"]));
768 foreach ($ids as $id) {
770 $filters = load_filters($link, $id, $_SESSION["uid"], 6);
772 $result = db_query($link, "SELECT title, content, link, ref_id FROM
773 ttrss_user_entries, ttrss_entries
774 WHERE ref_id = id AND feed_id = '$id' AND
775 owner_uid = " .$_SESSION['uid']."
780 while ($line = db_fetch_assoc($result)) {
782 $article_filters = get_article_filters($filters, $line['title'],
783 $line['content'], $line['link']);
785 $new_score = calculate_article_score($article_filters);
787 if (!$scores[$new_score]) $scores[$new_score] = array();
789 array_push($scores[$new_score], $line['ref_id']);
792 foreach (array_keys($scores) as $s) {
794 db_query($link, "UPDATE ttrss_user_entries SET score = '$s',
796 ref_id IN (" . join(',', $scores[$s]) . ")");
797 } else if ($s < -500) {
798 db_query($link, "UPDATE ttrss_user_entries SET score = '$s',
800 ref_id IN (" . join(',', $scores[$s]) . ")");
802 db_query($link, "UPDATE ttrss_user_entries SET score = '$s' WHERE
803 ref_id IN (" . join(',', $scores[$s]) . ")");
808 print __("All done.");
812 if ($subop == "rescoreAll") {
814 $result = db_query($link,
815 "SELECT id FROM ttrss_feeds WHERE owner_uid = " . $_SESSION['uid']);
817 while ($feed_line = db_fetch_assoc($result)) {
819 $id = $feed_line["id"];
821 $filters = load_filters($link, $id, $_SESSION["uid"], 6);
823 $tmp_result = db_query($link, "SELECT title, content, link, ref_id FROM
824 ttrss_user_entries, ttrss_entries
825 WHERE ref_id = id AND feed_id = '$id' AND
826 owner_uid = " .$_SESSION['uid']."
831 while ($line = db_fetch_assoc($tmp_result)) {
833 $article_filters = get_article_filters($filters, $line['title'],
834 $line['content'], $line['link']);
836 $new_score = calculate_article_score($article_filters);
838 if (!$scores[$new_score]) $scores[$new_score] = array();
840 array_push($scores[$new_score], $line['ref_id']);
843 foreach (array_keys($scores) as $s) {
845 db_query($link, "UPDATE ttrss_user_entries SET score = '$s',
847 ref_id IN (" . join(',', $scores[$s]) . ")");
849 db_query($link, "UPDATE ttrss_user_entries SET score = '$s' WHERE
850 ref_id IN (" . join(',', $scores[$s]) . ")");
855 print __("All done.");
859 if ($subop == "add") {
861 if (!WEB_DEMO_MODE
) {
863 $feed_url = db_escape_string(trim($_REQUEST["feed_url"]));
864 $cat_id = db_escape_string($_REQUEST["cat_id"]);
865 $p_from = db_escape_string($_REQUEST["from"]);
867 /* only read authentication information from POST */
869 $auth_login = db_escape_string(trim($_POST["auth_login"]));
870 $auth_pass = db_escape_string(trim($_POST["auth_pass"]));
872 if ($p_from != 'tt-rss') {
875 <title>Tiny Tiny RSS</title>
876 <link rel=\"stylesheet\" type=\"text/css\" href=\"utility.css\">
879 <img class=\"floatingLogo\" src=\"images/ttrss_logo.png\"
880 alt=\"Tiny Tiny RSS\"/>
881 <h1>Subscribe to feed...</h1>";
884 if (subscribe_to_feed($link, $feed_url, $cat_id, $auth_login, $auth_pass)) {
885 print_notice(T_sprintf("Subscribed to <b>%s</b>.", $feed_url));
887 print_warning(T_sprintf("Already subscribed to <b>%s</b>.", $feed_url));
890 if ($p_from != 'tt-rss') {
891 $tt_uri = ($_SERVER['HTTPS'] != "on" ?
'http://' : 'https://') . $_SERVER['HTTP_HOST'] . preg_replace('/backend\.php.*$/', 'tt-rss.php', $_SERVER["REQUEST_URI"]);
894 $tp_uri = ($_SERVER['HTTPS'] != "on" ?
'http://' : 'https://') . $_SERVER['HTTP_HOST'] . preg_replace('/backend\.php.*$/', 'prefs.php', $_SERVER["REQUEST_URI"]);
896 $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
897 feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]);
899 $feed_id = db_fetch_result($result, 0, "id");
904 print "<form method=\"GET\" style='display: inline'
906 <input type=\"hidden\" name=\"tab\" value=\"feedConfig\">
907 <input type=\"hidden\" name=\"subop\" value=\"editFeed\">
908 <input type=\"hidden\" name=\"subopparam\" value=\"$feed_id\">
909 <input type=\"submit\" value=\"".__("Edit subscription options")."\">
913 print "<form style='display: inline' method=\"GET\" action=\"$tt_uri\">
914 <input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
917 print "</body></html>";
924 if ($subop == "categorize") {
926 if (!WEB_DEMO_MODE
) {
928 $ids = split(",", db_escape_string($_REQUEST["ids"]));
930 $cat_id = db_escape_string($_REQUEST["cat_id"]);
933 $cat_id_qpart = 'NULL';
935 $cat_id_qpart = "'$cat_id'";
938 db_query($link, "BEGIN");
940 foreach ($ids as $id) {
942 db_query($link, "UPDATE ttrss_feeds SET cat_id = $cat_id_qpart
943 WHERE id = '$id' AND parent_feed IS NULL
944 AND owner_uid = " . $_SESSION["uid"]);
946 # update linked feed categories
947 db_query($link, "UPDATE ttrss_feeds SET
948 cat_id = $cat_id_qpart WHERE parent_feed = '$id' AND
949 owner_uid = " . $_SESSION["uid"]);
953 db_query($link, "COMMIT");
958 if ($subop == "editCats") {
960 $action = $_REQUEST["action"];
962 if ($action == "save") {
964 $cat_title = db_escape_string(trim($_REQUEST["value"]));
965 $cat_id = db_escape_string($_REQUEST["cid"]);
967 db_query($link, "BEGIN");
969 $result = db_query($link, "SELECT title FROM ttrss_feed_categories
970 WHERE id = '$cat_id' AND owner_uid = ".$_SESSION["uid"]);
972 if (db_num_rows($result) == 1) {
974 $old_title = db_fetch_result($result, 0, "title");
976 if ($cat_title != "") {
977 $result = db_query($link, "UPDATE ttrss_feed_categories SET
978 title = '$cat_title' WHERE id = '$cat_id' AND
979 owner_uid = ".$_SESSION["uid"]);
986 print $_REQUEST["value"];
989 db_query($link, "COMMIT");
995 print "<div id=\"infoBoxTitle\">".__('Category editor')."</div>";
997 print "<div class=\"infoBoxContents\">";
1000 if ($action == "add") {
1002 if (!WEB_DEMO_MODE
) {
1004 $feed_cat = db_escape_string(trim($_REQUEST["cat"]));
1006 $result = db_query($link,
1007 "SELECT id FROM ttrss_feed_categories
1008 WHERE title = '$feed_cat' AND owner_uid = ".$_SESSION["uid"]);
1010 if (db_num_rows($result) == 0) {
1012 $result = db_query($link,
1013 "INSERT INTO ttrss_feed_categories (owner_uid,title)
1014 VALUES ('".$_SESSION["uid"]."', '$feed_cat')");
1018 print_warning(T_sprintf("Category <b>$%s</b> already exists in the database.",
1025 if ($action == "remove") {
1027 $ids = split(",", db_escape_string($_REQUEST["ids"]));
1029 foreach ($ids as $id) {
1030 remove_feed_category($link, $id, $_SESSION["uid"]);
1034 print "<div class=\"prefGenericAddBox\">
1035 <input id=\"fadd_cat\"
1036 onkeypress=\"return filterCR(event, addFeedCat)\"
1037 onkeyup=\"toggleSubmitNotEmpty(this, 'catadd_submit_btn')\"
1038 onchange=\"toggleSubmitNotEmpty(this, 'catadd_submit_btn')\"
1041 type=\"submit\" class=\"button\" disabled=\"true\" id=\"catadd_submit_btn\"
1042 onclick=\"javascript:addFeedCat()\" value=\"".__('Create category')."\"></div>";
1044 $result = db_query($link, "SELECT title,id FROM ttrss_feed_categories
1045 WHERE owner_uid = ".$_SESSION["uid"]."
1050 if (db_num_rows($result) != 0) {
1052 print "<table width=\"100%\" class=\"prefFeedCatList\"
1053 cellspacing=\"0\">";
1055 print "<tr><td class=\"selectPrompt\" colspan=\"8\">
1057 <a href=\"javascript:selectPrefRows('fcat', true)\">".__('All')."</a>,
1058 <a href=\"javascript:selectPrefRows('fcat', false)\">".__('None')."</a>
1063 print "<div class=\"prefFeedCatHolder\">";
1065 print "<form id=\"feed_cat_edit_form\" onsubmit=\"return false\">";
1067 print "<table width=\"100%\" class=\"prefFeedCatList\"
1068 cellspacing=\"0\" id=\"prefFeedCatList\">";
1072 while ($line = db_fetch_assoc($result)) {
1074 $class = ($lnum %
2) ?
"even" : "odd";
1076 $cat_id = $line["id"];
1077 $this_row_id = "id=\"FCATR-$cat_id\"";
1079 print "<tr class=\"$class\" $this_row_id>";
1081 $edit_title = htmlspecialchars($line["title"]);
1083 print "<td width='5%' align='center'><input
1084 onclick='toggleSelectPrefRow(this, \"fcat\");'
1085 type=\"checkbox\" id=\"FCCHK-$cat_id\"></td>";
1087 print "<td><span id=\"FCATT-$cat_id\">" .
1088 $edit_title . "</span></td>";
1102 print "<p>".__('No feed categories defined.')."</p>";
1105 print "<div style='float : right'>
1106 <input type='submit' class='button'
1107 onclick=\"selectTab('feedConfig')\" value=\"".__('Close this window')."\"></div>";
1109 print "<div id=\"catOpToolbar\">";
1112 <input type=\"submit\" class=\"button\" disabled=\"true\"
1113 onclick=\"return removeSelectedFeedCats()\" value=\"".__('Remove')."\">";
1125 set_pref($link, "_PREFS_ACTIVE_TAB", "feedConfig");
1127 $result = db_query($link, "SELECT COUNT(id) AS num_errors
1128 FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);
1130 $num_errors = db_fetch_result($result, 0, "num_errors");
1132 if ($num_errors > 0) {
1134 print format_notice("<a href=\"javascript:showFeedsWithErrors()\">".
1135 __('Some feeds have update errors (click for details)')."</a>");
1138 $feed_search = db_escape_string($_REQUEST["search"]);
1140 if (array_key_exists("search", $_REQUEST)) {
1141 $_SESSION["prefs_feed_search"] = $feed_search;
1143 $feed_search = $_SESSION["prefs_feed_search"];
1146 print "<div class=\"feedEditSearch\">
1147 <input id=\"feed_search\" size=\"20\" type=\"search\"
1148 onfocus=\"javascript:disableHotkeys();\"
1149 onblur=\"javascript:enableHotkeys();\"
1150 onchange=\"javascript:updateFeedList()\" value=\"$feed_search\">
1151 <input type=\"submit\" class=\"button\"
1152 onclick=\"javascript:updateFeedList()\" value=\"".__('Search')."\">
1155 print "<input onclick=\"javascript:displayDlg('quickAddFeed')\"
1156 type=\"submit\" id=\"subscribe_to_feed_btn\"
1157 class=\"button\" value=\"".__('Subscribe to feed')."\">";
1159 if (ENABLE_FEED_BROWSER
&& !SINGLE_USER_MODE
) {
1160 print " <input type=\"submit\" class=\"button\"
1161 id=\"top25_feeds_btn\"
1162 onclick=\"javascript:browseFeeds()\" value=\"".__('More feeds')."\">";
1165 $feeds_sort = db_escape_string($_REQUEST["sort"]);
1167 if (!$feeds_sort ||
$feeds_sort == "undefined") {
1168 $feeds_sort = $_SESSION["pref_sort_feeds"];
1169 if (!$feeds_sort) $feeds_sort = "title";
1172 $_SESSION["pref_sort_feeds"] = $feeds_sort;
1176 $feed_search = split(" ", $feed_search);
1179 foreach ($feed_search as $token) {
1181 $token = trim($token);
1183 array_push($tokens, "(UPPER(F1.title) LIKE UPPER('%$token%') OR
1184 UPPER(C1.title) LIKE UPPER('%$token%') OR
1185 UPPER(F1.feed_url) LIKE UPPER('%$token%'))");
1188 $search_qpart = "(" . join($tokens, " AND ") . ") AND ";
1194 $show_last_article_info = false;
1195 $show_last_article_checked = "";
1196 $show_last_article_qpart = "";
1198 if ($_REQUEST["slat"] == "true") {
1199 $show_last_article_info = true;
1200 $show_last_article_checked = "checked";
1201 $show_last_article_qpart = ", (SELECT ".SUBSTRING_FOR_DATE
."(MAX(updated),1,16) FROM ttrss_user_entries,
1202 ttrss_entries WHERE ref_id = ttrss_entries.id
1203 AND feed_id = F1.id) AS last_article";
1204 } else if ($feeds_sort == "last_article") {
1205 $feeds_sort = "title";
1208 if (get_pref($link, 'ENABLE_FEED_CATS')) {
1209 $order_by_qpart = "category,$feeds_sort,title";
1211 $order_by_qpart = "$feeds_sort,title";
1214 $result = db_query($link, "SELECT
1218 ".SUBSTRING_FOR_DATE
."(F1.last_updated,1,16) AS last_updated,
1224 F2.title AS parent_title,
1225 C1.title AS category,
1227 F1.include_in_digest
1228 $show_last_article_qpart
1231 LEFT JOIN ttrss_feeds AS F2
1232 ON (F1.parent_feed = F2.id)
1233 LEFT JOIN ttrss_feed_categories AS C1
1234 ON (F1.cat_id = C1.id)
1236 $search_qpart F1.owner_uid = '".$_SESSION["uid"]."'
1237 ORDER by $order_by_qpart");
1239 if (db_num_rows($result) != 0) {
1241 // print "<div id=\"infoBoxShadow\"><div id=\"infoBox\">PLACEHOLDER</div></div>";
1243 print "<p><table width=\"100%\" cellspacing=\"0\"
1244 class=\"prefFeedList\" id=\"prefFeedList\">";
1245 print "<tr><td class=\"selectPrompt\" colspan=\"8\">".
1246 "<div style='float : right'>".
1247 "<input id='show_last_article_times' type='checkbox' onchange='feedlistToggleSLAT()'
1248 $show_last_article_checked><label
1249 for='show_last_article_times'>".__('Show last article times')."</label></div>".
1251 <a href=\"javascript:selectPrefRows('feed', true)\">".__('All')."</a>,
1252 <a href=\"javascript:selectPrefRows('feed', false)\">".__('None')."</a>
1255 if (!get_pref($link, 'ENABLE_FEED_CATS')) {
1256 print "<tr class=\"title\">
1257 <td width='5%' align='center'> </td>";
1259 if (get_pref($link, 'ENABLE_FEED_ICONS')) {
1260 print "<td width='3%'> </td>";
1263 print "<td width='60%'><a href=\"javascript:updateFeedList('title')\">".__('Title')."</a></td>";
1265 if ($show_last_article_info) {
1266 print "<td width='20%' align='right'><a href=\"javascript:updateFeedList('last_article')\">".__('Last Article')."</a></td>";
1269 print "<td width='20%' align='right'><a href=\"javascript:updateFeedList('last_updated')\">".__('Updated')."</a></td>";
1276 while ($line = db_fetch_assoc($result)) {
1278 $feed_id = $line["id"];
1279 $cat_id = $line["cat_id"];
1281 $edit_title = htmlspecialchars($line["title"]);
1282 $edit_cat = htmlspecialchars($line["category"]);
1284 $hidden = sql_bool_to_bool($line["hidden"]);
1286 $last_error = $line["last_error"];
1288 if (!$edit_cat) $edit_cat = __("Uncategorized");
1290 $last_updated = $line["last_updated"];
1292 if (!$last_updated) {
1293 $last_updated = "—";
1294 } else if (get_pref($link, 'HEADLINES_SMART_DATE')) {
1295 $last_updated = smart_date_time(strtotime($last_updated));
1297 $short_date = get_pref($link, 'SHORT_DATE_FORMAT');
1298 $last_updated = date($short_date, strtotime($last_updated));
1301 $last_article = $line["last_article"];
1303 if (!$last_article) {
1304 $last_article = "—";
1305 } else if (get_pref($link, 'HEADLINES_SMART_DATE')) {
1306 $last_article = smart_date_time(strtotime($last_article));
1308 $short_date = get_pref($link, 'SHORT_DATE_FORMAT');
1309 $last_article = date($short_date, strtotime($last_article));
1312 if (get_pref($link, 'ENABLE_FEED_CATS') && $cur_cat_id != $cat_id) {
1315 print "<tr><td colspan=\"6\" class=\"feedEditCat\">$edit_cat</td></tr>";
1317 print "<tr class=\"title\">
1318 <td width='5%'> </td>";
1320 if (get_pref($link, 'ENABLE_FEED_ICONS')) {
1321 print "<td width='3%'> </td>";
1324 print "<td width='60%'><a href=\"javascript:updateFeedList('title')\">".__('Title')."</a></td>";
1326 if ($show_last_article_info) {
1327 print "<td width='20%' align='right'>
1328 <a href=\"javascript:updateFeedList('last_article')\">".__('Last Article')."</a></td>";
1331 print "<td width='20%' align='right'>
1332 <a href=\"javascript:updateFeedList('last_updated')\">".__('Updated')."</a></td>";
1334 $cur_cat_id = $cat_id;
1337 $class = ($lnum %
2) ?
"even" : "odd";
1338 $this_row_id = "id=\"FEEDR-$feed_id\"";
1340 print "<tr class=\"$class\" $this_row_id>";
1342 $icon_file = ICONS_DIR
. "/$feed_id.ico";
1344 if (file_exists($icon_file) && filesize($icon_file) > 0) {
1345 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL
. "/$feed_id.ico\">";
1347 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
1350 print "<td class='feedSelect'><input onclick='toggleSelectPrefRow(this, \"feed\");'
1351 type=\"checkbox\" id=\"FRCHK-".$line["id"]."\"></td>";
1353 $onclick = "onclick='editFeed($feed_id)' title='".__('Click to edit')."'";
1355 if (get_pref($link, 'ENABLE_FEED_ICONS')) {
1356 print "<td $onclick class='feedIcon'>$feed_icon</td>";
1360 $edit_title = "<span class=\"insensitive\">$edit_title ".
1361 __('(Hidden)')."</span>";
1362 $last_updated = "<span class=\"insensitive\">$last_updated</span>";
1363 $last_article = "<span class=\"insensitive\">$last_article</span>";
1367 $edit_title = "<span class=\"feed_error\">$edit_title</span>";
1368 $last_updated = "<span class=\"feed_error\">$last_updated</span>";
1369 $last_article = "<span class=\"feed_error\">$last_article</span>";
1372 $parent_title = $line["parent_title"];
1373 if ($parent_title) {
1374 $linked_to = sprintf(__("(linked to %s)"), $parent_title);
1375 $parent_title = "<span class='groupPrompt'>$linked_to</span>";
1378 print "<td $onclick>" . "$edit_title $parent_title" . "</td>";
1380 if ($show_last_article_info) {
1381 print "<td align='right' $onclick>" .
1382 "$last_article</td>";
1385 print "<td $onclick align='right'>$last_updated</td>";
1396 print "<div id=\"feedOpToolbar\">";
1398 if (get_pref($link, 'ENABLE_FEED_CATS')) {
1400 print __('Selection:') . " ";
1402 print_feed_cat_select($link, "sfeed_set_fcat", "", "disabled");
1404 print " <input type=\"submit\" class=\"button\" disabled=\"true\"
1405 onclick=\"javascript:categorizeSelectedFeeds()\" value=\"".
1406 __('Recategorize')."\">";
1411 print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\">
1412 <option value=\"facDefault\" selected>".__('Actions...')."</option>
1413 <optgroup label=\"".__('Selection:')."\">
1414 <option value=\"facEdit\">".__('Edit')."</option>";
1416 if (FORCE_ARTICLE_PURGE
== 0) {
1418 "<option value=\"facPurge\">".__('Manual purge')."</option>";
1422 <option value=\"facClear\">".__('Clear feed data')."</option>
1423 <option value=\"facRescore\">".__('Rescore articles')."</option>
1424 <option value=\"facUnsubscribe\">".__('Unsubscribe')."</option>";
1426 print "</optgroup>";
1428 if (get_pref($link, 'ENABLE_FEED_CATS')) {
1430 print "<optgroup label=\"".__('Other:')."\">
1431 <option value=\"facEditCats\">".__('Edit categories')."
1442 if (!$feed_search) {
1443 print_warning(__("You don't have any subscribed feeds."));
1445 print_warning(__('No matching feeds found.'));
1451 print "<h3>".__('OPML')."</h3>
1453 <div style='float : left'>
1454 <form enctype=\"multipart/form-data\" method=\"POST\" action=\"opml.php\">
1455 ".__('File:')." <input id=\"opml_file\" name=\"opml_file\" type=\"file\">
1456 <input type=\"hidden\" name=\"op\" value=\"Import\">
1457 <input class=\"button\" onclick=\"return validateOpmlImport();\"
1458 type=\"submit\" value=\"".__('Import')."\">
1463 print "<input type=\"submit\"
1464 class=\"button\" onclick=\"gotoExportOpml()\"
1465 value=\"".__('Export OPML')."\">";
1468 print "<h3>" . __("Firefox Integration") . "</h3>";
1470 print "<p>" . __('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.');
1471 print "</p><p> <a class='visibleLinkB' href='javascript:window.navigator.registerContentHandler(" .
1472 "\"application/vnd.mozilla.maybe.feed\", " .
1473 "\"" . add_feed_url() . "\", " . " \"Tiny Tiny RSS\")'>" .
1474 __('Click here to register this site as a feed reader.') . "</a></p>";
1477 print "<h3>".__("Published articles")."</h3>";
1479 if (!get_pref($link, "_PREFS_PUBLISH_KEY")) {
1480 set_pref($link, "_PREFS_PUBLISH_KEY", generate_publish_key());
1483 print "<p>".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the URL specified below.')."</p>";
1485 $url_path = article_publish_url($link);
1487 print "<p><a class=\"visibleLinkB\" id=\"pubGenAddress\" target=\"_blank\" href=\"$url_path\">".__("Link to published articles feed.")."</a></p>";
1489 print "<p><input type=\"submit\" onclick=\"return pubRegenKey()\" class=\"button\"
1490 value=\"".__('Generate another link')."\">";
1491 /* print " <input type=\"submit\" onclick=\"return pubToClipboard()\" class=\"button\"
1492 value=\"".__('Copy link to clipboard')."\">"; */
1497 function print_feed_browser($link, $search, $limit, $mode = 1) {
1499 $owner_uid = $_SESSION["uid"];
1502 $search_qpart = "AND (UPPER(feed_url) LIKE UPPER('%$search%') OR
1503 UPPER(title) LIKE UPPER('%$search%'))";
1509 $result = db_query($link, "SELECT feed_url, subscribers FROM
1510 ttrss_feedbrowser_cache WHERE (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf
1511 WHERE tf.feed_url = ttrss_feedbrowser_cache.feed_url
1512 AND owner_uid = '$owner_uid') $search_qpart
1513 ORDER BY subscribers DESC LIMIT $limit");
1514 } else if ($mode == 2) {
1515 $result = db_query($link, "SELECT * FROM
1516 ttrss_archived_feeds WHERE
1517 (SELECT COUNT(*) FROM ttrss_feeds
1518 WHERE ttrss_feeds.feed_url = ttrss_archived_feeds.feed_url AND
1519 owner_uid = '$owner_uid') = 0 AND
1520 owner_uid = '$owner_uid' $search_qpart
1521 ORDER BY id DESC LIMIT $limit");
1526 while ($line = db_fetch_assoc($result)) {
1530 $feed_url = $line["feed_url"];
1531 $subscribers = $line["subscribers"];
1533 $det_result = db_query($link, "SELECT site_url,title,id
1534 FROM ttrss_feeds WHERE feed_url = '$feed_url' LIMIT 1");
1536 $details = db_fetch_assoc($det_result);
1538 $icon_file = ICONS_DIR
. "/" . $details["id"] . ".ico";
1540 if (file_exists($icon_file) && filesize($icon_file) > 0) {
1541 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL
.
1542 "/".$details["id"].".ico\">";
1544 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
1547 $check_box = "<input onclick='toggleSelectListRow(this)' class='feedBrowseCB'
1548 type=\"checkbox\" id=\"FBCHK-" . $details["id"] . "\">";
1550 $class = ($feedctr %
2) ?
"even" : "odd";
1552 if ($details["site_url"]) {
1553 $site_url = "<a target=\"_blank\" href=\"".$details["site_url"]."\">
1554 <img style='border-width : 0px' src='images/www.png' alt='www'></a>";
1559 print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
1560 "$feed_icon " . $details["title"] .
1561 " <span class='subscribers'>($subscribers)</span>
1565 } else if ($mode == 2) {
1566 $feed_url = $line["feed_url"];
1568 $check_box = "<input onclick='toggleSelectListRow(this)' class='feedBrowseCB'
1569 type=\"checkbox\" id=\"FBCHK-" . $line["id"] . "\">";
1571 $class = ($feedctr %
2) ?
"even" : "odd";
1573 if ($line["site_url"]) {
1574 $site_url = "<a target=\"_blank\" href=\"".$line["site_url"]."\">
1575 <img style='border-width : 0px' src='images/www.png' alt='www'></a>";
1580 print "<li class='$class' id=\"FBROW-".$line["id"]."\">$check_box".
1581 $line["title"] . $site_url . "</li>";
1589 if ($feedctr == 0) {
1590 print "<li style=\"text-align : center\"><p>".__('No feeds found.')."</p></li>";