From b8776a07f1c125955a9e8ad1ca13097411568fbd Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 26 Jan 2009 12:30:13 +0100 Subject: tmp color-ops toolbar (2) --- modules/pref-labels.php | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'modules') diff --git a/modules/pref-labels.php b/modules/pref-labels.php index 1c8fd02ad..162592625 100644 --- a/modules/pref-labels.php +++ b/modules/pref-labels.php @@ -3,6 +3,19 @@ $subop = $_GET["subop"]; + if ($subop == "color-set") { + $kind = db_escape_string($_REQUEST["kind"]); + $ids = split(',', db_escape_string($_REQUEST["ids"])); + $color = db_escape_string($_REQUEST["color"]); + + foreach ($ids as $id) { + db_query($link, "UPDATE ttrss_labels2 SET + ${kind}_color = '$color' WHERE id = '$id' + AND owner_uid = " . $_SESSION["uid"]); + } + + } + if ($subop == "save") { $id = db_escape_string($_REQUEST["id"]); @@ -211,19 +224,18 @@ print "

"; - print "

"; + print ""; + + print "  "; print __("Color:"); - print "  "; + print "  "; print " "; + onclick=\"labelColorSet('bg')\" value=\"".__('Bg')."\"> "; print ""; + onclick=\"labelColorReset()\" value=\"".__('Clear')."\">"; - print "
"; - - print ""; print "

"; } else { -- cgit v1.2.3