die("Nameservers need to be at least 7 characters long."); } /* deal with custom nameservers */ if (isset($_POST['ns1_ip'])) { if (strlen($_POST['ns1_ip']) > 0) { $ns1_ip = $_POST['ns1_ip']; } else { $ns1_ip = "NULL"; } } if (isset($_POST['ns2_ip'])) { if (strlen($_POST['ns2_ip']) > 0) { $ns2_ip = $_POST['ns2_ip']; } else { $ns2_ip = "NULL"; } } update_domain($domain, $ns1, $ns2, $ns1_ip, $ns2_ip); break; default: echo "Invalid command."; die; } } else { show_header(); echo "Unspecified error."; } ?> </body> </html>
} if (isset($_POST['mx1'])) { $mx1 = $_POST['mx1']; } else { $mx1 = "NULL"; } if (isset($_POST['dskey'])) { $dskey = $_POST['dskey']; } else { $dskey = "NULL"; } if (isset($_POST['txt'])) { $txt = $_POST['txt']; } else { $txt = "NULL"; } $isns = $_POST['isns']; update_domain($domain, $ns1, $ns2, $ns1_ip, $ns2_ip, $mx1, $dskey, $txt, $isns); break; default: echo "Invalid command."; die; } } else { show_header(); echo "Unspecified error."; } ?> </body> </html>
function process_edit_domain() { // Create a new hotspot using the post data $domain_id = $_POST['domain_id']; $domain_name = $_POST['domain_name']; // Get the id $return = update_domain($domain_id, $domain_name); if ($return) { wp_redirect(admin_url('admin.php?page=pano_domain_settings&settings-saved')); } else { wp_redirect(admin_url('admin.php?page=pano_domain_settings&error')); } }