19 include_once (
"FDL/Class.DocSearch.php");
20 include_once (
"FDL/freedom_util.php");
21 include_once (
"GENERIC/generic_util.php");
45 if (
$dir->isAlive()) {
55 $sdoc->title = sprintf(_(
"my search %s") ,
$keyword);
56 $sdoc->setValue(
"se_famid", 16);
58 if (!
$keyword) $sdoc->title = sprintf(_(
"my searches about %s") ,
$fdoc->title);
60 $full = (
$mode ==
"FULL");
62 $sqlfilter = $sdoc->getSqlGeneralFilters(
$keyword,
"yes",
false, $full);
64 if ($sqlorder ==
"") $sdoc->deleteValue(
"se_orderby");
65 $sqlfilter[] =
"owner=" .
$action->user->id;
66 $sqlfilter[] =
"se_famid='" . pg_escape_string(
$famid) .
"'";
71 redirect(
$action,
GetHttpVars(
"app") ,
"GENERIC_LIST&sqlorder=title$pds&mode=$mode&famid=$famid&dirid=" . $sdoc->id .
"&catg=$catgid");
76 $pds =
$doc->urlWhatEncodeSpec(
"");
80 $pds = $catg->urlWhatEncodeSpec(
"");
85 if (
$doc->defDoctype ==
'S') {
91 $sdoc->title = sprintf(_(
"search %s") ,
$keyword);
94 else $sdoc->title = sprintf(_(
"search contains %s in %s") ,
$keyword,
$doc->getTitle());
96 $sdoc->setValue(
"se_famid", $sfamid);
99 $full = (
$mode ==
"FULL");
103 $sqlfilter = $sdoc->getSqlGeneralFilters(
$keyword,
"yes",
false, $full);
105 if ($sqlorder ==
"") $sdoc->deleteValue(
"se_orderby");
114 redirect(
$action,
GetHttpVars(
"app") ,
"GENERIC_LIST$pds&mode=$mode&famid=$famid&dirid=" . $sdoc->id .
"&catg=$catgid");
116 redirect(
$action,
GetHttpVars(
"app") ,
"GENERIC_LIST$pds&mode=$mode&famid=$famid&dirid=" . $catgid .
"&catg=$catgid");