17 include_once (
"FDL/Class.Dir.php");
35 if (!
$doc->isAffected()) $action->
exitError(sprintf(_(
"cannot see unknow reference %s") ,
$docid));
37 $oa =
$doc->getAttribute($attrid);
38 if (!$oa) $action->
exitError(sprintf(_(
"unknow attribute '%s'") , $attrid));
40 $phpfunc = $oa->phpfunc;
41 if (preg_match(
'/([^:]+):([^(]+)\(([^)]*)\):(.*)/i', $phpfunc, $reg)) {
44 if ($reg[4]) $funres = explode(
",", $reg[4]);
45 else $funres = array();
48 $incfile = sprintf(
"EXTERNALS/%s", $oa->phpfile);
49 if (file_exists($incfile)) {
51 include_once ($incfile);
52 if (function_exists(strtolower($zone))) {
53 include_once (
"FDL/enum_choice.php");
54 $oa->phpfunc = substr($phpfunc, strpos($phpfunc,
':') + 1);
56 $action->parent->AddJsRef($action->GetParam(
"CORE_JSURL") .
"/geometry.js");
57 $action->parent->AddJsRef($action->GetParam(
"CORE_JSURL") .
"/autoclose.js");
58 $action->parent->AddJsRef(
"FDL:specialhelp.js",
true);
60 $action->parent->AddJsCode(
"Ih.resultArguments=" . json_encode($funres) .
";");
62 $action->
exitError(sprintf(_(
"Cannot find help function %s") , strtolower($zone)));
66 $action->
exitError(sprintf(_(
"Cannot include '%s'") , sprintf(
"%s/%s.php",
$appname, strtolower($zone))));
70 $action->
exitError(sprintf(_(
"declaration syntax does not match special help input '%s'") , $phpfunc));
73 if (GetHttpVars(
'extjs',
'') !=
'') {
74 $action->parent->AddCssRef(
"STYLE/DEFAULT/Layout/EXT-ADAPTER-SYSTEM.css");
75 $style = $action->
getParam(
"CORE_STYLE");
76 if (file_exists($action->parent->rootdir .
"/STYLE/$style/Layout/EXT-ADAPTER-USER.css")) {
77 $action->parent->AddCssRef(
"STYLE/$style/Layout/EXT-ADAPTER-USER.css");
79 $action->parent->AddCssRef(
"STYLE/DEFAULT/Layout/EXT-ADAPTER-USER.css");
getResPhpFunc(Doc &$doc, NormalAttribute &$oattr, &$rargids, &$tselect, &$tval, $whttpvars=true, $index="")
Layout is a template generator.
exitError($texterr, $exit=true, $code="")
specialhelp(Action &$action)
getLayoutFile($app, $layfile)
new_Doc($dbaccess, $id= '', $latest=false)
static getArgument($k, $def= '')
getIdFromName($dbaccess, $name)