/** * Returns corporate users search form * * @global object $ubillingConfig * @return string */ function web_CorpsSearchForm() { global $ubillingConfig; $alterCfg = $ubillingConfig->getAlter(); $result = ''; if ($alterCfg['CORPS_ENABLED']) { $result .= wf_tag('h3') . __('Corporate users') . wf_tag('h3', true); if ($alterCfg['SEARCHADDR_AUTOCOMPLETE']) { $corps = new Corps(); $corpsDataRaw = $corps->getCorps(); $corpsNames = array(); if (!empty($corpsDataRaw)) { foreach ($corpsDataRaw as $io => $each) { $corpsNames[] = $each['corpname']; } } $inputs = wf_AutocompleteTextInput('searchcorpname', $corpsNames, '', '', false, '30'); } else { $inputs = wf_TextInput('searchcorpname', '', '', false, '30'); } $inputs .= wf_Submit(__('Search')); $result .= wf_Form('?module=corps&show=search', 'POST', $inputs, ''); } return $result; }
<?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)) {