From c64d5b0316cac32e8a2b4b57d05ae47c9313331b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 23 Nov 2005 10:55:05 +0100 Subject: [PATCH] move categories editor below feeds --- backend.php | 188 ++++++++++++++++++++++++++-------------------------- 1 file changed, 94 insertions(+), 94 deletions(-) diff --git a/backend.php b/backend.php index fa032d0f..69559a69 100644 --- a/backend.php +++ b/backend.php @@ -1088,98 +1088,7 @@ } } - if (get_pref($link, 'ENABLE_FEED_CATS')) { - - // print "

Categories

"; - - print "
-  
"; - - $result = db_query($link, "SELECT title,id FROM ttrss_feed_categories - WHERE owner_uid = ".$_SESSION["uid"]." - ORDER BY title"); - - print "

"; - print " - - "; - - $lnum = 0; - - while ($line = db_fetch_assoc($result)) { - - $class = ($lnum % 2) ? "even" : "odd"; - - $cat_id = $line["id"]; - - $edit_cat_id = $_GET["id"]; - - if ($subop == "editCat" && $cat_id != $edit_cat_id) { - $class .= "Grayed"; - } - - print ""; - - $edit_title = htmlspecialchars(db_unescape_string($line["title"])); - - if (!$edit_cat_id || $subop != "editCat") { - - print ""; - - print ""; - - } else if ($cat_id != $edit_cat_id) { - - print ""; - - print ""; - - } else { - - print ""; - - print ""; - - } - - print ""; - - ++$lnum; - } - - if ($lnum == 0) { - print ""; - } - - print "
SelectTitle
" . - $edit_title . "$edit_title
No categories defined.
"; - - print "

"; - - if ($subop == "editCat") { - print "Edit category:  - - "; - } else { - - print " - Selection:  - - "; - } - } - -// print "

Feeds

"; - - print "

"; +// print "

Edit Feeds

"; $result = db_query($link, "SELECT id,title,feed_url,last_error FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); @@ -1202,7 +1111,7 @@ } - print "
+ print "

 
"; @@ -1408,7 +1317,98 @@ } - print "

OPML Import

+ print "

Edit Categories

"; + + if (get_pref($link, 'ENABLE_FEED_CATS')) { + + // print "

Categories

"; + + print "
+  
"; + + $result = db_query($link, "SELECT title,id FROM ttrss_feed_categories + WHERE owner_uid = ".$_SESSION["uid"]." + ORDER BY title"); + + print "

"; + print " + + "; + + $lnum = 0; + + while ($line = db_fetch_assoc($result)) { + + $class = ($lnum % 2) ? "even" : "odd"; + + $cat_id = $line["id"]; + + $edit_cat_id = $_GET["id"]; + + if ($subop == "editCat" && $cat_id != $edit_cat_id) { + $class .= "Grayed"; + } + + print ""; + + $edit_title = htmlspecialchars(db_unescape_string($line["title"])); + + if (!$edit_cat_id || $subop != "editCat") { + + print ""; + + print ""; + + } else if ($cat_id != $edit_cat_id) { + + print ""; + + print ""; + + } else { + + print ""; + + print ""; + + } + + print ""; + + ++$lnum; + } + + if ($lnum == 0) { + print ""; + } + + print "
SelectTitle
" . + $edit_title . "$edit_title
No categories defined.
"; + + print "

"; + + if ($subop == "editCat") { + print "Edit category:  + + "; + } else { + + print " + Selection:  + + "; + } + } + + print "

Import OPML

File: