diff options
author | Andrew Dolgov <[email protected]> | 2005-08-24 09:02:58 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-08-24 09:02:58 +0100 |
commit | 508a81e1b6502ac275a95831befe14d92c9ad55c (patch) | |
tree | 3a5da092abfd78612bf4fd1888c5d884185ad576 /backend.php | |
parent | 61c1a4d190ebcbfe810cd7c54dacf3279b36989d (diff) |
feed editor, xmlhttp locking in preferences, try to initialize xmlhttp_rpc via ActiveX and a big piggie
Diffstat (limited to 'backend.php')
-rw-r--r-- | backend.php | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/backend.php b/backend.php index 9697c0e01..027c7060d 100644 --- a/backend.php +++ b/backend.php @@ -356,7 +356,42 @@ $subop = $_GET["subop"]; if ($subop == "edit") { - print "<p>[Edit feed placeholder]</p>"; + + $feed_id = $_GET["id"]; + + $result = pg_query("SELECT title,feed_url + FROM ttrss_feeds WHERE id = '$feed_id'"); + + $fedit_link = pg_fetch_result($result, 0, "feed_url"); + $fedit_title = pg_fetch_result($result, 0, "title"); + + print "<table class=\"prefAddFeed\"> + <td>Title:</td><td><input id=\"fedit_title\" value=\"$fedit_title\"></td></tr> + <td>Link:</td><td><input id=\"fedit_link\" value=\"$fedit_link\"></td></tr> + <tr><td colspan=\"2\" align=\"right\"> + <a class=\"button\" href=\"javascript:feedEditCancel()\">Cancel</a> + <a class=\"button\" href=\"javascript:feedEditSave($feed_id)\">Save</a> + </td></tr> + </table>"; + + } else { + + print "<table class=\"prefAddFeed\"> + <td><input id=\"fadd_link\"></td> + <td colspan=\"4\" align=\"right\"> + <a class=\"button\" href=\"javascript:addFeed()\">Add feed</a></td></tr> + </table>"; + + } + + if ($subop == "editSave") { + $feed_title = pg_escape_string($_GET["t"]); + $feed_link = pg_escape_string($_GET["l"]); + $feed_id = $_GET["id"]; + + $result = pg_query("UPDATE ttrss_feeds SET + title = '$feed_title', feed_url = '$feed_link' WHERE id = '$feed_id'"); + } if ($subop == "remove") { |