Forking from Mailzu 0.8RC3
This commit is contained in:
102
templates/auth.template.php
Normal file
102
templates/auth.template.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/**
|
||||
* This file provides output functions for all auth pages
|
||||
* No data manipulation is done in this file
|
||||
* @author Nick Korbel <lqqkout13@users.sourceforge.net>
|
||||
* @version 03-04-05
|
||||
* @package Templates
|
||||
*
|
||||
* Copyright (C) 2003 - 2005 phpScheduleIt
|
||||
* License: GPL, see LICENSE
|
||||
*/
|
||||
|
||||
$link = CmnFns::getNewLink(); // Get Link object
|
||||
|
||||
/**
|
||||
* Prints out a login form and any error messages
|
||||
* @param string $msg error messages to display for user
|
||||
* @param string $resume page to resume on after login
|
||||
*/
|
||||
function printLoginForm($msg = '', $resume = '') {
|
||||
global $conf;
|
||||
$link = CmnFns::getNewLink();
|
||||
|
||||
// Check browser information
|
||||
echo '<script language="JavaScript" type="text/javascript">checkBrowser();</script>';
|
||||
|
||||
if (!empty($msg))
|
||||
CmnFns::do_error_box($msg, '', false);
|
||||
?>
|
||||
<form name="login" method="post" action="<?=$_SERVER['PHP_SELF']?>">
|
||||
<table width="350px" border="0" cellspacing="0" cellpadding="1" align="center">
|
||||
<tr>
|
||||
<td bgcolor="#CCCCCC">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||||
<tr bgcolor="#EDEDED">
|
||||
<td colspan="2" style="border-bottom: solid 1px #CCCCCC;">
|
||||
<h5 align="center"><?=translate('Please Log In')?></h5>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td width="150">
|
||||
<p><b><?=translate('Login')?></b></p>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="email" class="textbox" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>
|
||||
<p><b><?=translate('Password')?></b></p>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="password" class="textbox" />
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($conf['auth']['serverType'] === 'exchange') { ?>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>
|
||||
<p><b><?=translate('Domain')?></b></p>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="domain" class="textbox" value="<?=$conf['auth']['exch_domain']?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
if ($conf['app']['selectLanguage']) { ?>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>
|
||||
<p><b><?=translate('Language')?></b></p>
|
||||
</td>
|
||||
<td>
|
||||
<?CmnFns::print_language_pulldown()?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td>
|
||||
<p><b><?=translate('Keep me logged in')?></b></p>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="setCookie" value="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FAFAFA">
|
||||
<td colspan="2" style="border-top: solid 1px #CCCCCC;">
|
||||
<p align="center">
|
||||
<input type="submit" name="login" value="<?=translate('Log In')?>" class="button" />
|
||||
<input type="hidden" name="resume" value="<?=$resume?>" />
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p align="center">
|
||||
<? $link->doLink('javascript: help();', translate('Help'), '', '', translate('Get online help')) ?>
|
||||
</p>
|
||||
</form>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
263
templates/common.template.php
Normal file
263
templates/common.template.php
Normal file
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
/**
|
||||
* This file provides common output functions thar are used by other templates
|
||||
* No data manipulation is done in this file
|
||||
*
|
||||
* Following functions were borrowed from phpScheduleIt Project:
|
||||
* - showQuickLinks()
|
||||
* - printCpanelBr()
|
||||
* - getShowHide()
|
||||
* - getShowHideHeaders()
|
||||
* - startQuickLinksCol()
|
||||
* - startDataDisplayCol()
|
||||
* - endDataDisplayCol()
|
||||
* @author Nick Korbel <lqqkout13@users.sourceforge.net>
|
||||
* @author Adam Moore
|
||||
* @author David Poole <David.Poole@fccc.edu>
|
||||
* @version 04-03-07
|
||||
* @package Templates
|
||||
* Copyright (C) 2003 - 2005 phpScheduleIt
|
||||
*
|
||||
* New functions added for MailZu
|
||||
* @author Samuel Tran <stran2005@users.sourceforge.net>
|
||||
* @author Brian Wong <bwsource@users.sourceforge.net>
|
||||
* @author Nicolas Peyrussie <peyrouz@users.sourceforge.net>
|
||||
* @author Jeremy Fowler <jfowler06@users.sourceforge.net>
|
||||
* Copyright (C) 2005 - 2007 MailZu
|
||||
* License: GPL, see LICENSE
|
||||
*/
|
||||
|
||||
// Get Link object
|
||||
$link = CmnFns::getNewLink();
|
||||
|
||||
/**
|
||||
* Print out a table of links for user or administrator
|
||||
* This function prints out a table of links to
|
||||
* other parts of the system. If the user is an admin,
|
||||
* it will print out links to administrative pages, also
|
||||
* @param none
|
||||
*/
|
||||
function showQuickLinks() {
|
||||
global $conf;
|
||||
global $link;
|
||||
?>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="tableTitle" style="background-color:#0F93DF;">
|
||||
<?=translate('My Quick Links')?>
|
||||
</td>
|
||||
<td class="tableTitle" style="background-color:#0F93DF;"><div align="right">
|
||||
<? $link->doLink("javascript: help('quick_links');", '?', '', 'color: #FFFFFF', translate('Help') . ' - ' . translate('My Quick Links')) ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr style="padding: 5px;" class="cellColor">
|
||||
<td colspan="2">
|
||||
<? echo "Quarantine Summary" == $_SESSION['sessionNav'] ?
|
||||
' <p class="selectedLink"><b>»</b>':
|
||||
" <p><b>›</b>\t";
|
||||
$link->doLink('summary.php', translate('Quarantine Summary')) ?>
|
||||
</p>
|
||||
<? echo "My Quarantine" == $_SESSION['sessionNav'] ?
|
||||
' <p class="selectedLink"><b>»</b>':
|
||||
" <p><b>›</b>\t";
|
||||
$link->doLink('messagesIndex.php?ctype=A', translate('My Quarantine'));
|
||||
echo '</p>';
|
||||
if (! Auth::isMailAdmin()) {
|
||||
echo "My Pending Requests" == $_SESSION['sessionNav'] ?
|
||||
' <p class="selectedLink"><b>»</b>':
|
||||
" <p><b>›</b>\t";
|
||||
$link->doLink('messagesPending.php?ctype=A', translate('My Pending Requests'));
|
||||
echo '</p>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<br>
|
||||
<? if (Auth::isMailAdmin()) {
|
||||
if ($conf['app']['siteSummary']) {
|
||||
echo "Site Quarantine Summary" == $_SESSION['sessionNav'] ?
|
||||
' <p class="selectedLink"><b>»</b>':
|
||||
" <p><b>›</b>\t";
|
||||
$link->doLink('messagesSummary.php', translate('Site Quarantine Summary'));
|
||||
echo '</p>';
|
||||
}
|
||||
|
||||
echo "Site Quarantine" == $_SESSION['sessionNav'] ?
|
||||
' <p class="selectedLink"><b>»</b>':
|
||||
" <p><b>›</b>\t";
|
||||
$link->doLink('messagesAdmin.php?ctype=A&searchOnly='.$conf['app']['searchOnly'], translate('Site Quarantine'));
|
||||
echo '</p>';
|
||||
echo "Site Pending Requests" == $_SESSION['sessionNav'] ?
|
||||
' <p class="selectedLink"><b>»</b>':
|
||||
" <p><b>›</b>\t";
|
||||
$link->doLink('messagesPendingAdmin.php?ctype=A', translate('Site Pending Requests'));
|
||||
echo '</p>';
|
||||
echo '<br>';
|
||||
}
|
||||
if ((! Auth::isMailAdmin()) && ($conf['app']['showEmailAdmin'])) {
|
||||
echo "Email Administrator" == $_SESSION['sessionNav'] ?
|
||||
' <p class="selectedLink"><b>»</b>':
|
||||
" <p><b>›</b>\t";
|
||||
$link->doLink('send_mail.php', translate('Email Administrator'));
|
||||
echo ' </p>';
|
||||
}
|
||||
?>
|
||||
<p><b>›</b>
|
||||
<? $link->doLink('javascript: help();', translate('Help')) ?>
|
||||
</p>
|
||||
<br>
|
||||
<p><b>›</b>
|
||||
<? $link->doLink('index.php?logout=true', translate('Log Out')) ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
/**
|
||||
* Print out break to be used between tables
|
||||
* @param none
|
||||
*/
|
||||
function printCpanelBr() {
|
||||
echo '<p> </p>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the proper expansion type for this table
|
||||
* based on cookie settings
|
||||
* @param string table name of table to check
|
||||
* @return either 'block' or 'none'
|
||||
*/
|
||||
function getShowHide($table) {
|
||||
if (isset($_COOKIE[$table]) && $_COOKIE[$table] == 'show') {
|
||||
return 'block';
|
||||
}
|
||||
else
|
||||
return 'none';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the proper className for the rows of this table
|
||||
* based on cookie settings
|
||||
* @param string table name of table to check
|
||||
* @return 'visible' or 'hidden'
|
||||
*/
|
||||
function getShowHideHeaders($table) {
|
||||
if (isset($_COOKIE[$table]) && $_COOKIE[$table] == 'visible') {
|
||||
return 'visible';
|
||||
} else {
|
||||
return 'hidden';
|
||||
}
|
||||
}
|
||||
|
||||
function startQuickLinksCol() {
|
||||
?>
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:16%; border:solid 2px #0F93DF; background-color:#FFFFFF;">
|
||||
<?
|
||||
}
|
||||
|
||||
function startDataDisplayCol() {
|
||||
?>
|
||||
</td>
|
||||
<td style="padding-left:5px; vertical-align:top;">
|
||||
<?
|
||||
}
|
||||
|
||||
function endDataDisplayCol() {
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
/**
|
||||
* Print 'Release', 'Delete' and 'Delete All' buttons
|
||||
* @param string $content_type: 'S' (default), 'B', ...
|
||||
* @param bool $printDeleteAll: if true (default) print 'Delete All' button
|
||||
*/
|
||||
function printActionButtons( $printDeleteAll = true ) {
|
||||
?>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<?
|
||||
echo "<td align=\"left\"><input type=\"submit\" class=\"button\" name=\"action\" value=\"";
|
||||
if ($_SESSION['sessionNav'] == "My Pending Requests") {
|
||||
echo ( Auth::isMailAdmin() ? translate('Release') : translate('Cancel Request') );
|
||||
|
||||
} else {
|
||||
echo ( Auth::isMailAdmin() ? translate('Release') : translate('Release/Request release') );
|
||||
}
|
||||
echo "\"></td>";
|
||||
?>
|
||||
<td align="right"><input type="submit" class="button" name="action" value="<? echo translate('Delete'); ?>">
|
||||
<? if ( $printDeleteAll )
|
||||
echo "<input type=\"submit\" class=\"button\" name=\"action\" value=\"".translate('Delete All')."\">";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
/**
|
||||
* Print 'Send Error Report' buttons
|
||||
* @param string $query_string
|
||||
* @param array $error_array
|
||||
*/
|
||||
function printReportButtons( $query_string, $error_array, $process_action ) {
|
||||
|
||||
$serialized_error_array = urlencode(serialize($error_array));
|
||||
?>
|
||||
<form name="error_report_form" action="sendErrorReport.php" method="POST">
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<input type="hidden" name="query_string" value="<? echo $query_string; ?> ">
|
||||
<input type="hidden" name="serialized_error_array" value="<? echo $serialized_error_array; ?>">
|
||||
<input type="hidden" name="process_action" value="<? echo $process_action ;?>">
|
||||
<td><center>
|
||||
<input type="submit" class="button" name="action" value="<? echo translate('Send report and go back'); ?>">
|
||||
<input type="submit" class="button" name="action" value="<? echo translate('Go back'); ?>">
|
||||
</center></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?
|
||||
}
|
||||
|
||||
/**
|
||||
* Print Message and flushes the output buffer.
|
||||
*/
|
||||
|
||||
function printMessage($message) {
|
||||
$id = urlencode($message);
|
||||
?>
|
||||
<div align="center" id="<? echo $id; ?>" style="display:block;">
|
||||
<H4><? echo $message; ?></H4>
|
||||
</div>
|
||||
<?
|
||||
ob_flush();
|
||||
flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides Message crested with printMessage and flushes the output buffer.
|
||||
*/
|
||||
function hideMessage($message) {
|
||||
$id = urlencode($message);
|
||||
echo "<script> document.getElementById('$id').style.display='none'; </script>";
|
||||
ob_flush();
|
||||
flush();
|
||||
}
|
||||
?>
|
||||
0
templates/index.html
Normal file
0
templates/index.html
Normal file
359
templates/quarantine.template.php
Normal file
359
templates/quarantine.template.php
Normal file
@@ -0,0 +1,359 @@
|
||||
<?php
|
||||
/**
|
||||
* This file provides output functions for messagesIndex.php
|
||||
* No data manipulation is done in this file
|
||||
* @author Samuel Tran <stran2005@users.sourceforge.net>
|
||||
* @author Brian Wong <bwsource@users.sourceforge.net>
|
||||
* @author Nicolas Peyrussie <peyrouz@users.sourceforge.net>
|
||||
* @author Jeremy Fowler <jfowler06@users.sourceforge.net>
|
||||
* @version 04-03-2007
|
||||
* @package Templates
|
||||
*
|
||||
* Copyright (C) 2005 - 2007 MailZu
|
||||
* License: GPL, see LICENSE
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Print table listing messages in quarantine
|
||||
* This function prints a table of all spam/attachment in quarantine
|
||||
* for the current user. It also
|
||||
* provides a way for them to release and delete
|
||||
* their messages
|
||||
* @param string $content_type 'B', 'S', ...
|
||||
* @param mixed $res array of message data
|
||||
* @param integer $page current page number
|
||||
* @param string $order previous order field
|
||||
* @param string $vert previous vertical order
|
||||
* @param string $numRows total number of rows in table
|
||||
*/
|
||||
function showMessagesTable($content_type, $res, $page, $order, $vert, $numRows = 0) {
|
||||
global $link;
|
||||
global $conf;
|
||||
|
||||
// grab the display size limit set in config.php
|
||||
$sizeLimit = isset ( $conf['app']['displaySizeLimit'] ) && is_numeric( $conf['app']['displaySizeLimit'] ) ?
|
||||
$conf['app']['displaySizeLimit'] : 50;
|
||||
|
||||
if ('ASC' == $vert) {
|
||||
$new_vert = 'DESC';
|
||||
$mouseover_text = translate('Sort by descending order');
|
||||
} else {
|
||||
$new_vert='ASC';
|
||||
$mouseover_text = translate('Sort by ascending order');
|
||||
}
|
||||
|
||||
// If there are messages in quarantine, draw tables
|
||||
if ( $res ) {
|
||||
// $res is only a subset of the message quarantine
|
||||
// Its number of rows is $sizeLimit
|
||||
$count = $numRows;
|
||||
$start_entry = 0;
|
||||
$end_entry = count($res);
|
||||
$query_string = $_SERVER['QUERY_STRING'];
|
||||
|
||||
$pager_html = ( $count > $sizeLimit ) ? CmnFns::genMultiPagesLinks( $page, $sizeLimit, $count) : ''; ?>
|
||||
|
||||
<form name="messages_process_form" action="messagesProcessing.php" method="POST">
|
||||
|
||||
<input type="hidden" name="ctype" value="<? echo $content_type; ?>">
|
||||
<input type="hidden" name="query_string" value="<? echo $query_string; ?>">
|
||||
|
||||
<? // Draw 'Release', 'Delete' and 'Delete All' buttons
|
||||
printActionButtons((! CmnFns::didSearch() && ! ("Site Quarantine" == $_SESSION['sessionNav'])) );
|
||||
// Draw 'Select All, Clear All' and multi pages links
|
||||
printSelectAndPager($pager_html);
|
||||
|
||||
flush(); ?>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
|
||||
<tr>
|
||||
<td class="tableBorder">
|
||||
|
||||
<!-- Draw 'Showing messages ...' table -->
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan="5" class="tableTitle">
|
||||
<? echo translate('Showing messages',
|
||||
array( number_format($page*$sizeLimit+1), number_format($page*$sizeLimit+$end_entry), $count )); ?>
|
||||
</td>
|
||||
|
||||
<td class="tableTitle">
|
||||
<div align="right">
|
||||
<? $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;',
|
||||
translate('Help') . ' - ' . translate('My Quarantine')) ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Print messages table -->
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
|
||||
<!-- Print table's headers -->
|
||||
<tr class="rowHeaders">
|
||||
<td width="3%"> </td>
|
||||
<? if ( (count($_SESSION['sessionMail']) > 1) || ((Auth::isMailAdmin()) &&
|
||||
("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav']))) { ?>
|
||||
<td width="15%" <? echo "recip.email"==$order?' class="reservedCell"':''; ?>>
|
||||
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
|
||||
. '&order=recip.email&vert=' . $new_vert, translate('To'), '', '', $mouseover_text) ?>
|
||||
</td>
|
||||
<? } ?>
|
||||
<td width="15%" <? echo "from_addr"==$order?' class="reservedCell"':''; ?>>
|
||||
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
|
||||
. '&order=from_addr&vert=' . $new_vert, translate('From'), '', '', $mouseover_text) ?>
|
||||
</td>
|
||||
<td width="40%" <? echo "msgs.subject"==$order?' class="reservedCell"':''; ?>>
|
||||
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
|
||||
. '&order=msgs.subject&vert=' . $new_vert, translate('Subject'), '', '', $mouseover_text) ?>
|
||||
</td>
|
||||
<td width="10%" <? echo "msgs.time_num"==$order?' class="reservedCell"':''; ?>>
|
||||
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
|
||||
. '&order=msgs.time_num&vert=' . $new_vert, translate('Date'), '', '', $mouseover_text) ?>
|
||||
</td>
|
||||
<td width="7%" <? echo "spam_level"==$order?' class="reservedCell"':''; ?>>
|
||||
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
|
||||
. '&order=spam_level&vert=' . $new_vert, translate('Score'), '', '', $mouseover_text) ?>
|
||||
</td>
|
||||
<td width="10%" <? echo "msgs.content"==$order?' class="reservedCell"':''; ?>>
|
||||
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
|
||||
. '&order=msgs.content&vert=' . $new_vert, translate('Content Type'), '', '', $mouseover_text) ?>
|
||||
</td>
|
||||
<? if ( (Auth::isMailAdmin()) &&
|
||||
("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav'])) { ?>
|
||||
<td width="10%" <? echo "mail_id"==$order?' class="reservedCell"':''; ?>>
|
||||
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
|
||||
. '&order=mail_id&vert=' . $new_vert, translate('Mail ID'), '', '', $mouseover_text) ?>
|
||||
</td>
|
||||
<? } ?>
|
||||
</tr>
|
||||
|
||||
<? // For each line in table, print message fields
|
||||
for ($i = $start_entry; $i < $end_entry; $i++) {
|
||||
$rs = $res[$i];
|
||||
// Make sure that there is a clickable subject
|
||||
$subject = $rs['subject'] ? htmlspecialchars($rs['subject']) : '(none)';
|
||||
$from = $rs['from_addr'] ? htmlspecialchars($rs['from_addr']) : '(none)';
|
||||
if ( (count($_SESSION['sessionMail']) > 1) || (Auth::isMailAdmin() &&
|
||||
("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav']))) {
|
||||
$to = $rs['email'] ? htmlspecialchars($rs['email']) : '(none)';
|
||||
}
|
||||
$class = ( $rs['content'] == 'V' ? 'cellVirus' : 'cellColor') . ($i%2);
|
||||
echo "<tr class=\"$class\" align=\"center\">";
|
||||
|
||||
echo ' <td><input type="checkbox" onclick="ColorRow(this,\'lightyellow\')"
|
||||
name="mail_id_array[]" value="' . $rs['mail_id'] . '_' . $rs['email'] . '"></td>';
|
||||
if ( (count($_SESSION['sessionMail']) > 1) || (Auth::isMailAdmin() &&
|
||||
("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav']))) {
|
||||
echo ' <td>' . $to . '</td>';
|
||||
}
|
||||
echo ' <td>' . $from . '</td>';
|
||||
echo ' <td>' .
|
||||
// Only allow link to view mail if the mail is stored in SQL
|
||||
($rs['quar_type'] == 'Q' ?
|
||||
$link->getLink('read_mail.php' . '?mail_id=' . urlencode($rs['mail_id']) .
|
||||
"&recip_email=" . urlencode($rs['email']) .
|
||||
"&$query_string", $subject, '', '',
|
||||
translate('View this message'), ($rs['rs']=='v' || $rs['rs']=='p' ? false : true))
|
||||
: "<b>$subject</b>") .
|
||||
'</td>';
|
||||
echo ' <td>' . CmnFns::formatDateTime($rs['time_num']) . '</td>';
|
||||
|
||||
echo ' <td>' . ( $rs['content'] == 'S' ? $rs['spam_level'] : 'N/A') . '</td>';
|
||||
|
||||
switch ($rs['content']) {
|
||||
case 'S':
|
||||
$type = translate('Spam');
|
||||
break;
|
||||
case 'B':
|
||||
$type = translate('Banned');
|
||||
break;
|
||||
case 'V':
|
||||
$type = translate('Virus');
|
||||
break;
|
||||
case 'H':
|
||||
$type = translate('Bad Header');
|
||||
break;
|
||||
}
|
||||
|
||||
echo ( $rs['content'] == 'V' ? '<td class="typeVirus">' : '<td>') . $type . '</td>';
|
||||
|
||||
if ( Auth::isMailAdmin() &&
|
||||
("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav'])) {
|
||||
echo ' <td>' . $rs['mail_id'] . '</td>';
|
||||
}
|
||||
|
||||
echo "</tr>\n";
|
||||
} ?>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<? // Draw 'Select All, Clear All' and multi pages links
|
||||
printSelectAndPager($pager_html);
|
||||
// Draw 'Release', 'Delete' and 'Delete All' buttons
|
||||
printActionButtons((! CmnFns::didSearch() && ! ("Site Quarantine" == $_SESSION['sessionNav'])) );
|
||||
|
||||
unset($res); ?>
|
||||
|
||||
</form>
|
||||
<? } else {
|
||||
echo '<table width="100%" border="0" cellspacing="1" cellpadding="0">';
|
||||
echo '<tr><td align="center">' . translate('There are no matching records.') . '</td></tr>';
|
||||
echo '</table>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Print Search Engine
|
||||
* $param $content_type
|
||||
*/
|
||||
function printSearchEngine($content_type, $submit_page, $full_search = false) {
|
||||
global $link;
|
||||
?>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
|
||||
<tr>
|
||||
<td class="tableBorder">
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<td class="tableTitle">
|
||||
<a href="javascript: void(0);" onclick="showHideSearch('search');">› <?=translate('Search')?></a>
|
||||
</td>
|
||||
<td class="tableTitle">
|
||||
<div align="right">
|
||||
<? $link->doLink('javascript: help(\'search\');', '?', '', 'color: #FFFFFF;', translate('Help') . ' - ' . translate('My Re
|
||||
servations')) ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="search" style="display: <?= getShowHide('search') ?>">
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr class="cellColor"><td><center><? CmnFns::searchEngine($content_type, $submit_page, $full_search); ?></center></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print 'Select All, Clear All' and multi pages links
|
||||
* @param $pager_html multiple pages links
|
||||
*/
|
||||
function printSelectAndPager($pager_html) {
|
||||
?>
|
||||
|
||||
<table class="stdFont" width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<a href="javascript:CheckAll(document.messages_process_form);"><? echo translate('Select All'); ?></a> |
|
||||
<a href="javascript:CheckNone(document.messages_process_form);"><? echo translate('Clear All'); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<div align="right">
|
||||
<?
|
||||
// Draw the paging links if more than 1 page
|
||||
echo $pager_html . "\n";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
/**
|
||||
* Print 'No message was selected' warning and 'Back to messages' link
|
||||
* @param none
|
||||
*/
|
||||
function printNoMesgWarning() {
|
||||
global $link;
|
||||
?>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
|
||||
<tr><td class="tableBorder">
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr class="cellColor"><td>
|
||||
<center><? echo translate('No message was selected'); ?><br>
|
||||
<? $link->doLink('javascript: history.back();','‹‹ ' . translate('BackMessageIndex'), '', '',
|
||||
translate('BackMessageIndex')); ?></center>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
/**
|
||||
* Print table of messages that were processed without success
|
||||
* for the current user.
|
||||
* @param string $action 'Release', 'Delete', ...
|
||||
* @param string $content_type 'B', 'S', ...
|
||||
* @param mixed $res array of message data
|
||||
*/
|
||||
function showFailedMessagesTable($action, $content_type, $res) {
|
||||
global $link;
|
||||
?>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
|
||||
<tr>
|
||||
<!-- Print table title -->
|
||||
<td class="tableBorder">
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan="5" class="tableTitle">
|
||||
<? if ( $action == translate('Release') || $action == translate('Release/Request release') )
|
||||
echo translate('A problem occured when trying to release the following messages');
|
||||
elseif ( $action == translate('Delete') || $action == translate('Delete All') )
|
||||
echo translate('A problem occured when trying to delete the following messages');
|
||||
?>
|
||||
</td>
|
||||
<td class="tableTitle">
|
||||
<div align="right">
|
||||
<? $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', translate('Help') ) ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Print table headers -->
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr class="rowHeaders">
|
||||
<td width="20%"><? echo translate('From'); ?></td>
|
||||
<td width="30%"><? echo translate('Subject'); ?></td>
|
||||
<td width="10%"><? echo translate('Date'); ?></td>
|
||||
<? if ( 'S' == $content_type ) { ?>
|
||||
<td width="10%"><? echo translate('Score'); ?></td>
|
||||
<? } ?>
|
||||
<td width="30%"><? echo translate('Status'); ?></td>
|
||||
</tr>
|
||||
|
||||
<!-- Print table rows -->
|
||||
<?
|
||||
for ($i = 0; is_array($res) && $i < count($res); $i++) {
|
||||
$rs = $res[$i];
|
||||
$subject = $rs['subject'] ? $rs['subject'] : '(none)';
|
||||
$class = 'cellColor' . ($i%2);
|
||||
echo "<tr class=\"$class\" align=\"center\">"
|
||||
. ' <td>' . $rs['from_addr'] . '</td>'
|
||||
. ' <td>' . $subject . '</td>'
|
||||
. ' <td>' . CmnFns::formatDateTime($rs['time_num']) . '</td>';
|
||||
if ( 'S' == $content_type )
|
||||
echo ' <td>' . $rs['spam_level'] . '</td>';
|
||||
echo ' <td>' . $rs['status'] . '</td>';
|
||||
echo "</tr>\n";
|
||||
} ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
?>
|
||||
95
templates/sendmail.template.php
Normal file
95
templates/sendmail.template.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 04-03-2007
|
||||
* @package Templates
|
||||
*
|
||||
* Copyright (C) 2005 - 2007 MailZu
|
||||
* License: GPL, see LICENSE
|
||||
*/
|
||||
|
||||
include_once("lib/PHPMailer.class.php");
|
||||
|
||||
function printsendmail(){
|
||||
global $conf;
|
||||
global $link;
|
||||
?>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="1">
|
||||
<tr>
|
||||
<td class="tableBorder">
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<td class="tableTitle">
|
||||
<?
|
||||
$adminEmail = $conf['app']['adminEmail'];
|
||||
$emailList = '';
|
||||
if ( is_array($adminEmail) ) {
|
||||
foreach ($adminEmail as $email) {
|
||||
$emailList .= $emailList == '' ? $email : ", $email";
|
||||
}
|
||||
} else {
|
||||
$emailList = $adminEmail;
|
||||
}
|
||||
echo translate('Email Administrator') . " ($emailList)";
|
||||
?>
|
||||
|
||||
</td>
|
||||
<td class="tableTitle">
|
||||
<div align="right">
|
||||
<? $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;',
|
||||
translate('Help') . ' - ' . translate('Email Administrator')) ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="stdFont" width="100%" height="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
|
||||
<tr class="cellColor" align="left">
|
||||
<form name="sendmail_to_admin_form" action="<? echo $_SERVER['PHP_SELF']; ?>" method="POST">
|
||||
<td><br />
|
||||
<? echo translate('Subject') . ": " ;?><br />
|
||||
<input name="subject" type="text" size="60"><br /><br />
|
||||
<? echo translate('Message') . ": " ;?><br />
|
||||
<textarea name="body" cols="60" rows="15"></textarea><br/>
|
||||
<input type="submit" class="button" name="action" value="send"><br /><br />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?
|
||||
}
|
||||
|
||||
|
||||
function verifyAndSendMail()
|
||||
{
|
||||
global $conf;
|
||||
$subject = "[MailZu] " . stripslashes(CmnFns::getGlobalVar('subject', POST));
|
||||
$body = stripslashes(CmnFns::getGlobalVar('body', POST));
|
||||
if( $subject != '' && $body != '' ){
|
||||
$adminEmail = $conf['app']['adminEmail'];
|
||||
$sub = "[ Email Administrator ] Notification from '" . $_SESSION['sessionID'] . "'";
|
||||
$mailer = new PHPMailer();
|
||||
if ( is_array($adminEmail) ) {
|
||||
foreach ($adminEmail as $email) {
|
||||
$mailer->AddAddress($email, '');
|
||||
}
|
||||
} else {
|
||||
$mailer->AddAddress($adminEmail, '');
|
||||
}
|
||||
$mailer->FromName = $_SESSION['sessionID'];
|
||||
$mailer->From = $_SESSION['sessionMail'][0];
|
||||
$mailer->Subject = $subject;
|
||||
$mailer->Body = $body;
|
||||
$mailer->Send();
|
||||
CmnFns::redirect_js('summary.php');
|
||||
}else{
|
||||
CmnFns::do_error_box(translate('You have to type some text'), '', false);
|
||||
printsendmail();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
95
templates/summary.template.php
Normal file
95
templates/summary.template.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* This file provides output functions for summary.php
|
||||
* No data manipulation is done in this file
|
||||
* @author Samuel Tran
|
||||
* @author Jeremy Fowler <jfowler06@users.sourceforge.net>
|
||||
* @version 04-03-2007
|
||||
* @package Templates
|
||||
*
|
||||
* Copyright (C) 2005 - 2007 MailZu
|
||||
* License: GPL, see LICENSE
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Print table listing messages in quarantine :
|
||||
* - spam (content type = 'S')
|
||||
* - attachment (content type = 'B')
|
||||
* - viruses (content type = 'V')
|
||||
* - bad headers (content type = H)
|
||||
* - pending requests ( RS = 'P')
|
||||
* @param array $res containing spam and attachments of logged in user
|
||||
*/
|
||||
function showSummary($count_array) {
|
||||
global $link;
|
||||
|
||||
?>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
|
||||
<tr>
|
||||
<td class="tableBorder">
|
||||
|
||||
<!-- Draw Summary table -->
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan="5" class="tableTitle">
|
||||
<? echo translate($_SESSION['sessionNav']); ?>
|
||||
</td>
|
||||
|
||||
<td class="tableTitle">
|
||||
<div align="right">
|
||||
<? $link->doLink('javascript: help(\'msg_summary\');', '?', '', 'color: #FFFFFF;',
|
||||
translate('Help') . ' - ' . translate($_SESSION['sessionNav'])) ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- Print summary table -->
|
||||
<table class="stdFont" width="100%" height="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
|
||||
<!-- Print table's headers -->
|
||||
<tr class="rowHeaders">
|
||||
<td width="15%">
|
||||
<? echo translate('Date'); ?>
|
||||
</td>
|
||||
<td width="14%">
|
||||
<? echo translate('Spam'); ?>
|
||||
</td>
|
||||
<td width="14%">
|
||||
<? echo translate('Banned'); ?>
|
||||
</td>
|
||||
<td width="14%">
|
||||
<? echo translate('Viruses'); ?>
|
||||
</td>
|
||||
<td width="14%">
|
||||
<? echo translate('Bad Headers'); ?>
|
||||
</td>
|
||||
<td width="14%">
|
||||
<? echo translate('Pending Requests'); ?>
|
||||
</td>
|
||||
<td width="15%">
|
||||
<? echo translate('Total'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? $i = 0;
|
||||
foreach ($count_array as $key => $val) {
|
||||
echo '<tr class="' . 'cellColor' . ($i++%2) . ' align="center">';
|
||||
echo ($key == 'Total' ? '<td class="rowTotals">' : '<td class="rowNumValues">') . "$key</td> \n";
|
||||
foreach ($val as $subkey => $subval) {
|
||||
echo ( $key == 'Total' ? '<td class="rowTotals">' : '<td class="rowNumValues">') . "$subval</td> \n";
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
?>
|
||||
240
templates/viewmail.template.php
Normal file
240
templates/viewmail.template.php
Normal file
@@ -0,0 +1,240 @@
|
||||
<?php
|
||||
/**
|
||||
* This file provides output functions for ctrlpnl.php
|
||||
* No data manipulation is done in this file
|
||||
* @author Nick Korbel <lqqkout13@users.sourceforge.net>
|
||||
* @author Adam Moore
|
||||
* @author David Poole <David.Poole@fccc.edu>
|
||||
* @version 03-11-05
|
||||
* @package Templates
|
||||
*
|
||||
* Copyright (C) 2003 - 2005 phpScheduleIt
|
||||
* License: GPL, see LICENSE
|
||||
*/
|
||||
|
||||
/**
|
||||
* MailMime class
|
||||
*/
|
||||
include_once('lib/MailMime.class.php');
|
||||
|
||||
function startMessage() {
|
||||
?>
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:16%; border:solid 2px #0F93DF; background-color:#FFFFFF;">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="tableTitle" style="background-color:#0F93DF;">
|
||||
<? echo translate('Message'); ?>
|
||||
</td>
|
||||
<td class="tableTitle" style="background-color:#0F93DF;">
|
||||
<div align="right"
|
||||
<a href="javascript: help('msg_view');" class="" style="color: #FFFFFF" onmouseover="javascript: window.status='Help - Message View'; return true;" onmouseout="javascript: window.status=''; return true;">?</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
function endMessage() {
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
/**
|
||||
* Print row of message header (From,To,Subject,etc)
|
||||
* $param The mime structure object and the specific header name
|
||||
*/
|
||||
function MsgPrintHeader($struct,$hdr_list) {
|
||||
|
||||
foreach ($hdr_list as $hdr) {
|
||||
$header_value = $struct->headers[strtolower($hdr)];
|
||||
if (is_array($header_value)) {
|
||||
$value_array = $header_value;
|
||||
$count = count($value_array);
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$header_value = $value_array[$i];
|
||||
$displayed_value = $header_value ? htmlspecialchars(trim($header_value)) : '(none)';
|
||||
echo ' <tr>' . "\n"
|
||||
. ' <td class="headerName"><nobr>' . translate($hdr) , ":</nobr></td>" . "\n"
|
||||
. ' <td class="headerValue">' . $displayed_value . '</td>' . "\n"
|
||||
. ' </tr>' . "\n";
|
||||
}
|
||||
} else {
|
||||
$displayed_value = $header_value ? htmlspecialchars(trim($header_value)) : '(none)';
|
||||
echo ' <tr>' . "\n"
|
||||
. ' <td class="headerName"><nobr>' . translate($hdr) . ":</nobr></td>" . "\n"
|
||||
. ' <td class="headerValue">' . $displayed_value . '</td>' . "\n"
|
||||
. ' </tr>' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print row of optional message headers
|
||||
* $param The mime structure object and the specific header name
|
||||
*/
|
||||
function MsgPrintHeaderFull($struct,$hdr_list) {
|
||||
|
||||
foreach ($hdr_list as $hdr) {
|
||||
$header_value = $struct->headers[strtolower($hdr)];
|
||||
if (!$header_value) continue;
|
||||
if (is_array($header_value)) {
|
||||
$value_array = $header_value;
|
||||
$count = count($value_array);
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$header_value = $value_array[$i];
|
||||
$displayed_value = $header_value ? htmlspecialchars(trim($header_value)) : '(none)';
|
||||
echo ' <tr class="' . getShowHideHeaders('headers') . '">' . "\n"
|
||||
. ' <td class="headerName"><nobr>' . "$hdr:</nobr></td>" . "\n"
|
||||
. ' <td class="headerValue">' . $displayed_value . '</td>' . "\n"
|
||||
. ' </tr>' . "\n";
|
||||
}
|
||||
} else {
|
||||
$displayed_value = $header_value ? htmlspecialchars(trim($header_value)) : '(none)';
|
||||
echo ' <tr class="' . getShowHideHeaders('headers') . '">' . "\n"
|
||||
. ' <td class="headerName"><nobr>' . "$hdr:</nobr></td>" . "\n"
|
||||
. ' <td class="headerValue">' . $displayed_value . '</td>' . "\n"
|
||||
. ' </tr>' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print table of message options (Toggle Header, Back to Messages, etc..)
|
||||
* $param none
|
||||
*/
|
||||
function MsgDisplayOptions($mail_id, $recip_email) {
|
||||
// Double encode needed for javascript pass-through
|
||||
$enc_mail_id = urlencode(urlencode($mail_id));
|
||||
$enc_recip_email = urlencode(urlencode($recip_email));
|
||||
?>
|
||||
<table class="stdFont" width="100%">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<a href="javascript: history.back();">‹‹ <? echo translate('BackMessageIndex'); ?> </a>
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="javascript: ViewOriginal('<? echo $enc_mail_id ?>','<? echo $enc_recip_email ?>');"> <? echo translate('ViewOriginal'); ?></a>
|
||||
|
|
||||
<a href="javascript: void(1);" onclick="showHideFullHeaders('headers');">
|
||||
<? echo translate('ToggleHeaders'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
/**
|
||||
* Print row of original message options (Print, Close, etc..)
|
||||
* $param none
|
||||
*/
|
||||
function MsgOriginalOptions() {
|
||||
?>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="stdFont" align="right">
|
||||
<a href="javascript: window.print();"> <? echo translate('Print'); ?></a>
|
||||
|
|
||||
<a href="javascript: window.close();"> <? echo translate('CloseWindow'); ?> </a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="stdFont" bgcolor="#FAFAFA">
|
||||
<?
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print table of message headers (From,To,Subject,etc)
|
||||
* $param The mime structure object
|
||||
*/
|
||||
function MsgDisplayHeaders($struct) {
|
||||
|
||||
$headers = array ('From',
|
||||
'To',
|
||||
'Date',
|
||||
'Subject'
|
||||
);
|
||||
|
||||
$headers_full = array ("Received",
|
||||
"Message-ID",
|
||||
"X-Spam-Status",
|
||||
"X-Amavis-Alert"
|
||||
);
|
||||
|
||||
echo '<table id="headers" width="100%" border="0" cellspacing="0" cellpadding="1" align="center" style="border-collapse:collapse">' . "\n";
|
||||
MsgPrintHeader($struct,$headers);
|
||||
MsgPrintHeaderFull($struct,$headers_full);
|
||||
echo '</table>' . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Print table of message body
|
||||
* $param The mime structure object
|
||||
*/
|
||||
function MsgDisplayBody($struct) {
|
||||
echo '<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">';
|
||||
echo ' <tr>';
|
||||
echo ' <td class="stdFont">';
|
||||
MsgParseBody($struct);
|
||||
echo ' <br>';
|
||||
echo ' </td>';
|
||||
echo ' </tr>';
|
||||
echo '</table>';
|
||||
MsgDisplayFooter();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print text of text/plain MIME entity
|
||||
* $param The body of a mime structure object
|
||||
*/
|
||||
function MsgBodyPlainText($text) {
|
||||
echo nl2br(htmlspecialchars($text));
|
||||
}
|
||||
|
||||
/**
|
||||
* Print HTML of text/html MIME entity
|
||||
* $param The body of a mime structure object
|
||||
*/
|
||||
function MsgBodyHtmlText($text) {
|
||||
echo sanitizeHTML($text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print list of attachments
|
||||
* $param The body of a mime structure object
|
||||
*/
|
||||
function MsgDisplayFooter() {
|
||||
// Globals read from MailMime.class.php
|
||||
global $filelist;
|
||||
global $errors;
|
||||
if ( $filelist || $errors ) {
|
||||
// Space before attachment or warning list
|
||||
echo '<br>';
|
||||
echo '<hr>';
|
||||
echo '<table class="stdFont" width="100%" border="0" cellspacing="0" cellpadding="1" align="center">';
|
||||
echo '<tr>';
|
||||
echo ' <td>';
|
||||
|
||||
if ($filelist) {
|
||||
echo '--Attachments--<br>';
|
||||
foreach ($filelist as $file) {
|
||||
echo $file . '<br>';
|
||||
}
|
||||
}
|
||||
if ($errors) {
|
||||
echo '<br>--warnings--<br>';
|
||||
foreach (array_keys($errors) as $errmsg) {
|
||||
echo $errmsg . '<br>';
|
||||
}
|
||||
}
|
||||
echo ' </td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user