#include <infodrom.style>
#include <linux.style>

<page title="Upcoming Events Calendar">

<h1 align=center>Upcoming Events Calendar</h1>

<?
  if ((strlen ($_POST['email']) > 0)
    &&(strlen ($_POST['name']) > 0)
    &&(strlen ($_POST['event']) > 0)
    &&(strlen ($_POST['date']) > 0)
    &&(strlen ($_POST['url']) > 0)) {

    $header = "From: $_POST['name'] <$_POST['email']>";
    $header = strtr($header, "\015\012", '  ');
    $header .= "\r\n" . 'Content-Type: text/plain; charset="ISO-9959-1"';
<protect>
    $body = "Event      : " . $_POST['event'] . "\n"
           ."Date       : " . $_POST['date'] . "\n"
           ."City       : " . $_POST['city'] . "\n"
           ."Country    : " . $_POST['country'] . "\n"
           ."URL        : " . $_POST['url'] . "\n"
	   ."Description: " . $_POST['description'] . "\n"
	   ."\n"
	   ."HTTP_USER_AGENT: " . $_SERVER['HTTP_USER_AGENT'] . "\n"
	   ."REMOTE_ADDR    : " . $_SERVER['REMOTE_ADDR'] . "\n"
	   ."SCRIPT_URI     : " . $_SERVER['SCRIPT_URI'] . "\n";
</protect>
    mail ("joey@infodrom.org", "New event", $body, $header);
    echo ("<p>Thanks for the note.</p><p>It'll be procesdsed soon.</p>");	
  } else {
    echo ("<p><b>You haven't completed the form.</b></p><p>Please go back and fill out all fields.</p>");
  }
?>

<p>Download <a href="calendar.ics">iCal</a> or <a href="calendar.rdf">RSS</a> calendar file.</p>

</page>

# Local variables:
# mode: indented-text
# mode: auto-fill
# end:
