<?php if (cfr('CORPS')) { $altcfg = $ubillingConfig->getAlter(); if ($altcfg['CORPS_ENABLED']) { $greed = new Avarice(); $beggar = $greed->runtime('CORPS'); if (!empty($beggar)) { $corps = new Corps(); $funds = new FundsFlow(); //all that we need $corpsData = $corps->getCorps(); $corpUsers = $corps->getUsers(); $allUserContracts = zb_UserGetAllContracts(); $allUsersCash = zb_UserGetAllBalance(); $allUserTariffs = zb_TariffsGetAllUsers(); $allTariffPrices = zb_TariffGetPricesAll(); $rows = ''; $count = 0; //showing date search form show_window(__('Corporate users') . ' - ' . __('Funds flow'), $funds->renderCorpsFlowsDateForm()); if (!wf_CheckPost(array('yearsel', 'monthsel'))) { $needYear = curyear(); $needMonth = date("m"); } else { $needYear = $_POST['yearsel']; $needMonth = $_POST['monthsel']; } //setting date filter $date = $needYear . '-' . $needMonth . '-'; if (!empty($corpUsers)) {
/** * Renders ajax data subscriptions * * @return void */ public function subscribtionsListAjax() { $allAddress = zb_AddressGetFulladdresslistCached(); $allRealNames = zb_UserGetAllRealnames(); $allBalance = zb_UserGetAllBalance(); $result = '{ "aaData": [ '; if (!empty($this->allSubscribers)) { foreach ($this->allSubscribers as $io => $each) { $userLink = wf_Link('?module=userprofile&username='******'login'], web_profile_icon() . ' ' . @$allAddress[$each['login']], false); $userLink = $this->jqDtFilter($userLink); @($userRealName = $this->jqDtFilter($allRealNames[$each['login']])); $actFlag = $this->jqDtFilter(web_bool_led($each['active'], false)); $primFlag = $this->jqDtFilter(web_bool_led($each['primary'], false)); $freeperiodFlag = $this->jqDtFilter(web_bool_led($each['freeperiod'], false)); $actLinks = wf_Link(self::URL_ME . '&' . self::URL_SUBVIEW . '&subid=' . $each['id'], wf_img('skins/icon_edit.gif')); $actLinks = $this->jqDtFilter($actLinks); @($userCash = $this->jqDtFilter($allBalance[$each['login']])); $result .= ' [ "' . $each['id'] . '", "' . $userLink . '", "' . $userRealName . '", "' . $userCash . '", "' . @$this->allTariffs[$each['tariffid']]['name'] . '", "' . $each['actdate'] . '", "' . $actFlag . '", "' . $primFlag . '", "' . $freeperiodFlag . '", "' . $actLinks . '" ],'; } } $result = zb_CutEnd($result); $result .= '] }'; die($result); }