19 include_once (
"FDL/freedom_util.php");
20 include_once (
"FDL/Lib.Dir.php");
25 $action->parent->AddJsRef(
$action->GetParam(
"CORE_JSURL") .
"/subwindow.js");
30 $action->lay->set(
"vtext", _(
"search"));
31 $action->lay->set(
"first",
"true");
33 $action->lay->set(
"vtext", $vtext);
34 $action->lay->set(
"first",
"false");
38 $action->lay->set(
"vsuser", $searchuser);
39 $action->lay->set(
"USEL", ($searchuser == 1 ?
true :
false));
41 $action->lay->set(
"ssoc", $searchsoc);
42 $action->lay->set(
"SOCSEL", ($searchsoc == 1 ?
true :
false));
45 $action->lay->set(
"dfam", $sfam1);
47 $action->lay->set(
"icon1", $fam1->getIcon());
49 $sfam2 =
$action->getParam(
"USERCARD_SECONDFAM");
52 $action->lay->set(
"icon2", $fam2->getIcon());
54 $action->lay->set(
"Result",
false);
55 $action->lay->set(
"bCount",
false);
56 $action->lay->set(
"Count",
"-");
59 if ($searchuser == 1) $searchfam[] = $sfam1;
60 if ($sfam2 && ($searchsoc == 1)) $searchfam[] = $sfam2;
62 if (count($searchfam) == 0 || $vtext ==
"")
return;
65 if ($ws)
$filter[] =
"(svalues ~* '" . $vtext .
"')";
66 else $filter[] =
"(title ~* '" . $vtext .
"')";
68 foreach ($searchfam as $ks => $vs) {
70 foreach (
$rq as $k => $v) {
72 $pzabstract = isset($vo->faddbook_resume) ? $vo->faddbook_resume :
"FDL:VIEWTHUMBCARD";
73 $pzcard = (isset($vo->faddbook_card) ? $vo->faddbook_card : $vo->defaultview);
76 "title" => $vo->title,
78 "resume" => $vo->viewdoc($pzabstract)
83 $action->lay->set(
"Result",
true);
84 $action->lay->set(
"bCount",
true);
85 $action->lay->set(
"Count", count($cu));
87 usort($cu,
"sortmya");
88 $action->lay->setBlockData(
"Contacts", $cu);
92 return strcmp(
$a[
"title"], $b[
"title"]);