admin_news privilege for writing news too

main
Philip Häusler 13 years ago
parent fc90174dd8
commit 3c33e23c3c

@ -108,7 +108,7 @@ function user_news() {
$html = "";
if (isset ($_POST["text"]) && isset ($_POST["betreff"])) {
if (isset ($_POST["text"]) && isset ($_POST["betreff"]) && in_array("admin_news", $privileges)) {
if (!isset ($_POST["treffen"]) || !in_array("admin_news", $privileges))
$_POST["treffen"] = 0;
sql_query("INSERT INTO `News` (`Datum`, `Betreff`, `Text`, `UID`, `Treffen`) " .
@ -137,8 +137,9 @@ function user_news() {
else
$html .= '<a href="' . page_link_to("news") . '&page=' . $i . '">' . ($i +1) . '</a>&nbsp; ';
}
$html .= '</div>
<br /><hr />
$html .= '</div>';
if (in_array("admin_news", $privileges)) {
$html .= '<br /><hr />
<h2>' . Get_Text(6) . '</h2>
<a name="Neu">&nbsp;</a>
@ -163,6 +164,7 @@ function user_news() {
<br />
<input type="submit" value="' . Get_Text("save") . '">
</form>';
}
return $html;
}
?>
Loading…
Cancel
Save