19 include_once (
"FDL/viewfolder.php");
20 include_once (
"GENERIC/generic_util.php");
51 $action->parent->addCssRef(
"GENERIC:generic_list.css",
true);
52 $action->parent->AddJsRef(
$action->GetParam(
"CORE_JSURL") .
"/AnchorPosition.js",
false);
57 if (
$dir->isAlive() && (
$dir->defDoctype ==
'S')) {
58 $sfamid =
$dir->getValue(
"se_famid");
62 $wonglet = ($onglet !=
'N');
69 $action->lay->set(
"folderid",
"0");
70 if ($catg->doctype ==
'D')
$action->lay->set(
"folderid", $catg->id);
74 $action->lay->Set(
"pds", $catg->urlWhatEncodeSpec(
""));
76 $action->lay->Set(
"fldtitle",
$dir->getHTMLTitle());
79 $action->lay->Set(
"fldtitle", _(
"precise search"));
82 $action->lay->Set(
"fldtitle",
$dir->getHTMLTitle());
86 $action->lay->Set(
"dirid", $dirid);
88 $action->lay->Set(
"catg", $catgid);
95 $action->lay->Set(
"nexticon",
"");
96 $action->lay->Set(
"previcon",
"");
98 if ($sqlorder ==
"") {
100 setHttpVar(
"sqlorder", $sqlorder);
104 if ($sqlorder !=
"") {
106 if ($sqlorder[0] ==
"-") $sqlorder = substr($sqlorder, 1);
107 if (!in_array($sqlorder, $ndoc->fields)) setHttpVar(
"sqlorder",
"");
115 if (
$dir->fromid == 38) {
117 setHttpVar(
"sqlorder",
"--");
123 $action->lay->Set(
"nexticon",
$action->GetIcon(
"next.png",
N_(
"next") , 16));
126 if ($startpage > 0) {
128 $action->lay->Set(
"previcon",
$action->GetIcon(
"prev.png",
N_(
"prev") , 16));
131 if ($dirid && $wonglet) {
135 "onglabel" =>
"A B C",
139 "onglabel" =>
"D E F",
143 "onglabel" =>
"G H I",
147 "onglabel" =>
"J K L",
151 "onglabel" =>
"M N O",
155 "onglabel" =>
"P Q R S",
159 "onglabel" =>
"T U V",
163 "onglabel" =>
"W X Y Z",
167 "onglabel" =>
"A - Z",
172 while (list($k, $v) = each($onglet)) {
173 if ($v[
"ongdir"] == $tab) $onglet[$k][
"ongclass"] =
"onglets";
174 else $onglet[$k][
"ongclass"] =
"onglet";
175 $onglet[$k][
"onglabel"] = str_replace(
" ",
"<BR>", $v[
"onglabel"]);
178 $action->lay->SetBlockData(
"ONGLET", $onglet);
181 $action->lay->Set(
"onglet", $wonglet ?
"Y" :
"N");
188 $prefview = getHttpVars(
"gview");
190 $tmode = explode(
",",
$action->getParam(
"GENE_VIEWMODE"));
192 while (list($k, $v) = each($tmode)) {
193 list($fid, $vmode) = explode(
"|", $v);
194 $tview[$fid] = $vmode;
199 $tview[
$famid] = $prefview;
202 while (list($k, $v) = each($tview)) {
203 if ($k > 0) $tmode[] =
"$k|$v";
205 $pmode = implode(
",", $tmode);
237 if ($catgid == 0) $catgid = $dirid;
238 if (
$fdoc->dfldid > 0) {
243 $streeSearch = array();
244 foreach ($stree as $k => $v) {
245 if (($v[
"doctype"] ==
"S") && ($v[
"fromid"] !=
$fdoc->id)) {
246 $streeSearch[$v[
"id"]] = $v;
247 $streeSearch[$v[
"id"]][
"selected"] = ($v[
"id"] == $catgid) ?
"selected" :
"";
248 $streeSearch[$v[
"id"]][
"isreport"] =
"0";
249 $streeSearch[$v[
"id"]][
"isparam"] =
"0";
250 $keys =
getv($v,
"se_keys");
251 if (preg_match(
'/\?/', $keys)) {
252 $streeSearch[$v[
"id"]][
"title"] =
"(P)" . $streeSearch[$v[
"id"]][
"title"];
253 $streeSearch[$v[
"id"]][
"isparam"] =
"1";
255 if ($v[
"fromid"] == 25) {
256 $streeSearch[$v[
"id"]][
"title"] =
"(R)" . $streeSearch[$v[
"id"]][
"title"];
257 $streeSearch[$v[
"id"]][
"isreport"] =
"1";
263 $action->lay->set(
"ONESEARCH", (count($streeSearch) > 0));
265 $action->lay->SetBlockData(
"SYSSEARCH", $streeSearch);
268 $filter[] =
"se_famid='$famid'";
272 $action->lay->set(
"MSEARCH",
false);
274 $streeSearch = array();
275 foreach ($stree as $k => $v) {
276 if (!isset($streeSearch[$v[
"id"]])) $streeSearch[$v[
"id"]] = $v;
277 $streeSearch[$v[
"id"]][
"selected"] = ($v[
"id"] == $catgid) ?
"selected" :
"";
278 $streeSearch[$v[
"id"]][
"isreport"] =
"0";
279 $streeSearch[$v[
"id"]][
"isparam"] =
"0";
280 $keys =
getv($v,
"se_keys");
281 if (preg_match(
'/\?/', $keys)) {
282 $streeSearch[$v[
"id"]][
"title"] =
"(P)" . $streeSearch[$v[
"id"]][
"title"];
283 $streeSearch[$v[
"id"]][
"isparam"] =
"1";
285 if ($v[
"fromid"] == 25) {
286 $streeSearch[$v[
"id"]][
"title"] =
"(R)" . $streeSearch[$v[
"id"]][
"title"];
287 $streeSearch[$v[
"id"]][
"isreport"] =
"1";
290 $action->lay->set(
"MSEARCH", (count($stree) > 0));
291 $action->lay->SetBlockData(
"USERSEARCH", $streeSearch);
292 if (count($streeSearch) > 0)
$action->lay->set(
"ONESEARCH",
true);