function FindGroupID($name) { $group = new Lan_permission_groups(); $group->group_name = $name; $group->find(); if ($group->fetch()) { return $group->permgroup_id; } }
$master->Smarty->assign("mode", $mode); } else { $master->AddError("Unknown permission group passed!"); } } else { $mode->find(); if ($mode->fetch()) { $master->Smarty->assign("mode", $mode); } else { $master->AddError("Could not find any groups to display!"); } } //Find groups $groups = array(); $group = new Lan_permission_groups(); $group->find(); while ($group->fetch()) { $groups[] = clone $group; } $master->Smarty->assign("grouplist", $groups); //Find permissions for each mode and group $permissionlist = array(); $permission = new Lan_permission(); $permission->orderBy("module"); $permission->find(); while ($permission->fetch()) { $disallowedlist = array(); foreach ($groups as $group) { $setting = new Lan_permission_settings(); $setting->permission_id = $permission->permission_id; $setting->mode_id = $mode->mode_id;