Verdammt ich bekomme den Eintrag ins Script nicht hin!

Hier werden Probleme rund um das Zahlen Captcha behandelt

Moderator: frameguard

Verdammt ich bekomme den Eintrag ins Script nicht hin!

Beitragvon iltis » 23.05.2007, 16:24

Hallo,

ich bekomme den Eintrag zu der Captcha in mein Gästebuch einfach nicht hin. Beim parsen kommt imer:

Parse error: syntax error, unexpected '<' in /.../06_Gaestebuch/index.php3 on line 202

Mein Quelltextauszug sieht mit Eintrag so aus:



<?php
session_start();
if(isset($_SESSION['captcha_spam']) AND $_POST["sicherheitscode"] == $_SESSION['captcha_spam']){
unset($_SESSION['captcha_spam']);

<?php
$PathToAdminDir="intern/";
require ($PathToAdminDir."config.php3");
require ($PathToAdminDir."functions.php3");
db_connect($server,$user,$pass,$dbname);
include ("header.php3");
if (!$sessionid) $sessionid=sessionid();
?>

<?php
$sql = "select Count(*) as c from $table";
$set = mysql_query($sql);
if (!$set)
{
echo mysql_error().translate("\n<br>Fehler in der Abfrage (eventuell: Tabelle nicht vorhanden)");
}
$erg=mysql_fetch_object($set); //Anzahl Eintr&auml;ge
$count=$erg->c;
if ($count>0)
{
if ($start<2) $start=0;

$sql = "select * from $table order by time desc LIMIT $start,$mrp";
$set = mysql_query ($sql);
?>
<table width=100% border=0 cellspacing=1 cellpadding=7 summary="">
<tr>


</tr>
<tr>
<td class="author" width=120><?php echo translate("Verfasser"); ?></td>
<td class="entry" width=400>

<?php

echo translate("Eintr&auml;ge")."&nbsp;".($start+1)."&nbsp;-&nbsp;";
if (($start+$mrp)>$count) echo $count; else echo ($start+$mrp);
echo "&nbsp;".translate("&nbsp;von&nbsp;")."&nbsp;".$count."<br>";

// Vorherige Seite | Zum Anfang | N&auml;chste Seite
if ($navigation=="2" or $navigation=="3")
{
if ($start>=$mrp) echo "<a href=\"index.php3?language=".$language."&start=".($start-$mrp)."\">";
echo translate("Vorherige&nbsp;Seite");
if ($start>=$mrp) echo "</a>";
echo translate("&nbsp;|&nbsp;");
if ($start>2) echo "<a href=\"index.php3?language=".$language."&start=0\">";
echo translate("Zum&nbsp;Anfang");
if ($start>2) echo "</a>";
echo translate("&nbsp;|&nbsp;");
if (($start+$mrp)<$count) echo "<a href=\"index.php3?language=".$language."&start=".($start+$mrp)."\">";
echo translate("N&auml;chste&nbsp;Seite");
if (($start+$mrp)<$count) echo "</a>";

echo translate("&nbsp");

echo "<a href=\"newentry.php3?sessionid=".$sessionid."&language=".$language."\">".translate("Eintrag&nbsp;hinzuf&uuml;gen")."</a>";
}

?>

</td>

</tr>
<?php
while ($erg=mysql_fetch_object($set))
{
//Ausgabe

$time2=substr($erg->time,m);
//=substr($erg->time,8,2)."-".substr($erg->time,6,2)."-".substr($erg->time,0,4).",".substr($erg->time,11,2).":".
?>
<tr>
<td rowspan=2 valign="top" class="name">

<table border=0 cellspacing=0 cellpadding=0 summary="">
<tr>
<td valign="top"><?php if (strlen($erg->icon)>3) {?><img src="icons/<?php echo $erg->icon; ?>" border=0><?php } ?></td>
<td class="name"><?php echo htmlentities(stripslashes($erg->name)); ?></td>
</tr>
<tr>
<td colspan=2 >

<?php
if ($erg->homepage)
{
echo "<a href=\"".$erg->homepage."\"";
if ($target==1) echo "target=\"_blank\"";
echo "><img src=\"homepage.gif\" border=\"0\" alt=\"Homepage von ".$erg->name."\"></a>&nbsp;";
}
if ($erg->email)echo "<a href=\"mailto:".$erg->email."\"><img src=\"email.gif\" border=\"0\" alt=\"Email an ".$erg->name." schreiben\"></a>";
?>
&nbsp;
<br><span class="time"><?php echo $time2; ?></span>
<?php if ($show_ip) echo "<br><span class=\"time\">".$erg->ip."</span>"; ?>
</td>
</tr>
</table>



</td>

</tr>
<tr><td class="message">
<?php
echo translate("Titel:&nbsp;");
echo htmlentities(stripslashes( $erg->title)); ?>
<hr noshade size="1"><br><br>
<?php
$message=$erg->message;

if ($allowhtml==1) $message=nl2br(stripslashes($message));
else $message=nl2br(htmlentities(stripslashes($message)));
if ($pseudocode==1)$message=pseudocode($message,"icons");
$message=str_replace("[kommentar]"," ".$komtagsopen,$message);
$message=str_replace("[/kommentar]",$komtagsclose." ",$message);
$message=strmaxwordlen($message,$max_wordlength);
echo $message; ?></td></tr>

<?php
}

?>
<tr>
<td class="author">
<?php
//echo "<a href=\"newentry.php3?sessionid=".$sessionid."&language=".$language."\">".translate("Eintrag&nbsp;hinzuf&uuml;gen")."</a>";

echo "</td><td class=\"author\">";
echo translate("Eintr&auml;ge")."&nbsp;".($start+1)."&nbsp;-&nbsp;";
if (($start+$mrp)>$count) echo $count; else echo ($start+$mrp);
echo "&nbsp;".translate("&nbsp;von&nbsp;")."&nbsp;".$count."<br>";

// Vorherige Seite | Zum Anfang | N&auml;chste Seite
if ($navigation=="1" or $navigation=="3")
{
if ($start>=$mrp) echo "<a href=\"index.php3?language=".$language."&start=".($start-$mrp)."\">";
echo translate("Vorherige&nbsp;Seite");
if ($start>=$mrp) echo "</a>";
echo translate("&nbsp;|&nbsp;");
if ($start>2) echo "<a href=\"index.php3?language=".$language."&start=0\">";
echo translate("Zum&nbsp;Anfang");
if ($start>2) echo "</a>";
echo translate("&nbsp;|&nbsp;");
if (($start+$mrp)<$count) echo "<a href=\"index.php3?language=".$language."&start=".($start+$mrp)."\">";
echo translate("N&auml;chste&nbsp;Seite");
if (($start+$mrp)<$count) echo "</a>";
} // end if ($navigation=="1" or $navigation=="3")

?>
</td>
</tr>
</table>
<?php
}
else {
echo translate("Keine Eintr&auml;ge vorhanden<br>");
echo "<b><a href=\"newentry.php3?sessionid=".$sessionid."&language=".$language."\">".translate("Eintrag&nbsp;hinzuf&uuml;gen")."</a></b><br>";
}
if ($reg_code!=md5($reg_name))
{
?>

<?php
} // END if ($reg_code!=md5($reg_name))
mysql_close();
?>
<?php include ("footer.php3"); ?>

<br><br>
</td>
</tr>

}
?>



