1
|
1 |
<?php |
|
2 |
|
13
|
3 |
require_once("inc/toolkit.inc.php"); |
1
|
4 |
|
|
5 |
if ($_POST["commit"]) { |
|
6 |
$ret = add_record($_POST["zoneid"], $_POST["name"], $_POST["type"], $_POST["content"], $_POST["ttl"], $_POST["prio"]); |
|
7 |
if ($ret != '1') { |
|
8 |
die("$ret"); |
|
9 |
} |
|
10 |
clean_page("edit.php?id=".$_POST["zoneid"]); |
|
11 |
} |
13
|
12 |
|
1
|
13 |
include_once("inc/header.inc.php"); |
|
14 |
?> |
13
|
15 |
|
|
16 |
<h2><? echo _('Add record to zone'); ?> "<? echo get_domain_name_from_id($_GET["id"]) ?>"</H2> |
1
|
17 |
|
13
|
18 |
<form method="post"> |
|
19 |
<input type="hidden" name="zoneid" value="<? echo $_GET["id"] ?>"> |
|
20 |
<table border="0" cellspacing="4"> |
|
21 |
<tr> |
|
22 |
<td class="n"><? echo _('Name'); ?></td> |
|
23 |
<td class="n"> </td> |
|
24 |
<td class="n"><? echo _('Type'); ?></td> |
|
25 |
<td class="n"><? echo _('Priority'); ?></td> |
|
26 |
<td class="n"><? echo _('Content'); ?></td> |
|
27 |
<td class="n"><? echo _('TTL'); ?></td> |
|
28 |
</tr> |
|
29 |
<tr> |
|
30 |
<td class="n"><input type="text" name="name" class="input">.<? echo get_domain_name_from_id($_GET["id"]) ?></td> |
|
31 |
<td class="n">IN</td> |
|
32 |
<td class="n"> |
|
33 |
<select name="type"> |
1
|
34 |
<? |
|
35 |
$dname = get_domain_name_from_id($_GET["id"]); |
|
36 |
foreach (get_record_types() as $c) { |
|
37 |
if (eregi('in-addr.arpa', $dname) && strtoupper($c) == 'PTR') { |
|
38 |
$add = " SELECTED"; |
|
39 |
} elseif (strtoupper($c) == 'A') { |
|
40 |
$add = " SELECTED"; |
|
41 |
} else { |
|
42 |
unset($add); |
|
43 |
} |
13
|
44 |
?><option<? echo $add ?> value="<? echo $c ?>"><? echo $c ?></option><? |
1
|
45 |
} |
13
|
46 |
?> |
|
47 |
</select> |
|
48 |
</td> |
|
49 |
<td class="n"><input type="text" name="prio" class="sinput"></td> |
|
50 |
<td class="n"><input type="text" name="content" class="input"></td> |
|
51 |
<td class="n"><input type="text" name="ttl" class="sinput" value="<? echo $DEFAULT_TTL?>"></td> |
|
52 |
</tr> |
|
53 |
</table> |
|
54 |
<br> |
|
55 |
<input type="submit" name="commit" value="<? echo _('Add record'); ?>" class="button"> |
|
56 |
</form> |
1
|
57 |
|
|
58 |
<? include_once("inc/footer.inc.php"); ?> |