michael karbrüggen
Threadersteller
Dabei seit: 30.01.2007
Ort: -
Alter: -
Geschlecht:
|
Verfasst Mi 26.09.2007 06:59
Titel
|
|
|
Hier mein derzeitiger Gästebuchcode den ich includiere:
Code: |
<?
/* Guestbook v1.0b Copyright (c) 2001-2002 by Electron
********************************************
* Scripter: Electron *
* E-Mail: electron@electron-net.org.de *
* Homepage: www.electron-net.org *
********************************************
*/
//******************>>EDIT HERE<<***************
$gbfile = "gb.entrys"; // chmod 666 this file!
$backgroundcolor = "black";
$text = "white";
$bordercolor= "#ffffff";
$link = "";
$linkhover = "white";
$gblogo = "";
//******************>>END<<*********************
?>
<html>
<head>
<style type="text/css">
.tdeintraege
{
background-color:#333333;
border:1px solid #ffffff;
}
</style>
<link href="brasserie.css" rel="stylesheet" type="text/css">
</head>
<? echo "<body bgcolor=\"$backgroundcolor\" text=\"$text\">"; ?>
<p>
<?
if (!file_exists("$gbfile")) { echo "ERROR!<p><center>create file $gbfile and chmod 666 the file!<br><br><br><table border=0 width=100%><td bgcolor=gray><center><font face=tahoma size=1>Copyright (c) 2001 by <a href=\"http://www.electron-net.org\" target=_blank>Electron - www.electron-net.org</a></td></table>"; die(); }
$formstyle = "STYLE=\"BORDER: white 1px solid; color:white; background: #333333;\" size=25";
?>
<table width="650" border="0" cellpadding="0" cellspacing="0">
<form action=<?$PHP_SELF?>?add=entry method=post>
<tr>
<td width="440">Ihr Name:<br> <input class="forminput" title="Name" style="width:400" name="name">
<br> <br>
Ihre eMail-Adresse:<br> <input class="forminput" title="email" style="width:400" name="email">
<br> <br>
<img src="captcha/captcha.php" alt="Sicherheitscode" border="0" title="Sicherheitscode"><br>
Captcha - Auf Groß & Kleinschreibung achten.<br>
<input class="forminput" title="Sicherheitscode" style="width:400" name="Sicherheitscode">
<br>
<br>
Ihre Nachricht:<br> <textarea class="forminput" title="Nachricht" type="comment" name="comments" STYLE="overflow:auto; width:400" cols=35 rows=10></textarea>
<br>
<br>
<input name="submit" type=submit title="Absenden" class="forminputbutton" value="Absenden">
<input name="reset" title="Zurücksetzen" type=reset class="forminputbutton" value="Zurücksetzen">
</td>
<td width="210" valign="top"><img src="img/marco_polo.gif" width="210" height="109"><br>
<br>
<input name="button" type="button" class="forminputbutton" title="Impressum" value="Impressum"
onClick="window.open('http://www.kontakt.altstadt-brasserie.de/impress.html','Impressum','width=600,height=500,left=30,top=30,scrollbars=yes')">
<br> <br>
Altstadt Brasserie Werth & Bauer GbR<br>
Heiko Werth, Jens Bauer<br>
Marktstraße 4<br> <br>
Tel: +49 38 39 2 / 23 45 3<br>
Mobil: +49 1 71 / 64 41 14 4 <br> <br>
DE -18546 Sassnitz</td>
</table>
<p><table border=0 cellspacing=0 width=100% height=100%><td valign=top>
<?
$today = getdate();
$month = $today[month];
$mday = $today[mday];
$year = $today[year];
$zeituhr = "$month $mday, $year";
session_start();
if(isset($_SESSION['captcha_spam']) AND $_POST["sicherheitscode"] ==
$_SESSION['captcha_spam']){
unset($_SESSION['captcha_spam']);
if($add == "entry") {
if($name == "" || $comments == "") { echo "<center><u>Bitte geben Sie Ihren Namen und eine Nachricht ein.</u><p>"; }
else
{
if($url == "http://" || $url == "") { $url = "</a>none"; }
if($email == "") { $email = "</a>none";}
$filesize = filesize($gbfile);
$file = fopen("$gbfile","r");
$buffer = fread($file,$filesize);
fclose($file);
$file = fopen("$gbfile","w");
//$parsed_message = strip_tags($comments,"<a>,<i>");
//$comments_br = str_replace("\n","<br>",$parsed_message);
$comments = str_replace("<iframe","<img src=",$comments);
$comments = str_replace("<img src=","<img src=",$comments);
$comments = str_replace("<i>","",$comments);
$comments = str_replace("<meta","<meta",$comments);
$comments = str_replace("<","<",$comments);
$comments = str_replace(">",">",$comments);
$comments = str_replace("|","¦",$comments);
$comments = str_replace("\n","<br>",$comments);
$today = date( "Ymd", time() );
$index = date("YmdHis",time());
$message_table ="$index | $zeituhr | $REMOTE_ADDR | $name | $email | $url | $comments";
fputs($file,"$message_table\n$buffer");
fclose($file);
echo "<center>Eintrag erfolgreich hinzugefügt.<p>";
}
}
}
?>
<?
//gb infos
;
$data = file("$gbfile");
$max = count($data);
$pages = ($max / 10 + 1);
$size = (filesize($gbfile) / 1024);
//if(filesize($gbfile) == 0) { $max = "1"; }
echo "<center>Enträge: $max | Seiten: " . round($pages, 0) . " | Größe: " . round($size, 2) . "kB<p>";
$msg = 5;
$data = file("$gbfile");
rsort ($data);
$max = count($data);
If(!$pg){$pg=0;}
If($pg==0){print("<center>zurück");}
else{$tmp = $pg -1; print("<center><a class=aktuelles style=text-decoration:underline href=\"$PHP_SELF?pg=$tmp\">zurück</a>");}
$tmp = $pg * $msg + $msg;
print(" | ");
if ($max > $tmp){$tmp = $pg +1; print ("<a class=aktuelles style=text-decoration:underline href=\"$PHP_SELF?pg=$tmp\">nächste</a><p>");}
else {print("nächste<p>");}
$start = $pg * $msg;
$end = $pg * $msg + $msg;;
if ($end > $max){$end=$max;}
/*if(filesize($gbfile) == 0) {
print
"<table border=1 width=100% cellspacing=0 cellpadding=0><td>
<table border=0>
<td>Datum:</td><td>$zeituhr</td><tr>
<td>Name:</td><td></td><tr>
<td>E-Mail:</td><td></td><tr>
<td valign=top width=85>Nachricht:</td>
<table border=0 width=100%></td></table></table><p>\n";
}*/
for ($u=$start; $u<$end; $u++)
{
$info = explode("|",$data[$u]);
if($info[7] != "") { $info[7] = "<p><i>Admin:<br>$info[7]</i>"; }
$info[6] = wordwrap( $info[6], 50, "\n", 1);
$info[3] = wordwrap( $info[3], 50, "\n", 1);
$info[4] = wordwrap( $info[4], 50, "\n", 1);
print
"<table width=100% class=tdeintraege cellspacing=0 cellpadding=0><td><table border=0>
<td>Datum:</td><td>$info[1]</td><tr>
<td>Name:</td><td>$info[3]</td><tr>
<td>E-Mail:</td><td><a class=aktuelles style=text-decoration:underline href=\"mailto:$info[4]\">$info[4]</a></td><tr>
<td valign=top width=85>Nachricht:</td><td>$info[6] $info[7]</td>
</td></table></table><p>\n";
}
echo "</td></table>";
?>
</body>
</html>
|
|
|