18 * You should have received a copy of the GNU General Public License |
18 * You should have received a copy of the GNU General Public License |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 */ |
20 */ |
21 |
21 |
22 require_once("inc/toolkit.inc.php"); |
22 require_once("inc/toolkit.inc.php"); |
23 |
23 include_once("inc/header.inc.php"); |
24 // Assigning records to user: Check for records owned by user |
24 |
25 $recordOwnerError = ''; |
25 $zone_id = "-1"; |
26 if (isset($_POST["action"]) && $_POST["action"]=="record-user") { |
26 if (isset($_GET['id']) && v_num($_GET['id'])) { |
27 if (!is_array($_POST['rowid'])) { |
27 $zone_id = $_GET['id']; |
28 $recordOwnerError = 'No records where selected to assign an sub-owner.'; |
28 } |
|
29 |
|
30 if ($zone_id == "-1") { |
|
31 error(ERR_INV_INPUT); |
|
32 include_once("inc/footer.inc.php"); |
|
33 exit; |
|
34 } |
|
35 |
|
36 if (isset($_POST['commit'])) { |
|
37 foreach ($_POST['record'] as $record) { |
|
38 edit_record($record); |
|
39 } |
|
40 } |
|
41 |
|
42 if (verify_permission(zone_content_view_others)) { $perm_view = "all" ; } |
|
43 elseif (verify_permission(zone_content_view_own)) { $perm_view = "own" ; } |
|
44 else { $perm_view = "none" ; } |
|
45 |
|
46 if (verify_permission(zone_content_edit_others)) { $perm_content_edit = "all" ; } |
|
47 elseif (verify_permission(zone_content_edit_own)) { $perm_content_edit = "own" ; } |
|
48 else { $perm_content_edit = "none" ; } |
|
49 |
|
50 if (verify_permission(zone_meta_edit_others)) { $perm_meta_edit = "all" ; } |
|
51 elseif (verify_permission(zone_meta_edit_own)) { $perm_meta_edit = "own" ; } |
|
52 else { $perm_meta_edit = "none" ; } |
|
53 |
|
54 $user_is_zone_owner = verify_user_is_owner_zoneid($zone_id); |
|
55 if ( $perm_meta_edit == "all" || ( $perm_meta_edit == "own" && $user_is_zone_owner == "1") ) { |
|
56 $meta_edit = "1"; |
|
57 } |
|
58 |
|
59 if(isset($_POST['slave_master_change']) && is_numeric($_POST["domain"]) ) { |
|
60 change_zone_slave_master($_POST['domain'], $_POST['new_master']); |
|
61 } |
|
62 if(isset($_POST['type_change']) && in_array($_POST['newtype'], $server_types)) { |
|
63 change_zone_type($_POST['newtype'], $zone_id); |
|
64 } |
|
65 if(isset($_POST["newowner"]) && is_numeric($_POST["domain"]) && is_numeric($_POST["newowner"])) { |
|
66 add_owner_to_zone($_POST["domain"], $_POST["newowner"]); |
|
67 } |
|
68 if(isset($_POST["delete_owner"]) && is_numeric($_POST["delete_owner"]) ) { |
|
69 delete_owner_from_zone($zone_id, $_POST["delete_owner"]); |
|
70 } |
|
71 |
|
72 $domain_type=get_domain_type($zone_id); |
|
73 $record_count=count_zone_records($zone_id); |
|
74 |
|
75 echo " <h2>" . _('Edit zone') . " \"" . get_domain_name_from_id($zone_id) . "\"</h2>\n"; |
|
76 |
|
77 if ( $perm_view == "none" || $perm_view == "own" && $user_is_zone_owner == "0" ) { |
|
78 error(ERR_PERM_VIEW_ZONE); |
|
79 } else { |
|
80 echo " <div class=\"showmax\">\n"; |
|
81 show_pages($record_count,ROWAMOUNT,$zone_id); |
|
82 echo " </div>\n"; |
|
83 |
|
84 $records = get_records_from_domain_id($zone_id,ROWSTART,ROWAMOUNT); |
|
85 if ( $records == "-1" ) { |
|
86 echo " <p>" . _("This zone does not have any records. Weird.") . "</p>\n"; |
29 } else { |
87 } else { |
30 foreach ($_POST["rowid"] as $x_user => $recordid){ |
88 echo " <form method=\"post\">\n"; |
31 $x_userid = $db->queryOne("SELECT id FROM record_owners WHERE user_id = ".$db->quote($_POST["userid"])." AND record_id=".$db->quote($recordid)); |
89 echo " <table>\n"; |
32 if (empty($x_userid)) { |
90 echo " <tr>\n"; |
33 add_record_owner($_GET["id"],$_POST["userid"],$recordid); |
91 echo " <th> </th>\n"; |
34 } |
92 echo " <th>" . _('Name') . "</th>\n"; |
35 } |
93 echo " <th>" . _('Type') . "</th>\n"; |
36 } |
94 echo " <th>" . _('Content') . "</th>\n"; |
37 } |
95 echo " <th>" . _('Priority') . "</th>\n"; |
38 if(isset($_POST['change_slave_master']) && is_numeric($_POST["domain"]) && level(5)) |
96 echo " <th>" . _('TTL') . "</th>\n"; |
39 { |
97 echo " </tr>\n"; |
40 change_domain_slave_master($_POST['domain'], $_POST['slave_master']); |
98 foreach ($records as $r) { |
41 } |
99 echo " <input type=\"hidden\" name=\"record[" . $r['id'] . "][rid]\" value=\"" . $r['id'] . "\">\n"; |
42 if(isset($_POST['type_change']) && in_array($_POST['newtype'], $server_types)) |
100 echo " <input type=\"hidden\" name=\"record[" . $r['id'] . "][zid]\" value=\"" . $zone_id . "\">\n"; |
43 { |
101 echo " <tr>\n"; |
44 change_domain_type($_POST['newtype'], $_GET['id']); |
102 if ( $domain_type == "SLAVE" || $perm_content_edit == "none" || $perm_content_edit == "own" && $user_is_zone_owner == "0" ) { |
45 } |
103 echo " <td class=\"n\"> </td>\n"; |
46 if(isset($_POST["newowner"]) && is_numeric($_POST["domain"]) && is_numeric($_POST["newowner"])) |
104 } else { |
47 { |
105 echo " <td class=\"n\">\n"; |
48 add_owner($_POST["domain"], $_POST["newowner"]); |
106 echo " <a href=\"edit_record.php?id=" . $r['id'] . "&domain=" . $zone_id . "\"> |
49 } |
107 <img src=\"images/edit.gif\" alt=\"[ ". _('Edit record') . " ]\"></a>\n"; |
50 if(isset($_POST["del_user"]) && is_numeric($_POST["del_user"]) && level(5)) |
108 echo " <a href=\"delete_record.php?id=" . $r['id'] . "&domain=" . $zone_id . "\"> |
51 { |
109 <img src=\"images/delete.gif\" ALT=\"[ " . _('Delete record') . " ]\" BORDER=\"0\"></a>\n"; |
52 delete_owner($_GET["id"], $_POST["del_user"]); |
110 echo " </td>\n"; |
53 } |
111 } |
54 $info = get_domain_info_from_id($_GET["id"]); |
112 echo " <td class=\"u\"><input class=\"wide\" name=\"record[" . $r['id'] . "][name]\" value=\"" . $r['name'] . "\"></td>\n"; |
55 include_once("inc/header.inc.php"); |
113 echo " <td class=\"u\">\n"; |
|
114 echo " <select name=\"record[" . $r['id'] . "][type]\">\n"; |
|
115 foreach (get_record_types() as $type_available) { |
|
116 if ($type_available == $r["type"]) { |
|
117 $add = " SELECTED"; |
|
118 } else { |
|
119 $add = ""; |
|
120 } |
|
121 echo " <option" . $add . " value=\"" . $type_available . "\" >" . $type_available . "</option>\n"; |
|
122 } |
|
123 echo " </select>\n"; |
|
124 echo " </td>\n"; |
|
125 echo " <td class=\"u\"><input class=\"wide\" name=\"record[" . $r['id'] . "][content]\" value=\"" . $r['content'] . "\"></td>\n"; |
|
126 if ($r['type'] == "MX") { |
|
127 echo " <td class=\"u\"><input name=\"record[" . $r['id'] . "][prio]\" value=\"" . $r['prio'] . "\"></td>\n"; |
|
128 } else { |
|
129 echo " <td class=\"n\"> </td>\n"; |
|
130 } |
|
131 echo " <td class=\"u\"><input name=\"record[" . $r['id'] . "][ttl]\" value=\"" . $r['ttl'] . "\"></td>\n"; |
|
132 echo " </tr>\n"; |
|
133 } |
|
134 echo " </table>\n"; |
|
135 echo " <input type=\"submit\" class=\"button\" name=\"commit\" value=\"" . _('Commit changes') . "\">\n"; |
|
136 echo " </form>"; |
|
137 } |
56 |
138 |
57 $domain_type=get_domain_type($_GET['id']); |
139 if ( $perm_content_edit == "all" || $perm_content_edit == "own" && $user_is_zone_owner == "1" ) { |
58 if ($domain_type == "SLAVE" ) { $slave_master=get_domain_slave_master($_GET['id']); }; |
140 if ( $domain_type != "SLAVE") { |
59 |
141 echo " <input type=\"button\" class=\"button\" OnClick=\"location.href='add_record.php?id=" . $zone_id . "'\" value=\"" . _('Add record') . "\">  \n"; |
60 if (strlen($recordOwnerError)) { |
142 } |
61 ?> |
143 echo " <input type=\"button\" class=\"button\" OnClick=\"location.href='delete_domain.php?id=" . $zone_id . "'\" value=\"" . _('Delete zone') . "\">\n"; |
62 <div class="error"><?php echo _('Error'); ?>: <?php echo _($recordOwnerError); ?></div> |
144 } |
63 <?php |
145 |
64 } |
146 echo " <div id=\"meta\">\n"; |
65 |
147 echo " <table>\n"; |
66 if(!isset($info["ownerid"]) && $domain_type != "SLAVE") |
148 echo " <tr>\n"; |
67 { |
149 echo " <th colspan=\"2\">" . _('Owner of zone') . "</th>\n"; |
68 ?> |
150 echo " </tr>\n"; |
69 <div class="error"><?php echo _('Error'); ?>: <?php echo ('There is no owner for this zone, please assign someone.'); ?></div> |
151 |
70 <?php |
152 $owners = get_users_from_domain_id($zone_id); |
71 } |
153 |
72 if ($domain_type == "SLAVE" && ! $slave_master ) |
154 if ($owners == "-1") { |
73 { |
155 echo " <tr><td>" . _('No owner set or this zone!') . "</td></tr>"; |
74 ?> |
156 } else { |
75 <div class="error"><?php echo _('Error'); ?>: <?php echo _('Type of this zone is "slave", but there is no IP address for it\'s master given.'); ?></div> |
157 if ($meta_edit) { |
76 <?php |
158 foreach ($owners as $owner) { |
77 } |
159 echo " <form method=\"post\" action=\"edit.php?id=" . $zone_id . "\">\n"; |
78 ?> |
160 echo " <tr>\n"; |
79 <h2><?php echo _('Edit zone'); ?> "<?php echo get_domain_name_from_id($_GET["id"]) ?>"</h2> |
161 echo " <td>" . $owner["fullname"] . "</td>\n"; |
80 <?php |
162 echo " <td>\n"; |
81 if (level(5)) |
163 echo " <input type=\"hidden\" name=\"delete_owner\" value=\"" . $owner["id"] . "\">\n"; |
82 { ?> |
164 echo " <input type=\"submit\" class=\"sbutton\" name=\"co\" value=\"" . _('Delete') . "\">\n"; |
83 <div id="meta"> |
165 echo " </td>\n"; |
84 <div id="meta-left"> |
166 echo " </tr>\n"; |
85 <table> |
167 echo " </form>\n"; |
86 <tr> |
168 } |
87 <th colspan="2"><?php echo _('Owner of zone'); ?></th> |
|
88 </tr> |
|
89 <?php |
|
90 if(isset($info["ownerid"])) |
|
91 { |
|
92 $userRes = get_users_from_domain_id($_GET["id"]); |
|
93 foreach($userRes as $user) |
|
94 { ?> |
|
95 <tr> |
|
96 <form method="post" action="edit.php?id=<?php echo $_GET['id']?>"> |
|
97 <td> |
|
98 <?php echo $user["fullname"]?> |
|
99 </td> |
|
100 <td> |
|
101 <input type="hidden" name="del_user" value="<?php echo $user["id"]?>"> |
|
102 <input type="submit" class="sbutton" name="co" value="<?php echo _('Delete'); ?>"> |
|
103 </td> |
|
104 </form> |
|
105 </tr> |
|
106 <?php |
|
107 } |
|
108 } |
|
109 else |
|
110 { |
|
111 ?> |
|
112 <tr> |
|
113 <td><?php echo _('No owner set or this zone!'); ?></td> |
|
114 </tr> |
|
115 <?php |
|
116 } |
|
117 ?> |
|
118 <tr> |
|
119 <form method="post" action="edit.php?id=<?php echo $_GET['id']?>"> |
|
120 <td> |
|
121 <input type="hidden" name="domain" value="<?php echo $_GET["id"] ?>"> |
|
122 <select name="newowner"> |
|
123 <?php |
|
124 $users = show_users(); |
|
125 foreach ($users as $u) |
|
126 { |
|
127 $add = ''; |
|
128 if ($u["id"] == $info["ownerid"]) |
|
129 { |
|
130 $add = " SELECTED"; |
|
131 } |
|
132 ?> |
|
133 <option<?php echo $add ?> value="<?php echo $u["id"] ?>"><?php echo $u["fullname"] ?></option><?php |
|
134 } |
|
135 ?> |
|
136 </select> |
|
137 </td> |
|
138 <td> |
|
139 <input type="submit" class="sbutton" name="co" value="<?php echo _('Add'); ?>"> |
|
140 </td> |
|
141 </form> |
|
142 </tr> |
|
143 </table> |
|
144 </div> <?php // eo div meta-left ?> |
|
145 <div id="meta-right"> |
|
146 <table> |
|
147 <tr> |
|
148 <th colspan="2"><?php echo _('Type of zone'); ?></th> |
|
149 </tr> |
|
150 <form action="<?php echo $_SERVER['PHP_SELF']?>?id=<?php echo $_GET['id']?>" method="post"> |
|
151 <input type="hidden" name="domain" value="<?php echo $_GET["id"] ?>"> |
|
152 <tr> |
|
153 <td> |
|
154 <select name="newtype"> |
|
155 <?php |
|
156 foreach($server_types as $s) |
|
157 { |
|
158 $add = ''; |
|
159 if ($s == $domain_type) |
|
160 { |
|
161 $add = " SELECTED"; |
|
162 } |
|
163 ?> |
|
164 <option<?php echo $add ?> value="<?php echo $s?>"><?php echo $s?></option><?php |
|
165 } |
|
166 ?> |
|
167 </select> |
|
168 </td> |
|
169 <td> |
|
170 <input type="submit" class="sbutton" name="type_change" value="<?php echo _('Change'); ?>"> |
|
171 </td> |
|
172 </tr> |
|
173 </form> |
|
174 |
|
175 <?php |
|
176 if ($domain_type == "SLAVE" ) |
|
177 { |
|
178 $slave_master=get_domain_slave_master($_GET['id']); |
|
179 ?> |
|
180 <tr> |
|
181 <th colspan="2"> |
|
182 <?php echo _('IP address of master NS'); ?> |
|
183 </th> |
|
184 </tr> |
|
185 <form action="<?php echo $_SERVER['PHP_SELF']?>?&id=<?php echo $_GET['id']?>" method="post"> |
|
186 <input type="hidden" name="domain" value="<?php echo $_GET["id"] ?>"> |
|
187 <tr> |
|
188 <td> |
|
189 <input type="text" name="slave_master" value="<?php echo $slave_master; ?>" class="input"> |
|
190 </td> |
|
191 <td> |
|
192 <input type="submit" class="sbutton" name="change_slave_master" value="<?php echo _('Change'); ?>"> |
|
193 </td> |
|
194 </tr> |
|
195 </form> |
|
196 <?php |
|
197 } |
|
198 ?> |
|
199 </table> |
|
200 </div> <?php // eo div meta-right ?> |
|
201 </div> <?php // eo div meta |
|
202 } |
|
203 else |
|
204 { |
|
205 ?> |
|
206 <div id="meta"> |
|
207 <div id="meta-right"> |
|
208 <table> |
|
209 <tr> |
|
210 <th><?php echo _('Type of zone'); ?></th><td class="y"><?php echo $domain_type; ?></td> |
|
211 </tr> |
|
212 <?php |
|
213 if ($domain_type == "SLAVE" && $slave_master ) |
|
214 { |
|
215 ?> |
|
216 <tr> |
|
217 <th><?php echo _('IP address of master NS'); ?></th><td class="y"><?php echo $slave_master; ?></td> |
|
218 </tr> |
|
219 <?php |
|
220 } |
|
221 ?> |
|
222 </table> |
|
223 </div> <?php //eo div meta-right ?> |
|
224 </div> <?php // eo div meta |
|
225 } |
|
226 ?> |
|
227 <div id="meta"> |
|
228 <?php |
|
229 if ($_SESSION[$_GET["id"]."_ispartial"] != 1 && $domain_type != "SLAVE" ) |
|
230 { |
|
231 ?> |
|
232 <input type="button" class="button" OnClick="location.href='add_record.php?id=<?php echo $_GET["id"] ?>'" value="<?php echo _('Add record'); ?>"> |
|
233 <?php |
|
234 } |
|
235 if (level(5)) |
|
236 { |
|
237 ?> |
|
238 <input type="button" class="button" OnClick="location.href='delete_domain.php?id=<?php echo $_GET["id"] ?>'" value="<?php echo _('Delete zone'); ?>"> |
|
239 <?php |
|
240 } |
|
241 ?> |
|
242 </div> <?php // eo div meta ?> |
|
243 <div class="showmax"> |
|
244 <?php |
|
245 show_pages($info["numrec"],ROWAMOUNT,$_GET["id"]); |
|
246 ?> |
|
247 </div> <?php // eo div showmax ?> |
|
248 <form action="<?php echo $_SERVER["PHP_SELF"]?>?id=<?php echo $_GET["id"]?>" method="post"> |
|
249 <input type="hidden" name="action" value="record-user"> |
|
250 <table> |
|
251 <?php |
|
252 $countinput=0; |
|
253 $rec_result = get_records_from_domain_id($_GET["id"],ROWSTART,ROWAMOUNT); |
|
254 if($rec_result != -1) |
|
255 { |
|
256 ?> |
|
257 <tr> |
|
258 <th> </th> |
|
259 <?php |
|
260 if (level(10) && $domain_type != "SLAVE") |
|
261 { |
|
262 echo "<th class=\"n\">" . _('Sub-owners') . "</td>"; |
|
263 } |
|
264 ?> |
|
265 <th><?php echo _('Name'); ?></th> |
|
266 <th><?php echo _('Type'); ?></th> |
|
267 <th><?php echo _('Content'); ?></th> |
|
268 <th><?php echo _('Priority'); ?></th> |
|
269 <th><?php echo _('TTL'); ?></th> |
|
270 </tr> |
|
271 <?php |
|
272 $recs = sort_zone($rec_result); |
|
273 foreach($recs as $r) |
|
274 { |
|
275 ?> |
|
276 <tr> |
|
277 <td class="n"> |
|
278 <?php |
|
279 if ($domain_type != "SLAVE" ) |
|
280 { |
|
281 if(level(5) || (!($r["type"] == "SOA" && !$GLOBALS["ALLOW_SOA_EDIT"]) && !($r["type"] == "NS" && !$GLOBALS["ALLOW_NS_EDIT"]))) |
|
282 { |
|
283 ?> |
|
284 <a href="edit_record.php?id=<?php echo $r['id'] ?>&domain=<?php echo $_GET["id"] ?>"><img src="images/edit.gif" alt="[ <?php echo _('Edit record'); ?> ]"></a> |
|
285 <a href="delete_record.php?id=<?php echo $r['id'] ?>&domain=<?php echo $_GET["id"] ?>"><img src="images/delete.gif" ALT="[ <?php echo _('Delete record'); ?> ]" BORDER="0"></a> |
|
286 <?php |
|
287 } |
|
288 } |
|
289 if(level(10) && $domain_type != "SLAVE") |
|
290 { |
|
291 ?> |
|
292 <input type="checkbox" name="rowid[<?php echo $countinput++?>]" value="<?php echo $r['id']?>" /> |
|
293 <?php |
|
294 } |
|
295 ?> |
|
296 </td> |
|
297 <?php |
|
298 if (level(10) && $domain_type != "SLAVE") |
|
299 { |
|
300 ?> |
|
301 <td class="n"> |
|
302 <?php |
|
303 $x_result = $db->query("SELECT r.user_id,u.username,u.fullname FROM record_owners as r, users as u WHERE r.record_id=".$db->quote($r['id'])." AND u.id=r.user_id"); |
|
304 echo "<select style=\"width:120px;\">"; |
|
305 while ($x_r = $x_result->fetchRow()) { |
|
306 echo "<option value=\"".$x_r["username"]."\">".$x_r["fullname"]."</option>"; |
|
307 } |
|
308 echo "</select>"; |
|
309 ?> |
|
310 </td> |
|
311 <?php |
|
312 } |
|
313 ?> |
|
314 <td class="y"><?php echo $r['name'] ?></td> |
|
315 <td class="y"><?php echo $r['type'] ?></td> |
|
316 <td class="y"><?php echo $r['content'] ?></td> |
|
317 <?php |
|
318 if ($r['prio'] != 0) |
|
319 { |
|
320 ?> |
|
321 <td class="y"><?php echo $r['prio']; ?></td> |
|
322 <?php |
|
323 } else { |
169 } else { |
324 ?> |
170 foreach ($owners as $owner) { |
325 <td class="n"></td><?php |
171 echo " <tr><td>" . $owner["fullname"] . "</td><td> </td></tr>"; |
326 } |
172 } |
327 ?> |
173 } |
328 <td class="y"><?php echo $r['ttl'] ?></td> |
174 |
329 </tr> |
175 } |
330 <?php |
176 if ($meta_edit) { |
331 } |
177 echo " <form method=\"post\" action=\"edit.php?id=" . $zone_id . "\">\n"; |
332 } |
178 echo " <input type=\"hidden\" name=\"domain\" value=\"" . $zone_id . "\">\n"; |
333 else |
179 echo " <tr>\n"; |
334 { |
180 echo " <td>\n"; |
335 ?> |
181 echo " <select name=\"newowner\">\n"; |
336 <tr> |
|
337 <td class="n"> |
|
338 <div class="warning"><?php echo _('No records for this zone.'); ?></div> |
|
339 </td> |
|
340 </tr> |
|
341 <?php |
|
342 } |
|
343 ?> |
|
344 </table> |
|
345 |
|
346 <?php |
|
347 if ($domain_type != "SLAVE") |
|
348 { |
|
349 if (level(10)) { ?> |
|
350 <img src="images/arrow.png" alt="arrow" class="edit-assign-to-user"> |
|
351 <select name="userid"> |
|
352 <?php |
|
353 $users = show_users(); |
182 $users = show_users(); |
354 foreach ($users as $user) { |
183 foreach ($users as $user) { |
355 echo "<option value=\"".$user[id]."\">".$user[fullname]."</option>"; |
184 unset($add); |
356 } |
185 if ($user["id"] == $_SESSION["userid"]) { |
357 ?> |
186 $add = " SELECTED"; |
358 </select> |
187 } |
359 <input type="submit" class="button" value="<?php echo _('Assign to user'); ?>"> |
188 echo " <option" . $add . " value=\"" . $user["id"] . "\">" . $user["fullname"] . "</option>\n"; |
360 </form> |
189 } |
361 <?php |
190 echo " </select>\n"; |
362 } |
191 echo " </td>\n"; |
363 } |
192 echo " <td>\n"; |
|
193 echo " <input type=\"submit\" class=\"sbutton\" name=\"co\" value=\"" . _('Add') . "\">\n"; |
|
194 echo " </td>\n"; |
|
195 echo " </tr>\n"; |
|
196 echo " </form>\n"; |
|
197 } |
|
198 echo " <tr>\n"; |
|
199 echo " <th colspan=\"2\">" . _('Type of zone') . "</th>\n"; |
|
200 echo " </tr>\n"; |
|
201 |
|
202 if ($meta_edit) { |
|
203 echo " <form action=\"" . $_SERVER['PHP_SELF'] . "?id=" . $zone_id . "\" method=\"post\">\n"; |
|
204 echo " <input type=\"hidden\" name=\"domain\" value=\"" . $zone_id . "\">\n"; |
|
205 echo " <tr>\n"; |
|
206 echo " <td>\n"; |
|
207 echo " <select name=\"newtype\">\n"; |
|
208 foreach($server_types as $type) { |
|
209 unset($add); |
|
210 if ($type == $domain_type) { |
|
211 $add = " SELECTED"; |
|
212 } |
|
213 echo " <option" . $add . " value=\"" . $type . "\">" . strtolower($type) . "</option>\n"; |
|
214 } |
|
215 echo " </select>\n"; |
|
216 echo " </td>\n"; |
|
217 echo " <td>\n"; |
|
218 echo " <input type=\"submit\" class=\"sbutton\" name=\"type_change\" value=\"" . _('Change') . "\">\n"; |
|
219 echo " </td>\n"; |
|
220 echo " </tr>\n"; |
|
221 echo " </form>\n"; |
|
222 } else { |
|
223 echo " <tr><td>" . strtolower($domain_type) . "</td><td> </td></tr>\n"; |
|
224 } |
|
225 |
|
226 if ($domain_type == "SLAVE" ) { |
|
227 $slave_master=get_domain_slave_master($zone_id); |
|
228 echo " <tr>\n"; |
|
229 echo " <th colspan=\"2\">" . _('IP address of master NS') . "</th>\n"; |
|
230 echo " </tr>\n"; |
|
231 |
|
232 if ($meta_edit) { |
|
233 echo " <form action=\"" . $_SERVER['PHP_SELF'] . "?id=" . $zone_id . "\" method=\"post\">\n"; |
|
234 echo " <input type=\"hidden\" name=\"domain\" value=\"" . $zone_id . "\">\n"; |
|
235 echo " <tr>\n"; |
|
236 echo " <td>\n"; |
|
237 echo " <input type=\"text\" name=\"new_master\" value=\"" . $slave_master . "\" class=\"input\">\n"; |
|
238 echo " </td>\n"; |
|
239 echo " <td>\n"; |
|
240 echo " <input type=\"submit\" class=\"sbutton\" name=\"slave_master_change\" value=\"" . _('Change') . "\">\n"; |
|
241 echo " </td>\n"; |
|
242 echo " </tr>\n"; |
|
243 echo " </form>\n"; |
|
244 } else { |
|
245 echo " <tr><td>" . $slave_master . "</td><td> </td></tr>\n"; |
|
246 } |
|
247 } |
|
248 echo " </table>\n"; |
|
249 echo " </div>\n"; // eo div meta |
|
250 } |
|
251 |
364 include_once("inc/footer.inc.php"); |
252 include_once("inc/footer.inc.php"); |
365 ?> |
253 ?> |