From 3c33e23c3cdbd2602724d2ee179823b7336ca178 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Wed, 14 Sep 2011 22:23:29 +0200 Subject: admin_news privilege for writing news too --- includes/pages/user_news.php | 84 +++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 41 deletions(-) (limited to 'includes/pages/user_news.php') diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index 48b3764c..5d725c13 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -80,22 +80,22 @@ function user_news_comments() { $html .= ""; $html .= ' -
-
-

Neuer Kommentar:

-   - -
- - - - - - -
Text:
-
- -
'; +
+
+

Neuer Kommentar:

+   + +
+ + + + + + +
Text:
+
+ +
'; } else { $html .= "Fehlerhafter Aufruf!"; } @@ -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,32 +137,34 @@ function user_news() { else $html .= '' . ($i +1) . '  '; } - $html .= ' -

-

' . Get_Text(6) . '

-   - -
- - - - - - - - - '; - if (in_array('admin_news', $privileges)) { - $html .= ' - - - '; + $html .= ''; + if (in_array("admin_news", $privileges)) { + $html .= '

+

' . Get_Text(6) . '

+   + + +
' . Get_Text(7) . '
' . Get_Text(8) . '
' . Get_Text(9) . '
+ + + + + + + + '; + if (in_array('admin_news', $privileges)) { + $html .= ' + + + '; + } + $html .= '
' . Get_Text(7) . '
' . Get_Text(8) . '
' . Get_Text(9) . '
+
+ +
'; } - $html .= ' -
- - '; return $html; } ?> \ No newline at end of file -- cgit v1.2.3-54-g00ecf