<?
//   XUL Webmail, a web based mailclient
//
//   Copyright (C) 2004 Wouter van Wijk (wvw@dds.nl),
//   based on XUL Channels, Copyright (C) 2003 Tim Broddin
//
//   This program is free software; you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation; either version 2 of the License, or
//   (at your option) any later version.
//
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program; if not, write to the Free Software
//   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//

// session check
session_start();
if (!isset($_SESSION['user']))
{
	header("Location: error.php?ec=2");
	exit;
}
include('settings.php');
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
	font-family: "Courier New", Courier, mono;
	font-size: 90%;

<?
	$id = trim($_GET['id']);
	$mailbox=$_GET['mailbox'];
	if (empty($id)) {
		echo 'background: #fff url(\'icons/bg_header_bottom_left.png\') no-repeat; ';
	}
 ?>}
<?

	if (empty($id)) {
		echo 'h1 {color: white; margin-left: 120px; margin-bottom: 70px;}';
	}
 ?>

-->
</style>
</head>

<body>

 <?
   if (empty($id)) {
   	echo "<h1>$standardtitle</h1>";
	$messagetitle=$_GET['messagetitle'];
	$message=$_GET['message'];
	if(!empty($messagetitle)) {
		echo "<h3>$messagetitle</h3><p>$message</p>";
	}
	echo "<p>Please select a mailbox and a message.</p>";
   } else {
	echo getaMessage($mailbox, $id);
   }
   ?>


</body>
</html>
