<?php 
	if ( strlen($_SERVER['HTTPS']) == 0 && strlen($_SERVER['QUERY_STRING']) == 0 ) {
		echo "<div id=\"sslhinweis\">Benutze doch HTTPS! -&gt; ";
		echo "<a href=\"https://{$_SERVER['SERVER_NAME']}/\">https://{$_SERVER['SERVER_NAME']}</a></div>";

	}	

$result = $db->query("SELECT * FROM pastebin WHERE pub = 1");

if($db->num_rows($result))
{
  echo "<br/><br/><hr/><p>letzte &ouml;ffentliche Ascii-Eintr&auml;ge:</p>";
}

while($row = $db->fetch_assoc($result) )
{
  echo "<a href=\"/a/{$row['pid']}\" target=\"_blank\">";
  echo "{$row['id']} von ".date("d.m.Y H:i:s",$row['timest']) . "</a><br/>";
}


?>

  </body>
</html>