26 $this->lay->set(
"V_PUBM_BODY", str_replace(
"[",
"[", $this->lay->get(
"V_PUBM_BODY")));
30 $udoc =
new_Doc($this->dbaccess, $uid);
31 if ($udoc->isAlive()) {
32 $listattr = $udoc->GetNormalAttributes();
34 foreach ($listattr as $k => $v) {
35 $value = $udoc->getRawValue($v->id);
37 if (
$value || ($v->type ==
"image")) $this->lay->Set(strtoupper($v->id) , $udoc->GetHtmlValue($v,
$value, $atarget, $ulink));
38 else $this->lay->Set(strtoupper($v->id) ,
false);
63 AddLogMsg(sprintf(_(
"fdl_pubedit error: family %s not found") ,
$famid));
66 $listattr = $udoc->GetNormalAttributes();
68 foreach ($listattr as $k => $v) {
70 "aid" =>
"[" . strtoupper($k) .
"]",
71 "alabel" => str_replace(
"'",
"\\'", $v->getLabel())
74 $listattr = $udoc->GetFileAttributes();
75 foreach ($listattr as $k => $v) {
76 if ($v->type ==
"image") {
78 "aid" =>
"<img src=\"[" . strtoupper($k) .
"]\">",
79 "alabel" => str_replace(
"'",
"\\'", $v->getLabel())
83 "aid" =>
"<a href=\"[" . strtoupper($k) .
"]\">" . $v->getLabel() .
"</a>",
84 "alabel" => str_replace(
"'",
"\\'", $v->getLabel())
88 $this->lay->set(
"famattr", sprintf(_(
"%s attribute") , $this->
getRawValue(
"pubm_fam",
"personne")));
89 $this->lay->setBlockData(
"ATTR", $tatt);
98 function fdl_pubprint($target =
"_self", $ulink =
true, $abstract =
false)
102 $udocid = GetHttpVars(
"uid");
105 $zonebodycard =
"FDL:FDL_PUBPRINTONE:S";
108 $t[] =
getTDoc($this->dbaccess, $udocid);
113 if (preg_match(
"/\[[a-z]+_[a-z0-9_]+\]/i", str_replace(
"[",
"[", $body))) {
114 foreach ($t as $k => $v) {
115 $zoneu = $zonebodycard .
"?uid=" . $v[
"id"];
117 "doc" => $this->
viewDoc($zoneu,
"",
true) ,
118 "subject" => $v[
"title"]
122 $laydoc = $this->
viewDoc($zonebodycard,
"",
true);
124 foreach ($t as $k => $v) {
127 "subject" => $v[
"title"]
131 if (
count($t) == 0) $action->AddWarningMsg(_(
"no available persons found"));
133 $this->lay->setBlockData(
"DOCS", $tlay);
153 function fdl_pubmail($target =
"_self", $ulink =
true, $abstract =
false)
155 include_once (
"FDL/mailcard.php");
161 $mailattr = strtolower($this->
getRawValue(
"PÜBM_MAILATT",
"us_mail"));
164 $zonebodycard =
"FDL:FDL_PUBSENDMAIL:S";
165 if (preg_match(
"/\[[a-z]+_[a-z0-9_]+\]/i", $body)) {
166 foreach ($t as $k => $v) {
167 $mail =
getv($v, $mailattr);
169 $zoneu = $zonebodycard .
"?uid=" . $v[
"id"];
174 "name" => $v[
"title"],
176 "color" => (
$err) ?
"#ea4c4c" :
"#7df89d",
183 foreach ($t as $k => $v) {
184 $mail =
getv($v, $mailattr);
185 if ($mail !=
"") $tmail[] = $mail;
188 $bcc = implode(
",", $tmail);
194 "color" => (
$err) ?
"#ea4c4c" :
"#7df89d",
198 if (
$err) $action->AddWarningMsg(
$err);
199 $this->lay->setBlockData(
"MAILS",
$tout);
200 $this->
viewattr($target, $ulink, $abstract);
209 $this->lay->set(
"dirid", $this->
id);
220 foreach ($t as $k => $v) {
222 "udocid" => $v[
"id"],
223 "utitle" => $v[
"title"]
227 $this->lay->setBlockData(
"DOCS", $tlay);
228 $this->lay->set(
"dirid", $this->
id);
fdl_pubmail($target="_self", $ulink=true, $abstract=false)
getHtmlAttrValue($attrid, $target="_self", $htmllink=2, $index=-1, $entities=true, $abstract=false)
getTDoc($dbaccess, $id, $sqlfilters=array(), $result=array())
sendCard(Action &$action, $docid, $to, $cc, $subject, $zonebodycard="", $ulink=false, $comment="", $from="", $bcc="", $format="html", $sendercopy=true, $addfiles=array(), $userinfo=null, $savecopy=false)
fdl_pubdisplay($target="_self", $ulink=true, $abstract=false)
count($onlyprimary=false)
viewattr($target="_self", $ulink=true, $abstract=false, $viewhidden=false)
viewdefaultcard($target="_self", $ulink=true, $abstract=false, $viewhidden=false)
fdl_pubsendmail($target="_self", $ulink=true, $abstract=false)
fdl_pubnavpreview($target="_self", $ulink=true, $abstract=false)
getContent($controlview=true, array $filter=array(), $famid="", $insertguide=true, $unused="")
fdl_pubpreview($target="_self", $ulink=true, $abstract=false)
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
getHttpVars($name, $def="", $scope="all")
new_Doc($dbaccess, $id= '', $latest=false)
viewDoc($layout="FDL:VIEWBODYCARD", $target="_self", $ulink=true, $abstract=false, $changelayout=false)
fdl_pubprintone($target="_self", $ulink=true, $abstract=false)
if($file) if($subject==""&&$file) if($subject=="") $err
fdl_pubprint($target="_self", $ulink=true, $abstract=false)
getRawValue($idAttr, $def="")