if ($regionInsert) { alert('Sync was OK!'); } else { alertDanger('Region Sync Failed'); } } break; case 'syncDistricts': if ($_POST['parentDropdown'] == "NONE") { alertDanger("Please select a Region to sync District value-sets with"); } else { $explode = explode("/", $_POST['parentDropdown']); $id = $explode[0]; $name = $explode[1]; alertSuccess("District: " . $id . " / " . $name); if ($is->insertDistricts($valueset, $id)) { alert('Sync was OK!'); } else { alertDanger('District Sync Failed'); } } break; case 'syncCounties': if ($_POST['parentDropdown'] == "NONE") { alertDanger("Please select a District to sync County value-sets with"); } else { $explode = explode("/", $_POST['parentDropdown']); $id = $explode[0]; $name = $explode[1]; alertSuccess("County: " . $id . " / " . $name); if ($is->insertDistricts($valueset, $id)) {