$billing->createtariff($newtariffname); $billing->edittariff($newtariffname, $tariffoptions); log_register("TARIFF CREATE `" . $newtariffname . "`"); } } if (isset($_GET['action'])) { if (isset($_GET['tariffname'])) { $tariffname = $_GET['tariffname']; if ($_GET['action'] == 'delete') { if (!zb_TariffProtected($tariffname)) { $billing->deletetariff($tariffname); log_register("TARIFF DELETE `" . $tariffname . "`"); zb_LousyTariffDelete($tariffname); zb_TariffDeleteSpeed($tariffname); $dshaper = new DynamicShaper(); $dshaper->flushTariff($tariffname); rcms_redirect('?module=tariffs'); } else { log_register("TARIFF DELETE TRY USED `" . $tariffname . "`"); show_error(__('Tariff is used by some users')); show_window('', wf_Link('?module=tariffs', __('Back'), true, 'ubButton')); } } if ($_GET['action'] == 'edit') { if (isset($_POST['options']['Fee'])) { $tariffoptions = $_POST['options']; $tariffoptions['Fee'] = trim($tariffoptions['Fee']); $billing->edittariff($tariffname, $tariffoptions); log_register("TARIFF CHANGE `" . $tariffname . "`"); rcms_redirect('?module=tariffs'); }