From f156fd00ee99338d1824d20f65f0fe30d03c4f9e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 17 Aug 2006 05:54:57 +0100 Subject: create label now uses dialog, code cleanups --- backend.php | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 9 deletions(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index 7155846b6..8b31297fb 100644 --- a/backend.php +++ b/backend.php @@ -2395,22 +2395,21 @@ if (!WEB_DEMO_MODE) { // no escaping is done here on purpose - $exp = trim($_GET["exp"]); + $sql_exp = trim($_GET["sql_exp"]); + $description = db_escape_string($_GET["description"]); $result = db_query($link, "INSERT INTO ttrss_labels (sql_exp,description,owner_uid) - VALUES ('$exp', '$exp', '".$_SESSION["uid"]."')"); + VALUES ('$sql_exp', '$description', '".$_SESSION["uid"]."')"); } } - print "
-  "; - + print "
"; + print"
"; + id=\"label_create_btn\" + onclick=\"return displayDlg('quickAddLabel', false)\" + value=\"Create label\">
"; $result = db_query($link, "SELECT id,sql_exp,description @@ -2665,6 +2664,52 @@ } + 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"]); -- cgit v1.2.3