17 include_once (
"FDL/Class.Doc.php");
18 include_once (
"GENERIC/generic_util.php");
31 $dir = new_doc($action->dbaccess, $catg);
32 if (
$dir->isAlive()) {
33 $sfamid =
$dir->getRawValue(
"se_famid");
37 $action->parent->param->
Set(
"GENERIC_USORT",
setUsort($action, $aorder, $sfamid) ,
Param::PARAM_USER . $action->user->id, $action->parent->id);
41 redirect($action, $action->GetParam(
"APPNAME",
"GENERIC") ,
"GENERIC_TAB&onefam=$onefamOrigin&catg=$catg&famid=$famid&tab=$tab", $action->GetParam(
"CORE_STANDURL"));
43 redirect($action, $action->GetParam(
"APPNAME",
"GENERIC") ,
"GENERIC_LIST&onefam=$onefamOrigin&dirid=$dirid&tab=0&famid=$famid&tab=$tab", $action->GetParam(
"CORE_STANDURL"));
54 $pu = $action->GetParam(
"GENERIC_USORT");
58 $tu = explode(
"|", $pu);
61 list($afamid, $uorder, $sqlorder) = explode(
":", $v);
62 $tr[$afamid] = $uorder .
":" . $sqlorder;
72 if ($aorder ==
'revdate') {
74 } elseif ($aorder ==
'-revdate') {
80 if (isset($aorder[0]) && $aorder[0] ==
"-") $sqlorder = substr($aorder, 1);
81 $a = $fdoc->getAttribute($sqlorder);
83 $a = $fdoc->getPropertyValue($sqlorder);
85 if (
$a && isset(
$a->type) &&
$a->type ==
"text") $sqlorder =
"lower($sqlorder)";
86 if (isset($aorder[0]) && $aorder[0] ==
"-") $sqlorder.=
" desc";
88 $tr[
$famid] = $aorder .
":" . $sqlorder;
92 foreach ($tr as $k => $v) {
95 return implode(
"|", $tu);
print< H1 > Check Database< i > $dbaccess</i ></H1 > $a
setUsort(Action &$action, $aorder, $famid="")
getDefFam(Action &$action)
generic_usort(Action &$action)
new_Doc($dbaccess, $id= '', $latest=false)
static getArgument($k, $def= '')