equal
deleted
inserted
replaced
24 if (!level(5)) |
24 if (!level(5)) |
25 { |
25 { |
26 error(ERR_LEVEL_5); |
26 error(ERR_LEVEL_5); |
27 } |
27 } |
28 |
28 |
29 if($_POST["submit"]) |
29 if(isset($_POST["submit"])) |
30 { |
30 { |
31 $master_ip = $_POST["master_ip"]; |
31 $master_ip = (isset($_POST['master_ip']) ? $_POST["master_ip"] : ''); |
32 $ns_name = $_POST["ns_name"]; |
32 $ns_name = (isset($_POST['ns_name']) ? $_POST["ns_name"] : ''); |
33 $account = $_POST["account"]; |
33 $account = (isset($_POST["account"]) ? $_POST['account'] : ''); |
34 if (!$error) |
34 if (!isset($error)) |
35 { |
35 { |
36 if (!is_valid_ip($master_ip) && !is_valid_ip6($master_ip)) |
36 if (!is_valid_ip($master_ip) && !is_valid_ip6($master_ip)) |
37 { |
37 { |
38 $error = _('Given master IP address is not valid IPv4 or IPv6.'); |
38 $error = _('Given master IP address is not valid IPv4 or IPv6.'); |
39 } |
39 } |
55 } |
55 } |
56 } |
56 } |
57 |
57 |
58 include_once("inc/header.inc.php"); |
58 include_once("inc/header.inc.php"); |
59 |
59 |
60 if ($error != "") |
60 if ((isset($error)) && ($error != "")) |
61 { |
61 { |
62 ?><div class="error"><?php echo _('Error'); ?>: <?php echo $error; ?></div><?php |
62 ?><div class="error"><?php echo _('Error'); ?>: <?php echo $error; ?></div><?php |
63 } |
63 } |
64 elseif ($success != "") |
64 elseif ((isset($success)) && ($success != "")) |
65 { |
65 { |
66 ?><div class="success"><?php echo $success; ?></div><?php |
66 ?><div class="success"><?php echo $success; ?></div><?php |
67 } |
67 } |
68 |
68 |
69 ?> |
69 ?> |
71 <form method="post" action="add_supermaster.php"> |
71 <form method="post" action="add_supermaster.php"> |
72 <table> |
72 <table> |
73 <tr> |
73 <tr> |
74 <td class="n"><?php echo _('IP address of supermaster'); ?>:</td> |
74 <td class="n"><?php echo _('IP address of supermaster'); ?>:</td> |
75 <td class="n"> |
75 <td class="n"> |
76 <input type="text" class="input" name="master_ip" value="<?php if ($error) print $_POST["master_ip"]; ?>"> |
76 <input type="text" class="input" name="master_ip" value="<?php if (isset($error)) print $_POST["master_ip"]; ?>"> |
77 </td> |
77 </td> |
78 </tr> |
78 </tr> |
79 <tr> |
79 <tr> |
80 <td class="n"><?php echo _('Hostname in NS record'); ?>:</td> |
80 <td class="n"><?php echo _('Hostname in NS record'); ?>:</td> |
81 <td class="n"> |
81 <td class="n"> |
82 <input type="text" class="input" name="ns_name" value="<?php if ($error) print $_POST["ns_name"]; ?>"> |
82 <input type="text" class="input" name="ns_name" value="<?php if (isset($error)) print $_POST["ns_name"]; ?>"> |
83 </td> |
83 </td> |
84 </tr> |
84 </tr> |
85 <tr> |
85 <tr> |
86 <td class="n"><?php echo _('Account'); ?>:</td> |
86 <td class="n"><?php echo _('Account'); ?>:</td> |
87 <td class="n"> |
87 <td class="n"> |
88 <input type="text" class="input" name="account" value="<?php if ($error) print $_POST["account"]; ?>"> |
88 <input type="text" class="input" name="account" value="<?php if (isset($error)) print $_POST["account"]; ?>"> |
89 </td> |
89 </td> |
90 </tr> |
90 </tr> |
91 <tr> |
91 <tr> |
92 <td class="n"> </td> |
92 <td class="n"> </td> |
93 <td class="n"> |
93 <td class="n"> |