PHP-Code:
<?php
include("login.php");
if (@$submit){
$DatenOK = "1";
$error = "";
if ($name == ""){
$DatenOK = 0;
}
if ($eintrag == ""){
$DatenOK = 0;
}
if ($DatenOK){
echo mysql_error();
$sql = mysql_query("INSERT INTO `guestbook` (`Autor`, `Mail`, `Eintrag`, `Datum` , `Homepage`) VALUES ('".$name."', '".$mail."', '".$eintrag."', NOW() , '".$hp."')");
echo $sql;
echo '<META HTTP-EQUIV="Refresh" CONTENT="0;URL=index.php?include=eintrag">';
}
if($DatenOK == "0") {
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=index.php?include=error.html\">";
}
}
?>
<html>
<head>
<style type="text/css">
a:link { font-weight:bold; color:#FFFFFF; text-decoration:none }
a:visited { font-weight:bold; color:#FFFFFF; text-decoration:none }
a:hover { font-weight:bold; color:#FF0000; text-decoration:none }
a:active { font-weight:bold; color:#FF0000; text-decoration:underline }
a:focus { font-weight:bold; color:#FF0000; text-decoration:underline }
</style>
<meta http-equiv="expires" content="0">
<meta http-equiv="Refresh" content="" url="forums.html" >
<meta http-equiv="cache-control" content="no-cache">
<style type="text/css">
<!--
.Button
{ background-color:#00007F; color:#FFFFFF; width:500px; border:4px outrun; border-color:#4F4F4F}
.text
{ background-color:#00007F; color:#FFFFFF; border:4px outrun #00005F; }
.normal
{ background-color:#00007F; color:#FFFFFF; border:4px outrun #00005F; }
-->
</style>
<title>TEAMKILLAZ GUESTBOOK</title>
</head>
<body background="../guestbook/image/acacac.jpg" style="margin:4px 4px 0px 4px">
<table width="100%" style="padding:0px;margin-bottom:2px;" border="0" cellspacing="0" cellpadding="0" marignwidth="0" marignheight="0">
<tr>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/links_obenw.gif);width:7px;height:6px" width="7" height="6"></td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/obenw.gif);width:16px;height:3px" width="16" height="3"></td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/rechts_obenw.gif);width:7px;height:6px" width="7" height="6"> </td>
</tr>
<tr>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/linksw.gif);width:7px" width="7"></td>
<td style="background:#FFFFFF" align="center">
<div align="center">[b][url]WWW.TEAMKILLAZ.DE[/url] GUESTBOOK - EINTRAG[/b]</div>
</td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/rechtsw.gif);width:7px" width="7"></td>
</tr>
<tr>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/links_untenw.gif);width:7px;height:16px" width="7" height="16"></td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/untenw.gif);width:16px;height:3px" width="16" height="3"></td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/rechts_untenw.gif);width:7px;height:16px" width="7" height="16"></td>
</tr>
</table>
<?PHP
if(@$include == "eintrag") {
}
elseif(@$include == "") {
include("eintragbutton.html");
}
else {
include($include);
}
?>
<table width="100%" style="padding:0px;margin-bottom:2px;marign-top:0px" border="0" cellspacing="0" cellpadding="0" marignwidth="0" marignheight="0">
<tr>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/links_obenw.gif);width:7px;height:6px" width="7" height="6"></td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/obenw.gif);width:16px;height:3px" width="16" height="3"></td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/rechts_obenw.gif);width:7px;height:6px" width="7" height="6"> </td>
</tr>
<tr>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/linksw.gif);width:7px" width="7"></td>
<td style="background:#FFFFFF" align="center" width="100%">
<?php
$res = mysql_query('SELECT * FROM `guestbook` ORDER BY `Datum` DESC');
echo mysql_error();
while ($row = mysql_fetch_array($res)){
echo "<div align=\"center\">";
echo "<table width=\"950px\" style=\"margin:5px;table-layout:fixed\" border=\"1\" bgcolor=\"#3F3F3F\" bordercolor=\"#000000\" width=\"100%\" height=\"10px\">";
echo "<tr><td bgcolor=\"#AFAFAF\">Name:</td>";
echo "<td bgcolor=\"#FFFFFF\">";
if( $row['Admin'] == "1") {
echo "<font color=\"#800080\">[b]";
}
echo $row['Autor'];
if($row['Admin'] == "1") {
echo "</font>";
}
echo "[/b]</td></tr>";
echo "<tr><td bgcolor=\"#AFAFAF\">Datum:</td><td bgcolor=\"#FFFFFF\">".$row['Datum']."</td></tr>";
if($row['Mail'] == "") {
}
else {
echo "<tr><td bgcolor=\"#AFAFAF\">Mail:</td><td bgcolor=\"#FFFFFF\">";
if( $row['Admin'] == "1") {
echo "<font color=\"#800080\">[b]";
}
echo $row['Mail'];
if($row['Admin'] == "1") {
echo "</font>";
}
echo "</td></tr>";
}
if($row['Homepage'] == "") {
}
else {
echo "<tr><td bgcolor=\"#AFAFAF\">Homepage:</td><td bgcolor=\"#FFFFFF\">";
if( $row['Admin'] == "1") {
echo "<font color=\"#800080\">[b]";
}
echo $row['Homepage'];
if($row['Admin'] == "1") {
echo "</font>";
}
echo "</td></tr>";
}
printf("<td bgcolor=\"#E8E8E8\" align=\"center\" colspan=\"2\">[b]
%s
[/b]</td>",nl2br(htmlentities($row["Eintrag"])));
echo "</table>";
echo "</div>";
}
?>
</td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/rechtsw.gif);width:7px" width="7"></td>
</tr>
<tr>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/links_untenw.gif);width:7px;height:16px" width="7" height="16"></td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/untenw.gif);width:16px;height:3px" width="16" height="3"></td>
<td style="BACKGROUND-IMAGE:url(../guestbook/image/rechts_untenw.gif);width:7px;height:16px" width="7" height="16"></td>
</tr>
</table>
<?PHP
if(@$include == "eintrag") {
}
elseif(@$include == "") {
include("eintragbutton.html");
}
?>
<div align="center">© by [email="joedoe.asd.q@gmx.de"]JoeDoe[/email]</div>
</body>
</html>
Also so ist das Normale Script.