%s", htmlspecialchars($caption));
}
}
if ($output == "select") {
header("Content-Type: text/xml");
print "";
print_label_select($link, "select_label",
$caption, "");
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 ""; #pane
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");
if (db_num_rows($result) != 0) {
print "
";
} else {
print "
";
if (!$label_search) {
print_warning(__('No labels defined.'));
} else {
print_warning(__('No matching labels found.'));
}
print "
";
}
print "
"; #pane
print "
"; #container
}
function print_color_picker($id) {
print "";
$color_picker_pairs = array(
array('#ff0000', '#ffffff'),
array('#009000', '#ffffff'),
array('#0000ff', '#ffffff'),
array('#ff00ff', '#ffffff'),
array('#009090', '#ffffff'),
array('#ffffff', '#ff0000'),
array('#000000', '#00ff00'),
array('#ffffff', '#0000ff'),
array('#ffffff', '#ff00ff'),
array('#000000', '#00ffff'),
array('#7b07e1', '#ffffff'),
array('#0091b4', '#ffffff'),
array('#00aa71', '#ffffff'),
array('#7d9e01', '#ffffff'),
array('#e14a00', '#ffffff'),
array('#ffffff', '#7b07e1'),
array('#ffffff', '#00b5e1'),
array('#ffffff', '#00e196'),
array('#ffffff', '#b3e100'),
array('#ffffff', '#e14a00'),
array('#000000', '#ffffff'),
array('#ffffff', '#000000'),
array('#ffffff', '#909000'),
array('#063064', '#fff7d5'),
array('#ffffff', '#4E4E90'),
);
foreach ($color_picker_pairs as $c) {
$fg_color = $c[0];
$bg_color = $c[1];
print "
α
";
}
print "
";
print "
".__('custom color:')."";
print "
".__("foreground")."
";
print "
".__("background")."
";
print "
";
}
?>