当前位置: 首页>>代码示例>>PHP>>正文


PHP zb_StorageGet函数代码示例

本文整理汇总了PHP中zb_StorageGet函数的典型用法代码示例。如果您正苦于以下问题:PHP zb_StorageGet函数的具体用法?PHP zb_StorageGet怎么用?PHP zb_StorageGet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了zb_StorageGet函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: zb_AskoziaGetConf

 function zb_AskoziaGetConf()
 {
     $result = array();
     $emptyArray = array();
     //getting url
     $url = zb_StorageGet('ASKOZIAPBX_URL');
     if (empty($url)) {
         $url = 'http://sip.isp/';
         zb_StorageSet('ASKOZIAPBX_URL', $url);
     }
     //getting login
     $login = zb_StorageGet('ASKOZIAPBX_LOGIN');
     if (empty($login)) {
         $login = 'admin';
         zb_StorageSet('ASKOZIAPBX_LOGIN', $login);
     }
     //getting password
     $password = zb_StorageGet('ASKOZIAPBX_PASSWORD');
     if (empty($password)) {
         $password = 'askozia';
         zb_StorageSet('ASKOZIAPBX_PASSWORD', $password);
     }
     //getting caching time
     $cache = zb_StorageGet('ASKOZIAPBX_CACHETIME');
     if (empty($cache)) {
         $cache = '1';
         zb_StorageSet('ASKOZIAPBX_CACHETIME', $cache);
     }
     $result['url'] = $url;
     $result['login'] = $login;
     $result['password'] = $password;
     $result['cachetime'] = $cache;
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:34,代码来源:index.php

示例2: web_CashCashtypeDefaultForm

 function web_CashCashtypeDefaultForm()
 {
     $defCashType = zb_StorageGet('DEF_CT');
     if (empty($defCashType)) {
         $defCashType = 'NOP';
     }
     $allCashTypes = zb_CashGetAllCashTypes();
     $inputs = wf_Selector('setdefaultcashtype', $allCashTypes, __('Current default cashtype for manual input'), $defCashType, true);
     $inputs .= wf_Submit(__('Set as default cash type'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:12,代码来源:index.php

示例3: loadConfig

 /**
  * Loads config from database
  * 
  * @return void
  */
 protected function loadConfig()
 {
     $config = zb_StorageGet('ARPU_LINES');
     $this->config = $config;
     if (!empty($config)) {
         $raw = explode(',', $config);
         if (!empty($raw)) {
             foreach ($raw as $io => $each) {
                 $clearLine = trim($each);
                 $this->lines[$clearLine] = $clearLine;
             }
         }
     }
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:19,代码来源:index.php

示例4: web_FDBTableFiltersForm

 /**
  * Returns FDB cache lister MAC filters setup form
  * 
  * @return string
  */
 function web_FDBTableFiltersForm()
 {
     $currentFilters = '';
     $oldFilters = zb_StorageGet('FDBCACHEMACFILTERS');
     if (!empty($oldFilters)) {
         $currentFilters = base64_decode($oldFilters);
     }
     $inputs = __('One MAC address per line') . wf_tag('br');
     $inputs .= wf_TextArea('newmacfilters', '', $currentFilters, true, '40x10');
     $inputs .= wf_HiddenInput('setmacfilters', 'true');
     $inputs .= wf_CheckInput('deletemacfilters', __('Cleanup'), true, false);
     $inputs .= wf_Submit(__('Save'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:20,代码来源:index.php

示例5: zb_AsteriskGetConf

 function zb_AsteriskGetConf()
 {
     $result = array();
     $emptyArray = array();
     //getting url
     $host = zb_StorageGet('ASTERISK_HOST');
     if (empty($host)) {
         $host = 'localhost';
         zb_StorageSet('ASTERISK_HOST', $host);
     }
     //getting login
     $login = zb_StorageGet('ASTERISK_LOGIN');
     if (empty($login)) {
         $login = 'asterisk';
         zb_StorageSet('ASTERISK_LOGIN', $login);
     }
     //getting DB name
     $db = zb_StorageGet('ASTERISK_DB');
     if (empty($db)) {
         $db = 'asteriskdb';
         zb_StorageSet('ASTERISK_DB', $db);
     }
     //getting CDR table name
     $table = zb_StorageGet('ASTERISK_TABLE');
     if (empty($table)) {
         $table = 'cdr';
         zb_StorageSet('ASTERISK_TABLE', $table);
     }
     //getting password
     $password = zb_StorageGet('ASTERISK_PASSWORD');
     if (empty($password)) {
         $password = 'password';
         zb_StorageSet('ASTERISK_PASSWORD', $password);
     }
     //getting caching time
     $cache = zb_StorageGet('ASTERISK_CACHETIME');
     if (empty($cache)) {
         $cache = '1';
         zb_StorageSet('ASTERISK_CACHETIME', $cache);
     }
     $result['host'] = $host;
     $result['db'] = $db;
     $result['table'] = $table;
     $result['login'] = $login;
     $result['password'] = $password;
     $result['cachetime'] = $cache;
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:48,代码来源:index.php

示例6: zb_GetHelpdeskDeniedAll

 function zb_GetHelpdeskDeniedAll()
 {
     $access_raw = zb_StorageGet('ZBS_HELP_DENIED');
     $result = array();
     if (!empty($access_raw)) {
         $access_raw = base64_decode($access_raw);
         $access_raw = unserialize($access_raw);
         $result = $access_raw;
     } else {
         //first access
         $newarray = serialize($result);
         $newarray = base64_encode($newarray);
         zb_StorageSet('ZBS_HELP_DENIED', $newarray);
     }
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:16,代码来源:index.php

示例7: zb_PaySysPercentGetAll

 function zb_PaySysPercentGetAll()
 {
     $result = array();
     $data_raw = zb_StorageGet('PAYSYSPC');
     if (!empty($data_raw)) {
         //unpack data
         $data_raw = base64_decode($data_raw);
         $result = unserialize($data_raw);
     } else {
         //first usage
         $newdata = serialize($result);
         $newdata = base64_encode($newdata);
         zb_StorageSet('PAYSYSPC', $newdata);
         log_register("PAYSYSPC CREATE EMPTY");
     }
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:17,代码来源:index.php

示例8: docsis_ModemSnmpWalkGet

 function docsis_ModemSnmpWalkGet()
 {
     $path = zb_StorageGet('DOCSIS_SNMPWALK_PATH');
     //if first run
     if (empty($path)) {
         $path = '/usr/local/bin/snmpwalk';
         zb_StorageSet('DOCSIS_SNMPWALK_PATH', $path);
         log_register("DOCSIS SNMPWALK SET `" . $path . "`");
     }
     return $path;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:11,代码来源:index.php

示例9: updateAlerts

 /**
  * Renders available and enabled alerts into  DarkVoid notification area
  * 
  * @return void
  */
 protected function updateAlerts()
 {
     //new tickets alert
     if ($this->altCfg['TB_NEWTICKETNOTIFY']) {
         $newticketcount = zb_TicketsGetAllNewCount();
         if ($newticketcount != 0) {
             $this->alerts .= wf_Link('?module=ticketing', wf_img('skins/ticketnotify.gif', $newticketcount . ' ' . __('support tickets expected processing')), false);
         }
     }
     //new signups notification
     if ($this->altCfg['SIGREQ_ENABLED']) {
         $signups = new SignupRequests();
         $newreqcount = $signups->getAllNewCount();
         if ($newreqcount != 0) {
             $this->alerts .= wf_Link('?module=sigreq', wf_img('skins/sigreqnotify.gif', $newreqcount . ' ' . __('signup requests expected processing')), false);
         }
     }
     //check for unread messages in instant messanger
     if ($this->altCfg['TB_UBIM']) {
         if (cfr('UBIM')) {
             $unreadMessageCount = im_CheckForUnreadMessages();
             if ($unreadMessageCount) {
                 //we have new messages
                 $unreadIMNotify = __('You received') . ' ' . $unreadMessageCount . ' ' . __('new messages');
                 $urlIM = $unreadIMNotify . wf_delimiter() . wf_Link("?module=ubim&checknew=true", __('Click here to go to the instant messaging service.'), false, 'ubButton');
                 $this->alerts .= wf_Link("?module=ubim&checknew=true", wf_img("skins/ubim_blink.gif", $unreadMessageCount . ' ' . __('new message received')), false, '');
                 //$this->alerts.=wf_modalOpened(__('New messages received'), $urlIM, '450', '200');
             }
         }
     }
     //check sms sending queue
     if ($this->altCfg['WATCHDOG_ENABLED']) {
         $smsQueueCount = rcms_scandir(DATA_PATH . 'tsms/');
         $smsQueueCount = sizeof($smsQueueCount);
         if ($smsQueueCount > 0) {
             $this->alerts .= wf_Link("?module=tsmsqueue", wf_img("skins/sms.png", $smsQueueCount . ' ' . __('SMS in queue')), false, '');
         }
     }
     if ($this->altCfg['TB_TASKMANNOTIFY']) {
         //only "for me" tasks notification
         if ($this->altCfg['TB_TASKMANNOTIFY'] == 1) {
             $undoneTasksCount = ts_GetUndoneCountersMy();
             if ($undoneTasksCount > 0) {
                 $undoneAlert = $undoneTasksCount . ' ' . __('Undone tasks') . ' ' . __('for me');
                 $this->alerts .= wf_Link("?module=taskman&show=undone", wf_img("skins/jobnotify.png", $undoneAlert), false, '');
             }
         }
         //total undone tasks count notification
         if ($this->altCfg['TB_TASKMANNOTIFY'] == 2) {
             $undoneTasksCount = ts_GetUndoneCountersAll();
             if ($undoneTasksCount > 0) {
                 $undoneAlert = $undoneTasksCount . ' ' . __('Undone tasks') . ' ' . __('for all');
                 $this->alerts .= wf_Link("?module=taskman&show=undone", wf_img("skins/jobnotify.png", $undoneAlert), false, '');
             }
         }
         //total+my undone tasks count notification
         if ($this->altCfg['TB_TASKMANNOTIFY'] == 3) {
             $undoneTasksCount = ts_GetUndoneCountersAll();
             if ($undoneTasksCount > 0) {
                 $undoneTasksCountMy = ts_GetUndoneCountersMy();
                 $undoneAlert = $undoneTasksCount . ' ' . __('Undone tasks') . ': ' . __('for all') . ' ' . ($undoneTasksCount - $undoneTasksCountMy) . ' / ' . __('for me') . ' ' . $undoneTasksCountMy;
                 $this->alerts .= wf_Link("?module=taskman&show=undone", wf_img("skins/jobnotify.png", $undoneAlert), false, '');
             }
         }
     }
     //switchmon at notify area
     if ($this->altCfg['TB_SWITCHMON']) {
         $dead_raw = zb_StorageGet('SWDEAD');
         $last_pingtime = zb_StorageGet('SWPINGTIME');
         $deathTime = zb_SwitchesGetAllDeathTime();
         $deadarr = array();
         $content = '';
         if ($this->altCfg['SWYMAP_ENABLED']) {
             $content = wf_Link('?module=switchmap', wf_img('skins/swmapsmall.png', __('Switches map')), false);
         }
         $content .= wf_AjaxLoader() . wf_AjaxLink("?module=switches&forcereping=true&ajaxping=true", wf_img('skins/refresh.gif', __('Force ping')), 'switchping', true, '');
         if ($dead_raw) {
             $deadarr = unserialize($dead_raw);
             if (!empty($deadarr)) {
                 //there is some dead switches
                 $deadcount = sizeof($deadarr);
                 if ($this->altCfg['SWYMAP_ENABLED']) {
                     //getting geodata
                     $switchesGeo = zb_SwitchesGetAllGeo();
                 }
                 //ajax container
                 $content .= wf_tag('div', false, '', 'id="switchping"');
                 foreach ($deadarr as $ip => $switch) {
                     if ($this->altCfg['SWYMAP_ENABLED']) {
                         if (isset($switchesGeo[$ip])) {
                             if (!empty($switchesGeo[$ip])) {
                                 $devicefind = wf_Link('?module=switchmap&finddevice=' . $switchesGeo[$ip], wf_img('skins/icon_search_small.gif', __('Find on map'))) . ' ';
                             } else {
                                 $devicefind = '';
                             }
//.........这里部分代码省略.........
开发者ID:carriercomm,项目名称:Ubilling,代码行数:101,代码来源:api.darkvoid.php

示例10: sn_SnmpParseFdbCacheJson

/**
 * function that display JSON data for display FDB cache
 * 
 * @param $fdbData_raw - array of existing cache _fdb files
 * 
 * @return string
 */
function sn_SnmpParseFdbCacheJson($fdbData_raw)
{
    $allusermacs = zb_UserGetAllMACs();
    $allusermacs = array_flip($allusermacs);
    $alladdress = zb_AddressGetFulladdresslist();
    $allswitches = zb_SwitchesGetAll();
    $rawFilters = zb_StorageGet('FDBCACHEMACFILTERS');
    $filteredCounter = 0;
    $switchdata = array();
    $allfilters = array();
    //switch data preprocessing
    if (!empty($allswitches)) {
        foreach ($allswitches as $io => $eachswitch) {
            $switchdata[$eachswitch['ip']] = $eachswitch['location'];
        }
    }
    //mac filters preprocessing
    if (!empty($rawFilters)) {
        $rawFilters = base64_decode($rawFilters);
        $rawFilters = explodeRows($rawFilters);
        if (!empty($rawFilters)) {
            foreach ($rawFilters as $rawfindex => $rawfmac) {
                $eachMacFilter = strtolower($rawfmac);
                $allfilters[trim($eachMacFilter)] = $rawfindex;
            }
        }
    }
    $result = '{ 
                  "aaData": [';
    foreach ($fdbData_raw as $each_raw) {
        $nameExplode = explode('_', $each_raw);
        if (sizeof($nameExplode) == 2) {
            $switchIp = $nameExplode[0];
            if (file_exists('exports/' . $each_raw)) {
                $eachfdb_raw = file_get_contents('exports/' . $each_raw);
                $eachfdb = unserialize($eachfdb_raw);
                if (!empty($eachfdb_raw)) {
                    foreach ($eachfdb as $mac => $port) {
                        //detecting user login by his mac
                        if (isset($allusermacs[$mac])) {
                            $userlogin = $allusermacs[$mac];
                        } else {
                            $userlogin = false;
                        }
                        if ($userlogin) {
                            $userlink = '<a href=?module=userprofile&username=' . $userlogin . '><img src=skins/icon_user.gif> ' . @$alladdress[$userlogin] . '</a>';
                        } else {
                            $userlink = '';
                        }
                        if (sn_FDBFilterCheckMac($mac, $allfilters)) {
                            $result .= '
                    [
                    "' . $switchIp . '",
                    "' . $port . '",
                    "' . @$switchdata[$switchIp] . '",
                    "' . $mac . '",
                    "' . $userlink . '"
                    ],';
                            $filteredCounter++;
                        }
                    }
                }
            }
        }
    }
    //show some data if filters failed
    if ($filteredCounter == 0) {
        $result .= '
                    [
                    "",
                    "",
                    "",
                    "' . __('Nothing found') . '",
                    ""
                    ],';
    }
    $result = substr($result, 0, -1);
    $result .= '] 
        }';
    return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:88,代码来源:api.swpoll.php

示例11: zb_PhpConsoleGetTemplate

 function zb_PhpConsoleGetTemplate($templatekey)
 {
     $templatedata = zb_StorageGet($templatekey);
     $result = unserialize($templatedata);
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:6,代码来源:index.php

示例12: sm_MapDrawSwitchUplinks

/**
 * Returns full map of switch links
 * 
 * @param int $traceid switch ID to trace uplinks
 * 
 * @return string
 */
function sm_MapDrawSwitchUplinks($traceid = '')
{
    global $ubillingConfig;
    $ym_conf = $ubillingConfig->getYmaps();
    $query = "SELECT * from `switches` WHERE `geo` != '' ";
    $tmpSwitches = simple_queryall($query);
    $allswitches = array();
    $alllinks = array();
    $result = '';
    //dead switches detection
    $dead_raw = zb_StorageGet('SWDEAD');
    $deadarr = array();
    if ($dead_raw) {
        $deadarr = unserialize($dead_raw);
    }
    if (!empty($tmpSwitches)) {
        //transform array to id=>switchdata
        foreach ($tmpSwitches as $io => $each) {
            $allswitches[$each['id']] = $each;
        }
        //making id=>parentid array if needed
        if (!empty($traceid)) {
            foreach ($tmpSwitches as $io => $each) {
                $alllinks[$each['id']] = $each['parentid'];
            }
        }
    }
    if (!empty($allswitches)) {
        foreach ($allswitches as $io => $each) {
            if (!empty($each['parentid'])) {
                if (isset($allswitches[$each['parentid']])) {
                    if ($allswitches[$each['parentid']]['geo'] != '') {
                        $coord1 = $each['geo'];
                        $coord2 = $allswitches[$each['parentid']]['geo'];
                        $hint = $each['location'] . ' ' . $each['ip'] . ' → ' . $allswitches[$each['parentid']]['location'] . ' ' . $allswitches[$each['parentid']]['ip'];
                        if (!isset($deadarr[$each['ip']]) and !isset($deadarr[$allswitches[$each['parentid']]['ip']])) {
                            $color = '#00FF00';
                        } else {
                            $color = '#FF0000';
                        }
                        /**
                         * Круглый год без забот жить бы в норке как енот,
                         * Вырыть ход в огород, воровать, что в нём растёт,
                         * Но боюсь, снег пойдёт - все тропинки заметёт.
                         * Кто-нибудь не разберёт и с ружьём за мной придёт.
                         * 
                         * 
                         * Жрать не буду целый день, и сдохну всем на зло!
                         * Пусть охотники идут - им не повезло!
                         */
                        //trace mode
                        if (!empty($traceid)) {
                            //switch is traced device
                            if ($each['id'] == $traceid) {
                                $width = 5;
                                $result .= sm_MapAddLine($coord1, $coord2, $color, $hint, $width);
                            } else {
                                //detecting uplinks
                                if (sm_MapIsLinked($alllinks, $traceid, $each['id'])) {
                                    $width = 3;
                                    $result .= sm_MapAddLine($coord1, $coord2, $color, $hint, $width);
                                }
                            }
                        } else {
                            $width = 1;
                            $result .= sm_MapAddLine($coord1, $coord2, $color, $hint, $width);
                        }
                    }
                }
            }
        }
    }
    return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:81,代码来源:api.ymaps.php

示例13: loadSettings

 /**
  * Gets watchdog settings from database and load it into settings property
  * Also it sets default values into the database
  * 
  * @return void
  */
 public function loadSettings()
 {
     $alert = zb_StorageGet('WATCHDOG_ALERT');
     if (empty($alert)) {
         $alert = __('Watchdog notifies that');
         zb_StorageSet('WATCHDOG_ALERT', $alert);
     }
     $phones = zb_StorageGet('WATCHDOG_PHONES');
     if (empty($phones)) {
         zb_StorageSet('WATCHDOG_PHONES', '');
     }
     $emails = zb_StorageGet('WATCHDOG_EMAILS');
     if (empty($emails)) {
         zb_StorageSet('WATCHDOG_EMAILS', '');
     }
     $telegramchats = zb_StorageGet('WATCHDOG_TELEGRAM');
     $this->settings['WATCHDOG_ALERT'] = $alert;
     $this->settings['WATCHDOG_PHONES'] = $phones;
     $this->settings['WATCHDOG_EMAILS'] = $emails;
     $this->settings['WATCHDOG_TELEGRAM'] = $telegramchats;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:27,代码来源:api.watchdog.php

示例14: web_PaymentsShowGraph

/**
 * Shows payments year graph with caching
 * 
 * @param int $year
 */
function web_PaymentsShowGraph($year)
{
    $months = months_array();
    $year_summ = zb_PaymentsGetYearSumm($year);
    $curtime = time();
    $yearPayData = array();
    $yearStats = array();
    $cacheTime = 3600;
    //sec intervall to cache
    $cells = wf_TableCell('');
    $cells .= wf_TableCell(__('Month'));
    $cells .= wf_TableCell(__('Payments count'));
    $cells .= wf_TableCell(__('ARPU'));
    $cells .= wf_TableCell(__('Cash'));
    $cells .= wf_TableCell(__('Visual'), '50%');
    $rows = wf_TableRow($cells, 'row1');
    //caching subroutine
    $renewTime = zb_StorageGet('YPD_LAST');
    if (empty($renewTime)) {
        //first usage
        $renewTime = $curtime;
        zb_StorageSet('YPD_LAST', $renewTime);
        $updateCache = true;
    } else {
        //cache time already set
        $timeShift = $curtime - $renewTime;
        if ($timeShift > $cacheTime) {
            //cache update needed
            $updateCache = true;
        } else {
            //load data from cache or init new cache
            $yearPayData_raw = zb_StorageGet('YPD_CACHE');
            if (empty($yearPayData_raw)) {
                //first usage
                $emptyCache = array();
                $emptyCache = serialize($emptyCache);
                $emptyCache = base64_encode($emptyCache);
                zb_StorageSet('YPD_CACHE', $emptyCache);
                $updateCache = true;
            } else {
                // data loaded from cache
                $yearPayData = base64_decode($yearPayData_raw);
                $yearPayData = unserialize($yearPayData);
                $updateCache = false;
                //check is current year already cached?
                if (!isset($yearPayData[$year]['graphs'])) {
                    $updateCache = true;
                }
                //check is manual cache refresh is needed?
                if (wf_CheckGet(array('forcecache'))) {
                    $updateCache = true;
                    rcms_redirect("?module=report_finance");
                }
            }
        }
    }
    if ($updateCache) {
        //extracting all of needed payments in one query
        $allYearPayments_q = "SELECT * from `payments` WHERE `date` LIKE '" . $year . "-%' AND `summ`>'0';";
        $allYearPayments = simple_queryall($allYearPayments_q);
        if (!empty($allYearPayments)) {
            foreach ($allYearPayments as $idx => $eachYearPayment) {
                //Here we can get up to 50% of CPU time on month extraction, but this hacks is to ugly :(
                //Benchmark results: http://pastebin.com/i7kadpN7
                $statsMonth = date("m", strtotime($eachYearPayment['date']));
                if (isset($yearStats[$statsMonth])) {
                    $yearStats[$statsMonth]['count']++;
                    $yearStats[$statsMonth]['summ'] = $yearStats[$statsMonth]['summ'] + $eachYearPayment['summ'];
                } else {
                    $yearStats[$statsMonth]['count'] = 1;
                    $yearStats[$statsMonth]['summ'] = $eachYearPayment['summ'];
                }
            }
        }
        foreach ($months as $eachmonth => $monthname) {
            $month_summ = isset($yearStats[$eachmonth]) ? $yearStats[$eachmonth]['summ'] : 0;
            $paycount = isset($yearStats[$eachmonth]) ? $yearStats[$eachmonth]['count'] : 0;
            $cells = wf_TableCell($eachmonth);
            $cells .= wf_TableCell(wf_Link('?module=report_finance&month=' . $year . '-' . $eachmonth, rcms_date_localise($monthname)));
            $cells .= wf_TableCell($paycount);
            $cells .= wf_TableCell(@round($month_summ / $paycount, 2));
            $cells .= wf_TableCell(web_roundValue($month_summ, 2));
            $cells .= wf_TableCell(web_bar($month_summ, $year_summ));
            $rows .= wf_TableRow($cells, 'row3');
        }
        $result = wf_TableBody($rows, '100%', '0', 'sortable');
        $yearPayData[$year]['graphs'] = $result;
        //write to cache
        zb_StorageSet('YPD_LAST', $curtime);
        $newCache = serialize($yearPayData);
        $newCache = base64_encode($newCache);
        zb_StorageSet('YPD_CACHE', $newCache);
    } else {
        //take data from cache
        if (isset($yearPayData[$year]['graphs'])) {
//.........这里部分代码省略.........
开发者ID:nightflyza,项目名称:Ubilling,代码行数:101,代码来源:api.workaround.php

示例15: loadConfig

 /**
  * Preloads alter config, for further usage as key=>value
  * 
  * @global object $ubillingConfig
  * 
  * @return void
  */
 protected function loadConfig()
 {
     global $ubillingConfig;
     $this->altCfg = $ubillingConfig->getAlter();
     //sets current month
     $this->curmonth = curmonth();
     //loading complex tariffs config
     if ($this->altCfg['COMPLEX_ENABLED']) {
         $this->complexFlag = true;
         if (!empty($this->altCfg['COMPLEX_MASKS'])) {
             $masksRaw = explode(",", $this->altCfg['COMPLEX_MASKS']);
             if (!empty($masksRaw)) {
                 foreach ($masksRaw as $eachmask) {
                     $this->complexMasks[] = trim($eachmask);
                 }
             }
         } else {
             throw new Exception(self::CPL_EMPTY_EX);
         }
     }
     //loading UKV options
     if ($this->altCfg['UKV_ENABLED']) {
         $this->ukvFlag = true;
         $this->ukvComplex = $this->altCfg['UKV_COMPLEX_TARIFFID'];
         $this->ukvIllegal = $this->altCfg['UKV_ILLEGAL_TARIFFID'];
         $this->ukvSocial = $this->altCfg['UKV_SOCIAL_TARIFFID'];
         $this->ukvDebtLimit = $this->altCfg['UKV_MONTH_DEBTLIMIT'];
     }
     //Askozia PBX integration
     if ($this->altCfg['ASKOZIA_ENABLED']) {
         $this->askoziaFlag = true;
         $this->askoziaUrl = zb_StorageGet('ASKOZIAPBX_URL');
         $this->askoziaLogin = zb_StorageGet('ASKOZIAPBX_LOGIN');
         $this->askoziaPassword = zb_StorageGet('ASKOZIAPBX_PASSWORD');
     }
     //PONizer enabled?
     if ($this->altCfg['PON_ENABLED']) {
         $this->ponFlag = true;
     }
     //is DOCSIS support enabled?
     if ($this->altCfg['DOCSIS_SUPPORT']) {
         $this->docsisFlag = true;
     }
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:51,代码来源:api.exhorse.php


注:本文中的zb_StorageGet函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。