#!/usr/local/bin/perl
# edit_defines.cgi
# Display a form for editing run-time httpd defines

require './apache-lib.pl';
$access{'global'}==1 || &error($text{'defines_ecannot'});
&header($text{'defines_title'}, "",
	undef, undef, undef, undef, &restart_button());
print "<hr>\n";

print "<form action=save_defines.cgi>\n";
print "<table width=100%><tr><td valign=top>\n";
print $text{'defines_desc'};
if ($config{'defines'}) {
	print "<p>",&text('defines_config',
			  "<tt><b>$config{'defines'}</b></tt>");
	}

print "</td> <td valign=top>\n";
print "<textarea name=defines rows=5 cols=20>",
	join("\n", split(/\s+/, $site{'defines'})),"</textarea><br>\n";
print "<input type=submit value=\"$text{'save'}\"></td>\n";
print "</tr></table></form>\n";

print "<hr>\n";
&footer("", $text{'index_return'});
