von iltis » 31.05.2007, 11:19
Danke Garfield.
Allerdings meckert er jetzt ganz unten Das </html> als Syntaxfehler an:
<?php session_start();?>
<html>
<head>
<title>Gästebuch</title>
<meta name="author" content="bh und mw">
<link rel="stylesheet" href="../../hp-hockeystylesheets.css" media="all">
</head>
<body bgcolor="#FFFFEC">
<!--Banner tabelle-->
<table class="tab_banner" bgcolor="#C0C0C0" bordercolor="#808080" width="840" align="center" cellspacing="0" cellpadding="0">
<tr class="inhalt_banner"><td>
<tr><td>
<table class="inhalt_banner" width="100%">
<td width="40%" align="right" valign="center"> <font color="#FFFFFF"> <font face="COURIER NEW"> <font size="+2">Elster Hockey Club</font></font></font>
<td width="20%" align="center" valign="center"> <img src="../../ehc_klein.gif" alt="ehc_klein" border="0">
<td width="40%" align="left" valign="center"> <font color="#FFFFFF"> <font face="COURIER NEW"> <font size="+2">49 Elsterwerda e.V.</font></font></font>
</td></td></td>
</table>
</td></tr>
</table>
<!--Ende---Banner tabelle-->
<br>
<!-- Beginn--Navi- & maintabelle -->
<table width="840" border="1" cellspacing="0" align="center" bgcolor="#FBFACA">
<tr>
<!-- beginn navi -->
<td width="130" align="left" valign="top" class="tab_main">
<table border="0" cellspacing="3" cellpadding="0" width="130" class="inhalt_navi" >
<tr >
<td >
<a href="../../index.html">Startseite</a>
</td>
</tr>
<tr >
<td >
<p style="line-height:1em; "><span style="color:#FFFFFF">............................... </span> </p>
</td>
</tr>
<tr>
<td >
<a href="../02_News/news.html"> News</a>
</td>
</tr>
<tr >
<td >
<p style="line-height:1em; "><span style="color:#FFFFFF">............................... </span> </p>
</td>
</tr>
<tr>
<td >
<a href="../03_Der Verein/verein.html">Der Verein</a>
</td>
</tr>
<tr >
<td >
<p style="line-height:1em; "><span style="color:#FFFFFF">............................... </span> </p>
</td>
</tr>
<tr>
<td >
<a href="../04_Hockey im Verein/hockey im verein.html">Hockey im Verein</a>
</td>
</tr>
<tr >
<td >
<p style="line-height:1em; "><span style="color:#FFFFFF">............................... </span> </p>
</td>
</tr>
<tr>
<td >
<a href="../05_Fotos/fotogalerie.html">Fotos</a>
</td>
</tr>
<tr >
<td >
<p style="line-height:1em; "><span style="color:#FFFFFF">............................... </span> </p>
</td>
</tr>
<tr>
<td >
<a href="../06_Gaestebuch/index.php3">Gästebuch</a>
</td>
</tr>
<tr >
<td > <p style="line-height:1em; "><span style="color:#FFFFFF">............................... </span> </p>
</td>
</tr>
<tr>
<td >
<a href="../07_Links/links.html">Links</a>
</td>
</tr>
<tr >
<td >
<p style="line-height:1em; "><span style="color:#FFFFFF">............................... </span> </p>
</td>
</tr>
<tr>
<td >
<a href="../08_Kontakt/kontakt.php">Kontakt</a>
</td>
</tr>
<tr >
<td >
<p style="line-height:1em; "><span style="color:#FFFFFF">............................... </span> </p>
</td>
</tr>
<tr>
<td >
<a href="../09_Impressum/impressum.html">Impressum</a>
</td>
</tr>
</table>
<!-- ende navi -->
<!-- beginn maincontent -->
<td valign="top" >
<table width="630" border="0" align="center">
<tr class="inhalt_main">
<br>
<table align="center" width="96%" class="inhalt_main" border="0" >
<tr>
<td>
<div align="left"><font size="+1">Eintrag ins Gästebuch</font>
<br><BR><br><br>
</td>
</tr>
<tr>
<tD>
<?php
if(isset($_SESSION['captcha_spam']) AND $_POST["sicherheitscode"] == $_SESSION['captcha_spam']){
unset($_SESSION['captcha_spam']);
if (!$sessionid)
{
header("location:index.php3");
die ("Invalid Session");
}
$PathToAdminDir="intern/";
require ($PathToAdminDir."config.php3");
require ($PathToAdminDir."functions.php3");
include ("header.php3");
if ($filled==1) // Eingabe überprüfen
{
if (strlen($email)>=1)
if (!check_email($email)) //Irgendwas in Email getippt
{
echo translate("Fehler: Emailadresse ungültig");
$filled=0;
}
if (strlen($homepage)>7)
{
if (!check_url($homepage))
{
echo translate("Ungültige URL");
$filled=0;
}
}
if ($name == "" or $message =="" or $title=="")
{
echo translate("Name, Titel und Nachricht sind Pflichtfelder");
$filled=0;
}
// Ende Eingabe prüfen
}
if ($filled!=1)
{
if (!$iset)
{
if ($nr_icons>1)
{
mt_srand((double)microtime()*1000000);
$iset=mt_rand(1,$nr_icons);
}
else $iset=1;
}
?>
<form method="post" action="newentry.php3">
<INPUT TYPE="hidden" NAME="filled" VALUE="1">
<INPUT TYPE="hidden" NAME="sessionid" VALUE="<?php echo $sessionid; ?>">
<INPUT TYPE="hidden" NAME="language" VALUE="<?php echo $language; ?>">
<table border="0" width="100%" cellspacing="1" cellpadding="3" align="center">
<tr>
<th colspan="2" class="headline"></th>
<th width=100%> </th>
</tr>
<tr>
<?php
$name=stripslashes($name);
$name=str_replace("\"",""","$name");
?>
<td align="right" class="left"><?php echo translate("Name:") ?></td>
<td class="right"><input type="text" name="name" size="40" value="<?php echo $name; ?>"></td>
<td> </td>
</tr>
<tr>
<td align="right" class="left"><?php echo translate("Email"); ?></td>
<td class="right"><input type="text" name="email" size="40" value="<?php echo $email; ?>"></td>
<td> </td></tr>
<tr>
<td align="right" class="left"><?php echo translate("Homepage:"); ?></td>
<?php
if (strlen($homepage)<=7) $homepage="http://";
?>
<td class="right"><input type="text" name="homepage" size="40" value="<?php echo stripslashes($homepage); ?>"></td>
<td> </td>
</tr>
<?php if($nr_icons>0)
{
?>
<tr>
<td align="right" valign="top" class="left"><?php
echo translate("Icon:");
if($nr_icons>1)
{
?>
<br>
<?php
for ($temp=1; $temp<=$nr_icons; $temp++)
{
if ($temp==$iset) echo "Iconset ".$temp."<br>";
else echo "<a href=\"newentry.php3?sessionid=".$sessionid."&language=".$language."&iset=".$temp."\">Iconset ".$temp."</a><br>";
}
}
?>
<INPUT TYPE="hidden" NAME="iset" VALUE="<?php echo $iset; ?>">
</td>
<td class="right">
<table border="0">
<?php
$file="icon".$iset.".dat";
include ("$file");
if (!isset($icon)) $icon=$icon01;
?>
<tr>
<td><input type="radio" value="<?php echo $icon01."\" "; if ($icon==$icon01) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon01; ?> "></td>
<td><input type="radio" value="<?php echo $icon02."\" "; if ($icon==$icon02) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon02; ?>"></td>
<td><input type="radio" value="<?php echo $icon03."\" "; if ($icon==$icon03) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon03; ?>"></td>
<td><input type="radio" value="<?php echo $icon04."\" "; if ($icon==$icon04) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon04; ?>"></td>
<td><input type="radio" value="<?php echo $icon05."\" "; if ($icon==$icon05) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon05; ?>"></td>
<td><input type="radio" value="<?php echo $icon06."\" "; if ($icon==$icon06) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon06; ?>"></td>
</tr>
<tr>
<td><input type="radio" value="<?php echo $icon07."\" "; if ($icon==$icon07) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon07; ?>"></td>
<td><input type="radio" value="<?php echo $icon08."\" "; if ($icon==$icon08) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon08; ?>"></td>
<td><input type="radio" value="<?php echo $icon09."\" "; if ($icon==$icon09) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon09; ?>"></td>
<td><input type="radio" value="<?php echo $icon10."\" "; if ($icon==$icon10) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon10; ?>"></td>
<td><input type="radio" value="<?php echo $icon11."\" "; if ($icon==$icon11) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon11; ?>"></td>
<td><input type="radio" value="<?php echo $icon12."\" "; if ($icon==$icon12) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon12; ?>"></td>
</tr>
<tr>
<td><input type="radio" value="<?php echo $icon13."\" "; if ($icon==$icon13) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon13; ?>"></td>
<td><input type="radio" value="<?php echo $icon14."\" "; if ($icon==$icon14) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon14; ?>"></td>
<td><input type="radio" value="<?php echo $icon15."\" "; if ($icon==$icon15) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon15; ?>"></td>
<td><input type="radio" value="<?php echo $icon16."\" "; if ($icon==$icon16) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon16; ?>"></td>
<td><input type="radio" value="<?php echo $icon17."\" "; if ($icon==$icon17) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon17; ?>"></td>
<td><input type="radio" value="<?php echo $icon18."\" "; if ($icon==$icon18) echo "checked";?> name="icon"></td>
<td><img border="0" src="icons/<?php echo $icon18; ?>"></td>
</tr>
</table>
</td>
<td> </td>
</tr>
<?php
}
if ($newsletter_email!="1") { ?>
<tr>
<td align="right" class="left"><?php echo translate("Newsletter?"); ?></td>
<td><input type="checkbox" value="1" name="newsletter" <?php if ($newsletter=="1") echo "checked"; ?>><?php echo $newsletter_text; ?></td>
<td> </td>
</tr>
<?php }
$title=stripslashes($title);
$title=str_replace("\"",""","$title");
?>
<tr>
<td align="right" class="left"><?php echo translate("Betreff:"); ?></td>
<td class="right"><input type="text" name="title" size="40" value="<?php echo stripslashes($title); ?>">
</td>
<td> </td>
</tr>
<tr>
<td align="right" valign="top" class="left"><?php echo translate("Dein Eintrag:"); ?>
<br>
<script language="JavaScript">
<!--
function neuesFenster(nr)
{
if (nr==1) link=window.open("code1.php3","link","directories=0,location=0,menubar=0,resizeable=1,scrollbars=0,status=0,toolbar=0,width=650,height=600");
link.focus();
}
//-->
</script>
<?php
if ($pseudocode==1){
?>
<br><br><br><a href="javascript:neuesFenster(1);" onclick="javascript:neuesFenster(1);">BB-Codes</a>
<?php
}
?>
</td>
<td class="right"><textarea rows="5" name="message" cols="40"><?php echo stripslashes($message); ?></textarea></td>
<td> </td>
</tr>
<tr><td colspan="2" align="middle" class="left">
<p align="center">
<input type="submit" VALUE="<?php echo translate("Eintragen"); ?>"></p>
</td>
<td> </td>
</tr>
</table>
</form>
<?php
}
else
{
//Variablen aufbereiten
$name= addslashes($name);
$title = addslashes($title);
$message= addslashes($message);
if ($homepage == "http://" or strlen($homepage)<=7)
{
unset($homepage);
}
if ($error!=1)
{
db_connect($server,$user,$pass,$dbname);
if (getenv(HTTP_CLIENT_IP)){
$ip=getenv(HTTP_CLIENT_IP);
}
else {
$ip=getenv(REMOTE_ADDR);
}
$sql = "REPLACE INTO $table (id,name,email,homepage,title,message,icon,ip) VALUES('$sessionid','$name','$email','$homepage','$title','$message','$icon','$ip')";
$set= mysql_query ($sql);
mysql_close();
echo "<br><h2><center><span class=\"newentry\">".translate("Dein Eintrag wurde aufgenomen")."</span><br><br><a href=\"index.php3?language=$language\" class=\"newentryback\">".translate("Zurück zum Gästebuch")."</a></h2>";
//Admin benachrichtigung
if ($sendmail!="1")
{
if ($debug) echo "<br>Verschicke Mail an Admin<br>";
$subjekt=$table;
$message=stripslashes($name)."\n".$email."\n".stripslashes($title)."\n".stripslashes($message)."\n".$homepage;
if (!$email)
$header= "From: $sendmail
Reply-To: $sendmail";
else
$header= "From: $email
Reply-To: $email";
mail("$sendmail","$subjekt","$message",$header);
}
// Newsletter
if ($newsletter_email!=1 && $newsletter=="1" && strlen($email)>3)
{
$header= "From: $email
Reply-To: $email";
mail("$newsletter_email","$newsletter_subject","$newsletter_message",$header);
if ($debug) echo "<br>Verschicke SubscribeMail an Newsletter<br>Abs: ".$email." ".$header."<br>";
}
}
}
?>
<?php include ("footer.php3"); ?>
}
?>
</td>
</tr>
</table>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Parse error: syntax error, unexpected $end in /var/www/web144/html/EHC-49/06_Gaestebuch/newentry.php3 on line 477
Danke für deine Bemühungen!
mfg iltis