globals=Off aenderungen vorgenommen

git-svn-id: svn://svn.cccv.de/engel-system@31 29ba0400-6e00-0410-a75a-ca02368028f8
This commit is contained in:
cookie 2005-11-09 17:36:32 +00:00
parent 124ac49668
commit cf1289774e
1 changed files with 16 additions and 15 deletions

View File

@ -6,19 +6,22 @@ include ("./inc/db.php");
include ("./inc/funktion_user.php"); include ("./inc/funktion_user.php");
if (IsSet($nid)) { if( IsSet( $_GET["nid"]))
{
if (IsSet($date) && IsSet($text)){ if( IsSet( $_GET["text"]))
{
$ch_sql="INSERT INTO news_comments (Refid, Datum, Text, UID) VALUES ('$nid', '$date', '$text', '".$_SESSION[UID]."')"; $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); $Erg = mysql_query($ch_sql, $con);
if ($Erg == 1) { echo "Eintrag wurde gespeichert<br><br>"; } if ($Erg == 1)
echo "Eintrag wurde gespeichert<br><br>";
} }
$SQL = "SELECT * FROM news_comments where Refid = $nid ORDER BY 'ID'"; $SQL = "SELECT * FROM news_comments where Refid = ". $_GET["nid"]. " ORDER BY 'ID'";
$Erg = mysql_query($SQL, $con); $Erg = mysql_query($SQL, $con);
echo mysql_error( $con);
// anzahl zeilen // anzahl zeilen
$news_rows = mysql_num_rows($Erg); $news_rows = mysql_num_rows($Erg);
@ -60,9 +63,8 @@ echo "</table>";
<h4>Neuer Kommentar:</h4> <h4>Neuer Kommentar:</h4>
<a name="Neu">&nbsp;</a> <a name="Neu">&nbsp;</a>
<form action="./news_comments.php" method="post"> <form action="./news_comments.php" method="GET">
<input type="hidden" name="date" value="<? echo date("Y-m-d H:i:s"); ?>"> <input type="hidden" name="nid" value="<? echo $_GET["nid"]; ?>">
<input type="hidden" name="nid" value="<? echo $nid; ?>">
<table> <table>
<tr> <tr>
<td align="right" valign="top">Text:</td> <td align="right" valign="top">Text:</td>
@ -76,12 +78,11 @@ echo "</table>";
<? <?
} else { }
else
{
echo "Fehlerhafter Aufruf!"; echo "Fehlerhafter Aufruf!";
} }
include ("./inc/footer.php"); include ("./inc/footer.php");
?> ?>