%s", htmlspecialchars($caption)); } } if ($output == "select") { header("Content-Type: text/xml"); print ""; } } return; } set_pref($link, "_PREFS_ACTIVE_TAB", "labelConfig"); $sort = db_escape_string($_REQUEST["sort"]); if (!$sort || $sort == "undefined") { $sort = "caption"; } $label_search = db_escape_string($_REQUEST["search"]); if (array_key_exists("search", $_REQUEST)) { $_SESSION["prefs_label_search"] = $label_search; } else { $label_search = $_SESSION["prefs_label_search"]; } print "
"; print "
"; print" "; print " "; print ""; print "
"; if ($label_search) { $label_search = split(" ", $label_search); $tokens = array(); foreach ($label_search as $token) { $token = trim($token); array_push($tokens, "(UPPER(caption) LIKE UPPER('%$token%'))"); } $label_search_query = "(" . join($tokens, " AND ") . ") AND "; } else { $label_search_query = ""; } $result = db_query($link, "SELECT * FROM ttrss_labels2 WHERE $label_search_query owner_uid = ".$_SESSION["uid"]." ORDER BY $sort"); // print "
PLACEHOLDER
"; if (db_num_rows($result) != 0) { print "

"; print ""; */ $lnum = 0; while ($line = db_fetch_assoc($result)) { $class = ($lnum % 2) ? "even" : "odd"; $label_id = $line["id"]; $this_row_id = "id=\"LILRR-$label_id\""; print ""; $line["caption"] = htmlspecialchars($line["caption"]); $fg_color = $line["fg_color"]; $bg_color = $line["bg_color"]; if (!$fg_color) $fg_color = ""; if (!$bg_color) $bg_color = ""; print ""; $id = $line['id']; print ""; print ""; ++$lnum; } print "
".__('Select:')." ".__('All').", ".__('None')." "; /* print "
  ".__('Caption')."
"; print "
α"; print_color_picker($id); print "
"; print "" . $line["caption"] . ""; print "
"; } else { print "

"; if (!$label_search) { print_warning(__('No labels defined.')); } else { print_warning(__('No matching labels found.')); } print "

"; } } function print_color_picker($id) { print ""; } ?>