admin_news privilege for writing news too
This commit is contained in:
parent
fc90174dd8
commit
3c33e23c3c
|
@ -108,7 +108,7 @@ function user_news() {
|
||||||
|
|
||||||
$html = "";
|
$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))
|
if (!isset ($_POST["treffen"]) || !in_array("admin_news", $privileges))
|
||||||
$_POST["treffen"] = 0;
|
$_POST["treffen"] = 0;
|
||||||
sql_query("INSERT INTO `News` (`Datum`, `Betreff`, `Text`, `UID`, `Treffen`) " .
|
sql_query("INSERT INTO `News` (`Datum`, `Betreff`, `Text`, `UID`, `Treffen`) " .
|
||||||
|
@ -137,8 +137,9 @@ function user_news() {
|
||||||
else
|
else
|
||||||
$html .= '<a href="' . page_link_to("news") . '&page=' . $i . '">' . ($i +1) . '</a> ';
|
$html .= '<a href="' . page_link_to("news") . '&page=' . $i . '">' . ($i +1) . '</a> ';
|
||||||
}
|
}
|
||||||
$html .= '</div>
|
$html .= '</div>';
|
||||||
<br /><hr />
|
if (in_array("admin_news", $privileges)) {
|
||||||
|
$html .= '<br /><hr />
|
||||||
<h2>' . Get_Text(6) . '</h2>
|
<h2>' . Get_Text(6) . '</h2>
|
||||||
<a name="Neu"> </a>
|
<a name="Neu"> </a>
|
||||||
|
|
||||||
|
@ -163,6 +164,7 @@ function user_news() {
|
||||||
<br />
|
<br />
|
||||||
<input type="submit" value="' . Get_Text("save") . '">
|
<input type="submit" value="' . Get_Text("save") . '">
|
||||||
</form>';
|
</form>';
|
||||||
|
}
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue