3 # Display a caller-ID number for editing
5 require './pap-lib.pl';
6 $access{'dialin'} || &error($text{'dialin_ecannot'});
10 &ui_print_header(undef, $text{'dialin_create'}, "");
13 &ui_print_header(undef, $text{'dialin_edit'}, "");
14 @dialin = &parse_dialin_config();
15 $dialin = $dialin[$in{'idx'}];
18 print "<form action=save_dialin.cgi>\n";
19 print "<input type=hidden name=idx value='$in{'idx'}'>\n";
20 print "<input type=hidden name=new value='$in{'new'}'>\n";
21 print "<table border>\n";
22 print "<tr $tb> <td><b>$text{'dialin_header'}</b></td> </tr>\n";
23 print "<tr $cb> <td><table>\n";
25 $mode = $dialin->{'number'} eq 'all' ? 0 :
26 $dialin->{'number'} eq 'none' ? 1 : 2;
27 print "<tr> <td valign=top><b>$text{'dialin_number'}</b></td>\n";
28 printf "<td><input type=radio name=mode value=0 %s> %s<br>\n",
29 $mode == 0 ? "checked" : "", $text{'dialin_all'};
30 printf "<input type=radio name=mode value=1 %s> %s<br>\n",
31 $mode == 1 ? "checked" : "", $text{'dialin_none'};
32 printf "<input type=radio name=mode value=2 %s> %s\n",
33 $mode == 2 ? "checked" : "", $text{'dialin_match'};
34 printf "<input name=number size=15 value='%s'></td>\n",
35 $mode == 2 ? $dialin->{'number'} : undef;
37 print "<td valign=top><b>$text{'dialin_ad'}</b></td>\n";
38 printf "<td valign=top><input type=radio name=allow value=1 %s> %s\n",
39 $dialin->{'not'} ? "" : "checked", $text{'dialin_allow'};
40 printf "<input type=radio name=allow value=0 %s> %s</td> </tr>\n",
41 $dialin->{'not'} ? "checked" : "", $text{'dialin_deny'};
43 print "</table></td></tr></table>\n";
45 print "<input type=submit value='$text{'create'}'>\n";
48 print "<input type=submit value='$text{'save'}'>\n";
49 print "<input type=submit name=delete value='$text{'delete'}'>\n";
53 &ui_print_footer("list_dialin.cgi", $text{'dialin_return'});