+
+function print_label_select($name, $value, $attributes = "") {
+
+ $pdo = Db::pdo();
+
+ $sth = $pdo->prepare("SELECT caption FROM ttrss_labels2
+ WHERE owner_uid = ? ORDER BY caption");
+ $sth->execute([$_SESSION['uid']]);
+
+ print "<select default=\"$value\" name=\"" . htmlspecialchars($name) .
+ "\" $attributes>";
+
+ while ($line = $sth->fetch()) {
+
+ $issel = ($line["caption"] == $value) ? "selected=\"1\"" : "";
+
+ print "<option value=\"".htmlspecialchars($line["caption"])."\"
+ $issel>" . htmlspecialchars($line["caption"]) . "</option>";
+
+ }
+
+# print "<option value=\"ADD_LABEL\">" .__("Add label...") . "</option>";
+
+ print "</select>";
+
+
+}