- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
function convert_code_tag_for_email($text = "", $lang=false)
{
global $MESS;
if (strlen($text)<=0) return;
if($lang===false) $lang = LANGUAGE_ID;
$text = stripslashes($text);
$text = preg_replace("#<#", "<", $text);
$text = preg_replace("#>#", ">", $text);
$text = preg_replace("#^(.*?)$#", " \\1", $text);
$OLD_MESS = $MESS;
$MESS = array();
include($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/lang/".$lang."/tools.php");
$s1 = "--------------- ".$MESS["MAIN_CODE_S"]." -------------------";
$MESS = $OLD_MESS;
$s2 = str_repeat("-",strlen($s1));
$text = "\n\n>".$s1."\n".$text."\n>".$s2."\n\n";
return $text;
}
guest 22.01.2009 21:27 # 0
"Hehehe, what a mess!" (Duke Nukem)
ohdesu 03.12.2009 06:15 # 0
как длина текста может быть мень нуля ?
Морфин 10.05.2010 20:29 # 0
Срань Господня!