Révision c5cfa06b
Ajouté par Phil Davis il y a plus de 9 ans
usr/local/www/firewall_aliases_edit.php | ||
---|---|---|
7 | 7 |
Copyright (C) 2010 Jim Pingle |
8 | 8 |
All rights reserved. |
9 | 9 |
|
10 |
originially part of m0n0wall (http://m0n0.ch/wall)
|
|
10 |
originally part of m0n0wall (http://m0n0.ch/wall) |
|
11 | 11 |
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>. |
12 | 12 |
All rights reserved. |
13 | 13 |
|
... | ... | |
105 | 105 |
$pconfig['type'] = $a_aliases[$id]['type']; |
106 | 106 |
$pconfig['descr'] = html_entity_decode($a_aliases[$id]['descr']); |
107 | 107 |
|
108 |
/* interface list */ |
|
109 |
$iflist = get_configured_interface_with_descr(false, true); |
|
110 |
foreach ($iflist as $if => $ifdesc) |
|
111 |
if($ifdesc == $pconfig['descr']) |
|
112 |
$input_errors[] = sprintf(gettext("Sorry, an interface is already named %s."), $pconfig['descr']); |
|
113 |
|
|
114 | 108 |
if($a_aliases[$id]['type'] == "urltable") { |
115 | 109 |
$pconfig['address'] = $a_aliases[$id]['url']; |
116 | 110 |
$pconfig['updatefreq'] = $a_aliases[$id]['updatefreq']; |
... | ... | |
462 | 456 |
} |
463 | 457 |
EOD; |
464 | 458 |
|
465 |
$network_str = gettext("Network"); |
|
459 |
$network_str = gettext("Network or FQDN");
|
|
466 | 460 |
$networks_str = gettext("Network(s)"); |
467 | 461 |
$cidr_str = gettext("CIDR"); |
468 | 462 |
$description_str = gettext("Description"); |
469 | 463 |
$hosts_str = gettext("Host(s)"); |
470 |
$ip_str = gettext("IP"); |
|
464 |
$ip_str = gettext("IP or FQDN");
|
|
471 | 465 |
$ports_str = gettext("Port(s)"); |
472 | 466 |
$port_str = gettext("Port"); |
473 | 467 |
$url_str = gettext("URL"); |
... | ... | |
495 | 489 |
document.getElementById ("onecolumn").firstChild.data = "{$network_str}"; |
496 | 490 |
document.getElementById ("twocolumn").firstChild.data = "{$cidr_str}"; |
497 | 491 |
document.getElementById ("threecolumn").firstChild.data = "{$description_str}"; |
492 |
document.getElementById ("threecolumn").style.display = 'block'; |
|
498 | 493 |
document.getElementById ("itemhelp").firstChild.data = "{$networks_help}"; |
499 | 494 |
document.getElementById ("addrowbutton").style.display = 'block'; |
500 | 495 |
} else if(selected == '{$hosts_str}') { |
... | ... | |
502 | 497 |
document.getElementById ("onecolumn").firstChild.data = "{$ip_str}"; |
503 | 498 |
document.getElementById ("twocolumn").firstChild.data = ""; |
504 | 499 |
document.getElementById ("threecolumn").firstChild.data = "{$description_str}"; |
500 |
document.getElementById ("threecolumn").style.display = 'block'; |
|
505 | 501 |
document.getElementById ("itemhelp").firstChild.data = "{$hosts_help}"; |
506 | 502 |
document.getElementById ("addrowbutton").style.display = 'block'; |
507 | 503 |
} else if(selected == '{$ports_str}') { |
... | ... | |
509 | 505 |
document.getElementById ("onecolumn").firstChild.data = "{$port_str}"; |
510 | 506 |
document.getElementById ("twocolumn").firstChild.data = ""; |
511 | 507 |
document.getElementById ("threecolumn").firstChild.data = "{$description_str}"; |
508 |
document.getElementById ("threecolumn").style.display = 'block'; |
|
512 | 509 |
document.getElementById ("itemhelp").firstChild.data = "{$ports_help}"; |
513 | 510 |
document.getElementById ("addrowbutton").style.display = 'block'; |
514 | 511 |
} else if(selected == '{$url_str}') { |
... | ... | |
516 | 513 |
document.getElementById ("onecolumn").firstChild.data = "{$url_str}"; |
517 | 514 |
document.getElementById ("twocolumn").firstChild.data = ""; |
518 | 515 |
document.getElementById ("threecolumn").firstChild.data = "{$description_str}"; |
516 |
document.getElementById ("threecolumn").style.display = 'block'; |
|
519 | 517 |
document.getElementById ("itemhelp").firstChild.data = "{$url_help}"; |
520 | 518 |
document.getElementById ("addrowbutton").style.display = 'block'; |
521 | 519 |
} else if(selected == '{$openvpn_user_str}') { |
... | ... | |
523 | 521 |
document.getElementById ("onecolumn").firstChild.data = "{$openvpn_str}"; |
524 | 522 |
document.getElementById ("twocolumn").firstChild.data = "{$openvpn_freq}"; |
525 | 523 |
document.getElementById ("threecolumn").firstChild.data = "{$description_str}"; |
524 |
document.getElementById ("threecolumn").style.display = 'block'; |
|
526 | 525 |
document.getElementById ("itemhelp").firstChild.data = "{$openvpn_help}"; |
527 | 526 |
document.getElementById ("addrowbutton").style.display = 'block'; |
528 | 527 |
} else if(selected == '{$urltable_str}') { |
Formats disponibles : Unified diff
Minor fixes to firewall_aliases_edit
for 2.1 branch