2 # $Id: edit_text.cgi,v 1.2 2005/04/16 14:30:21 jfranken Exp $
3 # File added 2005-04-15 by Johannes Franken <jfranken@jfranken.de>
4 # Distributed under the terms of the GNU General Public License, v2 or later
6 # * Display form to manually edit dhcpd.conf file (pass to save_text.cgi)
8 require './dhcpd-lib.pl';
9 $access{'noconfig'} && &error($text{'text_ecannot'});
10 $conf = &get_config();
11 &ui_print_header($text{'text_editor'}, $text{'text_title'}, "");
13 open(FILE, $config{'dhcpd_conf'});
15 push(@lines, &html_escape($_));
20 print &text('text_desc', "<tt>$file</tt>"),"<p>\n";
23 print "<form action=save_text.cgi method=post enctype=multipart/form-data>\n";
24 print "<textarea name=text rows=20 cols=80>",
25 join("", @lines),"</textarea><p>\n";
26 print "<input type=submit value=\"$text{'save'}\"> ",
27 "<input type=reset value=\"$text{'text_undo'}\">\n"
31 &ui_print_footer("",$text{'text_return'});