Ist der Eintrag an der falschen Stelle?

Bitte um Hilfe

danke[/b]
iltis
 
Beiträge: 3
Registriert: 23.05.2007, 16:16

Beitragvon garfield » 29.05.2007, 22:01

Hallo iltis,

hab deinen Code gerade mal überflogen... konnte aber auf den ersten Blick nichts finden.

Wäre hilfreich wenn du den gesamten Quelltext mal postest, oder aber die Stelle wo der Fehler auftaucht mal markieren würdest... am besten mit Schriftfarbe Rot oder so.

Hab auch mal versucht, die Zeilen zu zählen... sind aber keine 200 :-)

MfG
garfield
garfield
 
Beiträge: 4
Registriert: 29.05.2007, 21:45

Beitragvon iltis » 30.05.2007, 10:38

Hallo vielen Dank für die Antwort:

Also ich bin absoluter Neuling was HTML betrifft, daher auch der umständliche Quelltext^^
Hier ist der komplette Text mit dem Einbau (das ist die Datei des Neueintrags beim Gästebuch):

<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
session_start();
if(isset($_SESSION['captcha_spam']) AND $_POST["sicherheitscode"] == $_SESSION['captcha_spam']){
unset($_SESSION['captcha_spam']);


<?php

$PathToAdminDir="intern/";
require ($PathToAdminDir."config.php3");
require ($PathToAdminDir."functions.php3");
db_connect($server,$user,$pass,$dbname);
include ("header.php3");
if (!$sessionid) $sessionid=sessionid();
?>

<?php
$sql = "select Count(*) as c from $table";
$set = mysql_query($sql);
if (!$set)
{
echo mysql_error().translate("\n<br>Fehler in der Abfrage (eventuell: Tabelle nicht vorhanden)");
}
$erg=mysql_fetch_object($set); //Anzahl Eintr&auml;ge
$count=$erg->c;
if ($count>0)
{
if ($start<2) $start=0;

$sql = "select * from $table order by time desc LIMIT $start,$mrp";
$set = mysql_query ($sql);
?>
<table width=100% border=0 cellspacing=1 cellpadding=7 summary="">
<tr>


</tr>
<tr>
<td class="author" width=120><?php echo translate("Verfasser"); ?></td>
<td class="entry" width=400>

<?php

echo translate("Eintr&auml;ge")."&nbsp;".($start+1)."&nbsp;-&nbsp;";
if (($start+$mrp)>$count) echo $count; else echo ($start+$mrp);
echo "&nbsp;".translate("&nbsp;von&nbsp;")."&nbsp;".$count."<br>";

// Vorherige Seite | Zum Anfang | N&auml;chste Seite
if ($navigation=="2" or $navigation=="3")
{
if ($start>=$mrp) echo "<a href=\"index.php3?language=".$language."&start=".($start-$mrp)."\">";
echo translate("Vorherige&nbsp;Seite");
if ($start>=$mrp) echo "</a>";
echo translate("&nbsp;|&nbsp;");
if ($start>2) echo "<a href=\"index.php3?language=".$language."&start=0\">";
echo translate("Zum&nbsp;Anfang");
if ($start>2) echo "</a>";
echo translate("&nbsp;|&nbsp;");
if (($start+$mrp)<$count) echo "<a href=\"index.php3?language=".$language."&start=".($start+$mrp)."\">";
echo translate("N&auml;chste&nbsp;Seite");
if (($start+$mrp)<$count) echo "</a>";

echo translate("&nbsp");

echo "<a href=\"newentry.php3?sessionid=".$sessionid."&language=".$language."\">".translate("Eintrag&nbsp;hinzuf&uuml;gen")."</a>";
}

?>

</td>

</tr>
<?php
while ($erg=mysql_fetch_object($set))
{
//Ausgabe

$time2=substr($erg->time,m);
//=substr($erg->time,8,2)."-".substr($erg->time,6,2)."-".substr($erg->time,0,4).",".substr($erg->time,11,2).":".
?>
<tr>
<td rowspan=2 valign="top" class="name">

<table border=0 cellspacing=0 cellpadding=0 summary="">
<tr>
<td valign="top"><?php if (strlen($erg->icon)>3) {?><img src="icons/<?php echo $erg->icon; ?>" border=0><?php } ?></td>
<td class="name"><?php echo htmlentities(stripslashes($erg->name)); ?></td>
</tr>
<tr>
<td colspan=2 >

<?php
if ($erg->homepage)
{
echo "<a href=\"".$erg->homepage."\"";
if ($target==1) echo "target=\"_blank\"";
echo "><img src=\"homepage.gif\" border=\"0\" alt=\"Homepage von ".$erg->name."\"></a>&nbsp;";
}
if ($erg->email)echo "<a href=\"mailto:".$erg->email."\"><img src=\"email.gif\" border=\"0\" alt=\"Email an ".$erg->name." schreiben\"></a>";
?>
&nbsp;
<br><span class="time"><?php echo $time2; ?></span>
<?php if ($show_ip) echo "<br><span class=\"time\">".$erg->ip."</span>"; ?>
</td>
</tr>
</table>



</td>

</tr>
<tr><td class="message">
<?php
echo translate("Titel:&nbsp;");
echo htmlentities(stripslashes( $erg->title)); ?>
<hr noshade size="1"><br><br>
<?php
$message=$erg->message;

if ($allowhtml==1) $message=nl2br(stripslashes($message));
else $message=nl2br(htmlentities(stripslashes($message)));
if ($pseudocode==1)$message=pseudocode($message,"icons");
$message=str_replace("[kommentar]"," ".$komtagsopen,$message);
$message=str_replace("[/kommentar]",$komtagsclose." ",$message);
$message=strmaxwordlen($message,$max_wordlength);
echo $message; ?></td></tr>

<?php
}

?>
<tr>
<td class="author">
<?php
//echo "<a href=\"newentry.php3?sessionid=".$sessionid."&language=".$language."\">".translate("Eintrag&nbsp;hinzuf&uuml;gen")."</a>";

echo "</td><td class=\"author\">";
echo translate("Eintr&auml;ge")."&nbsp;".($start+1)."&nbsp;-&nbsp;";
if (($start+$mrp)>$count) echo $count; else echo ($start+$mrp);
echo "&nbsp;".translate("&nbsp;von&nbsp;")."&nbsp;".$count."<br>";

// Vorherige Seite | Zum Anfang | N&auml;chste Seite
if ($navigation=="1" or $navigation=="3")
{
if ($start>=$mrp) echo "<a href=\"index.php3?language=".$language."&start=".($start-$mrp)."\">";
echo translate("Vorherige&nbsp;Seite");
if ($start>=$mrp) echo "</a>";
echo translate("&nbsp;|&nbsp;");
if ($start>2) echo "<a href=\"index.php3?language=".$language."&start=0\">";
echo translate("Zum&nbsp;Anfang");
if ($start>2) echo "</a>";
echo translate("&nbsp;|&nbsp;");
if (($start+$mrp)<$count) echo "<a href=\"index.php3?language=".$language."&start=".($start+$mrp)."\">";
echo translate("N&auml;chste&nbsp;Seite");
if (($start+$mrp)<$count) echo "</a>";
} // end if ($navigation=="1" or $navigation=="3")

?>
</td>
</tr>
</table>
<?php
}
else {
echo translate("Keine Eintr&auml;ge vorhanden<br>");
echo "<b><a href=\"newentry.php3?sessionid=".$sessionid."&language=".$language."\">".translate("Eintrag&nbsp;hinzuf&uuml;gen")."</a></b><br>";
}
if ($reg_code!=md5($reg_name))
{
?>

<?php
} // END if ($reg_code!=md5($reg_name))
mysql_close();
?>
<?php include ("footer.php3"); ?>

<br><br>
</td>
</tr>

}
?>


