From 75448045cfe70054c8f4bae1bcfaf9bb0f70d330 Mon Sep 17 00:00:00 2001 From: Moritz helios Rudert Date: Wed, 1 Jun 2011 12:13:39 +0200 Subject: fixes --- www-ssl/nonpublic/news_comments.php | 70 +++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 37 deletions(-) mode change 100755 => 100644 www-ssl/nonpublic/news_comments.php (limited to 'www-ssl/nonpublic/news_comments.php') diff --git a/www-ssl/nonpublic/news_comments.php b/www-ssl/nonpublic/news_comments.php old mode 100755 new mode 100644 index 826733c1..b90d5a82 --- a/www-ssl/nonpublic/news_comments.php +++ b/www-ssl/nonpublic/news_comments.php @@ -3,54 +3,50 @@ $title = "Kommentare zu den News"; $header = "Kommentar"; include ("../../../camp2011/includes/header.php"); +if(isset($_GET["nid"])) { + if(isset( $_GET["text"])) { + $ch_sql = "INSERT INTO `news_comments` (`Refid`, `Datum`, `Text`, `UID`) ". + "VALUES ('". $_GET["nid"]. "', '". date("Y-m-d H:i:s"). "', '". $_GET["text"]. "', '". $_SESSION["UID"]. "')"; + $Erg = mysql_query($ch_sql, $con); -if( IsSet( $_GET["nid"])) -{ - - -if( IsSet( $_GET["text"])) -{ - $ch_sql="INSERT INTO `news_comments` (`Refid`, `Datum`, `Text`, `UID`) ". - "VALUES ('". $_GET["nid"]. "', '". date("Y-m-d H:i:s"). "', '". $_GET["text"]. "', '". $_SESSION["UID"]. "')"; - $Erg = mysql_query($ch_sql, $con); - if ($Erg == 1) - { - echo "Eintrag wurde gespeichert

"; - SetHeaderGo2Back(); - } -} + if ($Erg == 1) { + echo "Eintrag wurde gespeichert

"; + SetHeaderGo2Back(); + } + } -$SQL = "SELECT * FROM `news_comments` WHERE `Refid`='". $_GET["nid"]. "' ORDER BY 'ID'"; -$Erg = mysql_query($SQL, $con); -echo mysql_error( $con); -// anzahl zeilen -$news_rows = mysql_num_rows($Erg); + $SQL = "SELECT * FROM `news_comments` WHERE `Refid`='". $_GET["nid"]. "' ORDER BY 'ID'"; + $Erg = mysql_query($SQL, $con); + echo mysql_error( $con); + // anzahl zeilen + $news_rows = mysql_num_rows($Erg); ?> + - - - - - - - + + + + + + + -"; echo "\t\t"; echo "\t\t"; echo ""; echo "\t"; echo "\t\t"; echo ""; } @@ -59,24 +55,24 @@ echo "
DatumNick
Kommentar
DatumNick
Kommentar
"; - echo mysql_result($Erg, $n, "Datum"); + echo mysql_result($Erg, $n, "Datum"); echo "\t\t"; - echo UID2Nick(mysql_result($Erg, $n, "UID")); - // avatar anzeigen? - echo DisplayAvatar (mysql_result($Erg, $n, "UID")); + echo UID2Nick(mysql_result($Erg, $n, "UID")); + // avatar anzeigen? + echo DisplayAvatar (mysql_result($Erg, $n, "UID")); echo "\t\t
"; - echo nl2br(mysql_result($Erg, $n, "Text"))."\n"; + echo nl2br(mysql_result($Erg, $n, "Text"))."\n"; echo "\t\t
"; ?> -
+

Neuer Kommentar:

 
-"> +">
Text:
-
+
-