<?php
$referer = $_POST['referer'];
if( empty($referer) )
{
	$url = parse_url($_SERVER['HTTP_REFERER']);
	$referer=$url['scheme'] . '://' . $url['host'];
	if( strstr($url['host'],'lemmurg') )
	{
		$referer .= '/~micha';
	}
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
 "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html;">
   <meta name="Author" content="Michael Werle">
   <meta name="KeyWords" content="Micha,Michael Werle,Guestbook">
   <meta name="GENERATOR" content="vim">
   <title>Micha's Guestbook</title>
</head>
<BODY text="#33FF77" bgcolor="#000000" link="#FFFF00" vlink="#dd9900" alink="#FF0000" nosave>

<table border="0" cellspacing="0" width="100%" height="100%">

<!------------------------------------------------------------------------->
<!-- Page header -->
<tr>
 <td bgcolor="#000022">
  <center>
   <a href="<?php echo $referer; ?>/index.html"><img src="<?php echo $referer; ?>/MW_Logo_Round_64x64.png"
      width="64" height="64" alt="MW" border="0"></a>
  </center>
 </td>
 <td bgcolor="#000022">
  <center><a name="top"><h1>Micha's Guestbook</h1></a></center>
  <font face="arial" size="-1">
   <a href="<?php echo $referer; ?>/index.html">Home</a> -&gt; Guestbook
  </font>
 </td>
</tr>

<!------------------------------------------------------------------------->
<!-- Page index -->
<tr>
 <td bgcolor="#000022" valign="top">
  <hr width="100%">
  <center>Index</center>
  <hr width="80%">
      <a href="#guestbook">Guestbook</a>
  <br><a href="#tech">Technical&nbsp;Stuff</a>
  <hr width="100%">
 </td>

<!------------------------------------------------------------------------->
<!-- Page contents -->
<td background="<?php echo $referer; ?>/starback.gif">

<p>
Well, I've done it - finally decided to build my own little Guestbook
and here is the result!
</p>
<p>
<b>Warning:</b><br>
I am not responsible for the content on this page. Furthermore, clicking
on any [Email] or [Homepage] links is done at your own risk!
</p>

<!-- Guestbook -->
<?php
  $EditPage="NewGuest.php";
  $DisplayPage="index.php";
  $ProcessingPage="index.php";
  $highlight="#000022";
  include('guestbook.php');
?>
<!-- End Guestbook -->

<a name="tech"><h2>Technical Bits</h2></a>
<p>
The guestbook consists of a very small <a href="http://www.php.net/">PHP</a>
program and stores its data in a <a href="http://www.mysql.com/">
MySQL</a> database.  If anybody is interested in the source, please
email me, but believe me there's nothing special about it!
<P>
<p>
As of Dec 2010, I've had to protect the guestbook as some bleephole decided
it would be fun to try and hack my server through it.
</p>
<p>
All entries are displayed in &lt;pre&gt; tags - feel free to upload some
ASCII art!
</p>
<A HREF="#Top">Top</A>
</P>

<!-- End page contents -->
</td></tr>

<!------------------------------------------------------------------------->
<!-- Page footer -->
<tr>
 <a name="bottom"></a>
 <td bgcolor="#000022">
  <center>
   <a href="<?php echo $referer; ?>/index.html"><img src="<?php echo $referer; ?>/MW_Logo_Round_64x64.png"
      width="64" height="64" alt="MW" border="0"></a>
  </center>
 </td>
 <td bgcolor="#000022">
  <address>
   <img SRC="<?php echo $referer; ?>/mailani.gif" ALT="Mail" NOSAVE BORDER="0"
    height="52" width="45" align="LEFT">
   You can contact Micha
   <a href="http://www.lemmurg.com/~micha/Contact/index.php">here</a>.
   <BR>
   This page hosted by <A HREF="http://www.lemmurg.com/">Lemmurg.com</A>.
   <BR>
   Last updated: 2010.12.03
  </address>
 </td>
</tr>
<!-- End page footer -->

</table>

</body>
</html>
