<?php

if (!isset($_GET['key']))
{
  header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
?>
<html>
<head>
  <title>StickyLinks: A URL shortener with web-history support</title>
  <link rel="stylesheet" href="styles.css" type="text/css" media="all" />
  <link href='favicon.ico' rel='icon' type='image/vnd.microsoft.icon' />
</head>

<body class="main">
<div style="text-align:center; ">
  <h2 class="heading">Sorry, but the URL you specified seems to be malformed</h2>

  <p>You could create your own sticky or browse already created ones 
     <a href="index.php">here</a>
  </p>

</div>
</body>
</html>

<?php
}
else
{
	$key = $_GET['key'];
?>
<html>
<head>
  <title>StickyLinks</title>
  <link href='favicon.ico' rel='icon' type='image/vnd.microsoft.icon' />
</head>
<frameset rows="6%, *" border="0">
  <frame src="historyheader.php?key=<?php echo $key; ?>">
  <frame src="pagedata.php/?key=<?php echo $key; ?>">
</frameset>
</html>

<?php
}
?>
