30 require_once(
"../class/config.php");
31 include_once(
"head.php");
34 "domain" => array (
"post",
"string",
""),
35 "zone" => array (
"post",
"string",
""),
36 "save" => array (
"post",
"integer",
"0"),
37 "detect_redirect" => array (
"post",
"integer",
"0"),
43 <h3><?php
__(
"Import a DNS zone"); ?></h3>
49 echo
'<p class="alert alert-danger">'.$error.
'</p>';
53 <?php
if ( !empty($zone) ) {
55 echo
'<p class="alert alert-danger">'._(
"The domain field seems to be empty").
'</p>';
57 <?php
__(
"Here is my proposition. Modify your zone until my proposition seems good to you"); ?>
59 <tr><th colspan=3><h2><?php printf(_(
"Working on %s"),
$domain); ?></h2></th></tr>
61 <th width=
"50%"><?php
__(
"Zone"); ?></th><th width=
"50%"><?php
__(
"Generated entry"); ?></th><?php
if ($save) {echo
"<th>"._(
"Result").
"</th>"; } ?>
64 <?php
foreach (
$dom->import_manual_dns_zone($zone,
$domain, $detect_redirect, $save) as
$val) {
65 if (empty(
$val))
continue;
69 echo
"tab-".($val[
'did_it']==1?
'ok':
'err');
71 echo
"tab-".$val[
'status'];
73 echo
"'><td>".$val[
'entry_old'].
"</td><td>".
$val[
'comment'].
"</td>";
74 if ($save) { echo
"<td>".($val[
'did_it']==1?_(
"OK"):_(
"ERROR")).
"</td>"; }
87 echo
'<span class="inb"><a href="dom_edit.php?domain='.urlencode(
$domain).
'" >'._(
"Click here to continue").
'</a></span>';
92 <form method=
"post" action=
"dom_import.php">
96 <label
for=
"domain"><?php
__(
"Enter the domain name you want to import") ; ?></label>
99 <input type=
"text" size=
"40" name=
"domain" value=
"<?php echo $domain; ?>" />
104 <label
for=
"detect_redirect"><?php
__(
"Do you want to detect the redirection?"); ?></label>
107 <input name=
"detect_redirect" type=
"checkbox" value=
"1" <?php
cbox($detect_redirect); ?> />
114 <label
for=
"zone"><?php
115 __(
"Paste your existing DNS zone here.");
117 __(
"If you don't know what it is, don't submit this form.");?></label>
118 <textarea cols=100 rows=20 name=
"zone"><?php echo $zone; ?></textarea>
121 <?php
if ( ! empty($zone) && ! empty(
$domain) ) {
122 <label><?php
__(
"Do you want to import the zone as it?"); ?></label>
123 <input name=
"save" type=
"checkbox" value=
"1" />
126 <p><input type=
"submit" name=
"submit" class=
"inb ok" value=
"<?php __("Submit
"); ?>" /></p>
135 include_once(
"foot.php");