apply initial-fixes-make-compatible-with-Debian-Ubuntu-php from https://github.com/zedzedtop/mailzu

This commit is contained in:
Mario Fetka 2016-02-04 17:03:27 +01:00
parent 401edac1a7
commit 180aa514e9
22 changed files with 203 additions and 199 deletions

View File

@ -1,4 +1,4 @@
<? <?php
define('INTERNAL_DATE_SEPERATOR', '/'); define('INTERNAL_DATE_SEPERATOR', '/');
define('RES_TYPE_ADD', 'r'); define('RES_TYPE_ADD', 'r');
define('RES_TYPE_MODIFY', 'm'); define('RES_TYPE_MODIFY', 'm');

View File

@ -127,14 +127,16 @@ Alternating row colors
Got rid of the contextual selector '.cellColor0 td' Got rid of the contextual selector '.cellColor0 td'
*/ */
.cellColor0, td.cellColor0 { .cellColor0, td.cellColor0 {
font-family: monospace;
padding: 2px; padding: 2px;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 11px; font-size: 10px;
} }
td.cellColor1, .cellColor1 { .cellColor1, td.cellColor1 {
font-family: monospace;
padding: 2px; padding: 2px;
background-color: #F8FAEA; background-color: #F8FAEA;
font-size: 11px; font-size: 10px;
} }
/* /*
Special Alternating row colors for viruses Special Alternating row colors for viruses
@ -461,6 +463,7 @@ div.mycal_div {
} }
.stdFont { .stdFont {
/* font-family: monospace;*/
font-size: 11px; font-size: 11px;
} }

View File

