diff options
author | Andrew Dolgov <[email protected]> | 2007-12-05 07:42:18 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-12-05 07:42:18 +0100 |
commit | f70f7e285564a361f6881fd5957ccd0760733270 (patch) | |
tree | caf2cfdd9b0ed666b46ba8bece63afa5a1ea0ef6 /mobile/functions.php | |
parent | 510ac75fa088fd69e2311c82c375de50e13b39e4 (diff) |
mobile: add support for tagging/publishing articles from view mode
Diffstat (limited to 'mobile/functions.php')
-rw-r--r-- | mobile/functions.php | 27 |
1 files changed, 27 insertions, 0 deletions
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 "<div class=\"postTags\">Tags: $tags_str</div>"; } + if ($line["marked"] == "t" || $line["marked"] == "1") { + $marked_pic = "<img class='marked' src=\"../images/mark_set.png\">"; + } else { + $marked_pic = "<img class='marked' src=\"../images/mark_unset.png\">"; + } + + if ($line["published"] == "t" || $line["published"] == "1") { + $published_pic = "<img class='marked' src=\"../images/pub_set.gif\">"; + } else { + $published_pic = "<img class='marked' src=\"../images/pub_unset.gif\">"; + } + + print "<div class=\"postStarOps\">"; + print "<a href=\"?go=view&id=$id&ret_feed=$ret_feed_id&feed=$feed_id&sop=ts\">$marked_pic</a>"; + print "<a href=\"?go=view&id=$id&ret_feed=$ret_feed_id&feed=$feed_id&sop=tp\">$published_pic</a>"; + print "</div>"; + print sanitize_rss($link, $line["content"], true);; } @@ -675,4 +693,13 @@ print "</div>"; } + 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"]); + } ?> |