</td>
</tr>
</table>


</tr>

</table>
</td>

</tr>
</table>
</body>
</html>


Fehlermeldung: Parse error: syntax error, unexpected '<' in /var/www/web144/html/EHC-49/06_Gaestebuch/newentry.php3 on line 194


Rot ist die Fehlermeldungdszeile...praktisch die direkt nach dem Einschub

Vielen Dank
iltis
 
Beiträge: 3
Registriert: 23.05.2007, 16:16

Beitragvon garfield » 30.05.2007, 16:47

Und da ist auch schon der Fehler...

die rote Zeile <?php kannst du einfach entfernen. Das <php macht dem Server nur kenntlich, das ab dieser Stelle PHP-Code folgt. Und zwar so lange, bis diese "Klammer" mit einem ?> geschlossen wird. Da aber direkt darüber sowieso PHP-Code steht, wird das als Fehler erkannt.

Und dann solltest du auch die Zeile
session_start();

(5 Zeilen über der roten) dort rauslöschen und in der Form
<?php session_start();?>

Als allererste Zeile (noch vor dem <html>) einbinden. Sonst würdes du wieder eine Fehlermeldung bekommen.

Hoffe, das hilft weiter.

Sollten noch weitere Probleme auftauchen, einfach wieder hier melden :-)

