new NotifyWidgetSuccess(_T("DNS record successfully modified.")); header("Location: " . urlStrRedirect("network/network/zonemembers", array("zone" => $zone))); exit; } else { $msg = _T("The following aliases have not been set because a DNS record with the same name already exists:"); foreach ($ret as $alias) { $msg .= " {$alias}"; } new NotifyWidgetFailure($msg); } } } if ($_GET["action"] == "edithost") { $hostname = $_GET["host"]; $hostname = str_replace('.' . $zone, '', $hostname); $data = getResourceRecord($zone, $hostname); if (empty($data)) { die("Record {$hostname} does not exist."); } else { if (isset($data[0][1]["aRecord"])) { $ipaddress = $data[0][1]["aRecord"][0]; /* Lookup host alias */ $cnames = array(); foreach (getCNAMEs($zone, $hostname) as $dn => $cname) { if (in_array("associatedDomain", array_keys($cname[1]))) { $cnames[] = str_replace('.' . $zone, '', $cname[1]["associatedDomain"][0]); } else { $cnames[] = $cname[1]["relativeDomainName"][0]; } } } else {
* along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ if (isset($_POST["bconfirm"])) { $host = $_POST["host"]; $zone = $_POST["zone"]; delRecord($zone, $host); if (!isXMLRPCError()) { new NotifyWidgetSuccess(_T("The record has been deleted.")); } header("Location: main.php?module=network&submod=network&action=zonemembers&zone={$zone}"); exit; } else { $host = urldecode($_GET["host"]); $zone = urldecode($_GET["zone"]); $rr = getResourceRecord($zone, $host); $f = new PopupForm(_T("Delete a DNS record")); $f->addText(sprintf(_T("You will delete the %s record"), "<strong>{$host}</strong>")); /* If the deleted record is a A record, CNAME may be linked to it */ if (isset($rr[0][1]["aRecord"])) { $cnames = getCNAMEs($zone, $host); if (!empty($cnames)) { $msg = _T("The linked CNAME records will also be deleted:"); foreach ($cnames as $cname) { $msg .= " <strong>" . $cname[1]["relativeDomainName"][0] . "</strong>"; } $f->addText($msg); } } $hidden1 = new HiddenTpl("host"); $hidden2 = new HiddenTpl("zone");