From 951906dcecb1d3c7bcf751976a03e0c196ca6db0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Nov 2010 23:46:49 +0300 Subject: use Modalbox library for popup dialogs --- modules/pref-feeds.php | 140 +++++++------------------------------------------ 1 file changed, 19 insertions(+), 121 deletions(-) (limited to 'modules/pref-feeds.php') diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index b2ca96fbb..38f7b5777 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -58,114 +58,13 @@ return; } -/* if ($subop == "massSubscribe") { - $ids = split(",", db_escape_string($_REQUEST["ids"])); - - $subscribed = array(); - - foreach ($ids as $id) { - - if ($mode == 1) { - $result = db_query($link, "SELECT feed_url,title FROM ttrss_feeds - WHERE id = '$id'"); - } else if ($mode == 2) { - $result = db_query($link, "SELECT * FROM ttrss_archived_feeds - WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]); - $orig_id = db_escape_string(db_fetch_result($result, 0, "id")); - $site_url = db_escape_string(db_fetch_result($result, 0, "site_url")); - } - - $feed_url = db_escape_string(db_fetch_result($result, 0, "feed_url")); - $title = db_escape_string(db_fetch_result($result, 0, "title")); - - $title_orig = db_fetch_result($result, 0, "title"); - - $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE - feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]); - - if (db_num_rows($result) == 0) { - if ($mode == 1) { - $result = db_query($link, - "INSERT INTO ttrss_feeds (owner_uid,feed_url,title,cat_id) - VALUES ('".$_SESSION["uid"]."', '$feed_url', '$title', NULL)"); - } else if ($mode == 2) { - $result = db_query($link, - "INSERT INTO ttrss_feeds (id,owner_uid,feed_url,title,cat_id,site_url) - VALUES ('$orig_id','".$_SESSION["uid"]."', '$feed_url', '$title', NULL, '$site_url')"); - } - array_push($subscribed, $title_orig); - } - } - - if (count($subscribed) > 0) { - $msg = "".__('Subscribed to feeds:')."". - ""; - - print format_notice($msg); - } - - return; - } */ - -/* if ($subop == "browse") { - - print "
".__('Feed Browser')."
"; - - print "
"; - - $browser_search = db_escape_string($_REQUEST["search"]); - - //print "

".__("Showing top 25 registered feeds, sorted by popularity:")."

"; - - print "
"; - - print " -
- - - -
"; - - print " "; - - print __("limit:"); - - print " "; - - print "

"; - - $owner_uid = $_SESSION["uid"]; - - print "

    "; - print_feed_browser($link, $search, 25); - print "
"; + if ($subop == "editfeed") { + header("Content-Type: text/xml"); - print "
- -
"; + print ""; + print "".__('Feed Editor').""; + print ""; - return; - } */ - - if ($subop == "editfeed") { $feed_id = db_escape_string($_REQUEST["id"]); $result = db_query($link, @@ -184,10 +83,6 @@ $feed_icon = ""; } - print "
".__('Feed Editor')."
"; - - print "
"; - print ""; print ""; @@ -402,16 +297,19 @@
"; + print "]]>
"; + return; } if ($subop == "editfeeds") { $feed_ids = db_escape_string($_REQUEST["ids"]); - - print "
".__('Multiple Feed Editor')."
"; - - print "
"; + + header("Content-Type: text/xml"); + print ""; + print "".__('Multiple Feed Editor').""; + print ""; @@ -555,6 +453,8 @@ onclick=\"return feedEditCancel()\" value=\"".__('Cancel')."\">
"; + print "]]>"; + return; } @@ -954,10 +854,10 @@ } - print "
".__('Category editor')."
"; - - print "
"; - + header("Content-Type: text/xml"); + print ""; + print "".__('Category editor').""; + print "". __('Close this window')."
"; - print "
"; + print "]]>"; return; @@ -1189,8 +1089,6 @@ if (db_num_rows($result) != 0) { -// print "
PLACEHOLDER
"; - print "

"; print "
". -- cgit v1.2.3