Parse error: parse error, unexpected $end in Verzeichnis on line 190
<?php
//Seiten Abfrage ?seite=seite
if( isset( $_REQUEST["seite"] ) && $_REQUEST["seite"] != "" )
{
$seite = $_REQUEST["seite"];
}
else
{
$seite = 1;
}
//Include der Funktionen
include("functions.inc.php");
//Variablen für die Breite
$width1 = "100";
$width2 = "250";
$width3 = "100";
//Variablen für die BG-Colour der Tabelle
$colour1 = "#CCCCCC";
$colour2 = "#BEBEBE";
//Datenbank usw
mysqlconnect();
//Wie viele Seiten
$gesamt = howmany();
$seitegesamt = ceil( $gesamt / 5 );
//Datensaetze aus DB auslesen
$offset = ($seite - 1) * 5;
$querydb = "SELECT * FROM eintraege ORDER BY id DESC LIMIT " . $offset . ", 5 ";
$resultdb = mysql_query( $querydb );
if( ! $resultdb )
{
die("Konnte keine Datensätze aus der Datenbank auslesen");
}
$anzahl = mysql_num_rows( $resultdb );
// Seite hat sich selber aufgerufen
$error_msg = "";
if( $_REQUEST["form_titel"] == "" )
{
$error_msg .= "Bitte geben Sie einen Titel an.<br>";
}
if( $_REQUEST["form_text"] == "" )
{
$error_msg .= "Bitte geben Sie einen Text ein.<br>";
}
if( $error_msg == "" )
{
//Alles o.k.
$date = date("d.m.Y");
//INSERT DATABASE
$query = "INSERT INTO eintraege ( Autor, Titel, Text, Email, Datum ) VALUES ( ";
$query .= "'" . $_REQUEST["form_text"] . "', ";
$query .= "'" . $_REQUEST["form_titel"] . "', ";
$query .= " ) ";
//
$result = mysql_query( $query );
if ( ! $result )
{
die("Konnte Query nicht erstellen" . mysql_error() );
}
?>
<html>
<head>
<title><?php echo $admin["Titel"]; ?></title>
</head>
<body align="center">
<table border="0" align="center" background="#cccccc">
<tr>
<td width="<?php echo $width1; ?>"><a href="index.php">Home</a></td>
<td width="<?php echo $width1; ?>"><a href="enter.php">Eintragen</a></td>
<td width="<?php echo $width1; ?>"><a href="admin.php">Administration</a></td>
</tr>
</table>
<table align="center" border="0" background="grey" cellspacing="0">
<?php
//Schleife für Ausgabe der Tabellen-Reihen
for ($i=1;$i <= $anzahl; $i++)
{
$datensaetze = mysql_fetch_array( $resultdb );
?>
<form action="<?php echo $_REQUEST["PHP_SELF"]; ?>" method="post">
<tr>
<td bgcolor="<?php echo $colour1; ?>" width="<?php echo $width1; ?>">Datum</td>
<td width="<?php echo $width2; ?>" bgcolor="<?php echo $colour1; ?>" align="right"> Autor </td>
</tr>
<tr>
<td width="<?php echo $width1; ?>" bgcolor="<?php echo $colour2; ?>"></td>
<td width="<?php echo $width2; ?>" bgcolor="<?php echo $colour2; ?>"></td>
</tr>
<tr>
<td width="<?php echo $width1; ?>" bgcolor="<?php echo $colour2; ?>"><?php echo $datensaetze["Datum"]; ?></td>
<td width="<?php echo $width2; ?>" bgcolor="<?php echo $colour2; ?>" align="right">
<?php
if( $datensaetze["Email"] !== "" )
{
?>
<a href="mailto:<?php echo $datensaetze["Email"]; ?>"><?php echo $datensaetze["Autor"]; ?></a>
<?php
}
else
{
echo $datensaetze["Autor"];
}
?>
</td>
</tr>
<tr>
<td width="<?php echo $width1; ?>" bgcolor="<?php echo $colour1; ?>"> </td>
<td width="<?php echo $width2; ?>" bgcolor="<?php echo $colour1; ?>"> </td>
</tr>
<tr>
<td width="<?php echo $width1; ?>" bgcolor="<?php echo $colour1; ?>">Titel :</td>
<td width="<?php echo $width2; ?>" bgcolor="<?php echo $colour2; ?>"><input name="form_titel" value="<?php echo $datensaetze["Titel"]; ?>"></td>
</tr>
<tr>
<td width="<?php echo $width1; ?>" bgcolor="<?php echo $colour1; ?>" valign="top">Text :</td>
<td width="<?php echo $width2; ?>" bgcolor="<?php echo $colour2; ?>"><textarea name="form_text" cols="54" rows="8"><?php echo $datensaetze["Text"]; ?></textarea></td>
</tr>
<tr>
<td width="<?php echo $width1; ?>" bgcolor="#ffffff"><br></td>
<td width="<?php echo $width2; ?>" bgcolor="#ffffff"></td>
</tr>
</form>
<?php
}
?>
<tr>
<td width="<?php echo $width1; ?>" bgcolor="#ffffff"></td>
<td width="<?php echo $width2; ?>" bgcolor="#ffffff"></td>
</tr>
<tr align="center">
<td width="<?php echo $width1; ?>" bgcolor="<?php echo $colour1; ?>">
<?php
if ( $seite != 1 )
{
?>
<a href="<?php echo $_REQUEST["PHP_SELF"]; ?>?seite=<?php echo $seite -1; ?>">Zurück</a>
<?php
}
?>
</td>
<td width="<?php echo $width2; ?>" bgcolor="<?php echo $colour2; ?>">Seite <?php echo $seite;?> von <?php echo $seitegesamt; ?></td>
<td width="<?php echo $width3; ?>" bgcolor="<?php echo $colour1; ?>">
<?php
if ( ($seite +1) <= $seitegesamt )
{
?>
<a href="<?php echo $_REQUEST["PHP_SELF"]; ?>?seite=<?php echo $seite +1; ?>">Weiter</a>
<?php
}
?>
</td>
</tr>
</table>
</body>
</html>