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('RES_TYPE_ADD', 'r');
define('RES_TYPE_MODIFY', 'm');

View File

@ -127,14 +127,16 @@ Alternating row colors
Got rid of the contextual selector '.cellColor0 td'
*/
.cellColor0, td.cellColor0 {
font-family: monospace;
padding: 2px;
background-color: #FFFFFF;
font-size: 11px;
font-size: 10px;
}
td.cellColor1, .cellColor1 {
.cellColor1, td.cellColor1 {
font-family: monospace;
padding: 2px;
background-color: #F8FAEA;
font-size: 11px;
font-size: 10px;
}
/*
Special Alternating row colors for viruses
@ -461,6 +463,7 @@ div.mycal_div {
}
.stdFont {
/* font-family: monospace;*/
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"
"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>
<title>MailZu <?=translate('Help')?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>" />
<title>MailZu <?php echo translate('Help')?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset?>" />
<style type="text/css">
<!--
li {
@ -60,7 +60,7 @@ a:hover {
</style>
</head>
<body>
<?
<?php
$help_file = 'lang/' . $languages[$lang][2] . '.help.php';
if (file_exists($help_file)) {
include_once($help_file);

View File

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

View File

@ -356,7 +356,7 @@ class CmnFns {
global $conf;
?>
<select name="language" class="textbox" onchange="changeLanguage(this);">
<?
<?php
$languages = get_language_list();
foreach ($languages as $lang => $settings) {
echo '<option value="' . $lang . '"'
@ -365,7 +365,7 @@ class CmnFns {
}
?>
</select>
<?
<?php
}
/**
@ -452,10 +452,10 @@ class CmnFns {
$query_string = CmnFns::array_to_query_string( $_GET, array( 'page' ) );
$query_string_first = $query_string . '&page=0';
$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')) . " | ";
} else {
$pager_html .= translate('first') . " | " . translate('previous') ." | ";
$pager_html = translate('first') . " | " . translate('previous') ." | ";
}
$pager_html .= '&nbsp;&nbsp;';
@ -466,7 +466,7 @@ class CmnFns {
for( $i=0; $i<$count; $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 ) {
$pager_html .= '...&nbsp;&nbsp;';
$elipsis_printed = true;
@ -486,8 +486,8 @@ class CmnFns {
if( $page+1 < $total_pages ) {
$query_string = CmnFns::array_to_query_string( $_GET, array( 'page' ) );
$query_string_next .= $query_string . '&page=' . ($page+1);
$query_string_last .= $query_string . '&page=' . (ceil($total_pages)-1);
$query_string_next = $query_string . '&page=' . ($page+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_last, translate('last'), '', '', translate('Go to last page'));
} else {
@ -514,11 +514,11 @@ class CmnFns {
?>
<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;
<?
<?php
$i = 1;
$array_size = count($fields_array);
foreach ($fields_array as $k => $name) {
@ -543,34 +543,34 @@ class CmnFns {
$i ++;
}
?>
<? echo translate('Content Type'); ?>:
<?php echo translate('Content Type'); ?>:
<select name="ctype" class="button">
<option value="A" <? echo ($content_type == 'A' ? ' selected="true"':''); ?>>
<? echo translate('All'); ?></option>
<option value="S" <? echo ($content_type == 'S' ? ' selected="true"':''); ?>>
<? echo translate('Spam'); ?></option>
<option value="B" <? echo ($content_type == 'B' ? ' selected="true"':''); ?>>
<? echo translate('Banned'); ?></option>
<? if ((Auth::isMailAdmin() || Auth::isDomainAdmin()) || $conf['app']['allowViruses']) { ?>
<option value="V" <? echo ($content_type == 'V' ? ' selected="true"':''); ?>>
<? echo translate('Virus'); ?></option>
<? }
<option value="A" <?php echo ($content_type == 'A' ? ' selected="true"':''); ?>>
<?php echo translate('All'); ?></option>
<option value="S" <?php echo ($content_type == 'S' ? ' selected="true"':''); ?>>
<?php echo translate('Spam'); ?></option>
<option value="B" <?php echo ($content_type == 'B' ? ' selected="true"':''); ?>>
<?php echo translate('Banned'); ?></option>
<?php if ((Auth::isMailAdmin() || Auth::isDomainAdmin()) || $conf['app']['allowViruses']) { ?>
<option value="V" <?php echo ($content_type == 'V' ? ' selected="true"':''); ?>>
<?php echo translate('Virus'); ?></option>
<?php }
if ((Auth::isMailAdmin() || Auth::isDomainAdmin()) || $conf['app']['allowBadHeaders']) { ?>
<option value="H" <? echo ($content_type == 'H' ? ' selected="true"':''); ?>>
<? echo translate('Bad Header'); ?></option>
<? }
<option value="H" <?php echo ($content_type == 'H' ? ' selected="true"':''); ?>>
<?php echo translate('Bad Header'); ?></option>
<?php }
echo "</select>";
$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";
?>
<input type="submit" class="button" name="search_action" value="<? echo translate('Search'); ?>" />
<? if (CmnFns::didSearch())
<input type="submit" class="button" name="search_action" value="<?php echo translate('Search'); ?>" />
<?php if (CmnFns::didSearch())
echo "<input type=\"submit\" class=\"button\" name=\"search_action\" value=\"" . translate('Clear search results') . "\" />";
?>
&nbsp;</td></tr>
</form>
</table>
<?
<?php
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
/**
* CmnFns class
*/
include_once('CmnFns.class.php');
include_once('lib/CmnFns.class.php');
/**
* Include AmavisdEngine class
*/
@ -123,8 +123,7 @@ function releaseMessages($emailaddresses, $mail_id_array) {
global $conf;
// If release request needs to be sent to Admins
if ( is_array($release_req_messages) && !empty($release_req_messages)
&& $conf['app']['notifyAdmin'] )
if ( is_array($release_req_messages) && !empty($release_req_messages) && $conf['app']['notifyAdmin'] )
sendMailToAdmin(translate('Request release'), $release_req_messages);
// If release needs to be done
@ -252,15 +251,14 @@ function updateMessages($flag, $content_type, $emailaddresses, $mail_id_array, $
}
} else {
$i = 0;
foreach ($mail_id_array as $mail_id_recip) {
// Get mail_id and recipient email address
$temp = preg_split('/_/', $mail_id_recip);
$mail_id = str_replace("_" . $temp[(sizeof($temp) - 1)], "", $mail_id_recip);
$recip_email = $temp[(sizeof($temp) - 1)];
//$temp = preg_split('/_/', $mail_id_recip, 2);
//$mail_id = $temp[0];
//$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
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"
"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>
<title>
<?=$this->title?>
<?php echo $this->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" />
<script language="JavaScript" type="text/javascript" src="<?=$path?>functions.js"></script>
<!--<link href="<?=$path?>css.css" rel="stylesheet" type="text/css" />-->
<script language="JavaScript" type="text/javascript" src="<?php echo $path?>functions.js"></script>
<!--<link href="<?php echo $path?>css.css" rel="stylesheet" type="text/css" />-->
<style type="text/css">
@import url(<?=$path?>css.css);
@import url(<?php echo $path?>css.css);
</style>
</head>
<body>
<?
<?php
}
@ -96,31 +96,31 @@ class Template {
<tr>
<td class="mainBkgrdClr">
<h4 class="welcomeBack">
<?=
translate('Welcome Back', array($_SESSION['sessionName'], 1));
<?php
echo translate('Welcome Back', array($_SESSION['sessionName'], 1));
// Notify if the person logged in is admin
echo (Auth::isMailAdmin() ? ' (' . translate('Administrator') . ')' : '');
?>
</h4>
<!--<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>-->
</td>
<td class="mainBkgrdClr" valign="top">
<div align="right">
<p>
<?= translate_date('header', mktime());?>
<?php echo translate_date('header', mktime());?>
</p>
<!--<p>
<? $this->link->doLink('javascript: help();', translate('Help')) ?>
<?php $this->link->doLink('javascript: help();', translate('Help')) ?>
</p>-->
</div>
</td>
</tr>
</table>
<?
<?php
}
@ -134,7 +134,7 @@ class Template {
<table width="100%" border="0" cellspacing="0" cellpadding="10" style="border: solid #CCCCCC 1px;">
<tr>
<td bgcolor="#FAFAFA">
<?
<?php
}
@ -147,7 +147,7 @@ class Template {
</td>
</tr>
</table>
<?
<?php
}
@ -160,10 +160,10 @@ class Template {
function printHTMLFooter() {
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>
</html>
<?
<?php
}
/**

View File

@ -53,9 +53,9 @@ startDataDisplayCol();
if (! Auth::isMailAdmin()) {
CmnFns::do_error_box(translate('Access Denied'));
} else {
// Draw search engine
$content_type = (CmnFns::get_ctype() ? CmnFns::get_ctype() : 'A');
printSearchEngine($content_type, $_SERVER['PHP_SELF'], 1);
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');
// 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>";

View File

@ -51,8 +51,9 @@ startDataDisplayCol();
if (! Auth::isMailAdmin()) {
CmnFns::do_error_box(translate('Access Denied'));
} else {
// Arbitrary type for Admin
$content_type = (CmnFns::get_ctype() ? CmnFns::get_ctype() : 'A');
// Draw search engine
printSearchEngine($content_type, $_SERVER['PHP_SELF'], 1);
echo '<br>';
@ -67,8 +68,6 @@ if (! Auth::isMailAdmin()) {
$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');
// Arbitrary type for Admin
$content_type = (CmnFns::get_ctype() ? CmnFns::get_ctype() : 'A');
// Print a loading message until database returns...
printMessage(translate('Retrieving Messages...'));

View File

@ -27,19 +27,19 @@ function printLoginForm($msg = '', $resume = '') {
if (!empty($msg))
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">
<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>
<h5 align="center"><?php echo translate('Please Log In')?></h5>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="150">
<p><b><?=translate('Login')?></b></p>
<p><b><?php echo translate('Login')?></b></p>
</td>
<td>
<input type="text" name="email" class="textbox" />
@ -47,7 +47,7 @@ function printLoginForm($msg = '', $resume = '') {
</tr>
<tr bgcolor="#FFFFFF">
<td>
<p><b><?=translate('Password')?></b></p>
<p><b><?php echo translate('Password')?></b></p>
</td>
<td>
<input type="password" name="password" class="textbox" />
@ -56,26 +56,26 @@ function printLoginForm($msg = '', $resume = '') {
<?php if ($conf['auth']['serverType'] === 'exchange') { ?>
<tr bgcolor="#FFFFFF">
<td>
<p><b><?=translate('Domain')?></b></p>
<p><b><?php echo translate('Domain')?></b></p>
</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>
</tr>
<?php }
if ($conf['app']['selectLanguage']) { ?>
<tr bgcolor="#FFFFFF">
<td>
<p><b><?=translate('Language')?></b></p>
<p><b><?php echo translate('Language')?></b></p>
</td>
<td>
<?CmnFns::print_language_pulldown()?>
<?php CmnFns::print_language_pulldown()?>
</td>
</tr>
<?php } ?>
<tr bgcolor="#FFFFFF">
<td>
<p><b><?=translate('Keep me logged in')?></b></p>
<p><b><?php echo translate('Keep me logged in')?></b></p>
</td>
<td>
<input type="checkbox" name="setCookie" value="true" />
@ -84,8 +84,8 @@ function printLoginForm($msg = '', $resume = '') {
<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?>" />
<input type="submit" name="login" value="<?php echo translate('Log In')?>" class="button" />
<input type="hidden" name="resume" value="<?php echo $resume?>" />
</p>
</td>
</tr>
@ -94,9 +94,9 @@ function printLoginForm($msg = '', $resume = '') {
</tr>
</table>
<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>
</form>
<?
<?php
}
?>

View File

@ -47,10 +47,10 @@ function showQuickLinks() {
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tableTitle" style="background-color:#0F93DF;">
<?=translate('My Quick Links')?>
<?php echo 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')) ?>
<?php $link->doLink("javascript: help('quick_links');", '?', '', 'color: #FFFFFF', translate('Help') . ' - ' . translate('My Quick Links')) ?>
</div>
</td>
</tr>
@ -58,12 +58,12 @@ function showQuickLinks() {
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr style="padding: 5px;" class="cellColor">
<td colspan="2">
<? echo "Quarantine Summary" == $_SESSION['sessionNav'] ?
<?php echo "Quarantine Summary" == $_SESSION['sessionNav'] ?
' <p class="selectedLink"><b>&raquo;</b>':
" <p><b>&#8250;</b>\t";
$link->doLink('summary.php', translate('Quarantine Summary')) ?>
</p>
<? echo "My Quarantine" == $_SESSION['sessionNav'] ?
<?php echo "My Quarantine" == $_SESSION['sessionNav'] ?
' <p class="selectedLink"><b>&raquo;</b>':
" <p><b>&#8250;</b>\t";
$link->doLink('messagesIndex.php?ctype=A', translate('My Quarantine'));
@ -83,7 +83,7 @@ function showQuickLinks() {
?>
</p>
<br>
<?
<?php
if (Auth::isDomainAdmin()) {
if ($conf['app']['domainSummary']) {
echo "Domain Quarantine Summary" == $_SESSION['sessionNav'] ?
@ -146,11 +146,11 @@ function showQuickLinks() {
}
?>
<p><b>&#8250;</b>
<? $link->doLink('javascript: help();', translate('Help')) ?>
<?php $link->doLink('javascript: help();', translate('Help')) ?>
</p>
<br>
<p><b>&#8250;</b>
<? $link->doLink('index.php?logout=true', translate('Log Out')) ?>
<?php $link->doLink('index.php?logout=true', translate('Log Out')) ?>
</p>
</td>
</tr>
@ -158,7 +158,7 @@ function showQuickLinks() {
</td>
</tr>
</table>
<?
<?php
}
/**
@ -202,14 +202,14 @@ 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;">
<?
<?php
}
function startDataDisplayCol() {
?>
</td>
<td style="padding-left:5px; vertical-align:top;">
<?
<?php
}
function endDataDisplayCol() {
@ -217,7 +217,7 @@ function endDataDisplayCol() {
</td>
</tr>
</table>
<?
<?php
}
/**
@ -243,7 +243,7 @@ function printActionButtons( $printDeleteAll = true, $wbselect = true ) {
?>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<?
<?php
echo "<td align=\"left\">";
if (Auth::isMailAdmin()) {
if ($wbselect) {
@ -302,17 +302,17 @@ function printReportButtons( $query_string, $error_array, $process_action ) {
<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 ;?>">
<input type="hidden" name="query_string" value="<?php echo $query_string; ?> ">
<input type="hidden" name="serialized_error_array" value="<?php echo $serialized_error_array; ?>">
<input type="hidden" name="process_action" value="<?php echo $process_action ;?>">
<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="<? echo translate('Go back'); ?>">
<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="<?php echo translate('Go back'); ?>">
</center></td>
</tr>
</table>
</form>
<?
<?php
}
/**
@ -322,10 +322,10 @@ function printReportButtons( $query_string, $error_array, $process_action ) {
function printMessage($message) {
$id = urlencode($message);
?>
<div align="center" id="<? echo $id; ?>" style="display:block;">
<H4><? echo $message; ?></H4>
<div align="center" id="<?php echo $id; ?>" style="display:block;">
<H4><?php echo $message; ?></H4>
</div>
<?
<?php
ob_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">
<input type="hidden" name="ctype" value="<? echo $content_type; ?>">
<input type="hidden" name="query_string" value="<? echo $query_string; ?>">
<input type="hidden" name="ctype" value="<?php echo $content_type; ?>">
<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'])) );
// Draw 'Select All, Clear All' and multi pages links
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">
<tr>
<td colspan="5" class="tableTitle">
<? echo translate('Showing messages',
array( number_format($page*$sizeLimit+1), number_format($page*$sizeLimit+$end_entry), $count )); ?>
<?php 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')) ?>
<?php $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', translate('Help') . ' - ' . translate('My Quarantine')) ?>
</div>
</td>
</tr>
@ -89,51 +87,50 @@ function showMessagesTable($content_type, $res, $page, $order, $vert, $numRows =
<!-- Print messages table -->
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<!-- Print table's headers -->
<tr class="rowHeaders">
<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'])
||
("Domain Quarantine" == $_SESSION['sessionNav'] || "Domain 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'))
<td width="15%" <?php echo "recip.email"==$order?' class="reservedCell"':''; ?>>
<?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) ?>
</td>
<? } ?>
<td width="15%" <? echo "from_addr"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
<?php } ?>
<td width="25%" <?php echo "from_addr"==$order?' class="reservedCell"':''; ?>>
<?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) ?>
</td>
<td width="40%" <? echo "msgs.subject"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
<td width="33%" <?php echo "msgs.subject"==$order?' class="reservedCell"':''; ?>>
<?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) ?>
</td>
<td width="10%" <? echo "msgs.time_num"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
<td width="10%" <?php echo "msgs.time_num"==$order?' class="reservedCell"':''; ?>>
<?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) ?>
</td>
<td width="7%" <? echo "spam_level"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
<td width="5%" <?php echo "spam_level"==$order?' class="reservedCell"':''; ?>>
<?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) ?>
</td>
<td width="10%" <? echo "msgs.content"==$order?' class="reservedCell"':''; ?>>
<? $link->doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert'))
<td width="5%" <?php echo "msgs.content"==$order?' class="reservedCell"':''; ?>>
<?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) ?>
</td>
<? if ( Auth::isMailAdmin() &&
<?php 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'))
<td width="10%" <?php echo "mail_id"==$order?' class="reservedCell"':''; ?>>
<?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) ?>
</td>
<? } ?>
<?php } ?>
</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++) {
$rs = $res[$i];
// Make sure that there is a clickable subject
@ -202,16 +199,13 @@ function showMessagesTable($content_type, $res, $page, $order, $vert, $numRows =
</td>
</tr>
</table>
<? // Draw 'Select All, Clear All' and multi pages links
<?php // 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']) && !("Domain Quarantine" == $_SESSION['sessionNav'])), 0);
unset($res); ?>
</form>
<? } else {
<?php } 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>';
@ -331,25 +325,25 @@ function printSearchEngine($content_type, $submit_page, $full_search = false) {
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<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 class="tableTitle">
<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')) ?>
</div>
</td>
</tr>
</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">
<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>
</div>
</td>
</tr>
</table>
<?
<?php
}
@ -363,12 +357,12 @@ 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>&nbsp;|&nbsp;
<a href="javascript:CheckNone(document.messages_process_form);"><? echo translate('Clear All'); ?></a>
<a href="javascript:CheckAll(document.messages_process_form);"><?php echo translate('Select All'); ?></a>&nbsp;|&nbsp;
<a href="javascript:CheckNone(document.messages_process_form);"><?php echo translate('Clear All'); ?></a>
</td>
<td>
<div align="right">
<?
<?php
// Draw the paging links if more than 1 page
echo $pager_html . "\n";
?>
@ -376,7 +370,7 @@ function printSelectAndPager($pager_html) {
</td>
</tr>
</table>
<?
<?php
}
/**
@ -390,14 +384,14 @@ function printNoMesgWarning() {
<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();','&#8249;&#8249; ' . translate('BackMessageIndex'), '', '',
<center><?php echo translate('No message was selected'); ?><br>
<?php $link->doLink('javascript: history.back();','&#8249;&#8249; ' . translate('BackMessageIndex'), '', '',
translate('BackMessageIndex')); ?></center>
</td></tr>
</table>
</td></tr>
</table>
<?
<?php
}
/**
@ -418,7 +412,7 @@ function showFailedMessagesTable($action, $content_type, $res) {
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<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');
elseif ( $action == translate('Delete') || $action == translate('Delete All') )
echo translate('A problem occured when trying to delete the following messages');
@ -426,7 +420,7 @@ function showFailedMessagesTable($action, $content_type, $res) {
</td>
<td class="tableTitle">
<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>
</td>
</tr>
@ -435,17 +429,17 @@ function showFailedMessagesTable($action, $content_type, $res) {
<!-- 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>
<td width="20%"><?php echo translate('From'); ?></td>
<td width="30%"><?php echo translate('Subject'); ?></td>
<td width="10%"><?php echo translate('Date'); ?></td>
<?php if ( 'S' == $content_type ) { ?>
<td width="10%"><?php echo translate('Score'); ?></td>
<?php } ?>
<td width="30%"><?php echo translate('Status'); ?></td>
</tr>
<!-- Print table rows -->
<?
<?php
for ($i = 0; is_array($res) && $i < count($res); $i++) {
$rs = $res[$i];
$subject = $rs['subject'] ? $rs['subject'] : '(none)';
@ -463,7 +457,7 @@ function showFailedMessagesTable($action, $content_type, $res) {
</td>
</tr>
</table>
<?
<?php
}

View File

@ -19,7 +19,7 @@ function printsendmail(){
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tableTitle">
<?
<?php
$adminEmail = $conf['app']['adminEmail'];
$emailList = '';
if ( is_array($adminEmail) ) {
@ -35,7 +35,7 @@ function printsendmail(){
</td>
<td class="tableTitle">
<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')) ?>
</div>
</td>
@ -45,11 +45,11 @@ function printsendmail(){
<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">
<form name="sendmail_to_admin_form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<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;<? echo translate('Message') . ": " ;?><br />
&nbsp;&nbsp;<?php echo translate('Message') . ": " ;?><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 />
</form>
@ -60,7 +60,7 @@ function printsendmail(){
</tr>
</table>
<?
<?php
}

View File

@ -33,12 +33,12 @@ function showSummary($count_array) {
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td colspan="5" class="tableTitle">
<? echo translate($_SESSION['sessionNav']); ?>
<?php echo translate($_SESSION['sessionNav']); ?>
</td>
<td class="tableTitle">
<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'])) ?>
</div>
</td>
@ -52,29 +52,29 @@ function showSummary($count_array) {
<!-- Print table's headers -->
<tr class="rowHeaders">
<td width="15%">
<? echo translate('Date'); ?>
<?php echo translate('Date'); ?>
</td>
<td width="14%">
<? echo translate('Spam'); ?>
<?php echo translate('Spam'); ?>
</td>
<td width="14%">
<? echo translate('Banned'); ?>
<?php echo translate('Banned'); ?>
</td>
<td width="14%">
<? echo translate('Viruses'); ?>
<?php echo translate('Viruses'); ?>
</td>
<td width="14%">
<? echo translate('Bad Headers'); ?>
<?php echo translate('Bad Headers'); ?>
</td>
<td width="14%">
<? echo translate('Pending Requests'); ?>
<?php echo translate('Pending Requests'); ?>
</td>
<td width="15%">
<? echo translate('Total'); ?>
<?php echo translate('Total'); ?>
</td>
</tr>
<? $i = 0;
<?php $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";
@ -89,7 +89,7 @@ function showSummary($count_array) {
</td>
</tr>
</table>
<?
<?php
}
?>

View File

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