home *** CD-ROM | disk | FTP | other *** search
/ ftp.sunet.sepub/pictures / 2014.11.ftp.sunet.se-pictures.tar / ftp.sunet.se / pub / pictures / ACiD-artpacks / www / mirrors / hirez / cgi-bin / discus / board-admin-2.cgi < prev    next >
Text File  |  1999-02-12  |  17KB  |  419 lines

  1. #!/usr/bin/perl
  2. $discus_conf = '/usr/local/www/www.hirez.org/discus_admin_149349189/discus.conf';
  3. #Discus board administration script (board-admin-2.cgi)
  4. #-------------------------------------------------------------------------------
  5. # This script is copyright (c) 1998 by DiscusWare, LLC, all rights reserved.
  6. # Its use is subject to the license agreement that can be found at the following
  7. # URL:  http://www.chem.hope.edu/discus/license
  8. #-------------------------------------------------------------------------------
  9. if (open (FILE, "$discus_conf")) {
  10.     @file = <FILE>;
  11.     close (FILE);
  12.     $evals = "";
  13.     foreach $line (@file) {
  14.         if ($line =~ /^(\w+)=(.*)/) {
  15.             $varname = $1;
  16.             $value = $2;
  17.             $value =~ s/'/\\'/g; $value =~ s/\r//g;
  18.             $evals .= "\$$varname='$value'; ";
  19.         }
  20.     }
  21.     eval($evals);
  22.     require "$admin_dir/source/src-board-subs-common";
  23. } else {
  24.     print "Content-type: text/html\n\n";
  25.     print "<HTML><HEAD><TITLE>Script Execution Error</TITLE></HEAD>\n";
  26.     print "<BODY BGCOLOR=#ffffff TEXT=#000000>\n";
  27.     print "<H1>Script Execution Error</H1>\n";
  28.     print "Discus scripts could not execute because the discus.conf file\n";
  29.     print "could not be opened.";
  30.     print "<P>Reason: <FONT COLOR=#ff0000><B>$!</B></FONT>" if $!;
  31.     print "<P>This generally indicates a setup error of some kind.\n";
  32.     print "Consult the <A HREF=\"http://www.chem.hope.edu/discus/rc\">Discus ";
  33.     print "Resource Center</A> for troubleshooting information.</BODY></HTML>\n";
  34.     exit(0);
  35. }
  36. require "$admin_dir/source/src-board-subs-admin";
  37. &parse_form;
  38. &read_cookie;
  39. #-------------------------------------------------------------------------------
  40. # BOARD MANAGER ACTIONS AND OTHER RELATED FUNCTIONS
  41. #-------------------------------------------------------------------------------
  42. if ($FORM{'action'} eq "topic_description") {
  43.     &error_message('Permissions Error', 'Only the superuser may access this functionality!') if $FORM{'username'} ne "$superuser";
  44.     &check_passwd;
  45.     $topic_number = $FORM{'HTTP_REFERER'} if $FORM{'HTTP_REFERER'};
  46.     $topic_number = $FORM{'topic'} if $FORM{'topic'};
  47.     if ($FORM{'submit'} !~ /Preview/) {
  48.         $message = $FORM{'message'};
  49.         ($lint, $message_in) = &ex('webtags', $message, 1, 1);
  50.         $FORM{'submit'} = "Preview" if $lint eq "!Error";
  51.     }
  52.     if ($FORM{'submit'} !~ "Preview") {
  53.         $source = &escape($message);
  54.         &ex('save_description', $topic_number, $message_in, $source);
  55.         &extract("//$topic_number/$topic_number.$ext");
  56.         &ex('rename_topic_form', $topic_name, $topic_number, $FORM{"username"}, &unescape($source));
  57.         exit(0);
  58.     } else {
  59.         ($message_in) = &ex('webtags', $FORM{"message"},1);
  60.         $FORM{'message'} =~ s/</</g;
  61.         $FORM{'message'} =~ s/>/>/g;
  62.         $FORM{'message'} =~ s/&/&/g;
  63.         $FORM{'message'} =~ s/"/"/g;
  64.         &ex('preview_admin_message', $FORM{"message"}, $message_in, $FORM{'username'}, $topic_number, "topic_description", "Topic Description");
  65.         exit(0);
  66.     }
  67. }
  68. if ($FORM{'action'} eq 'Add_Topic') {
  69.     &error_message('Permissions Error', 'Only the superuser may access the "Add New Topic" functionality!') if $FORM{'username'} ne "$superuser";
  70.     &check_passwd;
  71.     ($new_topic) = &ex('webtags',$FORM{'topic'},3);
  72.     $group = $FORM{'group'};
  73.     $group =~ tr/A-Z/a-z/;
  74.     $group =~ s/\W//g;
  75.     &error_message('Group Specification Error', 'You did not specify a valid group!') if $group eq "";
  76.     &ex('add_topic', $new_topic, $group, $FORM{'privs'}, $FORM{'templ'}, $FORM{'topic'});
  77.     &ex('board_manager', $FORM{"username"}); exit(0);
  78.     exit(0);
  79. }
  80. if ($FORM{'action'} eq 'board_toppage') {
  81.     &error_message('Permissions Error', 'Only the superuser may access this functionality!') if $FORM{'username'} ne "$superuser";
  82.     &check_passwd;
  83.     if ($FORM{'Bold'}) { $boldon = 1; } else { $boldon = 0; }
  84.     if ($FORM{'Group'}) { $groupon = 1; } else { $groupon = 0; }
  85.     if ($FORM{'Date'}) { $dateon = 1; } else { $dateon = 0; }
  86.     if ($FORM{'Lock'}) { $lockon = 1; } else { $lockon = 0; }
  87.     if ($FORM{'Hide'}) { $hideon = 1; } else { $hideon = 0; }
  88.     &ex('change_board_toppage', $boldon, $groupon, $dateon, $lockon, $hideon);
  89.     &ex('board_manager', $FORM{"username"}); exit(0);
  90. }
  91. if ($FORM{'action'} eq 'topics') {
  92.     if ($FORM{'SELECTION'} =~ /delete(\w+)/) {
  93.         $todo = $1;
  94.         &error_message('Permissions Error', 'Only the superuser may access this functionality!') if $FORM{'username'} ne "$superuser";
  95.         &check_passwd;
  96.         if ($todo ne "all") {
  97.             $todo =~ s/\D//g;
  98.             if ($todo != 0) {
  99.                 &ex('remove_topic', $todo);
  100.             }
  101.         } else {
  102.             @mark = split(/,/, $FORM{'MARK'});
  103.             foreach $num (@mark) {
  104.                 $num =~ s/\D//g;
  105.                 &ex('remove_topic', $num) if $num != 0;
  106.             }
  107.         }
  108.         &ex('board_manager', $FORM{"username"}); exit(0);
  109.         exit(0);
  110.     } elsif ($FORM{'SELECTION'} =~ /properties(\d+)/) {
  111.         $todo = $1;
  112.         &error_message('Permissions Error', 'Only the superuser may access this functionality!') if $FORM{'username'} ne "$superuser";
  113.         &check_passwd;
  114.         open (TOP, "$message_dir/board-topics.html"); @top = <TOP>; close (TOP);
  115.         ($srcline) = grep(/^<!-Source: $todo-!>/, @top);
  116.         if ($srcline =~ m|<!-Source: $todo-!>|) {
  117.             $srcline = $'; $srcline = &unescape($srcline);
  118.         }        
  119.         &extract ("//$todo/$todo.$ext");
  120.         &ex('rename_topic_form', $topic_name, $todo, $FORM{"username"}, $srcline);
  121.         exit(0);
  122.     } elsif ($FORM{'SELECTION'} =~ /group(\w+)/) {
  123.         $todo = $1;
  124.         &error_message('Permissions Error', 'Only the superuser may access this functionality!') if $FORM{'username'} ne "$superuser";
  125.         &check_passwd;
  126.         if ($todo ne "all") {
  127.             $todo =~ s/[^\d,]//g;
  128.             if ($todo != 0) {
  129.                 &ex('change_topic_group_form', $todo, $FORM{"username"});
  130.             }
  131.         } else {
  132.             &ex('change_topic_group_form', $FORM{'MARK'},$FORM{"username"});
  133.         }
  134.         &ex('board_manager', $FORM{"username"}); exit(0);
  135.     } elsif ($FORM{'SELECTION'} =~ /reorderall/) {
  136.         undef @data;
  137.         undef @datakeys;
  138.         foreach $key (keys(%FORM)) {
  139.             if ($key =~ m|^ORDER(\d+)|) {
  140.                 push (@data, $1);
  141.                 push (@dataval, $FORM{$key});
  142.             }
  143.         }
  144.         @array = @data[sort {$dataval[$a] <=> $dataval[$b]} $[..$#data];
  145.         $arraystr = join(":", @array);
  146.         &ex('reorder_topics', $arraystr);
  147.         &ex('board_manager', $FORM{"username"}); exit(0);
  148.     }
  149. }
  150. if ($FORM{'action'} eq 'rename_a_topic') {
  151.     &error_message('Permissions Error', 'Only the superuser may access the "Rename Topic" functionality!') if $FORM{'username'} ne "$superuser";
  152.     &check_passwd;
  153.     ($newname) = &ex('webtags', $FORM{"newname"},3);
  154.     $newname = &remove_links($newname);
  155.     &error_message("Rename Error", "You didn't specify a new topic name!") if $newname eq "";
  156.     &error_message("Formatting Error", "The following formatting error was returned:<BR><BR>$newname<BR><BR>") if $newname =~ /<H3>FORMATTING/i;
  157.     $topic = $FORM{'topic'};
  158.     $topic =~ s/\D//g;
  159.     &error_message("Rename Error", "You didn't specify a valid initial topic!") if $topic == 0;
  160.     &ex('rename_topic', $topic,$newname);
  161.     &ex('board_manager', $FORM{"username"}); exit(0);
  162.     exit(0);
  163. }
  164. if ($FORM{'action'} eq 'main_message' || $FORM{'action'} eq 'title_message') {
  165.     &check_passwd;
  166.     &error_message('Permissions Error', 'Only the superuser may change this property!') if $FORM{'username'} ne "$superuser";
  167.     if ($FORM{'submit'} !~ /Preview/) {
  168.         $message = $FORM{'message'};
  169.         ($lint, $message_in) = &ex('webtags', $message, 1, 1);
  170.         $FORM{'submit'} = "Preview" if $lint eq "!Error";
  171.     }
  172.     if ($FORM{'submit'} !~ "Preview") {
  173.         $source = &escape($message);
  174.         $sub = "change_$FORM{'action'}";
  175.         &ex($sub, $message_in, $source);
  176.         &ex('board_manager', $FORM{"username"}); exit(0);
  177.     } else {
  178.         ($message_in) = &ex('webtags', $FORM{"message"},1);
  179.         $FORM{'message'} =~ s/</</g;
  180.         $FORM{'message'} =~ s/>/>/g;
  181.         $FORM{'message'} =~ s/&/&/g;
  182.         $FORM{'message'} =~ s/"/"/g;
  183.         $descr = "Main Message" if $FORM{'action'} eq "main_message";
  184.         $descr = "Title Message" if $FORM{'action'} eq "title_message";
  185.         &ex('preview_admin_message', $FORM{"message"}, $message_in, $FORM{'username'}, "", $FORM{'action'}, $descr);
  186.         exit(0);
  187.     }
  188. }
  189. if ($FORM{'action'} eq 'meta_tags_top') {
  190.     &error_message('Permissions Error', "Only the superuser may change META Tags!") if $FORM{'username'} ne "$superuser";
  191.     &check_passwd;
  192.     &ex('save_top_meta_tags', $FORM{'DESCRIPTION'}, $FORM{'KEYWORDS'}, $FORM{'ROBOTS'});
  193.     if ($FORM{'applyall'}) {
  194.         open (MAIN, "$message_dir/board-topics.html"); @main = <MAIN>; close (MAIN);
  195.         @tpc = grep(/^<!-Top: (\d+)/, @main);
  196.         foreach $line (@tpc) {
  197.             if ($line =~ m|^<!-Top: (\d+)-!>|) {
  198.                 &ex('save_topic_meta_tags', $1, $FORM{'DESCRIPTION'}, $FORM{'KEYWORDS'}, $FORM{'ROBOTS'});
  199.             }
  200.         }
  201.     }
  202.     &ex('board_manager', $FORM{"username"}); exit(0);
  203. }
  204. if ($FORM{'action'} eq 'meta_tags_topic') {
  205.     &error_message('Permissions Error', "Only the superuser may change META Tags!") if $FORM{'username'} ne "$superuser";
  206.     &check_passwd;
  207.     &extract("//$FORM{'topic'}/$FORM{'topic'}.$ext");
  208.     &ex('save_topic_meta_tags', $FORM{'topic'}, $FORM{'DESCRIPTION'}, $FORM{'KEYWORDS'}, $FORM{'ROBOTS'});
  209.     open (TOP, "$message_dir/board-topics.html"); @top = <TOP>; close (TOP);
  210.     $todo = $FORM{'topic'};
  211.     ($srcline) = grep(/^<!-Source: $todo-!>/, @top);
  212.     if ($srcline =~ m|<!-Source: $todo-!>|) {
  213.         $srcline = $'; $srcline = &unescape($srcline);
  214.     }        
  215.     &extract ("//$todo/$todo.$ext");
  216.     &ex('rename_topic_form', $topic_name, $todo, $FORM{"username"}, $srcline);
  217. }
  218. if ($FORM{'action'} eq 'change_topic_group') {
  219.     &error_message('Permissions Error', "Only the superuser may change a topic's group!") if $FORM{'username'} ne "$superuser";
  220.     &check_passwd;
  221.     $group = $FORM{'group'}; $group =~ tr/A-Z/a-z/; $group =~ s/\W//g;
  222.     &error_message('Group Specification Error', 'You did not specify a valid group!') if $group eq "";
  223.     $topic = $FORM{'topics'}; $topic =~ s/[^\d,]//g;
  224.     &error_message("Invalid Topic", "Topic selected is not valid.") if $topic eq "";
  225.     @topics = split(/,/, $topic);
  226.     foreach $line (@topics) {
  227.         $line =~ s/\D//g;
  228.         &ex('change_topic_group', $line, $group, $FORM{'smart'});
  229.     }
  230.     &ex('board_manager', $FORM{"username"}); exit(0);
  231. }
  232. if ($FORM{'action'} eq "board_appearance") {
  233.     &error_message('Permissions Error', 'Only the superuser may change the board appearance!') if $FORM{'username'} ne "$superuser";
  234.     &check_passwd;
  235.     $FORM{'bgcolor'} =~ s/[^\w#\s]//g;
  236.     $FORM{'text'} =~ s/[^\w#\s]//g;
  237.     $FORM{'link'} =~ s/[^\w#\s]//g;
  238.     $FORM{'vlink'} =~ s/[^\w#\s]//g;
  239.     $FORM{'alink'} =~ s/[^\w#\s]//g;
  240.     $FORM{'size'} =~ s/\D//g;
  241.     $FORM{'face'} =~ s/[<>"&'\[\];]//g;
  242.     $FORM{'image'} =~ s/[<>"&'\[\];]//g;
  243.     if ($FORM{'submit'} =~ /Preview/) {
  244.         &ex('preview_board_colors', $FORM{"bgcolor"}, $FORM{"text"}, $FORM{"link"}, $FORM{"vlink"}, $FORM{"alink"}, $FORM{"face"}, $FORM{"size"}, $FORM{"username"}, $FORM{"image"}, $FORM{"move_board"});
  245.         exit(0);
  246.     } else {
  247.         &ex('upgrade_file_structure', 1);
  248.         &ex('change_board_colors', $FORM{"bgcolor"}, $FORM{"text"}, $FORM{"link"}, $FORM{"vlink"}, $FORM{"alink"}, $FORM{"face"}, $FORM{"size"}, $FORM{"image"}, $FORM{"move_board"});
  249.         &ex('board_manager', $FORM{"username"}); exit(0);
  250.     }
  251. }
  252. #-------------------------------------------------------------------------------
  253. # MODERATOR MANAGER ACTIONS AND OTHER RELATED FUNCTIONS
  254. #-------------------------------------------------------------------------------
  255. if ($FORM{'action'} eq "add_moderator") {
  256.     &error_message('Permissions Error', 'Only the superuser may access the "Add New Moderator" functionality!') if $FORM{'username'} ne "$superuser";
  257.     &check_passwd;
  258.     &ex('add_moderator', $FORM{"username"}, $FORM{"user"}, $FORM{"pass_1"}, $FORM{"pass_2"}, $FORM{'email'}, $FORM{'fullname'});
  259.     &ex('moderator_mgr', $FORM{"username"}); exit(0);
  260. }
  261. if ($FORM{'action'} eq "moderator_form") {
  262.     &error_message("Permissions Error", "Only the superuser may delete and edit moderators!") if $FORM{'username'} ne $superuser;
  263.     &check_passwd;
  264.     if ($FORM{'SELECTION'} =~ /^delete(.*)/) {
  265.         $remove = $1;
  266.         if ($remove ne "All") {
  267.             &ex('delete_moderator', $remove) if $remove ne $superuser;
  268.         } else {
  269.             @mark = split(/,/, $FORM{'MARK'});
  270.             @mark = grep(!/^$superuser$/, @mark);
  271.             foreach $user (@mark) {
  272.                 &ex('delete_moderator', $user);
  273.             }
  274.         }
  275.         &ex('moderator_mgr', $FORM{"username"}); exit(0);
  276.     } elsif ($FORM{'SELECTION'} =~ /^edit(.*)/) {
  277.         $edit = $1;
  278.         &ex("profile_editor_screen", "passwd", $edit, "", $FORM{"username"}, "$cgiurl2", "profile_moderator", 2) if !$pro;
  279.         &ex("profile_editor_screen_PRO", "passwd", $edit, "", $FORM{"username"}, "$cgiurl2", "profile_moderator", 2) if $pro;
  280.         exit(0);
  281.     }
  282. }
  283. if ($FORM{'action'} eq "profile_moderator") {
  284.     &check_passwd;
  285.     &error_message("Permissions Error", "Only the superuser may access this functionality!") if $FORM{'username'} ne $superuser;
  286.     $act2 = $FORM{'action2'};
  287.     $username = $FORM{'username_edit'};
  288.     open (PASSWD, "$admin_dir/passwd.txt"); @passwd = <PASSWD>; close (PASSWD);
  289.     ($result) = grep(/^$username:/, @passwd);
  290.     $result = "PASSWD:$result";
  291.     @result = ($result);
  292.     if ($act2 eq "infosave") {
  293.         $email = $FORM{'profile_email'};
  294.         $full = $FORM{'profile_fullname'};
  295.         if ($email =~ m|^([\w\-\+\.]+)\@([\w\-\+\.]+)$|) {
  296.             $email_new = $email;
  297.         } else {
  298.             $email_new = "email";
  299.         }
  300.         if ($full eq "") {
  301.             $full = "fullname";
  302.         } else {
  303.             $full =~ s/\n//g;
  304.             $full =~ s/[:<>]//g;    
  305.         }
  306.         &ex('save_profile_information', "", $email_new, $full, "", "", "", "", @result);
  307.     } elsif ($act2 eq "notifysave") {
  308.         if (!$pro) {
  309.             undef @em;
  310.             foreach $key (keys(%FORM)) {
  311.                 if ($key =~ m|^notify_(\d+)|) {
  312.                     push (@em, $1);
  313.                 }
  314.             }
  315.             $emr = join(",", @em); $emr = "*" if $emr eq "";
  316.             &ex('save_profile_information', "", "", "", "", $emr, "", "", @result);
  317.         } else {
  318.             &ex('select_by_subtopics', "passwd", $FORM{"username_edit"}, $FORM{'group'}, $FORM{"username"}, "$cgiurl2", "profile_moderator", 2) if $FORM{'submit'} eq $L{PRED_FIRSTLEVEL};
  319.             &ex('notify_save_pro', $FORM{'username_edit'}, $FORM{'username'});
  320.         }
  321.     } elsif ($act2 eq "changepass") {
  322.         $p1 = $FORM{'pass_1'}; $p2 = $FORM{'pass_2'};
  323.         $p1 =~ tr/A-Z/a-z/; $p2 =~ tr/A-Z/a-z/;
  324.         while ($p1 =~ m|(\W)|g) {
  325.             $o = ord($1); $m = $1;    
  326.             &error_message("Change Password Error", "Password is invalid (password may not contain the character <B>$m</B>).") if $o < 126;
  327.         }
  328.         &error_message("Change Password Error", "Password is invalid (must contain 1 to 20 characters)") if (length($p1) < 1 || length($p1) > 20);
  329.         srand(time);
  330.         undef (@salt);
  331.         for ($i=1; $i<=4; $i++) {
  332.             push (@salt, int(rand(26))+65);
  333.         }
  334.         $salt = pack('c4', @salt);
  335.         $new_password = crypt($p1, $salt);
  336.         &ex('save_profile_information', $new_password, "", "", "", "", "", "", @result);
  337.     } elsif ($act2 eq "editpriv") {
  338.         $FORM{'editing'} =~ s/\D//g;
  339.         &ex('save_profile_information', "", "", "", $FORM{'editing'}, "", "", "", @result);
  340.     } elsif ($FORM{'action2'} eq "preferences") {
  341.         @result_save = @result;
  342.         &ex('prefs_save_pro', 1);
  343.     } elsif ($FORM{'action2'} eq "infosection") {
  344.         @result_save = @result;
  345.         &ex('info_save_pro', 1);
  346.     } elsif ($act2 eq "picture") {
  347.         &ex('clear_picture', @result);
  348.     }
  349.     &ex("profile_editor_screen", "passwd", $username, "", $FORM{"username"}, "$cgiurl2", "profile_moderator", 2) if !$pro;
  350.     &ex("profile_editor_screen_PRO", "passwd", $username, "", $FORM{"username"}, "$cgiurl2", "profile_moderator", 2) if $pro;
  351.     exit(0);
  352. }
  353. #-------------------------------------------------------------------------------
  354. # GROUP MANAGER ACTIONS AND OTHER RELATED FUNCTIONS
  355. #-------------------------------------------------------------------------------
  356. if ($FORM{'action'} eq "add_group") {
  357.     &error_message('Permissions Error', 'Only the superuser may access the "Add New Group" functionality!') if $FORM{'username'} ne "$superuser";
  358.     &check_passwd;
  359.     &ex('add_group', $FORM{"username"}, $FORM{"group"});
  360.    &ex('group_mgr', $FORM{"username"}); exit(0);
  361. }
  362. if ($FORM{'action'} eq "group_form") {
  363.     &error_message("Permissions Error", "Only the superuser may delete and edit groups!") if $FORM{'username'} ne $superuser;
  364.     &check_passwd;
  365.     if ($FORM{'SELECTION'} =~ /delete([\w\-]+)/) {
  366.         $remove = $1;
  367.         if ($remove ne "All") {
  368.             &ex('delete_group', $remove);
  369.         } else {
  370.             @mark = split(/,/, $FORM{'MARK'});
  371.             foreach $user (@mark) {
  372.                 &ex('delete_group', $user);
  373.             }
  374.         }
  375.        &ex('group_mgr', $FORM{"username"}); exit(0);
  376.     } elsif ($FORM{'SELECTION'} =~ /edit([\w\-]+)/) {
  377.         $edit = $1;
  378.         &ex('edit_group', $FORM{"username"}, $edit);
  379.         exit(0);
  380.     }
  381. }
  382. if ($FORM{'action'} eq "edit_group_form") {
  383.     &error_message("Permissions Error", "Only the superuser may delete and edit groups!") if $FORM{'username'} ne $superuser;
  384.     &check_passwd;
  385.     if ($FORM{'SELECTION'} =~ /^delete(.+)/) {
  386.         $remove = $1;
  387.         if ($remove ne "All") {
  388.             &ex('delete_moderator_from_group', $remove, $FORM{"group"});
  389.         } else {
  390.             @mark = split(/,/, $FORM{'MARK'});
  391.             foreach $user (@mark) {
  392.                 &ex('delete_moderator_from_group', $user, $FORM{"group"});
  393.             }
  394.         }
  395.         $edit = $FORM{'group'};
  396.         &ex('edit_group', $FORM{"username"}, $edit);
  397.         exit(0);
  398.     }
  399. }
  400. if ($FORM{'action'} eq "add_to_group") {
  401.     &error_message('Permissions Error', 'Only the superuser may add a moderator to a group!') if $FORM{'username'} ne "$superuser";
  402.     &check_passwd;
  403.     if ($FORM{'SELECTION'} =~ /^add(.+)/) {
  404.         $add = $1;
  405.         if ($add ne "All") {
  406.             &ex('add_to_group', $FORM{"group"}, $add);
  407.         } else {
  408.             @mark = split(/,/, $FORM{'MARK'});
  409.             foreach $user (@mark) {
  410.                 &ex('add_to_group', $FORM{"group"}, $user);
  411.             }
  412.         }
  413.     }
  414.     $edit = $FORM{'group'};
  415.     &ex('edit_group', $FORM{"username"}, $edit);
  416.     exit(0);
  417. }
  418. &error_message("Invalid Query", "The form action $FORM{action} is not valid for this script (ID# 2)");
  419.