19 include_once (
"FDL/Lib.Dir.php");
23 $action->parent->AddJsRef(
$action->GetParam(
"CORE_PUBURL") .
"/FDL/Layout/common.js");
24 $action->parent->AddJsRef(
$action->GetParam(
"CORE_JSURL") .
"/subwindow.js");
26 $action->parent->AddJsRef(
$action->GetParam(
"CORE_JSURL") .
"/geometry.js");
27 $action->parent->AddJsRef(
$action->GetParam(
"CORE_JSURL") .
"/AnchorPosition.js");
31 $action->parent->AddJsRef(
$action->GetParam(
"CORE_PUBURL") .
"/FDL/Layout/mktree.js");
33 $action->lay->set(
"isMaster",
$action->parent->Haspermission(
"FUSERS_MASTER"));
37 $q2 =
new queryDb(
"",
"User");
38 $groups = $q2->Query(0, 0,
"TABLE",
"select users.*, groups.idgroup, domain.name as domain from users, groups, domain where users.id = groups.iduser and users.iddomain=domain.iddomain and users.isgroup='Y'");
40 $q2 =
new queryDb(
"",
"User");
41 $mgroups = $q2->Query(0, 0,
"TABLE",
"select users.*, domain.name as domain from users,domain where users.iddomain=domain.iddomain and isgroup='Y' and id not in (select iduser from groups)");
44 foreach ($groups as $k => $v) {
45 $groupuniq[$v[
"id"]] = $v;
46 $groupuniq[$v[
"id"]][
"checkbox"] =
"";
51 if (!$groups) $groups = array();
54 uasort($mgroups,
"cmpgroup");
55 foreach ($mgroups as $k => $v) {
58 $tgroup[$k][
"SUBUL"] = $cgroup;
63 $tgroup[$k][
"icon"] = $icon;
65 $tgroup[$k][
"icon"] =
"Images/igroup.gif";
67 $groupuniq[$v[
"id"]] = $v;
68 $groupuniq[$v[
"id"]][
"checkbox"] =
"";
73 $action->lay->setBlockData(
"LI", $tgroup);
74 $action->lay->setBlockData(
"SELECTGROUP", $groupuniq);
76 $action->lay->set(
"expand", (count($groups) < 30));
88 if (((
$a->type ==
"enum") || (
$a->type ==
"enumlist")) && ((
$a->phpfile ==
"") || (
$a->phpfile ==
"-")) && (
$a->getOption(
"system") !=
"yes")) {
91 "label" =>
$a->getLabel() ,
93 "ftitle" =>
$fdoc->getTitle(
$a->docid) ,
99 $action->lay->setBlockData(
"CATG", $tcf);
100 $filter[] =
"grp_isrefreshed = '0'";
103 if ($ngr > 0)
$action->lay->set(
"textgroup", sprintf(_(
"<b>%d group(s) to refresh</b>") , $ngr));
104 else $action->lay->set(
"textgroup", sprintf(_(
"No need to refresh group")));
117 foreach ($groups as $k => $v) {
118 if ($v[
"idgroup"] ==
$id) {
125 $tlay[$k][
"icon"] = $icon;
127 $tlay[$k][
"icon"] =
"Images/igroup.gif";
132 if (count($tlay) == 0)
return "";
134 $lay =
new Layout(
"FUSERS/Layout/fusers_ligroup.xml", $action);
136 uasort($tlay,
"cmpgroup");
137 $lay->setBlockData(
"LI", $tlay);
142 return strcasecmp(
$a[
'lastname'], $b[
'lastname']);