0; } function render_category($link, $cat_id) { $owner_uid = $_SESSION["uid"]; if ($cat_id != 0) { $cat_query = "cat_id = '$cat_id'"; } else { $cat_query = "cat_id IS NULL"; } $result = db_query($link, "SELECT id, title, (SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries WHERE feed_id = ttrss_feeds.id AND unread = true AND ttrss_user_entries.ref_id = ttrss_entries.id AND owner_uid = '$owner_uid') as unread FROM ttrss_feeds WHERE ttrss_feeds.hidden = false AND ttrss_feeds.owner_uid = '$owner_uid' AND parent_feed IS NULL AND $cat_query ORDER BY unread DESC,title"); $title = getCategoryTitle($link, $cat_id); print ""; /* print ""; */ } function render_categories_list($link) { $owner_uid = $_SESSION["uid"]; print '"; } function render_headlines_list($link, $feed_id, $cat_id) { $feed_id = $feed_id; $limit = 30; $filter = ''; $is_cat = false; $view_mode = 'adaptive'; /* do not rely on params below */ $search = ''; $search_mode = ''; $match_on = ''; $qfh_ret = queryFeedHeadlines($link, $feed_id, $limit, $view_mode, $is_cat, $search, $search_mode, $match_on); $result = $qfh_ret[0]; $feed_title = $qfh_ret[1]; $cat_title = getCategoryTitle($link, $cat_id); print ""; } function render_article($link, $id, $feed_id, $cat_id) { $query = "SELECT title,link,content,feed_id,comments,int_id, marked,unread,published, ".SUBSTRING_FOR_DATE."(updated,1,16) as updated, author FROM ttrss_entries,ttrss_user_entries WHERE id = '$id' AND ref_id = id AND owner_uid = " . $_SESSION["uid"] ; $result = db_query($link, $query); if (db_num_rows($result) != 0) { $line = db_fetch_assoc($result); $tmp_result = db_query($link, "UPDATE ttrss_user_entries SET unread = false,last_read = NOW() WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]); if (get_pref($link, 'HEADLINES_SMART_DATE')) { $updated_fmt = smart_date_time(strtotime($line["updated"])); } else { $short_date = get_pref($link, 'SHORT_DATE_FORMAT'); $updated_fmt = date($short_date, strtotime($line["updated"])); } $title = $line["title"]; $article_link = $line["link"]; $feed_title = getFeedTitle($link, $feed_id, false); print "
"; // print "

$title

"; print "
"; print "
"; print ""; print "
"; $is_starred = (sql_bool_to_bool($line["marked"])) ? "true" : "false"; $is_published = (sql_bool_to_bool($line["published"])) ? "true" : "false"; print "
ONOFF
"; print "
ONOFF
"; print "
"; print ""; print ""; print "
"; print "
"; print "

"; print $line["content"]; print "

"; print "
"; } } ?>