示例#1
0
<?php

if (cfr('UKV')) {
    $altcfg = $ubillingConfig->getAlter();
    if ($altcfg['UKV_ENABLED']) {
        set_time_limit(0);
        //creating base system object
        $ukv = new UkvSystem();
        /*
         * controller section
         */
        //fast ajax render
        if (wf_CheckGet(array('ajax'))) {
            $ukv->ajaxUsers();
        }
        /*
         * some views here
         */
        //show global management panel
        show_window('', $ukv->panel());
        //renders tariffs list with controls
        if (wf_CheckGet(array('tariffs'))) {
            //tariffs editing
            if (wf_CheckPost(array('edittariff'))) {
                $ukv->tariffSave($_POST['edittariff'], $_POST['edittariffname'], $_POST['edittariffprice']);
                rcms_redirect(UkvSystem::URL_TARIFFS_MGMT);
            }
            //tariffs creation
            if (wf_CheckPost(array('createtariff'))) {
                $ukv->tariffCreate($_POST['createtariffname'], $_POST['createtariffprice']);
                rcms_redirect(UkvSystem::URL_TARIFFS_MGMT);