17 include_once (
"FDL/Class.Dir.php");
18 include_once (
"FDL/editutil.php");
32 $attrid = strtolower(GetHttpVars(
"id"));
33 $type = stripslashes(GetHttpVars(
"type"));
34 $jsevent = stripslashes(GetHttpVars(
"jsevent"));
35 $label = GetHttpVars(
"label");
36 $esize = GetHttpVars(
"esize");
37 $value = GetHttpVars(
"value");
38 $phpfunc = GetHttpVars(
"phpfunc",
"",
"zone");
39 $phpfile = GetHttpVars(
"phpfile",
"",
"zone");
40 $eformat = GetHttpVars(
"eformat");
41 $options = GetHttpVars(
"options");
46 $doc->attributes =
new Adoc();
48 if (
$type ==
"doclink") {
49 $famid = GetHttpVars(
"famid");
60 $isInAbstract =
false;
63 if (!$phpfunc) $phpfunc =
"::getTitle(id_$attrid):$attrid";
69 if (!
isUTF8($label)) $label = utf8_encode($label);
71 $oattr1 =
new NormalAttribute(
"id_$attrid",
$doc->id,
"id $label",
"docid", $format, $repeat, $order, $link, $visibility, $needed, $isInTitle, $isInAbstract, $fieldSet, $phpfile, $phpfunc, $elink, $phpconstraint, $usefor, $eformat, $options);
82 $isInAbstract =
false;
84 $phpfunc =
"lfamily(D,$famid,$attrid):id_$attrid,$attrid";
90 $options =
"elabel=" . ($label);
91 if ($esize) $options.=
"|esize=$esize";
92 $oattr =
new NormalAttribute($attrid,
$doc->id, $label,
"text", $format, $repeat, $order, $link, $visibility, $needed, $isInTitle, $isInAbstract, $fieldSet, $phpfile, $phpfunc, $elink, $phpconstraint, $usefor, $eformat, $options);
93 $doc->attributes->addAttribute($oattr1);
96 $doc->attributes->addAttribute($oattr);
100 if (preg_match(
'/^(.*)\("([^"]*)"/',
$type, $reg)) {
101 $type = trim($reg[1]);
102 $format = trim($reg[2]);
112 $isInAbstract =
false;
119 if (!$options) $options =
"elabel=" . ($label);
120 if ($esize) $options.=
"|esize=$esize";
121 $oattr =
new NormalAttribute($attrid,
$doc->id, $label,
$type, $format, $repeat, $order, $link, $visibility, $needed, $isInTitle, $isInAbstract, $fieldSet, $phpfile, $phpfunc, $elink, $phpconstraint, $usefor, $eformat, $options);
122 $doc->attributes->addAttribute($oattr);
127 $action->lay->template = $htmlinput;
getHtmlInput(&$doc, &$oattr, $value, $index="", $jsevent="", $notd=false)