Exemplo n.º 1
0
     $tariffoptions = $_POST['options'];
     $tariffoptions['Fee'] = trim($tariffoptions['Fee']);
     if (!empty($newtariffname)) {
         $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);
Exemplo n.º 2
0
<?php

if (cfr('LOUSYTARIFFS')) {
    //deleting lousy mark
    if (wf_CheckGet(array('delete'))) {
        zb_LousyTariffDelete($_GET['delete']);
        rcms_redirect("?module=lousytariffs");
    }
    //adding new lousy mark for tariff
    if (wf_CheckPost(array('newlousytariff'))) {
        zb_LousyTariffAdd($_POST['newlousytariff']);
        rcms_redirect("?module=lousytariffs");
    }
    show_window(__('Rarely used tariffs'), web_LousyShowAll());
    show_window('', web_LousyAddForm());
} else {
    show_error(__('You cant control this module'));
}