MfG
garfield
garfield
 
Beiträge: 4
Registriert: 29.05.2007, 21:45

Beitragvon 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 &uuml;berpr&uuml;fen
{
if (strlen($email)>=1)
if (!check_email($email)) //Irgendwas in Email getippt
{
echo translate("Fehler: Emailadresse ung&uuml;ltig");
$filled=0;

}
if (strlen($homepage)>7)
{
if (!check_url($homepage))
{
echo translate("Ung&uuml;ltige URL");
$filled=0;
}
}
if ($name == "" or $message =="" or $title=="")
{
echo translate("Name, Titel und Nachricht sind Pflichtfelder");
$filled=0;
}

// Ende Eingabe pr&uuml;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%>&nbsp;</th>
</tr>
<tr>
<?php
$name=stripslashes($name);
$name=str_replace("\"","&quot;","$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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</td>
</tr>
<?php }
$title=stripslashes($title);
$title=str_replace("\"","&quot;","$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>&nbsp;</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>&nbsp;</td>
</tr>
<tr><td colspan="2" align="middle" class="left">
<p align="center">
<input type="submit" VALUE="<?php echo translate("Eintragen"); ?>"></p>
</td>
<td>&nbsp;</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&uuml;ck zum G&auml;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
iltis
 
Beiträge: 3
Registriert: 23.05.2007, 16:16


Zurück zu Zahlen Captcha

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste

cron