23 include_once (
"Class.SubForm.php");
24 include_once (
"Class.Domain.php");
25 include_once (
"Class.MailAccount.php");
26 include_once (
"Class.User.php");
27 include_once (
"Class.ControlObject.php");
28 include_once (
"Class.ObjectPermission.php");
39 $filteruser = getHttpVars(
"userfilter");
41 $action->lay->Set(
"returnact",
"GROUP_ACCESS&userfilter=$filteruser");
42 $userId =
$action->Read(
"access_group_id");
44 $action->lay->Set(
"returnact",
"USER_ACCESS&userfilter=$filteruser");
45 $userId =
$action->Read(
"access_user_id");
50 $appId =
$action->Read(
"access_class_id");
51 $action->lay->Set(
"returnact",
"OBJECT_ACCESS&oid=$coid");
54 $appId =
$action->Read(
"access_appl_id");
55 $action->lay->Set(
"returnact",
"APPL_ACCESS");
59 $action->lay->Set(
"modifyact",
"MODIFY");
60 $action->lay->Set(
"target",
"fbody");
62 if (($isclass) || ($coid > 0)) {
64 $action->lay->SetBlockData(
"OBJECTCLASS", array(
83 $action->lay->Set(
"modifyact",
"MODIFY");
84 $action->lay->Set(
"returnact",
"OBJECT_ACCESS&oid=$coid&userid=$userId&appid=$appId");
85 $action->lay->Set(
"target",
"body");
87 if ($userId == 0) $userId =
$action->Read(
"access_user_id");
88 if ($coid == 0) $coid =
$action->Read(
"access_object_id");
90 $action->lay->SetBlockData(
"USERS", array(
101 $action->Register(
"access_object_id", $coid);
102 $action->Register(
"access_class_id", $oid->id_class);
103 $action->Register(
"access_user_id", $userId);
105 $action->lay->Set(
"title",
$action->text(
"object") .
" : " . $oid->description);
117 if (($isclass) || ($coid > 0)) {
120 $toid = $octrl->GetOids($appId);
122 while (list($k, $v) = each($toid)) {
124 if ($v->id_obj == $coid) $oids[$k][
"selectedoid"] =
"selected";
125 else $oids[$k][
"selectedoid"] =
"";
126 $oids[$k][
"oid"] = $v->id_obj;
127 $oids[$k][
"descoid"] = $v->description;
130 $action->lay->SetBlockData(
"OID", $oids);
133 $tiduser = $ouser->GetUserAndGroupList();
135 while (list($k, $v) = each($tiduser)) {
136 if ($v->id == 1)
continue;
137 if ($v->id == $userId) $userids[$k][
"selecteduser"] =
"selected";
138 else $userids[$k][
"selecteduser"] =
"";
139 $userids[$k][
"userid"] = $v->id;
140 $userids[$k][
"descuser"] = $v->firstname .
" " . $v->lastname;
143 $action->lay->SetBlockData(
"USER", $userids);
145 $action->lay->Set(
"nbinput", 5);
147 $action->lay->Set(
"nbinput", 4);
150 if (($isclass) && (!($coid > 0))) $coid = $oids[0][
"oid"];
151 $action->lay->Set(
"userid", $userId);
152 $action->lay->Set(
"oid", $coid);
153 $action->lay->Set(
"appid", $appId);
154 $action->lay->Set(
"dboperm",
"");
167 if (preg_match(
"/dbname=(.*)/", $p->dbaccess, $reg)) {
168 $action->lay->Set(
"dboperm", $reg[1]);
171 if ((
$err = $p->ControlOid($appId,
"viewacl")) !=
"") {
180 $uperm->GetGroupPrivileges();
189 $appacls = $acl->getAclApplication($appId);
192 while (list($k, $v) = each($appacls)) {
194 $tableacl[$k][
"aclname"] = $v->name;
195 $tableacl[$k][
"acldesc"] =
" (" . _($v->description) .
")";
196 $tableacl[$k][
"aclid"] = $v->id;
197 if ($uperm->HasPrivilege($v->id)) {
198 $tableacl[$k][
"selected"] =
"checked";
200 $tableacl[$k][
"selected"] =
"";
202 $tableacl[$k][
"iacl"] =
"$k";
203 if (in_array($v->id, $uperm->GetUnPrivileges())) {
204 $tableacl[$k][
"selectedun"] =
"checked";
206 $tableacl[$k][
"selectedun"] =
"";
208 if (in_array($v->id, $uperm->GetUpPrivileges())) {
209 $tableacl[$k][
"selectedup"] =
"checked";
211 $tableacl[$k][
"selectedup"] =
"";
213 if (in_array($v->id, $uperm->GetGPrivileges())) {
214 $tableacl[$k][
"selectedg"] =
"checked";
216 $tableacl[$k][
"selectedg"] =
"";
220 $action->lay->SetBlockData(
"SELECTACL", $tableacl);