<?php
/* fortune.php */

//Configuration Stuff
$title='Fortune Cookies';
$webmaster='webmaster@wiberg.nu';

//*********************** Main ***********************
print_header($title);

global $target,$type,$REMOTE_ADDR,$output;

ping($target);

print_footer($webmaster);

//**************** Print Header *****************
function print_header($title)
{
  global $REMOTE_ADDR;
  include("../templates/header.php");
  print "<p><b><a href=\"/\">wiberg.nu</a> -> <a href=\"/pastime/\">pastime</a> -> fortune</b></p>";
  print "<h1>".$title."</h1>";
  print "<hr /><br />";
  print "<pre>";
}
//**************** Print Footer *****************
function print_footer($webmaster)
{
  print "</pre>";
  include("../templates/footer.php");
}
//********************* ping ***********************
function ping($target)
{
$command='/usr/games/fortune -a';

if (!system($command)) {
   print("Error!");
	}
}
?>
