#!/usr/local/bin/perl # edit_rfile.cgi # Display the contents of an autoreply file require './qmail-lib.pl'; &ReadParse(); &ui_print_header(undef, $text{'rfile_title'}, ""); open(FILE, $in{'file'}); while() { if (/^Reply-Tracking:\s*(.*)/) { $replies = $1; } elsif (/^Reply-Period:\s*(.*)/) { $period = $1; } else { push(@lines, $_); } } close(FILE); print "",&text('rfile_desc', "$in{'file'}"),"

\n"; print "$text{'rfile_desc2'}

\n"; print "

\n"; print "\n"; print "\n"; print "

\n"; print $text{'rfile_replies'},"\n"; printf " %s\n", $replies eq '' ? "checked" : "", $text{'rfile_none'}; printf " %s\n", $replies eq '' ? "" :"checked", $text{'rfile_file'}; printf " %s
\n", $replies, &file_chooser_button("replies"); print " " x 3; print $text{'rfile_period'},"\n"; printf " %s\n", $period eq '' ? "checked" : "", $text{'rfile_default'}; printf "\n", $period eq '' ? "" :"checked"; printf " %s

\n", $period, $text{'rfile_secs'}; print " ", "\n"; print "

\n"; &ui_print_footer("edit_alias.cgi?name=$in{'name'}", $text{'aform_return'});