19 include_once (
"FDL/Class.Dir.php");
33 if (
$docid ==
"") $action->exitError(_(
"no document reference"));
35 if (intval(
$docid) == 0) $action->exitError(sprintf(_(
"unknow logical reference '%s'") , $action->
getArgument(
"id")));
37 if (!
$doc->isAffected()) $action->exitError(sprintf(_(
"cannot see unknow reference %s") ,
$docid));
39 $oa =
$doc->getAttribute($attrid);
40 if (!$oa) $action->exitError(sprintf(_(
"unknow attribute '%s'") , $attrid));
42 $phpfunc = $oa->phpfunc;
43 if (preg_match(
'/([^:]+):([^(]+)\(([^)]*)\):(.*)/i', $phpfunc, $reg)) {
46 $funarg = explode(
",", $reg[3]);
47 if ($reg[4]) $funres = explode(
",", $reg[4]);
48 else $funres = array();
52 $incfile = sprintf(
"EXTERNALS/%s", $oa->phpfile);
53 if (file_exists($incfile)) {
55 include_once ($incfile);
56 if (function_exists(strtolower($zone))) {
57 include_once (
"FDL/enum_choice.php");
58 $oa->phpfunc = substr($phpfunc, strpos($phpfunc,
':') + 1);
60 $action->parent->AddJsRef($action->
GetParam(
"CORE_JSURL") .
"/geometry.js");
61 $action->parent->AddJsRef($action->
GetParam(
"CORE_JSURL") .
"/autoclose.js");
62 $action->parent->AddJsRef(
"FDL:specialhelp.js",
true);
64 $action->parent->AddJsCode(
"Ih.resultArguments=" . json_encode($funres)) .
";";
66 $action->exitError(sprintf(_(
"Cannot find help function %s") , strtolower($zone)));
70 $action->exitError(sprintf(_(
"Cannot include '%s'") , sprintf(
"%s/%s.php",
$appname, strtolower($zone))));
74 $action->exitError(sprintf(_(
"declaration syntax does not match special help input '%s'") , $phpfunc));
78 $action->parent->AddCssRef(
"STYLE/DEFAULT/Layout/EXT-ADAPTER-SYSTEM.css");
79 if (file_exists($action->parent->rootdir .
"/STYLE/$style/Layout/EXT-ADAPTER-USER.css")) {
80 $action->parent->AddCssRef(
"STYLE/$style/Layout/EXT-ADAPTER-USER.css");
82 $action->parent->AddCssRef(
"STYLE/DEFAULT/Layout/EXT-ADAPTER-USER.css");