]>
git.wh0rd.org - tt-rss.git/blob - mobile/classic/functions.php
2 define('MOBILE_FEEDLIST_ENABLE_ICONS', false);
3 define('TTRSS_SESSION_NAME', 'ttrss_m_sid');
5 function render_feeds_list($link) {
9 print "<div id=\"heading\">";
12 print __("Tags")."<span id=\"headingAddon\">
13 (<a href=\"index.php\">".__("View feeds")."</a>, ";
15 print __("Feeds")." <span id=\"headingAddon\">
16 (<a href=\"index.php?tags=1\">".__("View tags")."</a>, ";
19 print "<a href=\"index.php?go=sform\">".__("Search")."</a>, ";
21 print "<a href=\"logout.php\">".__("Logout")."</a>)</span>";
24 print "<ul class=\"feedList\">";
26 $owner_uid = $_SESSION["uid"];
32 if (get_pref($link, 'ENABLE_FEED_CATS')) {
34 $collapsed = get_pref($link, "_COLLAPSED_SPECIAL");
36 if ($collapsed == "t" ||
$collapsed == "1") {
37 $holder_class = "invisible";
40 $holder_class = "feedCatHolder";
44 $tmp_category = __("Special");
46 print "<li class=\"feedCat\">
47 <a href=\"?subop=tc&id=-1\">$tmp_category</a>$ellipsis
50 print "<li class=\"$holder_class\"><ul class=\"feedCatList\">";
53 $num_total = getFeedUnread($link, -4);
57 if ($num_total > 0) $class .= "Unread";
59 printMobileFeedEntry(-4, $class, __("All articles"), $num_total,
60 "../../images/fresh.png", $link);
62 $num_fresh = getFeedUnread($link, -3);
66 if ($num_fresh > 0) $class .= "Unread";
68 printMobileFeedEntry(-3, $class, __("Fresh articles"), $num_fresh,
69 "../../images/fresh.png", $link);
71 $num_starred = getFeedUnread($link, -1);
75 if ($num_starred > 0) $class .= "Unread";
77 printMobileFeedEntry(-1, $class, __("Starred articles"), $num_starred,
78 "../../images/mark_set.png", $link);
82 $num_published = getFeedUnread($link, -2);
84 if ($num_published > 0) $class .= "Unread";
86 printMobileFeedEntry(-2, $class, __("Published articles"), $num_published,
87 "../../images/pub_set.png", $link);
89 if (get_pref($link, 'ENABLE_FEED_CATS')) {
94 $result = db_query($link, "SELECT id,caption FROM
95 ttrss_labels2 WHERE owner_uid = '$owner_uid' ORDER by caption");
97 if (db_num_rows($result) > 0) {
98 if (get_pref($link, 'ENABLE_FEED_CATS')) {
100 $collapsed = get_pref($link, "_COLLAPSED_LABELS");
102 if ($collapsed == "t" ||
$collapsed == "1") {
103 $holder_class = "invisible";
106 $holder_class = "feedCatHolder";
110 $tmp_category = __("Labels");
112 print "<li class=\"feedCat\">
113 <a href=\"?subop=tc&id=-2\">$tmp_category</a>$ellipsis
116 print "<li class=\"$holder_class\"><ul class=\"feedCatList\">";
118 // print "<li><hr></li>";
122 while ($line = db_fetch_assoc($result)) {
124 $count = getFeedUnread($link, -$line["id"]-11);
132 printMobileFeedEntry(-$line["id"]-11,
133 $class, $line["caption"], $count, "../images/label.png", $link);
137 if (db_num_rows($result) > 0) {
138 if (get_pref($link, 'ENABLE_FEED_CATS')) {
144 if (get_pref($link, 'ENABLE_FEED_CATS')) {
145 $order_by_qpart = "category,title";
147 $order_by_qpart = "title";
150 $result = db_query($link, "SELECT ttrss_feeds.*,
151 ".SUBSTRING_FOR_DATE
."(last_updated,1,19) AS last_updated_noms,
152 (SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries
153 WHERE feed_id = ttrss_feeds.id AND
154 ttrss_user_entries.ref_id = ttrss_entries.id AND
155 owner_uid = '$owner_uid') AS total,
156 (SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries
157 WHERE feed_id = ttrss_feeds.id AND unread = true
158 AND ttrss_user_entries.ref_id = ttrss_entries.id
159 AND owner_uid = '$owner_uid') as unread,
161 ttrss_feed_categories.title AS category,
162 ttrss_feed_categories.collapsed
163 FROM ttrss_feeds LEFT JOIN ttrss_feed_categories
164 ON (ttrss_feed_categories.id = cat_id)
166 ttrss_feeds.hidden = false AND
167 ttrss_feeds.owner_uid = '$owner_uid' AND parent_feed IS NULL
168 ORDER BY $order_by_qpart");
170 $actid = $_GET["actid"];
178 while ($line = db_fetch_assoc($result)) {
179 if (get_pref($link, 'HIDE_READ_FEEDS') && (int)$line['unread']==0) {
183 $feed = db_unescape_string($line["title"]);
184 $feed_id = $line["id"];
186 $subop = $_GET["subop"];
188 $total = $line["total"];
189 $unread = $line["unread"];
191 $rtl_content = sql_bool_to_bool($line["rtl_content"]);
194 $rtl_tag = "dir=\"RTL\"";
199 $tmp_result = db_query($link,
200 "SELECT id,COUNT(unread) AS unread
201 FROM ttrss_feeds LEFT JOIN ttrss_user_entries
202 ON (ttrss_feeds.id = ttrss_user_entries.feed_id)
203 WHERE parent_feed = '$feed_id' AND unread = true
204 GROUP BY ttrss_feeds.id");
206 if (db_num_rows($tmp_result) > 0) {
207 while ($l = db_fetch_assoc($tmp_result)) {
208 $unread +
= $l["unread"];
212 $cat_id = $line["cat_id"];
214 $tmp_category = $line["category"];
216 if (!$tmp_category) {
217 $tmp_category = "Uncategorized";
220 // $class = ($lnum % 2) ? "even" : "odd";
222 if ($line["last_error"]) {
228 if ($unread > 0) $class .= "Unread";
230 if ($actid == $feed_id) {
231 $class .= "Selected";
234 if ($category != $tmp_category && get_pref($link, 'ENABLE_FEED_CATS')) {
240 $category = $tmp_category;
242 $collapsed = $line["collapsed"];
244 // workaround for NULL category
245 if ($category == "Uncategorized") {
246 $collapsed = get_pref($link, "_COLLAPSED_UNCAT");
249 if ($collapsed == "t" ||
$collapsed == "1") {
250 $holder_class = "invisible";
253 $holder_class = "feedCatHolder";
258 $cat_id_qpart = "cat_id = '$cat_id'";
260 $cat_id_qpart = "cat_id IS NULL";
263 $cat_id = sprintf("%d", $cat_id);
264 $cat_unread = getCategoryUnread($link, $cat_id);
266 if ($cat_unread > 0) {
269 $catctr_class = "invisible";
272 print "<li class=\"feedCat\">
273 <a href=\"?subop=tc&id=$cat_id\">$tmp_category</a>
274 <a href=\"?go=vf&id=$cat_id&cat=true\">
275 <span class=\"$catctr_class\">($cat_unread)$ellipsis</span>
278 print "<li id=\"feedCatHolder\" class=\"$holder_class\">
279 <ul class=\"feedCatList\">";
282 printMobileFeedEntry($feed_id, $class, $feed, $unread,
283 "../icons/$feed_id.ico", $link, $rtl_content);
291 $result = db_query($link, "SELECT tag_name,SUM((SELECT COUNT(int_id)
292 FROM ttrss_user_entries WHERE int_id = post_int_id
293 AND unread = true)) AS count FROM ttrss_tags
294 WHERE owner_uid = '".$_SESSION['uid']."' GROUP BY tag_name ORDER BY tag_name");
298 while ($line = db_fetch_assoc($result)) {
299 $tags[$line["tag_name"]] +
= $line["count"];
302 foreach (array_keys($tags) as $tag) {
304 $unread = $tags[$tag];
312 printMobileFeedEntry($tag, $class, $tag, $unread,
313 "../images/tag.png", $link);
321 function printMobileFeedEntry($feed_id, $class, $feed_title, $unread, $icon_file, $link,
322 $rtl_content = false) {
324 if (file_exists($icon_file) && filesize($icon_file) > 0) {
325 $feed_icon = "<img src=\"$icon_file\">";
327 $feed_icon = "<img src=\"../../images/blank_icon.gif\">";
331 $rtl_tag = "dir=\"rtl\"";
333 $rtl_tag = "dir=\"ltr\"";
336 $feed = "<a href=\"?go=vf&id=$feed_id\">$feed_title</a>";
338 print "<li class=\"$class\">";
339 # if (get_pref($link, 'ENABLE_FEED_ICONS')) {
340 # print "$feed_icon";
343 print "<span $rtl_tag>$feed</span> ";
346 print "<span $rtl_tag>($unread)</span>";
353 function render_headlines($link) {
355 $feed = db_escape_string($_GET["id"]);
356 $limit = db_escape_string($_GET["limit"]);
357 $view_mode = db_escape_string($_GET["viewmode"]);
358 $cat_view = db_escape_string($_GET["cat"]);
359 $subop = $_GET["subop"];
360 $catchup_op = $_GET["catchup_op"];
363 if ($_SESSION["mobile:viewmode"]) {
364 $view_mode = $_SESSION["mobile:viewmode"];
366 $view_mode = "adaptive";
370 $_SESSION["mobile:viewmode"] = $view_mode;
372 if (!$limit) $limit = 30;
373 if (!$feed) $feed = 0;
375 if (preg_match("/^-?[0-9][0-9]*$/", $feed) != false) {
377 $result = db_query($link, "SELECT rtl_content FROM ttrss_feeds
378 WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
380 if (db_num_rows($result) == 1) {
381 $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
383 $rtl_content = false;
387 $rtl_tag = "dir=\"RTL\"";
392 $rtl_content = false;
396 print "<div id=\"headlines\" $rtl_tag>";
398 if ($subop == "ForceUpdate" && sprintf("%d", $feed) > 0) {
399 update_generic_feed($link, $feed, $cat_view, true);
402 if ($subop == "MarkAllRead" ||
$catchup_op == "feed") {
403 catchup_feed($link, $feed, $cat_view);
406 if ($catchup_op == "selection") {
407 $ids_to_mark = array_keys($_GET["sel_ids"]);
409 foreach ($ids_to_mark as $id) {
410 db_query($link, "UPDATE ttrss_user_entries SET
411 unread = false,last_read = NOW()
412 WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
417 if ($subop == "MarkPageRead" ||
$catchup_op == "page") {
418 $ids_to_mark = $_SESSION["last_page_ids.$feed"];
422 foreach ($ids_to_mark as $id) {
423 db_query($link, "UPDATE ttrss_user_entries SET
424 unread = false,last_read = NOW()
425 WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
431 /// START /////////////////////////////////////////////////////////////////////////////////
433 $search = db_escape_string($_GET["query"]);
434 $search_mode = db_escape_string($_GET["search_mode"]);
435 $match_on = db_escape_string($_GET["match_on"]);
441 $real_offset = $offset * $limit;
443 if ($_GET["debug"]) $timing_info = print_checkpoint("H0", $timing_info);
445 $qfh_ret = queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view,
446 $search, $search_mode, $match_on, false, $real_offset);
448 if ($_GET["debug"]) $timing_info = print_checkpoint("H1", $timing_info);
450 $result = $qfh_ret[0];
451 $feed_title = $qfh_ret[1];
452 $feed_site_url = $qfh_ret[2];
453 $last_error = $qfh_ret[3];
455 /// STOP //////////////////////////////////////////////////////////////////////////////////
458 print "<div align='center'>".
459 __("Could not display feed (query failed). Please check label match syntax or local configuration.").
464 print "<div id=\"heading\">";
465 # if (!$cat_view && file_exists("../icons/$feed.ico") && filesize("../icons/$feed.ico") > 0) {
466 # print "<img class=\"feedIcon\" src=\"../icons/$feed.ico\">";
469 print "$feed_title <span id=\"headingAddon\">(";
470 print "<a href=\"index.php\">".__("Back")."</a>, ";
471 print "<a href=\"index.php?go=sform&aid=$feed&ic=$cat_view\">".__("Search")."</a>, ";
472 print "<a href=\"index.php?go=vf&id=$feed&subop=ForceUpdate\">".__("Update")."</a>";
474 # print "Mark as read: ";
475 # print "<a href=\"index.php?go=vf&id=$feed&subop=MarkAsRead\">Page</a>, ";
476 # print "<a href=\"index.php?go=vf&id=$feed&subop=MarkAllRead\">Feed</a>";
480 print " " . __('View:');
482 print "<form style=\"display : inline\" method=\"GET\" action=\"index.php\">";
484 /* print "<select name=\"viewmode\">
485 <option selected value=\"adaptive\"> " . __('Adaptive') . "</option>
486 <option value=\"all_articles\">" . __('All Articles') . "</option>
487 <option value=\"marked\">" . __('Starred') . "</option>
488 <option value=\"unread\">" . __('Unread') . "</option>
492 "adaptive" => __("Adaptive"),
493 "all_articles" => __("All Articles"),
494 "unread" => __("Unread"),
495 "marked" => __("Starred"));
497 print_select_hash("viewmode", $view_mode, $sel_values);
499 print "<input type=\"hidden\" name=\"id\" value=\"$feed\">
500 <input type=\"hidden\" name=\"cat\" value=\"$cat_view\">
501 <input type=\"hidden\" name=\"go\" value=\"vf\">
502 <input type=\"submit\" value=\"".__('Refresh')."\">";
507 if (db_num_rows($result) > 0) {
509 print "<form method=\"GET\" action=\"index.php\">";
510 print "<input type=\"hidden\" name=\"go\" value=\"vf\">";
511 print "<input type=\"hidden\" name=\"id\" value=\"$feed\">";
512 print "<input type=\"hidden\" name=\"cat\" value=\"$cat_view\">";
514 print "<ul class=\"headlines\" id=\"headlines\">";
516 $page_art_ids = array();
520 error_reporting (DEFAULT_ERROR_LEVEL
);
524 while ($line = db_fetch_assoc($result)) {
526 $class = ($lnum %
2) ?
"even" : "odd";
529 $feed_id = $line["feed_id"];
531 array_push($page_art_ids, $id);
533 if ($line["last_read"] == "" &&
534 ($line["unread"] != "t" && $line["unread"] != "1")) {
536 $update_pic = "<img id='FUPDPIC-$id' src=\"images/updated.png\"
537 alt=\"".__("Updated")."\">";
539 $update_pic = "<img id='FUPDPIC-$id' src=\"images/blank_icon.gif\"
540 alt=\"".__("Updated")."\">";
543 if ($line["unread"] == "t" ||
$line["unread"] == "1") {
551 if ($line["marked"] == "t" ||
$line["marked"] == "1") {
552 $marked_pic = "<img alt=\"S\" class='marked' src=\"../../images/mark_set.png\">";
554 $marked_pic = "<img alt=\"s\" class='marked' src=\"../../images/mark_unset.png\">";
557 if ($line["published"] == "t" ||
$line["published"] == "1") {
558 $published_pic = "<img alt=\"P\" class='marked' src=\"../../images/pub_set.gif\">";
560 $published_pic = "<img alt=\"p\" class='marked' src=\"../../images/pub_unset.gif\">";
563 $content_link = "<a href=\"?go=view&id=$id&cat=$cat_view&ret_feed=$feed&feed=$feed_id\">" .
564 $line["title"] . "</a>";
566 if (get_pref($link, 'HEADLINES_SMART_DATE')) {
567 $updated_fmt = smart_date_time(strtotime($line["updated"]));
569 $short_date = get_pref($link, 'SHORT_DATE_FORMAT');
570 $updated_fmt = date($short_date, strtotime($line["updated"]));
573 print "<li class='$class' id=\"HROW-$id\">";
575 print "<input type=\"checkbox\" name=\"sel_ids[$id]\"
576 id=\"HSCB-$id\" onchange=\"toggleSelectRow(this, $id)\">";
578 print "<a href=\"?go=vf&id=$feed&ts=$id&cat=$cat_view\">$marked_pic</a>";
579 print "<a href=\"?go=vf&id=$feed&tp=$id&cat=$cat_view\">$published_pic</a>";
583 if ($line["feed_title"]) {
584 print " (<a href='?go=vf&id=$feed_id'>".
585 $line["feed_title"]."</a>)";
588 print "<span class='hlUpdated'> ($updated_fmt)</span>";
598 print "<div class='footerAddon'>";
600 $_SESSION["last_page_ids.$feed"] = $page_art_ids;
602 /* print "<a href=\"index.php?go=vf&id=$feed&subop=MarkPageRead\">Page</a>, ";
603 print "<a href=\"index.php?go=vf&id=$feed&subop=MarkAllRead\">Feed</a></div>"; */
606 <a href=\"javascript:selectHeadlines(1)\">".__("All")."</a>,
607 <a href=\"javascript:selectHeadlines(2)\">".__("Unread")."</a>,
608 <a href=\"javascript:selectHeadlines(3)\">".__("None")."</a>,
609 <a href=\"javascript:selectHeadlines(4)\">".__("Invert")."</a>";
613 print "<select name=\"catchup_op\">
614 <option value=\"selection\">".__("Selection")."</option>
615 <option value=\"page\">".__("Page")."</option>
616 <option value=\"feed\">".__("Entire feed")."</option>
618 <input type=\"hidden\" name=\"cat\" value=\"$cat_view\">
619 <input type=\"submit\" value=\"".__("Mark as read")."\">";
624 print "<div align='center'>No articles found.</div>";
629 function render_article($link) {
631 $id = db_escape_string($_GET["id"]);
632 $feed_id = db_escape_string($_GET["feed"]);
633 $ret_feed_id = db_escape_string($_GET["ret_feed"]);
634 $cat_view = db_escape_string($_GET["cat"]);
636 $result = db_query($link, "SELECT rtl_content FROM ttrss_feeds
637 WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
639 if (db_num_rows($result) == 1) {
640 $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
642 $rtl_content = false;
646 $rtl_tag = "dir=\"RTL\"";
653 $result = db_query($link, "UPDATE ttrss_user_entries
654 SET unread = false,last_read = NOW()
655 WHERE ref_id = '$id' AND feed_id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
657 $result = db_query($link, "SELECT title,link,content,feed_id,comments,int_id,
659 ".SUBSTRING_FOR_DATE
."(updated,1,16) as updated,
660 (SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url,
663 FROM ttrss_entries,ttrss_user_entries
664 WHERE id = '$id' AND ref_id = id");
668 $line = db_fetch_assoc($result);
670 $num_comments = $line["num_comments"];
671 $entry_comments = "";
673 if ($num_comments > 0) {
674 if ($line["comments"]) {
675 $comments_url = $line["comments"];
677 $comments_url = $line["link"];
679 $entry_comments = "<a href=\"$comments_url\">$num_comments comments</a>";
681 if ($line["comments"] && $line["link"] != $line["comments"]) {
682 $entry_comments = "<a href=\"".$line["comments"]."\">comments</a>";
686 $tmp_result = db_query($link, "SELECT DISTINCT tag_name FROM
687 ttrss_tags WHERE post_int_id = " . $line["int_id"] . "
695 while ($tmp_line = db_fetch_assoc($tmp_result)) {
697 $tag = $tmp_line["tag_name"];
698 $tag_str = "<a href=\"?go=vf&id=$tag\">$tag</a>, ";
699 $tags_str .= $tag_str;
702 $tags_str = preg_replace("/, $/", "", $tags_str);
704 $parsed_updated = date(get_pref($link, 'SHORT_DATE_FORMAT'),
705 strtotime($line["updated"]));
707 print "<div id=\"heading\">";
709 # if (file_exists("../icons/$feed_id.ico") && filesize("../icons/$feed_id.ico") > 0) {
710 # print "<img class=\"feedIcon\" src=\"../icons/$feed_id.ico\">";
714 $feed_title = getFeedTitle($link, $ret_feed_id);
716 $feed_title = getCategoryTitle($link, $ret_feed_id);
717 $feed_title_native = getFeedTitle($link, $feed_id);
720 if ($feed_title_native) {
721 $feed_link = "<a href=\"index.php?go=vf&id=$feed_id\">$feed_title_native</a>";
722 $feed_link .= " in <a href=\"index.php?go=vf&id=$ret_feed_id&cat=$cat_view\">
725 $feed_link = "<a href=\"index.php?go=vf&id=$ret_feed_id\">$feed_title</a>";
728 $feedlist = "<a href=\"index.php\">".__('Back to feedlist')."</a>";
730 print "<a href=\"" . $line["link"] . "\">" .
731 truncate_string($line["title"], 30) . "</a>";
732 print " <span id=\"headingAddon\">$parsed_updated ($feed_link, $feedlist)</span>";
736 print "<div class=\"postTags\">".__("Tags:")." $tags_str</div>";
739 if ($line["marked"] == "t" ||
$line["marked"] == "1") {
740 $marked_pic = "<img class='marked' src=\"../../images/mark_set.png\">";
742 $marked_pic = "<img class='marked' src=\"../../images/mark_unset.png\">";
745 if ($line["published"] == "t" ||
$line["published"] == "1") {
746 $published_pic = "<img class='marked' src=\"../../images/pub_set.gif\">";
748 $published_pic = "<img class='marked' src=\"../../images/pub_unset.gif\">";
752 print "<div class=\"postStarOps\">";
753 print "<a title=\"".__('Toggle starred')."\"href=\"?go=view&id=$id&ret_feed=$ret_feed_id&feed=$feed_id&sop=ts\">$marked_pic</a>";
754 print "<a title=\"".__('Toggle published')."\" href=\"?go=view&id=$id&ret_feed=$ret_feed_id&feed=$feed_id&sop=tp\">$published_pic</a>";
756 print "<a title=\"".__('Mark as unread')."\" href=\"?go=vf&id=$ret_feed_id&feed=$feed_id&sop=mu&aid=$id";
757 if ($cat_view) { print "&cat=$cat_view"; }
758 print "\"><img class='marked' src=\"../../images/art-set-unread.png\"></a>";
761 print sanitize_rss($link, $line["content"], true);;
765 print "</body></html>";
768 function render_search_form($link, $active_feed_id = false, $is_cat = false) {
770 print "<div id=\"heading\">";
772 print __("Search")." <span id=\"headingAddon\">
773 (<a href=\"index.php\">".__("Go back")."</a>)</span></div>";
775 print "<form method=\"GET\" action=\"index.php\" class=\"searchForm\">";
777 print "<input type=\"hidden\" name=\"go\" value=\"vf\">";
778 print "<input type=\"hidden\" name=\"id\" value=\"$active_feed_id\">";
779 print "<input type=\"hidden\" name=\"cat\" value=\"$is_cat\">";
781 print "<table><tr><td>".__('Search:')."</td><td>";
782 print "<input name=\"query\"></td></tr>";
784 print "<tr><td>".__('Where:')."</td><td>";
786 print "<select name=\"search_mode\">
787 <option value=\"all_feeds\">".__('All feeds')."</option>";
789 $feed_title = getFeedTitle($link, $active_feed_id);
792 $feed_cat_title = getFeedCatTitle($link, $active_feed_id);
794 $feed_cat_title = getCategoryTitle($link, $active_feed_id);
797 if ($active_feed_id && !$is_cat) {
798 print "<option selected value=\"this_feed\">$feed_title</option>";
800 print "<option disabled>".__('This feed')."</option>";
804 $cat_preselected = "selected";
807 if (get_pref($link, 'ENABLE_FEED_CATS') && ($active_feed_id > 0 ||
$is_cat)) {
808 print "<option $cat_preselected value=\"this_cat\">$feed_cat_title</option>";
810 //print "<option disabled>".__('This category')."</option>";
813 print "</select></td></tr>";
815 print "<tr><td>".__('Match on:')."</td><td>";
817 $search_fields = array(
818 "title" => __("Title"),
819 "content" => __("Content"),
820 "both" => __("Title or content"));
822 print_select_hash("match_on", 3, $search_fields);
824 print "</td></tr></table>";
826 print "<input type=\"submit\" value=\"".__('Search')."\">";
833 function toggleMarked($link, $ts_id) {
834 $result = db_query($link, "UPDATE ttrss_user_entries SET marked = NOT marked
835 WHERE ref_id = '$ts_id' AND owner_uid = " . $_SESSION["uid"]);
838 function togglePublished($link, $tp_id) {
839 $result = db_query($link, "UPDATE ttrss_user_entries SET published = NOT published
840 WHERE ref_id = '$tp_id' AND owner_uid = " . $_SESSION["uid"]);
843 function markUnread($link, $mu_id) {
844 $result = db_query($link, "UPDATE ttrss_user_entries SET unread = true
845 WHERE ref_id = '$mu_id' AND owner_uid = " . $_SESSION["uid"]);