27 require_once(
"../class/config.php");
29 if (!$admin->enabled) {
30 $msg->raise(
"ERROR",
"admin", _(
"This page is restricted to authorized staff"));
31 echo
$msg->msg_html_all();
36 "delaccount" => array (
"request",
"string",
""),
37 "newlogin" => array (
"post",
"string",
""),
38 "newpass" => array (
"post",
"string",
""),
40 "delip" => array (
"request",
"string",
""),
41 "newip" => array (
"post",
"string",
""),
42 "newclass" => array (
"post",
"string",
"32"),
48 if (
$dom->del_slave_account($delaccount)) {
49 $msg->raise(
"INFO",
"admin", _(
"The requested account has been deleted. It is now denied."));
54 if (
$dom->add_slave_account($newlogin,$newpass)) {
55 $msg->raise(
"INFO",
"admin", _(
"The requested account address has been created. It is now allowed."));
56 unset($newlogin); unset($newpass);
62 if (
$dom->del_slave_ip($delip)) {
63 $msg->raise(
"INFO",
"admin", _(
"The requested ip address has been deleted. It will be denied in one hour."));
68 if (
$dom->add_slave_ip($newip,$newclass)) {
69 $msg->raise(
"INFO",
"admin", _(
"The requested ip address has been added to the list. It will be allowed in one hour."));
70 unset($newip); unset($newclass);
74 include_once(
"head.php");
76 $c=$admin->listPasswordPolicies();
80 <h3><?php
__(
"Manage allowed ip for slave zone transfers"); ?></h3>
86 echo
$msg->msg_html_all();
88 if (is_array(
$c)) { ?>
90 <?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)"); ?>
93 <table border=
"0" cellpadding=
"4" cellspacing=
"0" class=
'tlist'>
94 <tr><th><?php
__(
"Action"); ?></th><th><?php
__(
"IP Address"); ?></th></tr>
100 <td
class=
"center"><div
class=
"ina delete"><a href=
"adm_slavedns.php?delip=<?php echo urlencode($c[$i]['ip']); ?>"><?php
__(
"Delete"); ?></a></div></td>
101 <td><?php echo
$c[
$i][
"ip"].
"/".
$c[
$i][
"class"]; ?></td>
109 <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>
111 <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>
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" autocomplete=
"off">
158 <!-- honeypot fields -->
159 <input type=
"text" style=
"display: none" id=
"fakeUsername" name=
"fakeUsername" value=
"" />
160 <input type=
"password" style=
"display: none" id=
"fakePassword" name=
"fakePassword" value=
"" />
162 <table
class=
"tedit">
163 <tr><th><label
for=
"newlogin"><?php
__(
"Login"); ?></label></th><th><label
for=
"newpass"><?php
__(
"Password"); ?></label></th></tr>
165 <td><input type=
"text" class=
"int" value=
"<?php ehe( isset($newlogin)?$newlogin:'') ; ?>" id=
"newlogin" name=
"newlogin" maxlength=
"64" size=
"32" /><br/><br/></td>
168 <tr
class=
"trbtn"><td colspan=
"2"><input type=
"submit" value=
"<?php __("Add
this account to the allowed list
"); ?>" class=
"inb" /></td></tr>
172 <script type=
"text/javascript">
173 document.forms[
'main'].newip.focus();
175 $(
".toggle-next").on(
"click",
function(){
177 var next = $(
this).next();
187 background: none repeat scroll 0 0 white;
188 border: 1px solid #CCCCCC;
189 border-radius: 15px 15px 15px 15px;
198 <h4
class=
"toggle toggle-next"><a href=
"javascript:void(0)" class=
"btn"> <?php
__(
"Need open DNS Slave servers?"); ?> ▼</a></h4>
199 <div
class=
"info-hide">
200 <p><?php
__(
"We offer free of charge DNS servers for alternc users."); ?></p>
201 <h2><?php
__(
"How does it work?"); ?> </h2>
203 <li><?php printf(_(
"<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>
204 <li><?php printf(_(
"<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>
207 <p><?php
__(
"The alternc.net servers will take care of transfering and distributing to the world your domains zones."); ?> </p>
208 </div><!-- info-hide -->
210 <?php include_once(
"foot.php"); ?>
if(! $admin->enabled) $fields
Manage the list of SLAVE DNS machines account and IPs used for the transfer of zones in Bind and the ...
const DEFAULT_PASS_SIZE
Define constants from vars of /etc/alternc/local.sh The you can't choose where is the AlternC Panel.
display_div_generate_password($pass_size=DEFAULT_PASS_SIZE, $fields_to_fill1="", $fields_to_fill2="", $classcount=3)
Show a button to set a random password for a password field.
ehe($str, $display=TRUE)
Echo the HTMLSpecialChars version of a value.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...