set_pref($link, "_PREFS_ACTIVE_TAB", "feedBrowser");
- print "<div>".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."</div>";
+ print "<div class=\"insensitive\">".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."</div>";
$limit = db_escape_string($_GET["limit"]);
onclick=\"updateBigFeedBrowser()\" value=\"".__('Show')."\">
</div>";
- print "<div id=\"fbrOpToolbar\">
- <input type='submit' class='button' onclick=\"feedBrowserSubscribe()\"
- disabled=\"true\" value=\"".__('Subscribe')."\"></div>";
+ if (db_num_rows($result) > 0) {
- print "<ul class='nomarks' id='browseBigFeedList'>";
-
- $feedctr = 0;
-
- while ($line = db_fetch_assoc($result)) {
- $feed_url = $line["feed_url"];
- $subscribers = $line["subscribers"];
-
- // mysql returns NULL records first by default
- if (DB_TYPE == "mysql") $order_fix = "DESC";
-
- $det_result = db_query($link, "SELECT site_url,title,id
- FROM ttrss_feeds WHERE feed_url = '$feed_url'
- ORDER BY last_updated $order_fix LIMIT 1");
-
- $details = db_fetch_assoc($det_result);
-
- $icon_file = ICONS_DIR . "/" . $details["id"] . ".ico";
-
- if (file_exists($icon_file) && filesize($icon_file) > 0) {
- $feed_icon = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL .
- "/".$details["id"].".ico\">";
- } else {
- $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
- }
-
- $check_box = "<input onclick='toggleSelectFBListRow(this)' class='feedBrowseCB'
- type=\"checkbox\" id=\"FBCHK-" . $details["id"] . "\">";
-
- $class = ($feedctr % 2) ? "even" : "odd";
-
- print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
- "$feed_icon ";
-
- print "<a href=\"javascript:browserToggleExpand('".$details["id"]."')\">" .
- $details["title"] ."</a> " .
- "<span class='subscribers'>($subscribers)</span>";
+ print "<div id=\"fbrOpToolbar\">
+ <input type='submit' class='button' onclick=\"feedBrowserSubscribe()\"
+ disabled=\"true\" value=\"".__('Subscribe')."\"></div>";
+
+ print "<ul class='nomarks' id='browseBigFeedList'>";
+
+ $feedctr = 0;
+
+ while ($line = db_fetch_assoc($result)) {
+ $feed_url = $line["feed_url"];
+ $subscribers = $line["subscribers"];
+
+ // mysql returns NULL records first by default
+ if (DB_TYPE == "mysql") $order_fix = "DESC";
+
+ $det_result = db_query($link, "SELECT site_url,title,id
+ FROM ttrss_feeds WHERE feed_url = '$feed_url'
+ ORDER BY last_updated $order_fix LIMIT 1");
+
+ $details = db_fetch_assoc($det_result);
- print "<div class=\"browserDetails\" style=\"display : none\" id=\"BRDET-" . $details["id"] . "\">";
- print "</div>";
+ $icon_file = ICONS_DIR . "/" . $details["id"] . ".ico";
+
+ if (file_exists($icon_file) && filesize($icon_file) > 0) {
+ $feed_icon = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL .
+ "/".$details["id"].".ico\">";
+ } else {
+ $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
+ }
+
+ $check_box = "<input onclick='toggleSelectFBListRow(this)' class='feedBrowseCB'
+ type=\"checkbox\" id=\"FBCHK-" . $details["id"] . "\">";
+
+ $class = ($feedctr % 2) ? "even" : "odd";
+
+ print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
+ "$feed_icon ";
+
+ print "<a href=\"javascript:browserToggleExpand('".$details["id"]."')\">" .
+ $details["title"] ."</a> " .
+ "<span class='subscribers'>($subscribers)</span>";
- print "</li>";
-
+ print "<div class=\"browserDetails\" style=\"display : none\" id=\"BRDET-" . $details["id"] . "\">";
+ print "</div>";
+
+ print "</li>";
+
++$feedctr;
+ }
+
+ print "</ul>";
+
}
if ($feedctr == 0) {
- print "<li>".__('No feeds found to subscribe.')."</li>";
+ print "<div>".__('No feeds found.')."</div>";
}
- print "</ul>";
-
print "</div>";
}
?>