| 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 ($delaccount) { |
|---|
| 38 |
|
|---|
| 39 |
if ($dom->del_slave_account($delaccount)) { |
|---|
| 40 |
$error=_("The requested account has been deleted. It is now denied."); |
|---|
| 41 |
} |
|---|
| 42 |
} |
|---|
| 43 |
if ($newlogin) { |
|---|
| 44 |
|
|---|
| 45 |
if ($dom->add_slave_account($newlogin,$newpass)) { |
|---|
| 46 |
$error=_("The requested account address has been created. It is now allowed."); |
|---|
| 47 |
unset($newlogin); unset($newpass); |
|---|
| 48 |
} |
|---|
| 49 |
} |
|---|
| 50 |
|
|---|
| 51 |
include("head.php"); |
|---|
| 52 |
?> |
|---|
| 53 |
</head> |
|---|
| 54 |
<body> |
|---|
| 55 |
<h3><?php __("Manage allowed accounts for slave zone transfers"); ?></h3> |
|---|
| 56 |
<?php |
|---|
| 57 |
if ($error) { |
|---|
| 58 |
echo "<p class=\"error\">$error</p>"; |
|---|
| 59 |
} |
|---|
| 60 |
|
|---|
| 61 |
$c=$dom->enum_slave_account(); |
|---|
| 62 |
|
|---|
| 63 |
if (is_array($c)) { |
|---|
| 64 |
|
|---|
| 65 |
?> |
|---|
| 66 |
<p> |
|---|
| 67 |
<?php __("Here is the list of the allowed accounts for slave dns synchronization. You can configure the alternc-slavedns package on your slave server and give him the login/pass that will grant him access to your server's domain list. "); ?> |
|---|
| 68 |
</p> |
|---|
| 69 |
|
|---|
| 70 |
<table border="0" cellpadding="4" cellspacing="0"> |
|---|
| 71 |
<tr><th><?php __("Action"); ?></th><th><?php __("Login"); ?></th><th><?php __("Password"); ?></th></tr> |
|---|
| 72 |
<?php |
|---|
| 73 |
$col=1; |
|---|
| 74 |
for($i=0;$i<count($c);$i++) { |
|---|
| 75 |
$col=3-$col; |
|---|
| 76 |
?> |
|---|
| 77 |
|
|---|
| 78 |
<tr class="lst<?php echo $col; ?>"> |
|---|
| 79 |
<td><a href="adm_slaveaccount.php?delaccount=<?php echo urlencode($c[$i]["login"]); ?>"><?php __("Delete"); ?></a></td> |
|---|
| 80 |
<td><?php echo $c[$i]["login"]; ?></td> |
|---|
| 81 |
<td><?php echo $c[$i]["pass"]; ?></td> |
|---|
| 82 |
</tr> |
|---|
| 83 |
<?php |
|---|
| 84 |
} |
|---|
| 85 |
?> |
|---|
| 86 |
</table> |
|---|
| 87 |
<?php } ?> |
|---|
| 88 |
<p><?php __("If you want to allow a new server to access your domain list, give him an account."); ?></p> |
|---|
| 89 |
<form method="post" action="adm_slaveaccount.php"> |
|---|
| 90 |
<table border="0" cellpadding="4" cellspacing="0"> |
|---|
| 91 |
<tr><th><label for="newlogin"><?php __("Login"); ?></label></th><th><label for="newpass"><?php __("Password"); ?></label></th></tr> |
|---|
| 92 |
<tr> |
|---|
| 93 |
<td><input type="text" class="int" value="<?php echo urlencode($newlogin); ?>" id="newlogin" name="newlogin" maxlength="64" size="32" /> / </td> |
|---|
| 94 |
<td><input type="password" class="int" value="<?php echo urlencode($newpass); ?>" id="newpass" name="newpass" maxlength="64" size="32" /></td> |
|---|
| 95 |
</tr> |
|---|
| 96 |
<tr><td colspan="2"> |
|---|
| 97 |
<input type="submit" value="<?php __("Add this account to the allowed list"); ?>" class="inb" /> |
|---|
| 98 |
</table> |
|---|
| 99 |
|
|---|
| 100 |
</form> |
|---|
| 101 |
</body> |
|---|
| 102 |
</html> |
|---|
| 103 |
|
|---|