Can be unchecked to decrease message visibility.
$params = array_merge($params, $val);
return $sql;
}
+ elseif (is_bool($val)) {
+ return $val ? 'TRUE' : 'FALSE';
+ }
$params[] = $val;
return '?';
$reply['raw'] = $body;
$reply['message'] = messagehtml($body);
}
+ if (isset($input['announce'])) {
+ $reply['announced'] = !!$input['announce'];
+ }
if ($_FILES and !empty($_FILES['image'])) {
$target = 'data/upload';
if (!file_exists($target)) {
page text,
raw text,
message text,
+ announced boolean NOT NULL DEFAULT TRUE,
created timestamptz DEFAULT now(),
author text,
id serial NOT NULL PRIMARY KEY
);
print "</p>\n";
}
+ {
+ print '<p>';
+ printf(
+ '<input type="hidden" name="%s" value="" />'
+ . "Geplaatste berichten zijn hier direct zichtbaar voor bewoners.\n"
+ . '<input type="checkbox" id="%1$s" name="%1$s" value="%s"%s%s />'
+ . '<label for="%1$s"> %s</label>'."\n",
+ 'announce',
+ '1',
+ ($_POST['announce'] ?? TRUE) ? ' checked' : '',
+ ' onclick="this.nextSibling.hidden = !this.checked"',
+ "De eerste regel wordt ook weergegeven op het scherm in de hal."
+ );
+ print "</p>\n";
+ }
if (isset($Issue)) {
printf(
'<p><label for="%s">%s:</label> '