<?php
function htmlcode($orimessage) {
	// convert to unix new lines
   $message= preg_replace("/\r\n|\r|\n/", ' ', $orimessage);
   $s = array ("<", ">");
   $z = array ("&lt;","&gt;");
   $final = str_replace($s, $z, $message);
   $message=trim(str_replace("\\n", "<br/>", $final));
   return stripslashes(stripslashes($message));
  }
function htmlcode_nolink($orimessage) {
	// convert to unix new lines
   $message= preg_replace("/\r\n|\r|\n/", ' ', $orimessage);
   $s = array ("<", ">");
   $z = array ("&lt;","&gt;");
   $final = str_replace($s, $z, $message);
   return stripslashes(stripslashes($final));
}
?>