move print_label_select to functions.php
This commit is contained in:
parent
4be1b04dcb
commit
24e2bb3a92
|
@ -7086,4 +7086,28 @@
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
function print_label_select($link, $name, $value, $style = "") {
|
||||
|
||||
$result = db_query($link, "SELECT caption FROM ttrss_labels2
|
||||
WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY caption");
|
||||
|
||||
print "<select default=\"$value\" name=\"" . htmlspecialchars($name) .
|
||||
"\" style=\"$style\" onchange=\"labelSelectOnChange(this)\" >";
|
||||
|
||||
while ($line = db_fetch_assoc($result)) {
|
||||
|
||||
$issel = ($line["caption"] == $value) ? "selected=\"1\"" : "";
|
||||
|
||||
print "<option $issel>" . htmlspecialchars($line["caption"]) . "</option>";
|
||||
|
||||
}
|
||||
|
||||
print "<option value=\"ADD_LABEL\">" .__("Add label...") . "</option>";
|
||||
|
||||
print "</select>";
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -518,26 +518,4 @@
|
|||
}
|
||||
}
|
||||
|
||||
function print_label_select($link, $name, $value, $style = "") {
|
||||
|
||||
$result = db_query($link, "SELECT caption FROM ttrss_labels2
|
||||
WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY caption");
|
||||
|
||||
print "<select default=\"$value\" name=\"" . htmlspecialchars($name) .
|
||||
"\" style=\"$style\" onchange=\"labelSelectOnChange(this)\" >";
|
||||
|
||||
while ($line = db_fetch_assoc($result)) {
|
||||
|
||||
$issel = ($line["caption"] == $value) ? "selected=\"1\"" : "";
|
||||
|
||||
print "<option $issel>" . htmlspecialchars($line["caption"]) . "</option>";
|
||||
|
||||
}
|
||||
|
||||
print "<option value=\"ADD_LABEL\">" .__("Add label...") . "</option>";
|
||||
|
||||
print "</select>";
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue