From f70f7e285564a361f6881fd5957ccd0760733270 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 5 Dec 2007 07:42:18 +0100 Subject: mobile: add support for tagging/publishing articles from view mode --- mobile/functions.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'mobile/functions.php') diff --git a/mobile/functions.php b/mobile/functions.php index 0bd65082a..d2504e245 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -538,6 +538,7 @@ WHERE ref_id = '$id' AND feed_id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]); $result = db_query($link, "SELECT title,link,content,feed_id,comments,int_id, + marked,published, SUBSTRING(updated,1,16) as updated, (SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url, num_comments, @@ -603,6 +604,23 @@ print "
Tags: $tags_str
"; } + if ($line["marked"] == "t" || $line["marked"] == "1") { + $marked_pic = ""; + } else { + $marked_pic = ""; + } + + if ($line["published"] == "t" || $line["published"] == "1") { + $published_pic = ""; + } else { + $published_pic = ""; + } + + print "
"; + print "$marked_pic"; + print "$published_pic"; + print "
"; + print sanitize_rss($link, $line["content"], true);; } @@ -675,4 +693,13 @@ print ""; } + function toggleMarked($link, $ts_id) { + $result = db_query($link, "UPDATE ttrss_user_entries SET marked = NOT marked + WHERE ref_id = '$ts_id' AND owner_uid = " . $_SESSION["uid"]); + } + + function togglePublished($link, $tp_id) { + $result = db_query($link, "UPDATE ttrss_user_entries SET published = NOT published + WHERE ref_id = '$tp_id' AND owner_uid = " . $_SESSION["uid"]); + } ?> -- cgit v1.2.3-54-g00ecf