@ -21,10 +21,10 @@ echo "<?xml version=\"1.0\" encoding=\"$charset\"?" . ">\n";
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$languages[$lang][2]?>" lang="<?=$languages[$lang][2]?>"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $languages[$lang][2]?>" lang="<?=$languages[$lang][2]?>">
<head> <head>
<title>MailZu <?=translate('Help')?></title> <title>MailZu <?php echo translate('Help')?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset?>" />
<style type="text/css"> <style type="text/css">
<!-- <!--
li { li {
@ -60,7 +60,7 @@ a:hover {
</style> </style>
</head> </head>
<body> <body>
<? <?php
$help_file = 'lang/' . $languages[$lang][2] . '.help.php'; $help_file = 'lang/' . $languages[$lang][2] . '.help.php';
if (file_exists($help_file)) { if (file_exists($help_file)) {
include_once($help_file); include_once($help_file);

View File

@ -17,7 +17,7 @@
/** /**
* CmnFns class * CmnFns class
*/ */
include_once('CmnFns.class.php'); include_once('lib/CmnFns.class.php');
/** /**
* PEAR::Net_Socket Library * PEAR::Net_Socket Library

View File

@ -356,7 +356,7 @@ class CmnFns {
global $conf; global $conf;
?> ?>
<select name="language" class="textbox" onchange="changeLanguage(this);"> <select name="language" class="textbox" onchange="changeLanguage(this);">
<? <?php
$languages = get_language_list(); $languages = get_language_list();
foreach ($languages as $lang => $settings) { foreach ($languages as $lang => $settings) {
echo '<option value="' . $lang . '"' echo '<option value="' . $lang . '"'
@ -365,7 +365,7 @@ class CmnFns {
} }
?> ?>
</select> </select>
<? <?php
} }
/** /**
@ -452,10 +452,10 @@ class CmnFns {
$query_string = CmnFns::array_to_query_string( $_GET, array( 'page' ) ); $query_string = CmnFns::array_to_query_string( $_GET, array( 'page' ) );
$query_string_first = $query_string . '&page=0'; $query_string_first = $query_string . '&page=0';
$query_string_previous = $query_string . '&page=' . ($page-1); $query_string_previous = $query_string . '&page=' . ($page-1);
$pager_html .= $link->getLink($php_self . '?' . $query_string_first, translate('first'), '', '', translate('Go to first page')) . " | "; $pager_html = $link->getLink($php_self . '?' . $query_string_first, translate('first'), '', '', translate('Go to first page')) . " | ";
$pager_html .= $link->getLink($php_self . '?' . $query_string_previous, translate('previous'), '', '', translate('Go to previous page')) . " | "; $pager_html .= $link->getLink($php_self . '?' . $query_string_previous, translate('previous'), '', '', translate('Go to previous page')) . " | ";
} else { } else {
$pager_html .= translate('first') . " | " . translate('previous') ." | "; $pager_html = translate('first') . " | " . translate('previous') ." | ";
} }
$pager_html .= '&nbsp;&nbsp;'; $pager_html .= '&nbsp;&nbsp;';
@ -466,7 +466,7 @@ class CmnFns {
for( $i=0; $i<$count; $i+=$sizeLimit ) { for( $i=0; $i<$count; $i+=$sizeLimit ) {
$page_num = $i/$sizeLimit; $page_num = $i/$sizeLimit;
if( $count > $size_limit * 20 && abs( $page_num - $page ) > 10 ) { if( $count > $sizeLimit * 20 && abs( $page_num - $page ) > 10 ) {
if( ! $elipsis_printed ) { if( ! $elipsis_printed ) {
$pager_html .= '...&nbsp;&nbsp;'; $pager_html .= '...&nbsp;&nbsp;';
$elipsis_printed = true; $elipsis_printed = true;
@ -486,8 +486,8 @@ class CmnFns {
if( $page+1 < $total_pages ) { if( $page+1 < $total_pages ) {
$query_string = CmnFns::array_to_query_string( $_GET, array( 'page' ) ); $query_string = CmnFns::array_to_query_string( $_GET, array( 'page' ) );
$query_string_next .= $query_string . '&page=' . ($page+1); $query_string_next = $query_string . '&page=' . ($page+1);
$query_string_last .= $query_string . '&page=' . (ceil($total_pages)-1); $query_string_last = $query_string . '&page=' . (ceil($total_pages)-1);
$pager_html .= ' | ' . $link->getLink($php_self . '?' . $query_string_next, strtolower(translate('Next')), '', '', translate('Go to next page')); $pager_html .= ' | ' . $link->getLink($php_self . '?' . $query_string_next, strtolower(translate('Next')), '', '', translate('Go to next page'));
$pager_html .= ' | ' . $link->getLink($php_self . '?' . $query_string_last, translate('last'), '', '', translate('Go to last page')); $pager_html .= ' | ' . $link->getLink($php_self . '?' . $query_string_last, translate('last'), '', '', translate('Go to last page'));
} else { } else {
@ -514,11 +514,11 @@ class CmnFns {
?> ?>
<table border=0 width="100%"> <table border=0 width="100%">
<form action="<? echo $submit_page ?>" method="get" name="quarantine"> <form action="<?php echo $submit_page ?>" method="get" name="quarantine">
<tr><td colspan=2 align="center"><? echo translate('Search for messages whose:'); ?>&nbsp;</td></tr> <tr><td colspan=2 align="center"><?php echo translate('Search for messages whose:'); ?>&nbsp;</td></tr>
<tr><td align="right">&nbsp; <tr><td align="right">&nbsp;
<? <?php
$i = 1; $i = 1;
$array_size = count($fields_array); $array_size = count($fields_array);
foreach ($fields_array as $k => $name) { foreach ($fields_array as $k => $name) {
@ -543,34 +543,34 @@ class CmnFns {
$i ++; $i ++;
} }
?> ?>
<? echo translate('Content Type'); ?>: <?php echo translate('Content Type'); ?>:
<select name="ctype" class="button"> <select name="ctype" class="button">
<option value="A" <? echo ($content_type == 'A' ? ' selected="true"':''); ?>> <option value="A" <?php echo ($content_type == 'A' ? ' selected="true"':''); ?>>
<? echo translate('All'); ?></option> <?php echo translate('All'); ?></option>
<option value="S" <? echo ($content_type == 'S' ? ' selected="true"':''); ?>> <option value="S" <?php echo ($content_type == 'S' ? ' selected="true"':''); ?>>
<? echo translate('Spam'); ?></option> <?php echo translate('Spam'); ?></option>
<option value="B" <? echo ($content_type == 'B' ? ' selected="true"':''); ?>> <option value="B" <?php echo ($content_type == 'B' ? ' selected="true"':''); ?>>
<? echo translate('Banned'); ?></option> <?php echo translate('Banned'); ?></option>
<? if ((Auth::isMailAdmin() || Auth::isDomainAdmin()) || $conf['app']['allowViruses']) { ?> <?php if ((Auth::isMailAdmin() || Auth::isDomainAdmin()) || $conf['app']['allowViruses']) { ?>
<option value="V" <? echo ($content_type == 'V' ? ' selected="true"':''); ?>> <option value="V" <?php echo ($content_type == 'V' ? ' selected="true"':''); ?>>
<? echo translate('Virus'); ?></option> <?php echo translate('Virus'); ?></option>
<? } <?php }
if ((Auth::isMailAdmin() || Auth::isDomainAdmin()) || $conf['app']['allowBadHeaders']) { ?> if ((Auth::isMailAdmin() || Auth::isDomainAdmin()) || $conf['app']['allowBadHeaders']) { ?>
<option value="H" <? echo ($content_type == 'H' ? ' selected="true"':''); ?>> <option value="H" <?php echo ($content_type == 'H' ? ' selected="true"':''); ?>>
<? echo translate('Bad Header'); ?></option> <?php echo translate('Bad Header'); ?></option>
<? } <?php }
echo "</select>"; echo "</select>";
$i ++; $i ++;
echo ($i % 2) ? "&nbsp;</td></tr>\n\t\t\t<tr><td colspan='2' align='center'>&nbsp\n" : "&nbsp;</td><td align='left'>&nbsp"; echo ($i % 2) ? "&nbsp;</td></tr>\n\t\t\t<tr><td colspan='2' align='center'>&nbsp\n" : "&nbsp;</td><td align='left'>&nbsp";
?> ?>
<input type="submit" class="button" name="search_action" value="<? echo translate('Search'); ?>" /> <input type="submit" class="button" name="search_action" value="<?php echo translate('Search'); ?>" />
<? if (CmnFns::didSearch()) <?php if (CmnFns::didSearch())
echo "<input type=\"submit\" class=\"button\" name=\"search_action\" value=\"" . translate('Clear search results') . "\" />"; echo "<input type=\"submit\" class=\"button\" name=\"search_action\" value=\"" . translate('Clear search results') . "\" />";
?> ?>
&nbsp;</td></tr> &nbsp;</td></tr>
</form> </form>
</table> </table>
<? <?php
} }

View File

@ -19,7 +19,7 @@
/** /**
* CmnFns class * CmnFns class
*/ */
include_once('CmnFns.class.php'); include_once('lib/CmnFns.class.php');
/** /**
* Pear::DB * Pear::DB
*/ */

View File

@ -23,7 +23,7 @@
/** /**
* CmnFns class * CmnFns class
*/ */
include_once('CmnFns.class.php'); include_once('lib/CmnFns.class.php');
/** /**
* Auth class * Auth class
*/ */
@ -496,7 +496,7 @@ class DBEngine {
$join_type = ' INNER JOIN'; $join_type = ' INNER JOIN';
} }
$recipEmailClause = $this->convertEmailaddresses2SQL($emailaddresses); $recipEmailClause = $this->convertEmailaddresses2SQL($emailaddress);
$return = array(); $return = array();
@ -640,6 +640,7 @@ class DBEngine {
if ($result->numRows() <= 0){ if ($result->numRows() <= 0){
return false; return false;
} }
$return = "";
while ($rs = $result->fetchRow()) { while ($rs = $result->fetchRow()) {
$return .= $rs['mail_text']; $return .= $rs['mail_text'];
} }

View File

@ -15,7 +15,7 @@
/** /**
* CmnFns class * CmnFns class
*/ */
include_once('CmnFns.class.php'); include_once('lib/CmnFns.class.php');
/** /**
* Provide all database access/manipulation functionality for Exchange Auth * Provide all database access/manipulation functionality for Exchange Auth

View File

@ -15,7 +15,7 @@
/** /**
* CmnFns class * CmnFns class
*/ */
include_once('CmnFns.class.php'); include_once('lib/CmnFns.class.php');
/** /**
* Provide all database access/manipulation functionality for IMAP Auth * Provide all database access/manipulation functionality for IMAP Auth

View File

@ -15,7 +15,7 @@
/** /**
* CmnFns class * CmnFns class
*/ */
include_once('CmnFns.class.php'); include_once('lib/CmnFns.class.php');
class LDAPEngine { class LDAPEngine {

View File

@ -15,7 +15,7 @@
/** /**
* CmnFns class * CmnFns class
*/ */
include_once('CmnFns.class.php'); include_once('lib/CmnFns.class.php');
/** /**
* Pear::DB * Pear::DB
*/ */

View File

@ -15,7 +15,7 @@
/** /**
* CmnFns class * CmnFns class
*/ */
include_once('CmnFns.class.php'); include_once('lib/CmnFns.class.php');
/** /**
* Pear::DB * Pear::DB
*/ */
@ -91,14 +91,14 @@ function MsgParseBody($struct) {
break; break;
} }
break; break;
case "text": case "text":
// Do not display attached text types // Do not display attached text types
if ($attachment = $struct->d_parameters['filename'] or if (property_exists($struct, "d_parameters")) {
$attachment = $struct->d_parameters['name']) { if ($attachment = $struct->d_parameters['filename'] or $attachment = $struct->d_parameters['name']) {
array_push($filelist, $attachment); array_push($filelist, $attachment);
break; break;
} }
}
switch ($ctype_s) { switch ($ctype_s) {
// Plain text // Plain text
case "plain": case "plain":

View File

@ -16,7 +16,7 @@
/** /**
* CmnFns class * CmnFns class
*/ */
include_once('CmnFns.class.php'); include_once('lib/CmnFns.class.php');
/** /**
* Include AmavisdEngine class * Include AmavisdEngine class
*/ */
@ -123,8 +123,7 @@ function releaseMessages($emailaddresses, $mail_id_array) {
global $conf; global $conf;
// If release request needs to be sent to Admins // If release request needs to be sent to Admins
if ( is_array($release_req_messages) && !empty($release_req_messages) if ( is_array($release_req_messages) && !empty($release_req_messages) && $conf['app']['notifyAdmin'] )
&& $conf['app']['notifyAdmin'] )
sendMailToAdmin(translate('Request release'), $release_req_messages); sendMailToAdmin(translate('Request release'), $release_req_messages);
// If release needs to be done // If release needs to be done
@ -252,15 +251,14 @@ function updateMessages($flag, $content_type, $emailaddresses, $mail_id_array, $
} }
} else { } else {
$i = 0; $i = 0;
foreach ($mail_id_array as $mail_id_recip) { foreach ($mail_id_array as $mail_id_recip) {
// Get mail_id and recipient email address // Get mail_id and recipient email address
$temp = preg_split('/_/', $mail_id_recip); //$temp = preg_split('/_/', $mail_id_recip, 2);
$mail_id = str_replace("_" . $temp[(sizeof($temp) - 1)], "", $mail_id_recip); //$mail_id = $temp[0];
$recip_email = $temp[(sizeof($temp) - 1)]; //$recip_email = $temp[1];
$mail_id = substr($mail_id_recip, 0, 12);
$recip_email = substr($mail_id_recip, 13);
// Check if logged in user is admin or logged in user is trying to delete his own messages // Check if logged in user is admin or logged in user is trying to delete his own messages
if ( Auth::isMailAdmin() || Auth::isDomainAdmin() || in_array($recip_email, $emailaddresses) ) { if ( Auth::isMailAdmin() || Auth::isDomainAdmin() || in_array($recip_email, $emailaddresses) ) {

View File

@ -57,21 +57,21 @@ class Template {
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$languages[$lang][2]?>" lang="<?=$languages[$lang][2]?>"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $languages[$lang][2]?>" lang="<?php echo $languages[$lang][2]?>">
<head> <head>
<title> <title>
<?=$this->title?> <?php echo $this->title?>
</title> </title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset?>" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<script language="JavaScript" type="text/javascript" src="<?=$path?>functions.js"></script> <script language="JavaScript" type="text/javascript" src="<?php echo $path?>functions.js"></script>
<!--<link href="<?=$path?>css.css" rel="stylesheet" type="text/css" />--> <!--<link href="<?php echo $path?>css.css" rel="stylesheet" type="text/css" />-->
<style type="text/css"> <style type="text/css">
@import url(<?=$path?>css.css); @import url(<?php echo $path?>css.css);
</style> </style>
</head> </head>
<body> <body>
<? <?php
} }
@ -96,31 +96,31 @@ class Template {
<tr> <tr>
<td class="mainBkgrdClr"> <td class="mainBkgrdClr">
<h4 class="welcomeBack"> <h4 class="welcomeBack">
<?= <?php
translate('Welcome Back', array($_SESSION['sessionName'], 1)); echo translate('Welcome Back', array($_SESSION['sessionName'], 1));
// Notify if the person logged in is admin // Notify if the person logged in is admin
echo (Auth::isMailAdmin() ? ' (' . translate('Administrator') . ')' : ''); echo (Auth::isMailAdmin() ? ' (' . translate('Administrator') . ')' : '');
?> ?>
</h4> </h4>
<!--<p> <!--<p>
<? $this->link->doLink($this->dir_path . 'index.php?logout=true', translate('Log Out')) ?> <?php $this->link->doLink($this->dir_path . 'index.php?logout=true', translate('Log Out')) ?>
| |
<? $this->link->doLink($this->dir_path . 'summary.php', translate('My Control Panel')) ?> <?php $this->link->doLink($this->dir_path . 'summary.php', translate('My Control Panel')) ?>
</p>--> </p>-->
</td> </td>
<td class="mainBkgrdClr" valign="top"> <td class="mainBkgrdClr" valign="top">
<div align="right"> <div align="right">
<p> <p>
<?= translate_date('header', mktime());?> <?php echo translate_date('header', mktime());?>
</p> </p>
<!--<p> <!--<p>
<? $this->link->doLink('javascript: help();', translate('Help')) ?> <?php $this->link->doLink('javascript: help();', translate('Help')) ?>
</p>--> </p>-->
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
@ -134,7 +134,7 @@ class Template {
<table width="100%" border="0" cellspacing="0" cellpadding="10" style="border: solid #CCCCCC 1px;"> <table width="100%" border="0" cellspacing="0" cellpadding="10" style="border: solid #CCCCCC 1px;">
<tr> <tr>
<td bgcolor="#FAFAFA"> <td bgcolor="#FAFAFA">
<? <?php
} }
@ -147,7 +147,7 @@ class Template {
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
@ -160,10 +160,10 @@ class Template {
function printHTMLFooter() { function printHTMLFooter() {
global $conf; global $conf;
?> ?>
<p align="center"><a href="http://www.mailzu.net"><?=$conf['app']['title']?> v<?=$conf['app']['version']?></a></p> <p align="center"><a href="http://www.mailzu.net"><?php echo $conf['app']['title']?> v<?php $conf['app']['version']?></a></p>
</body> </body>
</html> </html>
<? <?php
} }
/** /**

View File

@ -53,9 +53,9 @@ startDataDisplayCol();
if (! Auth::isMailAdmin()) { if (! Auth::isMailAdmin()) {
CmnFns::do_error_box(translate('Access Denied')); CmnFns::do_error_box(translate('Access Denied'));
} else { } else {
// Draw search engine // Draw search engine
$content_type = (CmnFns::get_ctype() ? CmnFns::get_ctype() : 'A');
printSearchEngine($content_type, $_SERVER['PHP_SELF'], 1); printSearchEngine($content_type, $_SERVER['PHP_SELF'], 1);
echo '<br>'; echo '<br>';
@ -72,7 +72,7 @@ if (! Auth::isMailAdmin()) {
$order = array('msgs.time_num', 'from_addr', 'msgs.subject', 'spam_level', 'recip.email', 'msgs.content', 'mail_id'); $order = array('msgs.time_num', 'from_addr', 'msgs.subject', 'spam_level', 'recip.email', 'msgs.content', 'mail_id');
// Arbitrary type for Admin // Arbitrary type for Admin
$content_type = (CmnFns::get_ctype() ? CmnFns::get_ctype() : 'A'); //$content_type = (CmnFns::get_ctype() ? CmnFns::get_ctype() : 'A');
//echo "Before query: " . date("l dS of F Y h:i:s A") . "<br><br>"; //echo "Before query: " . date("l dS of F Y h:i:s A") . "<br><br>";

View File

@ -51,8 +51,9 @@ startDataDisplayCol();
if (! Auth::isMailAdmin()) { if (! Auth::isMailAdmin()) {
CmnFns::do_error_box(translate('Access Denied')); CmnFns::do_error_box(translate('Access Denied'));
} else { } else {
// Arbitrary type for Admin
$content_type = (CmnFns::get_ctype() ? CmnFns::get_ctype() : 'A');
// Draw search engine // Draw search engine
printSearchEngine($content_type, $_SERVER['PHP_SELF'], 1); printSearchEngine($content_type, $_SERVER['PHP_SELF'], 1);
echo '<br>'; echo '<br>';
@ -67,8 +68,6 @@ if (! Auth::isMailAdmin()) {
$search_array = array_merge( $search_array1, $search_array2, $search_array3, $search_array4 ); $search_array = array_merge( $search_array1, $search_array2, $search_array3, $search_array4 );
$order = array('msgs.time_num', 'from_addr', 'msgs.subject', 'spam_level', 'recip.email', 'msgs.content', 'mail_id'); $order = array('msgs.time_num', 'from_addr', 'msgs.subject', 'spam_level', 'recip.email', 'msgs.content', 'mail_id');
// Arbitrary type for Admin
$content_type = (CmnFns::get_ctype() ? CmnFns::get_ctype() : 'A');
// Print a loading message until database returns... // Print a loading message until database returns...
printMessage(translate('Retrieving Messages...')); printMessage(translate('Retrieving Messages...'));

View File

@ -27,19 +27,19 @@ function printLoginForm($msg = '', $resume = '') {
if (!empty($msg)) if (!empty($msg))
CmnFns::do_error_box($msg, '', false); CmnFns::do_error_box($msg, '', false);
?> ?>
<form name="login" method="post" action="<?=$_SERVER['PHP_SELF']?>"> <form name="login" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<table width="350px" border="0" cellspacing="0" cellpadding="1" align="center"> <table width="350px" border="0" cellspacing="0" cellpadding="1" align="center">
<tr> <tr>
<td bgcolor="#CCCCCC"> <td bgcolor="#CCCCCC">
<table width="100%" border="0" cellspacing="0" cellpadding="3"> <table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr bgcolor="#EDEDED"> <tr bgcolor="#EDEDED">
<td colspan="2" style="border-bottom: solid 1px #CCCCCC;"> <td colspan="2" style="border-bottom: solid 1px #CCCCCC;">
<h5 align="center"><?=translate('Please Log In')?></h5> <h5 align="center"><?php echo translate('Please Log In')?></h5>
</td> </td>
</tr> </tr>
<tr bgcolor="#FFFFFF"> <tr bgcolor="#FFFFFF">
<td width="150"> <td width="150">
<p><b><?=translate('Login')?></b></p> <p><b><?php echo translate('Login')?></b></p>
</td> </td>
<td> <td>
<input type="text" name="email" class="textbox" /> <input type="text" name="email" class="textbox" />
@ -47,7 +47,7 @@ function printLoginForm($msg = '', $resume = '') {
</tr> </tr>
<tr bgcolor="#FFFFFF"> <tr bgcolor="#FFFFFF">
<td> <td>
<p><b><?=translate('Password')?></b></p> <p><b><?php echo translate('Password')?></b></p>
</td> </td>
<td> <td>
<input type="password" name="password" class="textbox" /> <input type="password" name="password" class="textbox" />
@ -56,26 +56,26 @@ function printLoginForm($msg = '', $resume = '') {
<?php if ($conf['auth']['serverType'] === 'exchange') { ?> <?php if ($conf['auth']['serverType'] === 'exchange') { ?>
<tr bgcolor="#FFFFFF"> <tr bgcolor="#FFFFFF">
<td> <td>
<p><b><?=translate('Domain')?></b></p> <p><b><?php echo translate('Domain')?></b></p>
</td> </td>
<td> <td>
<input type="text" name="domain" class="textbox" value="<?=$conf['auth']['exch_domain']?>"/> <input type="text" name="domain" class="textbox" value="<?php echo $conf['auth']['exch_domain']?>"/>
</td> </td>
</tr> </tr>
<?php } <?php }
if ($conf['app']['selectLanguage']) { ?> if ($conf['app']['selectLanguage']) { ?>
<tr bgcolor="#FFFFFF"> <tr bgcolor="#FFFFFF">
<td> <td>
<p><b><?=translate('Language')?></b></p> <p><b><?php echo translate('Language')?></b></p>
</td> </td>
<td> <td>
<?CmnFns::print_language_pulldown()?> <?php CmnFns::print_language_pulldown()?>
</td> </td>
</tr> </tr>
<?php } ?> <?php } ?>
<tr bgcolor="#FFFFFF"> <tr bgcolor="#FFFFFF">
<td> <td>
<p><b><?=translate('Keep me logged in')?></b></p> <p><b><?php echo translate('Keep me logged in')?></b></p>
</td> </td>
<td> <td>
<input type="checkbox" name="setCookie" value="true" /> <input type="checkbox" name="setCookie" value="true" />
@ -84,8 +84,8 @@ function printLoginForm($msg = '', $resume = '') {
<tr bgcolor="#FAFAFA"> <tr bgcolor="#FAFAFA">
<td colspan="2" style="border-top: solid 1px #CCCCCC;"> <td colspan="2" style="border-top: solid 1px #CCCCCC;">
<p align="center"> <p align="center">
<input type="submit" name="login" value="<?=translate('Log In')?>" class="button" /> <input type="submit" name="login" value="<?php echo translate('Log In')?>" class="button" />
<input type="hidden" name="resume" value="<?=$resume?>" /> <input type="hidden" name="resume" value="<?php echo $resume?>" />
</p> </p>
</td> </td>
</tr> </tr>
@ -94,9 +94,9 @@ function printLoginForm($msg = '', $resume = '') {
</tr> </tr>
</table> </table>
<p align="center"> <p align="center">
<? $link->doLink('javascript: help();', translate('Help'), '', '', translate('Get online help')) ?> <?php $link->doLink('javascript: help();', translate('Help'), '', '', translate('Get online help')) ?>
</p> </p>
</form> </form>
<? <?php
} }
?> ?>

View File

@ -47,10 +47,10 @@ function showQuickLinks() {
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td class="tableTitle" style="background-color:#0F93DF;"> <td class="tableTitle" style="background-color:#0F93DF;">
<?=translate('My Quick Links')?> <?php echo translate('My Quick Links')?>
</td> </td>
<td class="tableTitle" style="background-color:#0F93DF;"><div align="right"> <td class="tableTitle" style="background-color:#0F93DF;"><div align="right">
<? $link->doLink("javascript: help('quick_links');", '?', '', 'color: #FFFFFF', translate('Help') . ' - ' . translate('My Quick Links')) ?> <?php $link->doLink("javascript: help('quick_links');", '?', '', 'color: #FFFFFF', translate('Help') . ' - ' . translate('My Quick Links')) ?>
</div> </div>
</td> </td>
</tr> </tr>
@ -58,12 +58,12 @@ function showQuickLinks() {
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr style="padding: 5px;" class="cellColor"> <tr style="padding: 5px;" class="cellColor">
<td colspan="2"> <td colspan="2">
<? echo "Quarantine Summary" == $_SESSION['sessionNav'] ? <?php echo "Quarantine Summary" == $_SESSION['sessionNav'] ?
' <p class="selectedLink"><b>&raquo;</b>': ' <p class="selectedLink"><b>&raquo;</b>':
" <p><b>&#8250;</b>\t"; " <p><b>&#8250;</b>\t";
$link->doLink('summary.php', translate('Quarantine Summary')) ?> $link->doLink('summary.php', translate('Quarantine Summary')) ?>
</p> </p>
<? echo "My Quarantine" == $_SESSION['sessionNav'] ? <?php echo "My Quarantine" == $_SESSION['sessionNav'] ?
' <p class="selectedLink"><b>&raquo;</b>': ' <p class="selectedLink"><b>&raquo;</b>':
" <p><b>&#8250;</b>\t"; " <p><b>&#8250;</b>\t";
$link->doLink('messagesIndex.php?ctype=A', translate('My Quarantine')); $link->doLink('messagesIndex.php?ctype=A', translate('My Quarantine'));
@ -83,7 +83,7 @@ function showQuickLinks() {
?> ?>
</p> </p>
<br> <br>
<? <?php
if (Auth::isDomainAdmin()) { if (Auth::isDomainAdmin()) {
if ($conf['app']['domainSummary']) { if ($conf['app']['domainSummary']) {
echo "Domain Quarantine Summary" == $_SESSION['sessionNav'] ? echo "Domain Quarantine Summary" == $_SESSION['sessionNav'] ?
@ -146,11 +146,11 @@ function showQuickLinks() {
} }
?> ?>
<p><b>&#8250;</b> <p><b>&#8250;</b>
<? $link->doLink('javascript: help();', translate('Help')) ?> <?php $link->doLink('javascript: help();', translate('Help')) ?>
</p> </p>
<br> <br>
<p><b>&#8250;</b> <p><b>&#8250;</b>
<? $link->doLink('index.php?logout=true', translate('Log Out')) ?> <?php $link->doLink('index.php?logout=true', translate('Log Out')) ?>
</p> </p>
</td> </td>
</tr> </tr>
@ -158,7 +158,7 @@ function showQuickLinks() {
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
/** /**
@ -202,14 +202,14 @@ function startQuickLinksCol() {
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="vertical-align:top; width:16%; border:solid 2px #0F93DF; background-color:#FFFFFF;"> <td style="vertical-align:top; width:16%; border:solid 2px #0F93DF; background-color:#FFFFFF;">
<? <?php
} }
function startDataDisplayCol() { function startDataDisplayCol() {
?> ?>
</td> </td>
<td style="padding-left:5px; vertical-align:top;"> <td style="padding-left:5px; vertical-align:top;">
<? <?php
} }
function endDataDisplayCol() { function endDataDisplayCol() {
@ -217,7 +217,7 @@ function endDataDisplayCol() {
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
/** /**
@ -243,7 +243,7 @@ function printActionButtons( $printDeleteAll = true, $wbselect = true ) {
?> ?>
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr> <tr>
<? <?php
echo "<td align=\"left\">"; echo "<td align=\"left\">";
if (Auth::isMailAdmin()) { if (Auth::isMailAdmin()) {
if ($wbselect) { if ($wbselect) {
@ -302,17 +302,17 @@ function printReportButtons( $query_string, $error_array, $process_action ) {
<form name="error_report_form" action="sendErrorReport.php" method="POST"> <form name="error_report_form" action="sendErrorReport.php" method="POST">
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr> <tr>
<input type="hidden" name="query_string" value="<? echo $query_string; ?> "> <input type="hidden" name="query_string" value="<?php echo $query_string; ?> ">
<input type="hidden" name="serialized_error_array" value="<? echo $serialized_error_array; ?>"> <input type="hidden" name="serialized_error_array" value="<?php echo $serialized_error_array; ?>">
<input type="hidden" name="process_action" value="<? echo $process_action ;?>"> <input type="hidden" name="process_action" value="<?php echo $process_action ;?>">
<td><center> <td><center>
<input type="submit" class="button" name="action" value="<? echo translate('Send report and go back'); ?>">&nbsp; <input type="submit" class="button" name="action" value="<?php echo translate('Send report and go back'); ?>">&nbsp;
<input type="submit" class="button" name="action" value="<? echo translate('Go back'); ?>"> <input type="submit" class="button" name="action" value="<?php echo translate('Go back'); ?>">
</center></td> </center></td>
</tr> </tr>
</table> </table>
</form> </form>
<? <?php
} }
/** /**
@ -322,10 +322,10 @@ function printReportButtons( $query_string, $error_array, $process_action ) {
function printMessage($message) { function printMessage($message) {
$id = urlencode($message); $id = urlencode($message);
?> ?>
<div align="center" id="<? echo $id; ?>" style="display:block;"> <div align="center" id="<?php echo $id; ?>" style="display:block;">
<H4><? echo $message; ?></H4> <H4><?php echo $message; ?></H4>
</div> </div>
<? <?php
ob_flush(); ob_flush();
flush(); flush();
} }

View File

@ -56,10 +56,10 @@ function showMessagesTable($content_type, $res, $page, $order, $vert, $numRows =
<form name="messages_process_form" action="messagesProcessing.php" method="POST"> <form name="messages_process_form" action="messagesProcessing.php" method="POST">
<input type="hidden" name="ctype" value="<? echo $content_type; ?>"> <input type="hidden" name="ctype" value="<?php echo $content_type; ?>">
<input type="hidden" name="query_string" value="<? echo $query_string; ?>"> <input type="hidden" name="query_string" value="<?php echo $query_string; ?>">
<? // Draw 'Release', 'Delete' and 'Delete All' buttons <?php // Draw 'Release', 'Delete' and 'Delete All' buttons
printActionButtons((! CmnFns::didSearch() && ! ("Site Quarantine" == $_SESSION['sessionNav']) && !("Domain Quarantine" == $_SESSION['sessionNav'])) ); printActionButtons((! CmnFns::didSearch() && ! ("Site Quarantine" == $_SESSION['sessionNav']) && !("Domain Quarantine" == $_SESSION['sessionNav'])) );
// Draw 'Select All, Clear All' and multi pages links // Draw 'Select All, Clear All' and multi pages links
printSelectAndPager($pager_html); printSelectAndPager($pager_html);
@ -74,14 +74,12 @@ function showMessagesTable($content_type, $res, $page, $order, $vert, $numRows =
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr> <tr>
<td colspan="5" class="tableTitle"> <td colspan="5" class="tableTitle">
<? echo translate('Showing messages', <?php echo translate('Showing messages', array( number_format($page*$sizeLimit+1), number_format($page*$sizeLimit+$end_entry), $count )); ?>
array( number_format($page*$sizeLimit+1), number_format($page*$sizeLimit+$end_entry), $count )); ?>
</td> </td>
<td class="tableTitle"> <td class="tableTitle">
<div align="right"> <div align="right">
<? $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', <?php $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', translate('Help') . ' - ' . translate('My Quarantine')) ?>
translate('Help') . ' - ' . translate('My Quarantine')) ?>
</div> </div>
</td> </td>
</tr> </tr>
@ -89,51 +87,50 @@ function showMessagesTable($content_type, $res, $page, $order, $vert, $numRows =
<!-- Print messages table --> <!-- Print messages table -->
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<!-- Print table's headers --> <!-- Print table's headers -->
<tr class="rowHeaders"> <tr class="rowHeaders">
<td width="3%">&nbsp;</td> <td width="3%">&nbsp;</td>
<? if ( (count($_SESSION['sessionMail']) > 1) || ((Auth::isMailAdmin() || Auth::isDomainAdmin()) && <?php if ( (count($_SESSION['sessionMail']) > 1) || ((Auth::isMailAdmin() || Auth::isDomainAdmin()) &&
("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav']) ("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav'])
|| ||
("Domain Quarantine" == $_SESSION['sessionNav'] || "Domain Pending Requests" == $_SESSION['sessionNav']) ("Domain Quarantine" == $_SESSION['sessionNav'] || "Domain Pending Requests" == $_SESSION['sessionNav'])
)) { ?> )) { ?>
<td width="15%" <? echo "recip.email"==$order?' class="reservedCell"':''; ?>> <td width="15%" <?php echo "recip.email"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) <?php $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
. '&amp;order=recip.email&amp;vert=' . $new_vert, translate('To'), '', '', $mouseover_text) ?> . '&amp;order=recip.email&amp;vert=' . $new_vert, translate('To'), '', '', $mouseover_text) ?>
</td> </td>
<? } ?> <?php } ?>
<td width="15%" <? echo "from_addr"==$order?' class="reservedCell"':''; ?>> <td width="25%" <?php echo "from_addr"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) <?php $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
. '&amp;order=from_addr&amp;vert=' . $new_vert, translate('From'), '', '', $mouseover_text) ?> . '&amp;order=from_addr&amp;vert=' . $new_vert, translate('From'), '', '', $mouseover_text) ?>
</td> </td>
<td width="40%" <? echo "msgs.subject"==$order?' class="reservedCell"':''; ?>> <td width="33%" <?php echo "msgs.subject"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) <?php $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
. '&amp;order=msgs.subject&amp;vert=' . $new_vert, translate('Subject'), '', '', $mouseover_text) ?> . '&amp;order=msgs.subject&amp;vert=' . $new_vert, translate('Subject'), '', '', $mouseover_text) ?>
</td> </td>
<td width="10%" <? echo "msgs.time_num"==$order?' class="reservedCell"':''; ?>> <td width="10%" <?php echo "msgs.time_num"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) <?php $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
. '&amp;order=msgs.time_num&amp;vert=' . $new_vert, translate('Date'), '', '', $mouseover_text) ?> . '&amp;order=msgs.time_num&amp;vert=' . $new_vert, translate('Date'), '', '', $mouseover_text) ?>
</td> </td>
<td width="7%" <? echo "spam_level"==$order?' class="reservedCell"':''; ?>> <td width="5%" <?php echo "spam_level"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) <?php $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
. '&amp;order=spam_level&amp;vert=' . $new_vert, translate('Score'), '', '', $mouseover_text) ?> . '&amp;order=spam_level&amp;vert=' . $new_vert, translate('Score'), '', '', $mouseover_text) ?>
</td> </td>
<td width="10%" <? echo "msgs.content"==$order?' class="reservedCell"':''; ?>> <td width="5%" <?php echo "msgs.content"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) <?php $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
. '&amp;order=msgs.content&amp;vert=' . $new_vert, translate('Content Type'), '', '', $mouseover_text) ?> . '&amp;order=msgs.content&amp;vert=' . $new_vert, translate('Content Type'), '', '', $mouseover_text) ?>
</td> </td>
<? if ( Auth::isMailAdmin() && <?php if ( Auth::isMailAdmin() &&
("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav']) ("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav'])
) { ?> ) { ?>
<td width="10%" <? echo "mail_id"==$order?' class="reservedCell"':''; ?>> <td width="10%" <?php echo "mail_id"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) <?php $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
. '&amp;order=mail_id&amp;vert=' . $new_vert, translate('Mail ID'), '', '', $mouseover_text) ?> . '&amp;order=mail_id&amp;vert=' . $new_vert, translate('Mail ID'), '', '', $mouseover_text) ?>
</td> </td>
<? } ?> <?php } ?>
</tr> </tr>
<? // For each line in table, print message fields <?php // For each line in table, print message fields
for ($i = $start_entry; $i < $end_entry; $i++) { for ($i = $start_entry; $i < $end_entry; $i++) {
$rs = $res[$i]; $rs = $res[$i];
// Make sure that there is a clickable subject // Make sure that there is a clickable subject
@ -202,16 +199,13 @@ function showMessagesTable($content_type, $res, $page, $order, $vert, $numRows =
</td> </td>
</tr> </tr>
</table> </table>
<?php // Draw 'Select All, Clear All' and multi pages links
<? // Draw 'Select All, Clear All' and multi pages links
printSelectAndPager($pager_html); printSelectAndPager($pager_html);
// Draw 'Release', 'Delete' and 'Delete All' buttons // Draw 'Release', 'Delete' and 'Delete All' buttons
printActionButtons((! CmnFns::didSearch() && ! ("Site Quarantine" == $_SESSION['sessionNav']) && !("Domain Quarantine" == $_SESSION['sessionNav'])), 0); printActionButtons((! CmnFns::didSearch() && ! ("Site Quarantine" == $_SESSION['sessionNav']) && !("Domain Quarantine" == $_SESSION['sessionNav'])), 0);
unset($res); ?> unset($res); ?>
</form> </form>
<? } else { <?php } else {
echo '<table width="100%" border="0" cellspacing="1" cellpadding="0">'; echo '<table width="100%" border="0" cellspacing="1" cellpadding="0">';
echo '<tr><td align="center">' . translate('There are no matching records.') . '</td></tr>'; echo '<tr><td align="center">' . translate('There are no matching records.') . '</td></tr>';
echo '</table>'; echo '</table>';
@ -331,25 +325,25 @@ function printSearchEngine($content_type, $submit_page, $full_search = false) {
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr> <tr>
<td class="tableTitle"> <td class="tableTitle">
<a href="javascript: void(0);" onclick="showHideSearch('search');">&#8250; <?=translate('Search')?></a> <a href="javascript: void(0);" onclick="showHideSearch('search');">&#8250; <?php echo translate('Search')?></a>
</td> </td>
<td class="tableTitle"> <td class="tableTitle">
<div align="right"> <div align="right">
<? $link->doLink('javascript: help(\'search\');', '?', '', 'color: #FFFFFF;', translate('Help') . ' - ' . translate('My Re <?php $link->doLink('javascript: help(\'search\');', '?', '', 'color: #FFFFFF;', translate('Help') . ' - ' . translate('My Re
servations')) ?> servations')) ?>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
<div id="search" style="display: <?= getShowHide('search') ?>"> <div id="search" style="display: <?php echo getShowHide('search') ?>">
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <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> <tr class="cellColor"><td><center><?php CmnFns::searchEngine($content_type, $submit_page, $full_search); ?></center></td></tr>
</table> </table>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
@ -363,12 +357,12 @@ function printSelectAndPager($pager_html) {
<table class="stdFont" width="100%" border="0" cellspacing="1" cellpadding="0"> <table class="stdFont" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr> <tr>
<td> <td>
<a href="javascript:CheckAll(document.messages_process_form);"><? echo translate('Select All'); ?></a>&nbsp;|&nbsp; <a href="javascript:CheckAll(document.messages_process_form);"><?php echo translate('Select All'); ?></a>&nbsp;|&nbsp;
<a href="javascript:CheckNone(document.messages_process_form);"><? echo translate('Clear All'); ?></a> <a href="javascript:CheckNone(document.messages_process_form);"><?php echo translate('Clear All'); ?></a>
</td> </td>
<td> <td>
<div align="right"> <div align="right">
<? <?php
// Draw the paging links if more than 1 page // Draw the paging links if more than 1 page
echo $pager_html . "\n"; echo $pager_html . "\n";
?> ?>
@ -376,7 +370,7 @@ function printSelectAndPager($pager_html) {
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
/** /**
@ -390,14 +384,14 @@ function printNoMesgWarning() {
<tr><td class="tableBorder"> <tr><td class="tableBorder">
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr class="cellColor"><td> <tr class="cellColor"><td>
<center><? echo translate('No message was selected'); ?><br> <center><?php echo translate('No message was selected'); ?><br>
<? $link->doLink('javascript: history.back();','&#8249;&#8249; ' . translate('BackMessageIndex'), '', '', <?php $link->doLink('javascript: history.back();','&#8249;&#8249; ' . translate('BackMessageIndex'), '', '',
translate('BackMessageIndex')); ?></center> translate('BackMessageIndex')); ?></center>
</td></tr> </td></tr>
</table> </table>
</td></tr> </td></tr>
</table> </table>
<? <?php
} }
/** /**
@ -418,7 +412,7 @@ function showFailedMessagesTable($action, $content_type, $res) {
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr> <tr>
<td colspan="5" class="tableTitle"> <td colspan="5" class="tableTitle">
<? if ( $action == translate('Release') || $action == translate('Release/Request release') ) <?php if ( $action == translate('Release') || $action == translate('Release/Request release') )
echo translate('A problem occured when trying to release the following messages'); echo translate('A problem occured when trying to release the following messages');
elseif ( $action == translate('Delete') || $action == translate('Delete All') ) elseif ( $action == translate('Delete') || $action == translate('Delete All') )
echo translate('A problem occured when trying to delete the following messages'); echo translate('A problem occured when trying to delete the following messages');
@ -426,7 +420,7 @@ function showFailedMessagesTable($action, $content_type, $res) {
</td> </td>
<td class="tableTitle"> <td class="tableTitle">
<div align="right"> <div align="right">
<? $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', translate('Help') ) ?> <?php $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', translate('Help') ) ?>
</div> </div>
</td> </td>
</tr> </tr>
@ -435,17 +429,17 @@ function showFailedMessagesTable($action, $content_type, $res) {
<!-- Print table headers --> <!-- Print table headers -->
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr class="rowHeaders"> <tr class="rowHeaders">
<td width="20%"><? echo translate('From'); ?></td> <td width="20%"><?php echo translate('From'); ?></td>
<td width="30%"><? echo translate('Subject'); ?></td> <td width="30%"><?php echo translate('Subject'); ?></td>
<td width="10%"><? echo translate('Date'); ?></td> <td width="10%"><?php echo translate('Date'); ?></td>
<? if ( 'S' == $content_type ) { ?> <?php if ( 'S' == $content_type ) { ?>
<td width="10%"><? echo translate('Score'); ?></td> <td width="10%"><?php echo translate('Score'); ?></td>
<? } ?> <?php } ?>
<td width="30%"><? echo translate('Status'); ?></td> <td width="30%"><?php echo translate('Status'); ?></td>
</tr> </tr>
<!-- Print table rows --> <!-- Print table rows -->
<? <?php
for ($i = 0; is_array($res) && $i < count($res); $i++) { for ($i = 0; is_array($res) && $i < count($res); $i++) {
$rs = $res[$i]; $rs = $res[$i];
$subject = $rs['subject'] ? $rs['subject'] : '(none)'; $subject = $rs['subject'] ? $rs['subject'] : '(none)';
@ -463,7 +457,7 @@ function showFailedMessagesTable($action, $content_type, $res) {
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }

View File

@ -19,7 +19,7 @@ function printsendmail(){
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr> <tr>
<td class="tableTitle"> <td class="tableTitle">
<? <?php
$adminEmail = $conf['app']['adminEmail']; $adminEmail = $conf['app']['adminEmail'];
$emailList = ''; $emailList = '';
if ( is_array($adminEmail) ) { if ( is_array($adminEmail) ) {
@ -35,7 +35,7 @@ function printsendmail(){
</td> </td>
<td class="tableTitle"> <td class="tableTitle">
<div align="right"> <div align="right">
<? $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', <?php $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;',
translate('Help') . ' - ' . translate('Email Administrator')) ?> translate('Help') . ' - ' . translate('Email Administrator')) ?>
</div> </div>
</td> </td>
@ -45,11 +45,11 @@ function printsendmail(){
<table class="stdFont" width="100%" height="100%" border="0" cellspacing="1" cellpadding="0"> <table class="stdFont" width="100%" height="100%" border="0" cellspacing="1" cellpadding="0">
<tr class="cellColor" align="left"> <tr class="cellColor" align="left">
<form name="sendmail_to_admin_form" action="<? echo $_SERVER['PHP_SELF']; ?>" method="POST"> <form name="sendmail_to_admin_form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<td><br /> <td><br />
&nbsp;&nbsp;<? echo translate('Subject') . ": " ;?><br /> &nbsp;&nbsp;<?php echo translate('Subject') . ": " ;?><br />
&nbsp;&nbsp;<input name="subject" type="text" size="60"><br /><br /> &nbsp;&nbsp;<input name="subject" type="text" size="60"><br /><br />
&nbsp;&nbsp;<? echo translate('Message') . ": " ;?><br /> &nbsp;&nbsp;<?php echo translate('Message') . ": " ;?><br />
&nbsp;&nbsp;<textarea name="body" cols="60" rows="15"></textarea><br/> &nbsp;&nbsp;<textarea name="body" cols="60" rows="15"></textarea><br/>
&nbsp;&nbsp;<input type="submit" class="button" name="action" value="send"><br /><br /> &nbsp;&nbsp;<input type="submit" class="button" name="action" value="send"><br /><br />
</form> </form>
@ -60,7 +60,7 @@ function printsendmail(){
</tr> </tr>
</table> </table>
<? <?php
} }

View File

@ -33,12 +33,12 @@ function showSummary($count_array) {
<table width="100%" border="0" cellspacing="1" cellpadding="0"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr> <tr>
<td colspan="5" class="tableTitle"> <td colspan="5" class="tableTitle">
<? echo translate($_SESSION['sessionNav']); ?> <?php echo translate($_SESSION['sessionNav']); ?>
</td> </td>
<td class="tableTitle"> <td class="tableTitle">
<div align="right"> <div align="right">
<? $link->doLink('javascript: help(\'msg_summary\');', '?', '', 'color: #FFFFFF;', <?php $link->doLink('javascript: help(\'msg_summary\');', '?', '', 'color: #FFFFFF;',
translate('Help') . ' - ' . translate($_SESSION['sessionNav'])) ?> translate('Help') . ' - ' . translate($_SESSION['sessionNav'])) ?>
</div> </div>
</td> </td>
@ -52,29 +52,29 @@ function showSummary($count_array) {
<!-- Print table's headers --> <!-- Print table's headers -->
<tr class="rowHeaders"> <tr class="rowHeaders">
<td width="15%"> <td width="15%">
<? echo translate('Date'); ?> <?php echo translate('Date'); ?>
</td> </td>
<td width="14%"> <td width="14%">
<? echo translate('Spam'); ?> <?php echo translate('Spam'); ?>
</td> </td>
<td width="14%"> <td width="14%">
<? echo translate('Banned'); ?> <?php echo translate('Banned'); ?>
</td> </td>
<td width="14%"> <td width="14%">
<? echo translate('Viruses'); ?> <?php echo translate('Viruses'); ?>
</td> </td>
<td width="14%"> <td width="14%">
<? echo translate('Bad Headers'); ?> <?php echo translate('Bad Headers'); ?>
</td> </td>
<td width="14%"> <td width="14%">
<? echo translate('Pending Requests'); ?> <?php echo translate('Pending Requests'); ?>
</td> </td>
<td width="15%"> <td width="15%">
<? echo translate('Total'); ?> <?php echo translate('Total'); ?>
</td> </td>
</tr> </tr>
<? $i = 0; <?php $i = 0;
foreach ($count_array as $key => $val) { foreach ($count_array as $key => $val) {
echo '<tr class="' . 'cellColor' . ($i++%2) . ' align="center">'; echo '<tr class="' . 'cellColor' . ($i++%2) . ' align="center">';
echo ($key == 'Total' ? '<td class="rowTotals">' : '<td class="rowNumValues">') . "$key</td> \n"; echo ($key == 'Total' ? '<td class="rowTotals">' : '<td class="rowNumValues">') . "$key</td> \n";
@ -89,7 +89,7 @@ function showSummary($count_array) {
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
?> ?>

View File

@ -25,7 +25,7 @@ function startMessage() {
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td class="tableTitle" style="background-color:#0F93DF;"> <td class="tableTitle" style="background-color:#0F93DF;">
<? echo translate('Message'); ?> <?php echo translate('Message'); ?>
</td> </td>
<td class="tableTitle" style="background-color:#0F93DF;"> <td class="tableTitle" style="background-color:#0F93DF;">
<div align="right" <div align="right"
@ -34,7 +34,7 @@ function startMessage() {
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
function endMessage() { function endMessage() {
@ -42,7 +42,7 @@ function endMessage() {
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
/** /**
@ -50,8 +50,10 @@ function endMessage() {
* $param The mime structure object and the specific header name * $param The mime structure object and the specific header name
*/ */
function MsgPrintHeader($struct,$hdr_list) { function MsgPrintHeader($struct,$hdr_list) {
foreach ($hdr_list as $hdr) { foreach ($hdr_list as $hdr) {
if (!array_key_exists(strtolower($hdr), $struct->headers)) {
continue;
}
$header_value = $struct->headers[strtolower($hdr)]; $header_value = $struct->headers[strtolower($hdr)];
if (is_array($header_value)) { if (is_array($header_value)) {
$value_array = $header_value; $value_array = $header_value;
@ -79,10 +81,14 @@ function MsgPrintHeader($struct,$hdr_list) {
* $param The mime structure object and the specific header name * $param The mime structure object and the specific header name
*/ */
function MsgPrintHeaderFull($struct,$hdr_list) { function MsgPrintHeaderFull($struct,$hdr_list) {
foreach ($hdr_list as $hdr) { foreach ($hdr_list as $hdr) {
if (!array_key_exists(strtolower($hdr), $struct->headers)) {
continue;
}
$header_value = $struct->headers[strtolower($hdr)]; $header_value = $struct->headers[strtolower($hdr)];
if (!$header_value) continue; if (!$header_value) {
continue;
}
if (is_array($header_value)) { if (is_array($header_value)) {
$value_array = $header_value; $value_array = $header_value;
$count = count($value_array); $count = count($value_array);
@ -116,17 +122,17 @@ function MsgDisplayOptions($mail_id, $recip_email) {
<table class="stdFont" width="100%"> <table class="stdFont" width="100%">
<tr> <tr>
<td align="left"> <td align="left">
<a href="javascript: history.back();">&#8249;&#8249; <? echo translate('BackMessageIndex'); ?> </a> <a href="javascript: history.back();">&#8249;&#8249; <?php echo translate('BackMessageIndex'); ?> </a>
</td> </td>
<td align="right"> <td align="right">
<a href="javascript: ViewOriginal('<? echo $enc_mail_id ?>','<? echo $enc_recip_email ?>');"> <? echo translate('ViewOriginal'); ?></a> <a href="javascript: ViewOriginal('<?php echo $enc_mail_id ?>','<?php echo $enc_recip_email ?>');"> <?php echo translate('ViewOriginal'); ?></a>
| |
<a href="javascript: void(1);" onclick="showHideFullHeaders('headers');"> <a href="javascript: void(1);" onclick="showHideFullHeaders('headers');">
<? echo translate('ToggleHeaders'); ?></a> <?php echo translate('ToggleHeaders'); ?></a>
</td> </td>
</tr> </tr>
</table> </table>
<? <?php
} }
/** /**
@ -138,14 +144,14 @@ function MsgOriginalOptions() {
<table width="100%"> <table width="100%">
<tr> <tr>
<td class="stdFont" align="right"> <td class="stdFont" align="right">
<a href="javascript: window.print();"> <? echo translate('Print'); ?></a> <a href="javascript: window.print();"> <?php echo translate('Print'); ?></a>
| |
<a href="javascript: window.close();"> <? echo translate('CloseWindow'); ?> </a> <a href="javascript: window.close();"> <?php echo translate('CloseWindow'); ?> </a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="stdFont" bgcolor="#FAFAFA"> <td class="stdFont" bgcolor="#FAFAFA">
<? <?php
} }
@ -194,7 +200,10 @@ function MsgDisplayBody($struct) {
* $param The body of a mime structure object * $param The body of a mime structure object
*/ */
function MsgBodyPlainText($text) { function MsgBodyPlainText($text) {
echo nl2br(htmlspecialchars($text)); // echo nl2br(htmlspecialchars($text));
echo "<pre>";
echo htmlspecialchars($text);
echo "</pre>";
} }
/** /**