include_once 'core/mods/payments/' . $_GET['id'] . '/admin.php'; include_once 'core/mods/payments/' . $_GET['id'] . '/conf/' . $_GET['id'] . '.conf.php'; include_once 'core/mods/payments/' . $_GET['id'] . '/conf/' . $_GET['id'] . '.tariffs.php'; $smarty->assign('config_template', SD_ROOT_DIR . 'core/mods/payments/' . $_GET['id'] . '/templates/' . $_GET['id'] . '.conf.tpl'); $smarty->assign('tariffs_template', SD_ROOT_DIR . 'core/mods/payments/' . $_GET['id'] . '/templates/' . $_GET['id'] . '.tariffs.tpl'); /** * Сохраняем настройки самого мода */ if (isset($_POST['conf'])) { if ($payments->saveModConf($_GET['id'], $_POST)) { messages::messageChangeSaved(MESSAGE_CHANGE_SAVED, false, CONF_ADMIN_FILE . '?m=mods&s=payments&action=config&id=' . $_GET['id']); } else { $arrErrors[] = ERROR_MODS_PAYMENTS_CONFIG_NOT_SAVE; } } elseif (isset($_POST['tariff']) && isset($_POST['arrTariffs']) && !empty($_POST['arrTariffs'])) { if ($payments->saveModTariffs($_GET['id'], $_POST['arrTariffs'], $arrPayments)) { messages::messageChangeSaved(MESSAGE_CHANGE_SAVED, false, CONF_ADMIN_FILE . '?m=mods&s=payments&action=config&id=' . $_GET['id']); } else { $arrErrors[] = ERROR_MODS_PAYMENTS_TARIFFS_NOT_SAVE; } } $smarty->assignByRef('arrPayments', $arrPayments); $smarty->assignByRef('arrTariffs', $arrTariffs); } elseif ($arrActions['payments'] && !empty($_GET['id']) && $issetMod) { // инициируем "Наименование страницы" отображаемое в форме $arrNamePage[] = array('name' => strtoupper($_GET['id']), 'link' => false); $arrNamePage[] = array('name' => MENU_ACTION_PAYMENTS, 'link' => false); include_once 'core/mods/payments/' . $_GET['id'] . '/admin.php'; include_once 'core/mods/payments/' . $_GET['id'] . '/conf/' . $_GET['id'] . '.conf.php'; include_once 'core/mods/payments/' . $_GET['id'] . '/conf/' . $_GET['id'] . '.tariffs.php'; $smarty->assignByRef('arrPayments', $arrPayments);