| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
require_once("../class/config.php"); |
|---|
| 31 |
|
|---|
| 32 |
if (!$admin->enabled) { |
|---|
| 33 |
__("This page is restricted to authorized staff"); |
|---|
| 34 |
exit(); |
|---|
| 35 |
} |
|---|
| 36 |
|
|---|
| 37 |
if ($delip) { |
|---|
| 38 |
|
|---|
| 39 |
if ($dom->del_slave_ip($delip)) { |
|---|
| 40 |
$error=_("The requested ip address has been deleted. It will be denied in one hour."); |
|---|
| 41 |
} |
|---|
| 42 |
} |
|---|
| 43 |
if ($newip) { |
|---|
| 44 |
|
|---|
| 45 |
if ($dom->add_slave_ip($newip,$newclass)) { |
|---|
| 46 |
$error=_("The requested ip address has been added to the list. It will be allowed in one hour."); |
|---|
| 47 |
unset($newip); unset($newclass); |
|---|
| 48 |
} |
|---|
| 49 |
} |
|---|
| 50 |
|
|---|
| 51 |
if (!$newclass) $newclass=32; |
|---|
| 52 |
|
|---|
| 53 |
include("head.php"); |
|---|
| 54 |
?> |
|---|
| 55 |
</head> |
|---|
| 56 |
<body> |
|---|
| 57 |
<h3><?php __("Manage allowed ip for slave zone transfers"); ?></h3> |
|---|
| 58 |
<?php |
|---|
| 59 |
if ($error) { |
|---|
| 60 |
echo "<p class=\"error\">$error</p>"; |
|---|
| 61 |
} |
|---|
| 62 |
|
|---|
| 63 |
$c=$dom->enum_slave_ip(); |
|---|
| 64 |
|
|---|
| 65 |
if (is_array($c)) { |
|---|
| 66 |
|
|---|
| 67 |
?> |
|---|
| 68 |
<p> |
|---|
| 69 |
<?php __("Here is the list of the allowed ip or ip class for slave dns zone transfer requests (AXFR). You must add the ip address of all the slave DNS you have so that those slaves will be allowed to transfer the zone files. There is also some defaults ip from DNS checks made by some third-party technical offices such as afnic (for .fr domains)"); ?> |
|---|
| 70 |
</p> |
|---|
| 71 |
|
|---|
| 72 |
<table border="0" cellpadding="4" cellspacing="0"> |
|---|
| 73 |
<tr><th><?php __("Action"); ?></th><th><?php __("IP Address"); ?></th></tr> |
|---|
| 74 |
<?php |
|---|
| 75 |
$col=1; |
|---|
| 76 |
for($i=0;$i<count($c);$i++) { |
|---|
| 77 |
$col=3-$col; |
|---|
| 78 |
?> |
|---|
| 79 |
|
|---|
| 80 |
<tr class="lst<?php echo $col; ?>"> |
|---|
| 81 |
<td><a href="adm_slaveip.php?delip=<?php echo urlencode($c[$i][ip]); ?>"><?php __("Delete"); ?></a></td> |
|---|
| 82 |
<td><?php echo $c[$i]["ip"]."/".$c[$i]["class"]; ?></td> |
|---|
| 83 |
</tr> |
|---|
| 84 |
<?php |
|---|
| 85 |
} |
|---|
| 86 |
?> |
|---|
| 87 |
</table> |
|---|
| 88 |
<?php } ?> |
|---|
| 89 |
<p><?php __("If you want to allow an ip address or class to connect to your dns server, enter it here. Choose 32 as a prefix for single ip address."); ?></p> |
|---|
| 90 |
<form method="post" action="adm_slaveip.php"> |
|---|
| 91 |
<table border="0" cellpadding="4" cellspacing="0"> |
|---|
| 92 |
<tr><th><label for="newip"><?php __("IP Address"); ?></label></th><th><label for="newclass"><?php __("Prefix"); ?></label></th></tr> |
|---|
| 93 |
<tr> |
|---|
| 94 |
<td style="text-align: right"><input type="text" class="int" value="<?php echo urlencode($newip); ?>" id="newip" name="newip" maxlength="15" size="20" style="text-align:right" /> / </td> |
|---|
| 95 |
<td><input type="text" class="int" value="<?php echo urlencode($newclass); ?>" id="newclass" name="newclass" maxlength="2" size="3" /></td> |
|---|
| 96 |
</tr> |
|---|
| 97 |
<tr><td colspan="2"> |
|---|
| 98 |
<input type="submit" value="<?php __("Add this ip to the slave list"); ?>" class="inb" /> |
|---|
| 99 |
</table> |
|---|
| 100 |
|
|---|
| 101 |
</form> |
|---|
| 102 |
</body> |
|---|
| 103 |
</html> |
|---|
| 104 |
|
|---|