26 require_once(
"../class/config.php");
27 include_once(
"head.php");
30 "domain" => array (
"post",
"string",
""),
31 "zone" => array (
"post",
"string",
""),
32 "save" => array (
"post",
"integer",
"0"),
33 "detect_redirect" => array (
"post",
"integer",
"0"),
39 <h3><?php
__(
"Import a DNS zone"); ?></h3>
45 $msg->raise(
"ALERT",
"dom", _(
"The domain field seems to be empty"));
48 echo
$msg->msg_html_all();
51 <?php
if ( !empty($zone) ) {
53 __(
"Here is my proposition. Modify your zone until my proposition seems good to you"); ?>
55 <tr><th colspan=3><h2><?php printf(_(
"Working on %s"),
$domain); ?></h2></th></tr>
57 <th width=
"50%"><?php
__(
"Zone"); ?></th><th width=
"50%"><?php
__(
"Generated entry"); ?></th><?php
if ($save) {echo
"<th>"._(
"Result").
"</th>"; } ?>
60 <?php
foreach (
$dom->import_manual_dns_zone($zone,
$domain, $detect_redirect, $save) as
$val) {
61 if (empty(
$val))
continue;
65 echo
"tab-".($val[
'did_it']==1?
'ok':
'err');
67 echo
"tab-".$val[
'status'];
69 echo
"'><td>".$val[
'entry_old'].
"</td><td>".
$val[
'comment'].
"</td>";
70 if ($save) { echo
"<td>".($val[
'did_it']==1?_(
"OK"):_(
"ERROR")).
"</td>"; }
83 echo
'<span class="inb"><a href="dom_edit.php?domain='.urlencode(
$domain).
'" >'._(
"Click here to continue").
'</a></span>';
88 <form method=
"post" action=
"dom_import.php">
93 <label
for=
"domain"><?php
__(
"Enter the domain name you want to import") ; ?></label>
96 <input type=
"text" size=
"40" name=
"domain" value=
"<?php ehe($domain); ?>" />
101 <label
for=
"detect_redirect"><?php
__(
"Do you want to detect the redirection?"); ?></label>
104 <input name=
"detect_redirect" type=
"checkbox" value=
"1" <?php
cbox($detect_redirect); ?> />
111 <label
for=
"zone"><?php
112 __(
"Paste your existing DNS zone here.");
114 __(
"If you don't know what it is, don't submit this form.");?></label>
115 <textarea cols=100 rows=20 name=
"zone"><?php echo $zone; ?></textarea>
118 <?php
if ( ! empty($zone) && ! empty(
$domain) ) {
119 <label><?php
__(
"Do you want to import the zone as it?"); ?></label>
120 <input name=
"save" type=
"checkbox" value=
"1" />
123 <p><input type=
"submit" name=
"submit" class=
"inb ok" value=
"<?php __("Submit
"); ?>" /></p>
132 include_once(
"foot.php");
$fields
Import of DNS informations from an existing zone, transformation into AlternC's system zone.
cbox($test, $echo=true)
ECHOes checked="checked" only if the parameter is true useful for checkboxes and radio buttons.
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 ...