19 include_once (
"FDL/Class.Doc.php");
20 include_once (
"GENERIC/generic_util.php");
31 if (
$dir->isAlive()) {
32 $sfamid =
$dir->getValue(
"se_famid");
38 if ($uorder[0] ==
"-") $aorder = substr($uorder, 1);
39 else $aorder =
"-" . $uorder;
46 redirect(
$action,
$action->GetParam(
"APPNAME",
"GENERIC") ,
"GENERIC_LIST&dirid=$catg&tab=0&famid=$famid",
$action->GetParam(
"CORE_STANDURL"));
57 $pu =
$action->GetParam(
"GENERIC_USORT");
61 $tu = explode(
"|", $pu);
63 while (list($k, $v) = each($tu)) {
64 list($afamid, $uorder, $sqlorder) = explode(
":", $v);
65 $tr[$afamid] = $uorder .
":" . $sqlorder;
70 if ($aorder[0] ==
"-") $sqlorder = substr($aorder, 1);
71 $a =
$fdoc->getAttribute($sqlorder);
72 if (
$a &&
$a->type ==
"text") $sqlorder =
"lower($sqlorder)";
73 if ($aorder[0] ==
"-") $sqlorder.=
" desc";
75 $tr[
$famid] = $aorder .
":" . $sqlorder;
79 while (list($k, $v) = each($tr)) {
82 return implode(
"|", $tu);