3 * This file is the 'read mail' page. Logged in users can:
4 * - read the content of a specific message
5 * - view the full headers
6 * - view the original content
7 * - release or delete the viewed message
9 * @author Brian Wong <bwsource@users.sourceforge.net>
10 * @author Samuel Tran <stran2005@users.sourceforge.net>
14 * Copyright (C) 2005 - 2007 MailZu
15 * License: GPL, see LICENSE
18 * Include Template class
20 include_once('lib/Template.class.php');
22 * Include control panel-specific output functions
24 include_once('templates/common.template.php');
26 * Include viewmail template class
28 include_once('templates/viewmail.template.php');
30 * Include MailEngine class
32 include_once('lib/MailEngine.class.php');
34 if (!Auth
::is_logged_in()) {
35 Auth
::print_login_msg(); // Check if user is logged in
38 $t = new Template(translate('Message View'));
40 $t->printHTMLHeader();
44 // Break table into 2 columns, put quick links on left side and all other tables on the right
46 showQuickLinks(); // Print out My Quick Links
47 startDataDisplayCol();
49 $mail_id = CmnFns
::get_mail_id();
50 $content_type = CmnFns
::getGlobalVar('ctype', GET
);
51 $recip_email = CmnFns
::getGlobalVar('recip_email', GET
);
52 $query_string = CmnFns
::querystring_exclude_vars( array('mail_id','recip_email') );
54 $m = new MailEngine($mail_id,$recip_email);
56 if ( ! $m->msg_found
) {
57 CmnFns
::do_error_box(translate('Message Unavailable'));
61 echo '<form name="messages_process_form" action="messagesProcessing.php" method="POST">';
62 echo ' <input type="hidden" name="mail_id_array[]" value="' . $mail_id . '_' . $recip_email . '">';
63 echo ' <input type="hidden" name="query_string" value="' . $query_string . '">';
64 printActionButtons(false);
67 MsgDisplayOptions(CmnFns
::get_mail_id(),$recip_email);
69 MsgDisplayHeaders($m->struct
);
70 // Give a space before the body displays
72 if ( ! $m->msg_error
) {
73 MsgDisplayBody($m->struct
);
75 echo "<p> $m->last_error </p>";
82 $t->printHTMLFooter();