76 parent::__construct(
$title,
'groupperm_form', XOOPS_URL .
'/modules/system/admin/groupperm.php',
'post');
77 $this->modid = intval(
$modid);
78 $this->permName = $permname;
79 $this->permDesc = $permdesc;
85 $this->showAnonymous = $anonymous;
97 public function addItem($itemId, $itemName, $itemParent = 0)
99 $this->itemTree[$itemParent][
'children'][] = $itemId;
100 $this->itemTree[$itemId][
'parent'] = $itemParent;
101 $this->itemTree[$itemId][
'name'] = $itemName;
102 $this->itemTree[$itemId][
'id'] = $itemId;
115 if (!empty($this->itemTree[$itemId][
'children'])) {
116 $children = $this->itemTree[$itemId][
'children'];
117 foreach ($children as $fcid) {
118 array_push($childIds, $fcid);
134 foreach (array_keys($this->itemTree) as $item_id) {
135 $this->itemTree[$item_id][
'allchild'] = array();
141 foreach (array_keys($glist) as
$i) {
142 if ($i == FixedGroups::ANONYMOUS && !$this->showAnonymous) {
146 $selected =
$gperm_handler->getItemIds($this->permName, $i, $this->modid);
147 $ele =
new GroupFormCheckbox($glist[$i],
'perms[' . $this->permName .
']', $i, $selected);
148 $ele->setOptionTree($this->itemTree);
157 $ret =
'<h4>' . $this->
getTitle() .
'</h4>';
158 if ($this->permDesc) {
159 $ret .= $this->permDesc .
'<br /><br />';
161 $ret .=
'<form title="' . str_replace(
'"',
'', $this->
getTitle()) .
'" name="'
164 .
'<table width="100%" class="outer" cellspacing="1" valign="top">';
171 $ret .=
'<tr valign="top" align="left"><td class="head">' .
$elements[
$i]->getCaption();
172 if (
$elements[$i]->getDescription() !=
"") {
173 $ret .=
"<br /><br /><span style='font-weight: normal;'>"
176 $ret .=
'</td>' .
'<td class="even">' .
$elements[
$i]->render() .
'</td></tr>' .
'';
181 $ret .=
'</table>' . $hidden .
'</form>';
if($uname== ''||$pass== '') $member_handler