Subversion Repositories Applications.projet

Rev

Rev 249 | Rev 256 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 249 Rev 253
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: ezmlm-msgdisplay.php,v 1.5 2007-06-25 12:15:07 alexandre_tb Exp $
2
// $Id: ezmlm-msgdisplay.php,v 1.6 2007-09-10 11:22:24 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 358... Line 358...
358
<dt><ezmlm-header-name> :</dt>
358
<dt><ezmlm-header-name> :</dt>
359
<dd><ezmlm-header-value></dd>
359
<dd><ezmlm-header-value></dd>
360
</ezmlm-headers>
360
</ezmlm-headers>
361
</dl>' ;
361
</dl>' ;
362
	}
362
	}
-
 
363
	
-
 
364
		// _cte_8bit: decode a content transfer encoding of 8bit
-
 
365
	// NOTE: this function is a little bit special. Since the end result will be displayed in
-
 
366
	// a web browser _cte_8bit decodes ASCII characters > 127 (the US-ASCII table) into the
-
 
367
	// html ordinal equivilant, it also ensures that the messages content-type is changed
-
 
368
	// to include text/html if it changes anything...
-
 
369
	function _cte_8bit($data,$simple = FALSE) {
-
 
370
		if ($simple) { return $data; }
-
 
371
		$changed = FALSE;
-
 
372
		$chars = preg_split('//',$data);
-
 
373
		while (list($key,$val) = each($chars)) {
-
 
374
			if (ord($val) > 127) { $out .= '&#' . ord($val) . ';'; $changed = TRUE; }
-
 
375
			else { $out .= $val; }
-
 
376
		}
-
 
377
		if ($changed) { $this->headers['content-type'][1] = 'text/html'; }
-
 
378
		return $out;
-
 
379
	}
Line 363... Line 380...
363
 
380