25 include_once (
"FDL/Lib.Dir.php");
29 if (preg_match(
"/<([^>]*)>/",
$from, $erg)) {
32 $this->lay->set(
"hasphoto",
false);
33 $filter1 =
"us_mail='" . pg_escape_string(
$from) .
"'";
34 $filter2 =
"us_homemail='" . pg_escape_string(
$from) .
"'";
35 $filter[] =
"$filter1 or $filter2";
37 if (count($tdir) == 1) {
39 $vphoto = $tdir[0]->getValue(
"us_photo");
41 $photo = $tdir[0]->GetHtmlAttrValue(
"us_photo");
42 $this->lay->set(
"photo", $photo);
43 $this->lay->set(
"hasphoto", ($photo !=
""));
46 $hashtml = ($this->
getValue(
"emsg_htmlbody") !=
"");
48 $this->lay->set(
"hashtml", $hashtml);
50 $this->lay->set(
"TO",
false);
51 $this->lay->set(
"CC",
false);
53 $recips = $this->
getTValue(
"emsg_recipient");
54 $reciptype = $this->
getTValue(
"emsg_sendtype");
58 foreach ($recips as $k => $addr) {
59 $addr = str_replace(array(
66 if ($reciptype[$k] ==
"cc") $tcc[] = $addr;
67 elseif ($reciptype[$k] ==
"bcc") $tbcc[] = $addr;
71 if (count($tto) > 0) {
72 $this->lay->set(
"TO", implode(
"; ", $tto));
74 if (count($tcc) > 0) {
75 $this->lay->set(
"CC", implode(
"; ", $tcc));
83 if (($this->
id > 0) && ($this->doctype !=
'C') && ($aclname ==
"edit") && ($this->
getParamValue(
"emsg_editcontrol") !=
"freeedit"))
return _(
"electronic messages cannot be modified");
84 else return parent::control($aclname);