if (!validate::arrDataNotEmpty($value['arrBindFields'])) { $arrErrors[] = ERROR_EMPTY_NAME; break; } if (isset($value['arrNoBindFields']['major'])) { $value['arrNoBindFields']['add_city_allowed'] = 0; } else { if (isset($value['arrNoBindFields']['add_city_allowed'])) { $value['arrNoBindFields']['major'] = 0; } else { $value['arrNoBindFields']['major'] = 0; $value['arrNoBindFields']['add_city_allowed'] = 0; } } } empty($arrErrors) ? $regions->actionRegions($_POST['action'], $_POST['region']) : null; } } elseif ('sort' === $_POST['action'] && isset($_POST['sort_region']) && is_array($_POST['sort_region']) && !empty($_POST['sort_region'])) { $regions->actionRegions($_POST['action'], $_POST['sort_region']); } elseif ('del' === $_POST['action'] && isset($_POST['region']) && is_array($_POST['region']) && !empty($_POST['region'])) { $regions->actionRegions($_POST['action'], array_keys($_POST['region'])); } else { messages::messageChangeSaved(MESSAGE_WARNING_UNKNOWN_ACTION, false, CONF_ADMIN_FILE . '?m=dictionary&s=regions'); } } else { // инициируем "Наименование страницы" отображаемое в форме $arrNamePage = array(array('name' => MENU_ADMIN_MAIN, 'link' => CONF_ADMIN_FILE), array('name' => MENU_DICTIONARY_REGIONS, 'link' => false)); // массив всех Регионов $smarty->assign('arrRegions', $regions->retCategorys()); } }
echo ajax::sdgJSONencode(array('success' => true)); } else { echo ajax::sdgJSONencode(array('error' => 'errResetRegionMajor')); } } else { echo ajax::sdgJSONencode(array('error' => ERROR_FATAL_UNCORRECT_PARAMS)); } } else { if (('setAddCityAllowed' == $_POST['do'] || 'resetAddCityAllowed' == $_POST['do']) && !empty($_POST['rid'])) { /** * инициализация списка регионов */ $regions = new regions(); $arrDataRegions = $regions->retCategorys(); if (!empty($arrDataRegions[$_POST['rid']])) { if ($regions->actionRegions($_POST['do'], array($_POST['rid']), true)) { echo ajax::sdgJSONencode(array('success' => true)); } else { echo ajax::sdgJSONencode(array('error' => 'errActionAddCityAllowed')); } } else { echo ajax::sdgJSONencode(array('error' => ERROR_FATAL_UNCORRECT_PARAMS)); } } else { echo ajax::sdgJSONencode(array('error' => ERROR_FATAL_UNCORRECT_PARAMS)); } } } } elseif (isset($_POST['doUserSubscription'])) { if (!empty($_POST['doUserSubscription'])) { if (!empty($_POST['mailerSubject'])) {