#!/usr/local/bin/perl # edit_group.cgi # Display a form for editing or creating a group require './postgresql-lib.pl'; &ReadParse(); $access{'users'} || &error($text{'group_ecannot'}); if ($in{'new'}) { &ui_print_header(undef, $text{'group_create'}, ""); } else { &ui_print_header(undef, $text{'group_edit'}, ""); $s = &execute_sql_safe($config{'basedb'}, "select * from pg_group ". "where grosysid = '$in{'gid'}'"); @group = @{$s->{'data'}->[0]}; } print "
\n"; print "\n"; print "\n"; print "\n"; print "
$text{'group_header'}
\n"; print "\n"; print "\n"; print "\n"; if ($in{'new'}) { $s = &execute_sql($config{'basedb'}, "select max(grosysid) from pg_group"); $gid = $s->{'data'}->[0]->[0] + 1; print "\n"; } else { print "\n"; print "\n"; print "\n"; } map { $mem{$_}++ } &split_array($group[2]) if (!$in{'new'}); print "\n"; print "\n"; print "
$text{'group_name'}$text{'group_id'}
$group[1]
$text{'group_mems'}
\n"; print "\n"; if ($in{'new'}) { print "\n"; } else { print "\n"; print "\n"; } print "
\n"; &ui_print_footer("list_groups.cgi", $text{'group_return'});