#!/usr/local/bin/perl
# edit_bind.cgi
# Display port / address form

require './webmin-lib.pl';
&header($text{'bind_title'}, "");
print "<hr>\n";
&get_miniserv_config(\%miniserv);

print $text{'bind_desc'},"<p>\n";

print "<form action=change_bind.cgi>\n";
print "<table border>\n";
print "<tr $tb> <td><b>$text{'bind_header'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";

print "<tr> <td nowrap><b>$text{'bind_ip'}</b></td>\n";
printf "<td nowrap><input type=radio name=bind_def value=1 %s>%s &nbsp;\n",
	$miniserv{"bind"} ? "" : "checked", $text{'bind_all'};
printf "<input type=radio name=bind_def value=0 %s>\n",
	$miniserv{"bind"} ? "checked" : "";
print "<input name=bind size=20 value=\"$miniserv{bind}\"></td> </tr>\n";

print "<tr> <td><b>$text{'bind_port'}</b></td>\n";
print "<td><input name=port size=6 value=\"$miniserv{port}\"></td> </tr>\n";

print "<tr> <td nowrap><b>$text{'bind_listen'}</b></td>\n";
printf "<td nowrap><input type=radio name=listen_def value=1 %s>%s &nbsp;\n",
	$miniserv{"listen"} ? "" : "checked", $text{'bind_none'};
printf "<input type=radio name=listen_def value=0 %s>\n",
	$miniserv{"listen"} ? "checked" : "";
print "<input name=listen size=6 value=\"$miniserv{listen}\"></td> </tr>\n";

print "</table></td></tr></table>\n";
print "<input type=submit value=\"$text{'save'}\"></form>\n";

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

