From ef8be8ea8da90596d321bc25e88c48121715ed18 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 1 Oct 2006 11:05:20 +0100 Subject: split backend.php into modules, backend cleanups --- modules/popup-dialog.php | 245 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 modules/popup-dialog.php (limited to 'modules/popup-dialog.php') diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php new file mode 100644 index 000000000..02282f46b --- /dev/null +++ b/modules/popup-dialog.php @@ -0,0 +1,245 @@ +Subscribe to feed"; + print "
"; + + print "
"; + + print ""; + print ""; + print ""; + + print " + "; + + if (get_pref($link, 'ENABLE_FEED_CATS')) { + print ""; + } + + print "
Feed URL: +
Category:"; + print_feed_cat_select($link, "cat_id"); + print "
"; + print "
"; + + print "
+ +
"; + } + + if ($id == "search") { + + print "
Search
"; + print "
"; + + print "
"; + + #$active_feed_id = db_escape_string($_GET["param"]); + + $params = split(":", db_escape_string($_GET["param"])); + + $active_feed_id = sprintf("%d", $params[0]); + $is_cat = $params[1] == "true"; + + print ""; + + print ""; + + print "
Search:"; + + print " +
Where:"; + + print "
Match on:"; + + $search_fields = array( + "title" => "Title", + "content" => "Content", + "both" => "Title or content"); + + print_select_hash("match_on", 3, $search_fields); + + print "
"; + + print "
"; + + print "
+ +
"; + + print "
"; + + } + + if ($id == "quickAddLabel") { + print "
Create label
"; + print "
"; + + print "
"; + + print ""; + print ""; + + print ""; + + print " + "; + + print "
Caption:"; + + print "
+

SQL Expression:

"; + + print ""; + + print "
"; + + print "
"; + + print "
"; + + print "
"; + + print " + "; + + print " "; + + print ""; + } + + if ($id == "quickAddFilter") { + + $active_feed_id = db_escape_string($_GET["param"]); + + print "
Create filter
"; + print "
"; + + print "
"; + + print ""; + print ""; + print ""; + +// print "
Note: filter will only apply to new articles.
"; + + $result = db_query($link, "SELECT id,description + FROM ttrss_filter_types ORDER BY description"); + + $filter_types = array(); + + while ($line = db_fetch_assoc($result)) { + //array_push($filter_types, $line["description"]); + $filter_types[$line["id"]] = $line["description"]; + } + + print ""; + + print " + "; + print ""; + + print ""; + + print "
Match:"; + print ""; + + print_select_hash("filter_type", 1, $filter_types, "class=\"iedit\""); + + print "
Feed:"; + + print_feed_select($link, "feed_id", $active_feed_id); + + print "
Action:"; + + print "
"; + + print "
"; + + print "
"; + + print " "; + + print ""; + + print "
"; + +// print ""; + + } + + print "
"; + } +?> -- cgit v1.2.3