30 require_once(
"../class/config.php");
32 if (!$admin->enabled) {
33 __(
"This page is restricted to authorized staff");
38 "delaccount" => array (
"request",
"string",
""),
39 "newlogin" => array (
"request",
"string",
""),
40 "newpass" => array (
"request",
"string",
""),
42 "delip" => array (
"request",
"string",
""),
43 "newip" => array (
"request",
"string",
""),
44 "newclass" => array (
"request",
"string",
"32"),
50 if (
$dom->del_slave_account($delaccount)) {
51 $error=_(
"The requested account has been deleted. It is now denied.");
56 if (
$dom->add_slave_account($newlogin,$newpass)) {
57 $error=_(
"The requested account address has been created. It is now allowed.");
58 unset($newlogin); unset($newpass);
64 if (
$dom->del_slave_ip($delip)) {
65 $error=_(
"The requested ip address has been deleted. It will be denied in one hour.");
70 if (
$dom->add_slave_ip($newip,$newclass)) {
71 $error=_(
"The requested ip address has been added to the list. It will be allowed in one hour.");
72 unset($newip); unset($newclass);
76 include_once(
"head.php");
79 echo
"<p class=\"alert alert-danger\">$error</p>";
83 <h3><?php
__(
"Manage allowed ip for slave zone transfers"); ?></h3>
89 if (is_array(
$c)) { ?>
91 <?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)"); ?>
94 <table border=
"0" cellpadding=
"4" cellspacing=
"0" class=
'tlist'>
95 <tr><th><?php
__(
"Action"); ?></th><th><?php
__(
"IP Address"); ?></th></tr>
101 <td
class=
"center"><div
class=
"ina delete"><a href=
"adm_slavedns.php?delip=<?php echo urlencode($c[$i]['ip']); ?>"><?php
__(
"Delete"); ?></a></div></td>
102 <td><?php echo
$c[
$i][
"ip"].
"/".
$c[
$i][
"class"]; ?></td>
110 <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>
112 <form method=
"post" action=
"adm_slavedns.php" name=
"main" id=
"main">
113 <table
class=
"tedit">
114 <tr><th><label
for=
"newip"><?php
__(
"IP Address"); ?></label></th><th><label
for=
"newclass"><?php
__(
"Prefix"); ?></label></th></tr>
116 <td
style=
"text-align: right"><input type=
"text" class=
"int" value=
"<?php ehe( (isset($newip)?$newip:'') ); ?>" id=
"newip" name=
"newip" maxlength=
"15" size=
"20" style=
"text-align:right" /> / </td>
117 <td><input type=
"text" class=
"int" value=
"<?php ehe( (isset($newclass)?$newclass:'') ); ?>" id=
"newclass" name=
"newclass" maxlength=
"2" size=
"3" /></td>
120 <td colspan=
"2"><input type=
"submit" value=
"<?php __("Add
this ip to the slave list
"); ?>" class=
"inb" /></td>
129 <h3><?php
__(
"Manage allowed accounts for slave zone transfers"); ?></h3>
134 $c=
$dom->enum_slave_account();
136 if (is_array($c)) { ?>
137 <p><?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. "); ?></p>
139 <table
class=
"tlist">
140 <tr><th><?php
__(
"Action"); ?></th><th><?php
__(
"Login"); ?></th><th><?php
__(
"Password"); ?></th></tr>
142 for(
$i=0;
$i<count($c);
$i++) { ?>
145 <td
class=
"center"><div
class=
"ina delete"><a href=
"adm_slavedns.php?delaccount=<?php echo urlencode($c[$i]["login
"]); ?>"><?php
__(
"Delete"); ?></a></div></td>
146 <td><?php
ehe($c[
$i][
"login"]); ?></td>
147 <td><?php
ehe($c[
$i][
"pass"]); ?></td>
154 <p><?php
__(
"If you want to allow a new server to access your domain list, give him an account."); ?></p>
156 <form method=
"post" action=
"adm_slavedns.php" name=
"main" id=
"main">
157 <table
class=
"tedit">
158 <tr><th><label
for=
"newlogin"><?php
__(
"Login"); ?></label></th><th><label
for=
"newpass"><?php
__(
"Password"); ?></label></th></tr>
160 <td><input type=
"text" class=
"int" value=
"<?php ehe( isset($newlogin)?$newlogin:'') ; ?>" id=
"newlogin" name=
"newlogin" maxlength=
"64" size=
"32" /><br/><br/></td>
163 <tr
class=
"trbtn"><td colspan=
"2"><input type=
"submit" value=
"<?php __("Add
this account to the allowed list
"); ?>" class=
"inb" /></td></tr>
167 <script type=
"text/javascript">
168 document.forms[
'main'].setAttribute(
'autocomplete',
'off');
169 document.forms[
'main'].newip.focus();
171 $(
".toggle-next").on(
"click",
function(){
173 var next = $(
this).next();
183 background: none repeat scroll 0 0 white;
184 border: 1px solid #CCCCCC;
185 border-radius: 15px 15px 15px 15px;
194 <h4
class=
"toggle toggle-next"><a href=
"javascript:void(0)" class=
"btn"> <?= _(
"Need open DNS Slave servers?")?> ▼</a></h4>
195 <div
class=
"info-hide">
196 <p><?= _(
"We offer free of charge DNS servers for alternc users."); ?></p>
197 <h2><?= _(
"How does it work?") ?> </h2>
199 <li><?= sprintf(_(
"<strong>Give access to the alternc.net servers.</strong> Follow the instructions on <a href='%s' target='blank'>this page</a>. They will help you to configure this page and configure your alternc.net account."),
"http://aide-alternc.org/go.php?hid=400") ?></li>
200 <li><?= sprintf(_(
"<strong>Subscribe to alternc.net.</strong> Go to <a href='%s' target='_blank' class='btn btn-inline btn-link'>the alternc.net site</a> to use the DNS servers provided for free by the AlternC association and enter the required informations for each server you want to connect to the service."),
"http://alternc.net/")?> </li>
203 <p><?= _(
"The alternc.net servers will take care of transfering and distributing to the world your domains zones.") ?> </p>
204 </div><!-- info-hide -->
206 <?php include_once(
"foot.php"); ?>