} else { print _("No"); } print "\t</td>"; # Show VRFs print " <td>"; if (@$section['showVRF'] == 1) { print _("Yes"); } else { print _("No"); } print "\t</td>"; # permissions print "<td>"; if (strlen($section['permissions']) > 1) { $permissions = parseSectionPermissions($section['permissions']); # print for each if they exist if (sizeof($permissions) > 0) { foreach ($permissions as $key => $p) { # get subnet name $group = getGroupById($key); # parse permissions $perm = parsePermissions($p); print $group['g_name'] . " : " . $perm . "<br>"; } } else { print _("All groups: No access"); } } print "</td>"; print ' <td class="actions">' . "\n";
} else { print _('Manage permissions for subnet'); ?> <?php print transform2long($subnet['subnet']) . "/" . $subnet['mask'] . " ({$subnet['description']})"; } ?> <hr> <form id="editSubnetPermissions"> <table class="editSubnetPermissions table table-noborder table-condensed table-hover"> <?php # parse permissions if (strlen($subnet['permissions']) > 1) { $permissons = parseSectionPermissions($subnet['permissions']); } else { $permissons = ""; } # print each group if ($groups) { foreach ($groups as $g) { print "<tr>"; print "\t<td>{$g['g_name']}</td>"; print "\t<td>"; print "<span class='checkbox inline noborder'>"; print "\t<input type='radio' name='group{$g['g_id']}' value='0' checked> na"; if ($permissons[$g['g_id']] == "1") { print " <input type='radio' name='group{$g['g_id']}' value='1' checked> ro"; } else { print " <input type='radio' name='group{$g['g_id']}' value='1'> ro";