1
|
1 |
<?php |
|
2 |
|
|
3 |
// +--------------------------------------------------------------------+ |
|
4 |
// | PowerAdmin | |
|
5 |
// +--------------------------------------------------------------------+ |
|
6 |
// | Copyright (c) 1997-2002 The PowerAdmin Team | |
|
7 |
// +--------------------------------------------------------------------+ |
|
8 |
// | This source file is subject to the license carried by the overal | |
|
9 |
// | program PowerAdmin as found on http://poweradmin.sf.net | |
|
10 |
// | The PowerAdmin program falls under the QPL License: | |
|
11 |
// | http://www.trolltech.com/developer/licensing/qpl.html | |
|
12 |
// +--------------------------------------------------------------------+ |
|
13 |
// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> | |
|
14 |
// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> | |
|
15 |
// +--------------------------------------------------------------------+ |
|
16 |
|
|
17 |
// |
|
18 |
// $Id: add_record.php,v 1.6 2003/02/05 15:25:01 azurazu Exp $ |
|
19 |
// |
|
20 |
|
|
21 |
require_once("inc/toolkit.inc.php"); |
|
22 |
if ($_POST["commit"]) { |
|
23 |
$ret = add_record($_POST["zoneid"], $_POST["name"], $_POST["type"], $_POST["content"], $_POST["ttl"], $_POST["prio"]); |
|
24 |
if ($ret != '1') { |
|
25 |
die("$ret"); |
|
26 |
} |
|
27 |
clean_page("edit.php?id=".$_POST["zoneid"]); |
|
28 |
} |
|
29 |
include_once("inc/header.inc.php"); |
|
30 |
?> |
2
|
31 |
<H2><? echo _('Add record to zone'); ?> "<?= get_domain_name_from_id($_GET["id"]) ?>"</H2> |
|
32 |
<FONT CLASS="nav"><BR><A HREF="index.php"><? echo _('DNS Admin'); ?></A> >> <A HREF="edit.php?id=<?= $_GET["id"] ?>"><?= get_domain_name_from_id($_GET["id"]) ?></A> >> <? echo _('Add record'); ?><BR><BR></FONT> |
1
|
33 |
|
|
34 |
<FORM METHOD="post"> |
|
35 |
<INPUT TYPE="hidden" NAME="zoneid" VALUE="<?= $_GET["id"] ?>"> |
|
36 |
<TABLE BORDER="0" CELLSPACING="4"> |
3
|
37 |
<TR STYLE="font-weight: Bold"><TD CLASS="tdbg"><? echo _('Name'); ?></TD><TD CLASS="tdbg"> </TD><TD CLASS="tdbg"><? echo _('Type'); ?></TD><TD CLASS="tdbg"><? echo _('Priority'); ?></TD><TD CLASS="tdbg"><? echo _('Content'); ?></TD><TD CLASS="tdbg"><? echo _('TTL'); ?></TD></TR> |
1
|
38 |
<TR><TD CLASS="tdbg"><INPUT TYPE="text" NAME="name" CLASS="input">.<?= get_domain_name_from_id($_GET["id"]) ?></TD><TD CLASS="tdbg">IN</TD><TD CLASS="tdbg"><SELECT NAME="type"> |
|
39 |
<? |
|
40 |
$dname = get_domain_name_from_id($_GET["id"]); |
|
41 |
foreach (get_record_types() as $c) { |
|
42 |
if (eregi('in-addr.arpa', $dname) && strtoupper($c) == 'PTR') { |
|
43 |
$add = " SELECTED"; |
|
44 |
} elseif (strtoupper($c) == 'A') { |
|
45 |
$add = " SELECTED"; |
|
46 |
} else { |
|
47 |
unset($add); |
|
48 |
} |
|
49 |
?><OPTION<?= $add ?> VALUE="<?= $c ?>"><?= $c ?></OPTION><? |
|
50 |
} |
|
51 |
?></SELECT></TD><TD CLASS="tdbg"><INPUT TYPE="text" NAME="prio" CLASS="sinput"></TD><TD CLASS="tdbg"><INPUT TYPE="text" NAME="content" CLASS="input"></TD><TD CLASS="tdbg"><INPUT TYPE="text" NAME="ttl" CLASS="sinput" VALUE="<?=$DEFAULT_TTL?>"></TD></TR> |
|
52 |
</TABLE> |
2
|
53 |
<BR><INPUT TYPE="submit" NAME="commit" VALUE="<? echo _('Add record'); ?>" CLASS="button"> |
1
|
54 |
</FORM> |
|
55 |
|
|
56 |
<? include_once("inc/footer.inc.php"); ?> |