Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
// $Id: ezmlm-msgdisplay.php,v 1.7 2007-10-02 09:00:06 alexandre_tb Exp $
|
2 |
// $Id: ezmlm-msgdisplay.php,v 1.7.2.1 2007-11-19 13:38:50 alexandre_tb Exp $
|
3 |
//
|
3 |
//
|
4 |
// ezmlm-msgdisplay.php - ezmlm-php v2.0
|
4 |
// ezmlm-msgdisplay.php - ezmlm-php v2.0
|
5 |
// --------------------------------------------------------------
|
5 |
// --------------------------------------------------------------
|
6 |
// Will parse a template (if specified) and display a message.
|
6 |
// Will parse a template (if specified) and display a message.
|
7 |
// Includes a default template.
|
7 |
// Includes a default template.
|
Line 371... |
Line 371... |
371 |
// html ordinal equivilant, it also ensures that the messages content-type is changed
|
371 |
// html ordinal equivilant, it also ensures that the messages content-type is changed
|
372 |
// to include text/html if it changes anything...
|
372 |
// to include text/html if it changes anything...
|
373 |
function _cte_8bit($data,$simple = FALSE) {
|
373 |
function _cte_8bit($data,$simple = FALSE) {
|
374 |
if ($simple) { return $data; }
|
374 |
if ($simple) { return $data; }
|
375 |
$changed = FALSE;
|
375 |
$changed = FALSE;
|
- |
|
376 |
$out = '';
|
376 |
$chars = preg_split('//',$data);
|
377 |
$chars = preg_split('//',$data);
|
377 |
while (list($key,$val) = each($chars)) {
|
378 |
while (list($key,$val) = each($chars)) {
|
378 |
if (ord($val) > 127) { $out .= '&#' . ord($val) . ';'; $changed = TRUE; }
|
379 |
if (ord($val) > 127) { $out .= '&#' . ord($val) . ';'; $changed = TRUE; }
|
379 |
else { $out .= $val; }
|
380 |
else { $out .= $val; }
|
380 |
}
|
381 |
}
|