<?php

// mail.php - PHProjekt Version 5.0
// copyright  ©  2000-2004 Albrecht Guenther  ag@phprojekt.com
// www.phprojekt.com
// Author: Albrecht Guenther, $auth$
// $Id: mail.php,v 1.16 2005/06/20 14:49:08 paolo Exp $

$module = 'mail';
$contextmenu = 1;

$path_pre = '../';
$include_path = $path_pre.'lib/lib.inc.php';
include_once $include_path;

$_SESSION['common']['module'] = 'mail';

require_once($path_pre.'lib/dbman_lib.inc.php');

if (!$mode) $mode = 'view';
else        $mode = xss($mode);

$action = xss($action);

$ID = (int) $ID;

// no full mail client installed? -> only send mail possible
if (PHPR_QUICKMAIL == 1 and !$action) $mode = 'send_form';

if ($mode=='send_form') $js_inc[] = "src='../lib/fckeditor.js'>";
$output = '';
echo set_page_header();

require_once($path_pre.'lib/dbman_lib.inc.php');
//include the navigation
include_once($path_pre.'lib/navigation.inc.php');
//now the actual content
echo '<div class="outer_content">';
echo '<div class="content">';
if ($mode=='view' or $mode=='forms') $fields = build_array('mail_client', $ID, $mode);
else if ($mode=='data')              $fields = build_array('mail_client', $ID, 'forms');

//print_r($field);
include_once('./mail_'.$mode.'.php');
echo '</div>';
echo '</div>';
echo "\n</body>\n</html>\n";

?>
