#!/usr/local/bin/perl
# expframe_form.cgi
# Display frame-forwarding HTML

require './virtual-server-lib.pl';
&ReadParse();
$d = &get_domain($in{'dom'});
&can_edit_domain($d) && &can_edit_forward() || &error($text{'edit_ecannot'});
&ui_print_header(&domain_in($d), $text{'expframe_title'}, "");

$ff = &framefwd_file($d);
print &text('expframe_desc', "<tt>$ff</tt>"),"<p>\n";

&switch_to_domain_user($d);
print "<form action=save_expframe.cgi method=post enctype=multipart/form-data>\n";
print "<input type=hidden name=dom value=\"$in{'dom'}\">\n";
print "<textarea name=text rows=20 cols=80>";
open(FF, $ff);
while(<FF>) {
	print &html_escape($_);
	}
close(FF);
print "</textarea><p>\n";
print "<input type=submit value=\"$text{'save'}\"> ",
      "<input type=reset value=\"$text{'afile_undo'}\">\n";
print "</form>\n";

&ui_print_footer(&domain_footer_link($d),
	"", $text{'index_return'});

