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


PHP wf_CheckInput函数代码示例

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


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

示例1: 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

示例2: web_UserGenForm

 function web_UserGenForm()
 {
     $alltariffs_raw = zb_TariffsGetAll();
     $alltariffs = array();
     if (!empty($alltariffs_raw)) {
         foreach ($alltariffs_raw as $it => $eachtariff) {
             $alltariffs[$eachtariff['name']] = $eachtariff['name'];
         }
     }
     $inputs = wf_TextInput('gencount', __('Count of users to generate'), '', true);
     $inputs .= wf_Selector('gentariff', $alltariffs, __('Existing tariff for this users'), '', true);
     $inputs .= multinet_service_selector() . ' ' . __('Service for new users') . wf_tag('br');
     $inputs .= wf_CheckInput('fastsqlgen', __('Fast SQL Inserts - need to shutdown stargazer'), true, false);
     $inputs .= wf_Submit(__('Go!'));
     $result = wf_Form("", "POST", $inputs, 'glamour');
     show_window(__('Sample user generator'), $result);
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:17,代码来源:index.php

示例3: tariffCreateForm

 /**
  * Returns tariff creation form
  * 
  * @return string
  */
 public function tariffCreateForm()
 {
     $result = '';
     $inputs = wf_TextInput('newtariffname', __('Tariff name'), '', true, '10');
     $inputs .= wf_TextInput('newtarifffee', __('Fee'), '', true, '5');
     $inputs .= wf_TextInput('newtariffserviceid', __('Service ID'), '', true, '10');
     $inputs .= wf_CheckInput('newtariffprimary', __('Primary'), true, false);
     $inputs .= wf_CheckInput('newtarifffreeperiod', __('Free period'), true, false);
     $inputs .= wf_Submit(__('Create'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:17,代码来源:api.megogo.php

示例4: renderEditForm

 /**
  * returns some build passport edit form
  * 
  * @praram $buildid existing build id
  * 
  * @return string
  */
 public function renderEditForm($buildid)
 {
     $buildid = vf($buildid, 3);
     if (isset($this->data[$buildid])) {
         $currentData = $this->data[$buildid];
     } else {
         $currentData = array();
     }
     $inputs = wf_HiddenInput('savebuildpassport', $buildid);
     $inputs .= wf_Selector('powner', $this->ownersArr, __('Owner'), @$currentData['owner'], true);
     $inputs .= wf_TextInput('pownername', __('Owner name'), @$currentData['ownername'], true, 30);
     $inputs .= wf_TextInput('pownerphone', __('Owner phone'), @$currentData['ownerphone'], true, 30);
     $inputs .= wf_TextInput('pownercontact', __('Owner contact person'), @$currentData['ownercontact'], true, 30);
     $keys = @$currentData['keys'] == 1 ? true : false;
     $inputs .= wf_CheckInput('pkeys', __('Keys available'), true, $keys);
     $inputs .= wf_TextInput('paccessnotices', __('Build access notices'), @$currentData['accessnotices'], true, 40);
     $inputs .= wf_Selector('pfloors', $this->floorsArr, __('Floors'), @$currentData['floors'], false);
     $inputs .= wf_Selector('pentrances', $this->entrancesArr, __('Entrances'), @$currentData['entrances'], false);
     $inputs .= wf_TextInput('papts', __('Apartments'), @$currentData['apts'], true, 5);
     $inputs .= __('Notes') . wf_tag('br');
     $inputs .= wf_TextArea('pnotes', '', @$currentData['notes'], true, '50x6');
     $inputs .= wf_Submit(__('Save'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:32,代码来源:api.address.php

示例5: uploadForm

 /**
  * returns template upload form 
  * 
  * @return string
  */
 public function uploadForm()
 {
     $uploadinputs = wf_HiddenInput('uploadtemplate', 'true');
     $uploadinputs .= wf_TextInput('templatedisplayname', __('Template display name'), '', true, '15');
     $uploadinputs .= wf_CheckInput('publictemplate', __('Template is public'), true, false);
     $uploadinputs .= __('Upload new document template from HDD') . wf_tag('br');
     $uploadinputs .= wf_tag('input', false, '', 'id="fileselector" type="file" name="uldocxtempplate"') . wf_tag('br');
     $uploadinputs .= wf_Submit('Upload');
     $uploadform = bs_UploadFormBody('', 'POST', $uploadinputs, 'glamour');
     return $uploadform;
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:16,代码来源:api.documents.php

示例6: web_PayFindForm

 function web_PayFindForm()
 {
     //try to save calendar states
     if (wf_CheckPost(array('datefrom', 'dateto'))) {
         $curdate = $_POST['dateto'];
         $yesterday = $_POST['datefrom'];
     } else {
         $curdate = date("Y-m-d", time() + 60 * 60 * 24);
         $yesterday = curdate();
     }
     $inputs = __('Date');
     $inputs .= wf_DatePickerPreset('datefrom', $yesterday) . ' ' . __('From');
     $inputs .= wf_DatePickerPreset('dateto', $curdate) . ' ' . __('To');
     $inputs .= wf_delimiter();
     $inputs .= wf_CheckInput('type_payid', '', false, false);
     $inputs .= wf_TextInput('payid', __('Search by payment ID'), '', true, '10');
     $inputs .= wf_CheckInput('type_contract', '', false, false);
     $inputs .= wf_TextInput('contract', __('Search by users contract'), '', true, '10');
     $inputs .= wf_CheckInput('type_login', '', false, false);
     $inputs .= wf_TextInput('login', __('Search by users login'), '', true, '10');
     $inputs .= wf_CheckInput('type_summ', '', false, false);
     $inputs .= wf_TextInput('summ', __('Search by payment sum'), '', true, '10');
     $inputs .= wf_CheckInput('type_cashtype', '', false, false);
     $inputs .= web_CashTypeSelector() . wf_tag('label', false, '', 'for="cashtype"') . __('Search by cash type') . wf_tag('label', true) . wf_tag('br');
     $inputs .= wf_CheckInput('type_cashier', '', false, false);
     $inputs .= web_PayFindCashierSelector();
     $inputs .= wf_CheckInput('type_tagid', '', false, false);
     $inputs .= web_PayFindTagidSelector();
     $inputs .= wf_CheckInput('type_paysys', '', false, false);
     $inputs .= web_PaySysPercentSelector();
     $inputs .= wf_Link("?module=payfind&confpaysys=true", __('Settings')) . wf_tag('br');
     $inputs .= wf_CheckInput('only_positive', __('Show only positive payments'), true, false);
     $inputs .= wf_CheckInput('numeric_notes', __('Show payments with numeric notes'), true, false);
     $inputs .= wf_CheckInput('numericonly_notes', __('Show payments with only numeric notes'), true, false);
     //ugly spacing hack
     $inputs .= '        ' . web_PayFindTableSelect() . wf_delimiter();
     $inputs .= wf_HiddenInput('dosearch', 'true');
     $inputs .= wf_Submit(__('Search'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     $result .= wf_Link("?module=report_finance", __('Back'), true, 'ubButton');
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:42,代码来源:index.php

示例7: renderSearchForm

 /**
  * Renders search form. Deal with it.
  * 
  * @return string
  */
 public function renderSearchForm()
 {
     $result = '';
     $datefromDefault = wf_CheckPost(array('datefrom')) ? $_POST['datefrom'] : curdate();
     $datetoDefault = wf_CheckPost(array('dateto')) ? $_POST['dateto'] : curdate();
     $inputs = __('Date') . ' ' . wf_DatePickerPreset('datefrom', $datefromDefault, true) . ' ' . __('From') . ' ' . wf_DatePickerPreset('dateto', $datetoDefault, true) . ' ' . __('To');
     $inputs .= wf_tag('br');
     $inputs .= wf_CheckInput('cb_id', '', false, false);
     $inputs .= wf_TextInput('taskid', __('ID'), '', true, 4);
     $inputs .= wf_CheckInput('cb_taskdays', '', false, false);
     $inputs .= wf_TextInput('taskdays', __('Implementation took more days'), '', true, 4);
     $inputs .= wf_CheckInput('cb_taskaddress', '', false, false);
     $inputs .= wf_TextInput('taskaddress', __('Task address'), '', true, 20);
     $inputs .= wf_CheckInput('cb_taskphone', '', false, false);
     $inputs .= wf_TextInput('taskphone', __('Phone'), '', true, 20);
     $inputs .= wf_CheckInput('cb_employee', '', false, false);
     $inputs .= wf_Selector('employee', $this->activeEmployee, __('Who should do'), '', true);
     $inputs .= wf_CheckInput('cb_employeedone', '', false, false);
     $inputs .= wf_Selector('employeedone', $this->activeEmployee, __('Worker done'), '', true);
     $inputs .= wf_CheckInput('cb_duplicateaddress', __('Duplicate address'), true, false);
     $inputs .= wf_CheckInput('cb_showlate', __('Show late'), true, false);
     $inputs .= wf_CheckInput('cb_onlydone', __('Done tasks'), true, false);
     $inputs .= wf_CheckInput('cb_onlyundone', __('Undone tasks'), true, false);
     if ($this->altCfg['SALARY_ENABLED']) {
         $inputs .= wf_CheckInput('cb_nosalsaryjobs', __('Tasks without jobs'), true, false);
     }
     $inputs .= wf_Submit(__('Search'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     $result .= wf_CleanDiv();
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:36,代码来源:index.php

示例8: rcms_redirect

                 rcms_redirect("?module=corporate&userlink=" . $userlink . "&control=cash");
             }
         }
     }
 }
 //cash control end
 if ($_GET['control'] == 'tariff') {
     //group tariff operations
     $allchildusers = cu_GetAllChildUsers($userlink);
     //construct form
     $current_tariff = zb_UserGetStargazerData($parent_login);
     $current_tariff = $current_tariff['Tariff'];
     $tariffinputs = '<h3>' . __('Current tariff') . ': ' . $current_tariff . '</h3> <br>';
     $tariffinputs .= web_tariffselector('newtariff');
     $tariffinputs .= '<br>';
     $tariffinputs .= wf_CheckInput('nextmonth', 'Next month', true, false);
     $tariffinputs .= '<br>';
     $tariffinputs .= wf_Submit('Save');
     $tariffform = wf_Form('', 'POST', $tariffinputs, 'glamour');
     show_window(__('Edit tariff'), $tariffform);
     //if group tariff change
     if (wf_CheckPost(array('newtariff'))) {
         $alter_conf = rcms_parse_ini_file(CONFIG_PATH . "alter.ini");
         $tariff = $_POST['newtariff'];
         if (!isset($_POST['nextmonth'])) {
             $billing->settariff($parent_login, $tariff);
             log_register('CHANGE Tariff ' . $parent_login . ' ON ' . $tariff);
             //optional user reset
             if ($alter_conf['TARIFFCHGRESET']) {
                 $billing->resetuser($parent_login);
                 log_register('RESET User ' . $parent_login);
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例9: tariffEditForm

 /**
  * Returns tariff editing form
  * 
  * @param int $tariffId
  * 
  * @return string
  */
 protected function tariffEditForm($tariffId)
 {
     $result = '';
     $inputs = wf_HiddenInput('edittariffid', $tariffId);
     $inputs .= wf_TextInput('edittariffname', __('Tariff name'), $this->allTariffs[$tariffId]['name'], true, '20');
     $inputs .= wf_TextInput('edittarifffee', __('Fee'), $this->allTariffs[$tariffId]['fee'], true, '5');
     $inputs .= wf_TextInput('edittariffserviceid', __('Service ID'), $this->allTariffs[$tariffId]['serviceid'], true, '10');
     $primaryFlag = $this->allTariffs[$tariffId]['primary'] ? true : false;
     $inputs .= wf_CheckInput('edittariffprimary', __('Primary'), true, $primaryFlag);
     $freePeriodFlag = $this->allTariffs[$tariffId]['freeperiod'] ? true : false;
     $inputs .= wf_CheckInput('edittarifffreeperiod', __('Free period'), true, $freePeriodFlag);
     $inputs .= wf_Submit(__('Save'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:22,代码来源:api.megogo.php

示例10: simple_update_field

            simple_update_field('employee', 'name', $_POST['editname'], "WHERE `id`='" . $editemployee . "'");
            simple_update_field('employee', 'appointment', $_POST['editappointment'], "WHERE `id`='" . $editemployee . "'");
            simple_update_field('employee', 'mobile', $_POST['editmobile'], "WHERE `id`='" . $editemployee . "'");
            simple_update_field('employee', 'admlogin', $_POST['editadmlogin'], "WHERE `id`='" . $editemployee . "'");
            if (wf_CheckPost(array('editactive'))) {
                simple_update_field('employee', 'active', '1', "WHERE `id`='" . $editemployee . "'");
            } else {
                simple_update_field('employee', 'active', '0', "WHERE `id`='" . $editemployee . "'");
            }
            log_register('EMPLOYEE CHANGE [' . $editemployee . ']');
            rcms_redirect("?module=employee");
        }
        $employeedata = stg_get_employee_data($editemployee);
        if ($employeedata['active']) {
            $actflag = true;
        } else {
            $actflag = false;
        }
        $editinputs = wf_TextInput('editname', 'Real Name', $employeedata['name'], true, 20);
        $editinputs .= wf_TextInput('editappointment', 'Appointment', $employeedata['appointment'], true, 20);
        $editinputs .= wf_TextInput('editmobile', __('Mobile'), $employeedata['mobile'], true, 20);
        $editinputs .= wf_TextInput('editadmlogin', __('Administrator'), $employeedata['admlogin'], true, 20);
        $editinputs .= wf_CheckInput('editactive', 'Active', true, $actflag);
        $editinputs .= wf_Submit('Save');
        $editform = wf_Form('', 'POST', $editinputs, 'glamour');
        show_window(__('Edit'), $editform);
        show_window('', wf_Link('?module=employee', 'Back', true, 'ubButton'));
    }
} else {
    show_error(__('You cant control this module'));
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例11: editForm

 /**
  * Returns edit form
  * 
  * @return string
  */
 protected function editForm($noteId)
 {
     $noteData = $this->getNoteData($noteId);
     if (!empty($noteData)) {
         $inputs = wf_HiddenInput('editnoteid', $noteId);
         $inputs .= wf_tag('label') . __('Text') . ': ' . wf_tag('br') . wf_tag('label', true);
         $inputs .= wf_TextArea('edittext', '', $noteData['text'], true, '50x15');
         $checkState = $noteData['active'] == 1 ? true : false;
         $inputs .= wf_CheckInput('editactive', __('Personal note active'), true, $checkState);
         $inputs .= wf_DatePickerPreset('editreminddate', $noteData['reminddate']);
         $inputs .= wf_tag('label') . __('Remind only after this date') . wf_tag('label', true);
         $inputs .= wf_tag('br');
         $inputs .= wf_tag('br');
         $inputs .= wf_Submit(__('Save'));
         $result = wf_Form('', 'POST', $inputs, 'glamour');
     } else {
         $result = __('Strange exeption');
     }
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:25,代码来源:api.stickynotes.php

示例12: web_CardsShow

/**
 * Returns available list with some controls
 * 
 * @return string
 */
function web_CardsShow()
{
    $result = '';
    $totalcount = zb_CardsGetCount();
    $perpage = 100;
    //pagination
    if (!isset($_GET['page'])) {
        $current_page = 1;
    } else {
        $current_page = vf($_GET['page'], 3);
    }
    if ($totalcount > $perpage) {
        $paginator = wf_pagination($totalcount, $perpage, $current_page, "?module=cards", 'ubButton');
        $from = $perpage * ($current_page - 1);
        $to = $perpage;
        $query = "SELECT * from `cardbank` ORDER by `id` DESC LIMIT " . $from . "," . $to . ";";
        $alluhw = simple_queryall($query);
    } else {
        $paginator = '';
        $query = "SELECT * from `cardbank` ORDER by `id` DESC;";
        $alluhw = simple_queryall($query);
    }
    $allcards = simple_queryall($query);
    $cells = wf_TableCell(__('ID'));
    $cells .= wf_TableCell(__('Serial number'));
    $cells .= wf_TableCell(__('Price'));
    $cells .= wf_TableCell(__('Admin'));
    $cells .= wf_TableCell(__('Date'));
    $cells .= wf_TableCell(__('Active'));
    $cells .= wf_TableCell(__('Used'));
    $cells .= wf_TableCell(__('Usage date'));
    $cells .= wf_TableCell(__('Used login'));
    $cells .= wf_TableCell(__('Used IP'));
    $cells .= wf_TableCell('');
    $rows = wf_TableRow($cells, 'row1');
    if (!empty($allcards)) {
        foreach ($allcards as $io => $eachcard) {
            $cells = wf_TableCell($eachcard['id']);
            $cells .= wf_TableCell($eachcard['serial']);
            $cells .= wf_TableCell($eachcard['cash']);
            $cells .= wf_TableCell($eachcard['admin']);
            $cells .= wf_TableCell($eachcard['date']);
            $cells .= wf_TableCell(web_bool_led($eachcard['active']));
            $cells .= wf_TableCell(web_bool_led($eachcard['used']));
            $cells .= wf_TableCell($eachcard['usedate']);
            $cells .= wf_TableCell($eachcard['usedlogin']);
            $cells .= wf_TableCell($eachcard['usedip']);
            $cells .= wf_TableCell(wf_CheckInput('_cards[' . $eachcard['id'] . ']', '', false, false));
            $rows .= wf_TableRow($cells, 'row3');
        }
    }
    $result = wf_TableBody($rows, '100%', 0, '');
    $result .= $paginator . wf_delimiter();
    $cardActions = array('caexport' => __('Export serials'), 'caactive' => __('Mark as active'), 'cainactive' => __('Mark as inactive'), 'cadelete' => __('Delete'));
    $actionSelect = wf_Selector('cardactions', $cardActions, '', '', false);
    $actionSelect .= wf_Submit(__('With selected'));
    $result .= $actionSelect;
    $result = wf_Form('', 'POST', $result, '');
    return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:65,代码来源:api.cardpay.php

示例13: renderReport

 /**
  * Renders report for some year
  * 
  * @return string
  */
 public function renderReport()
 {
     $result = '';
     $months = months_array_localized();
     $yearData = $this->loadStoredData();
     $inputs = wf_YearSelectorPreset('yearsel', __('Year'), false, $this->showYear) . ' ';
     $chartsFlag = wf_CheckPost(array('showcharts')) ? true : false;
     $inputs .= wf_CheckInput('showcharts', __('Graphs'), false, $chartsFlag) . ' ';
     $inputs .= wf_Submit(__('Show'));
     $yearForm = wf_Form('', 'POST', $inputs, 'glamour');
     $yearForm .= wf_CleanDiv();
     $result .= $yearForm;
     //charts presets
     $chartsOptions = "\n            'focusTarget': 'category',\n                        'hAxis': {\n                        'color': 'none',\n                            'baselineColor': 'none',\n                    },\n                        'vAxis': {\n                        'color': 'none',\n                            'baselineColor': 'none',\n                    },\n                        'curveType': 'function',\n                        'pointSize': 5,\n                        'crosshair': {\n                        trigger: 'none'\n                    },";
     $usersChartData = array(0 => array(__('Month'), __('Total'), __('Active'), __('Inactive'), __('Frozen'), __('Signups')));
     $complexChartData = array(0 => array(__('Month'), __('Total'), __('Active'), __('Inactive')));
     $financeChartsData = array(0 => array(__('Month'), __('Money'), __('Payments count'), __('ARPU'), __('ARPAU')));
     $ukvChartData = array(0 => array(__('Month'), __('Total'), __('Active'), __('Inactive'), __('Illegal'), __('Complex'), __('Social'), __('Signups')));
     $ukvfChartData = array(0 => array(__('Month'), __('Money'), __('Payments count'), __('ARPU'), __('ARPAU'), __('Debt')));
     $askoziaChartData = array(0 => array(__('Month'), __('Total calls'), __('Total answered'), __('No answer')));
     $equipChartData = array(0 => array(__('Month'), __('Switches'), __('PON ONU'), __('DOCSIS modems')));
     if (!empty($yearData)) {
         //internet users
         $cells = wf_TableCell(__('Month'));
         $cells .= wf_TableCell(__('Total'));
         $cells .= wf_TableCell(__('Active'));
         $cells .= wf_TableCell(__('Inactive'));
         $cells .= wf_TableCell(__('Frozen'));
         $cells .= wf_TableCell(__('Signups'));
         $rows = wf_TableRow($cells, 'row1');
         foreach ($yearData as $monthNum => $each) {
             $cells = wf_TableCell($months[$monthNum]);
             $cells .= wf_TableCell($each['u_totalusers']);
             $cells .= wf_TableCell($each['u_activeusers'] . ' (' . $this->percentValue($each['u_totalusers'], $each['u_activeusers']) . '%)');
             $cells .= wf_TableCell($each['u_inactiveusers'] . ' (' . $this->percentValue($each['u_totalusers'], $each['u_inactiveusers']) . '%)');
             $cells .= wf_TableCell($each['u_frozenusers'] . ' (' . $this->percentValue($each['u_totalusers'], $each['u_frozenusers']) . '%)');
             if (!empty($each['u_citysignups'])) {
                 $signupData = '';
                 $sigDataTmp = base64_decode($each['u_citysignups']);
                 $sigDataTmp = unserialize($sigDataTmp);
                 $citySigs = '';
                 $cityRows = '';
                 if (!empty($sigDataTmp)) {
                     $cityCells = wf_TableCell(__('City'));
                     $cityCells .= wf_TableCell(__('Signups'));
                     $cityRows .= wf_TableRow($cityCells, 'row1');
                     foreach ($sigDataTmp as $sigCity => $cityCount) {
                         $cityCells = wf_TableCell($sigCity);
                         $cityCells .= wf_TableCell($cityCount);
                         $cityRows .= wf_TableRow($cityCells, 'row3');
                     }
                     $citySigs .= wf_TableBody($cityRows, '100%', 0, '');
                 }
                 $signupData .= wf_modalAuto($each['u_signups'], __('Cities'), $citySigs);
             } else {
                 $signupData = $each['u_signups'];
             }
             $cells .= wf_TableCell($signupData);
             $rows .= wf_TableRow($cells, 'row3');
             //chart data
             $usersChartData[] = array($months[$monthNum], $each['u_totalusers'], $each['u_activeusers'], $each['u_inactiveusers'], $each['u_frozenusers'], $each['u_signups']);
         }
         $result .= wf_tag('h2') . __('Internets users') . wf_tag('h2', true);
         $result .= wf_TableBody($rows, '100%', 0, '');
         if ($chartsFlag) {
             $result .= wf_gchartsLine($usersChartData, __('Internets users'), '100%', '300px', $chartsOptions);
         }
         //complex data
         if ($this->complexFlag) {
             $result .= wf_tag('h2') . __('Complex services') . wf_tag('h2', true);
             $cells = wf_TableCell(__('Month'));
             $cells .= wf_TableCell(__('Total'));
             $cells .= wf_TableCell(__('Active'));
             $cells .= wf_TableCell(__('Inactive'));
             $rows = wf_TableRow($cells, 'row1');
             foreach ($yearData as $monthNum => $each) {
                 $cells = wf_TableCell($months[$monthNum]);
                 $cells .= wf_TableCell($each['u_complextotal']);
                 $cells .= wf_TableCell($each['u_complexactive'] . ' (' . $this->percentValue($each['u_complextotal'], $each['u_complexactive']) . '%)');
                 $cells .= wf_TableCell($each['u_complexinactive'] . ' (' . $this->percentValue($each['u_complextotal'], $each['u_complexinactive']) . '%)');
                 $rows .= wf_TableRow($cells, 'row3');
                 //chart data
                 $complexChartData[] = array($months[$monthNum], $each['u_complextotal'], $each['u_complexactive'], $each['u_complexinactive']);
             }
             $result .= wf_TableBody($rows, '100%', 0, '');
             if ($chartsFlag) {
                 $result .= wf_gchartsLine($complexChartData, __('Complex services'), '100%', '300px', $chartsOptions);
             }
         }
         //finance data
         $result .= wf_tag('h2') . __('Financial highlights') . wf_tag('h2', true);
         $cells = wf_TableCell(__('Month'));
         $cells .= wf_TableCell(__('Money'));
         $cells .= wf_TableCell(__('Payments count'));
         $cells .= wf_TableCell(__('Cash payments'));
//.........这里部分代码省略.........
开发者ID:nightflyza,项目名称:Ubilling,代码行数:101,代码来源:api.exhorse.php

示例14: reportDateRemains

 /**
  * Renders date remains report
  * 
  * @return string
  */
 public function reportDateRemains()
 {
     $result = '';
     $curyear = wf_CheckPost(array('yearsel')) ? vf($_POST['yearsel'], 3) : date("Y");
     $curmonth = wf_CheckPost(array('monthsel')) ? vf($_POST['monthsel'], 3) : date("m");
     $inputs = wf_YearSelector('yearsel', __('Year')) . ' ';
     $inputs .= wf_MonthSelector('monthsel', __('Month'), $curmonth) . ' ';
     $inputs .= wf_CheckInput('printmode', __('Print'), false, false);
     $inputs .= wf_Submit(__('Show'));
     $searchForm = wf_Form('', 'POST', $inputs, 'glamour');
     $searchForm .= wf_CleanDiv();
     //append form to result
     if (!wf_CheckPost(array('printmode'))) {
         $result .= $searchForm;
     }
     $lowerOffset = strtotime($curyear . '-' . $curmonth . '-01');
     $upperOffset = strtotime($curyear . '-' . $curmonth . '-01');
     $upperOffset = date("t", $upperOffset);
     $upperOffset = strtotime($curyear . '-' . $curmonth . '-' . $upperOffset);
     $incomingLower = array();
     $outcomingLower = array();
     if (!empty($this->allIncoming)) {
         foreach ($this->allIncoming as $io => $each) {
             $incomingDate = strtotime($each['date']);
             if ($incomingDate < $lowerOffset) {
                 if ($each['contractorid'] != 0) {
                     //ignoring move ops
                     $incomingLower[$each['id']] = $each;
                 }
             }
         }
     }
     if (!empty($this->allOutcoming)) {
         foreach ($this->allOutcoming as $io => $each) {
             $outcomingDate = strtotime($each['date']);
             if ($outcomingDate < $lowerOffset) {
                 if ($each['desttype'] != 'storage') {
                     // ignoring move ops
                     $outcomingLower[$each['id']] = $each;
                 }
             }
         }
     }
     $lowerIncome = array();
     if (!empty($incomingLower)) {
         foreach ($incomingLower as $io => $each) {
             if (isset($lowerIncome[$each['itemtypeid']])) {
                 $lowerIncome[$each['itemtypeid']]['count'] = $lowerIncome[$each['itemtypeid']]['count'] + $each['count'];
                 $lowerIncome[$each['itemtypeid']]['price'] = $lowerIncome[$each['itemtypeid']]['price'] + $each['count'] * $each['price'];
             } else {
                 $lowerIncome[$each['itemtypeid']]['count'] = $each['count'];
                 $lowerIncome[$each['itemtypeid']]['price'] = $each['count'] * $each['price'];
             }
         }
     }
     $lowerOutcome = array();
     if (!empty($outcomingLower)) {
         foreach ($outcomingLower as $io => $each) {
             if ($each['price'] == 0) {
                 $each['price'] = $this->getIncomeMiddlePrice($each['itemtypeid']);
             }
             if (isset($lowerOutcome[$each['itemtypeid']])) {
                 $lowerOutcome[$each['itemtypeid']]['count'] = $lowerOutcome[$each['itemtypeid']]['count'] + $each['count'];
                 $lowerOutcome[$each['itemtypeid']]['price'] = $lowerOutcome[$each['itemtypeid']]['price'] + $each['count'] * $each['price'];
             } else {
                 $lowerOutcome[$each['itemtypeid']]['count'] = $each['count'];
                 $lowerOutcome[$each['itemtypeid']]['price'] = $each['count'] * $each['price'];
             }
         }
     }
     //first report column here
     $lowerRemains = array();
     if (!empty($incomingLower)) {
         foreach ($incomingLower as $io => $each) {
             $outcomeCount = isset($lowerOutcome[$each['itemtypeid']]) ? $lowerOutcome[$each['itemtypeid']]['count'] : 0;
             $outcomePrice = isset($lowerOutcome[$each['itemtypeid']]) ? $lowerOutcome[$each['itemtypeid']]['price'] : 0;
             $lowerRemains[$each['itemtypeid']]['count'] = $lowerIncome[$each['itemtypeid']]['count'] - $outcomeCount;
             $lowerRemains[$each['itemtypeid']]['price'] = $lowerIncome[$each['itemtypeid']]['price'] - $outcomePrice;
         }
     }
     //second column
     $upperIncome = array();
     if (!empty($this->allIncoming)) {
         foreach ($this->allIncoming as $io => $each) {
             $incomeDate = strtotime($each['date']);
             if ($incomeDate >= $lowerOffset and $incomeDate <= $upperOffset) {
                 if ($each['contractorid'] != 0) {
                     //ignoring move ops
                     if (isset($upperIncome[$each['itemtypeid']])) {
                         $upperIncome[$each['itemtypeid']]['count'] = $upperIncome[$each['itemtypeid']]['count'] + $each['count'];
                         $upperIncome[$each['itemtypeid']]['price'] = $upperIncome[$each['itemtypeid']]['price'] + $each['count'] * $each['price'];
                     } else {
                         $upperIncome[$each['itemtypeid']]['count'] = $each['count'];
                         $upperIncome[$each['itemtypeid']]['price'] = $each['count'] * $each['price'];
                     }
//.........这里部分代码省略.........
开发者ID:nightflyza,项目名称:Ubilling,代码行数:101,代码来源:api.warehouse.php

示例15: web_permissions_editor

 /**
  * Shows permissions editor for some user
  * 
  * @global object $system
  * @param string $login
  */
 function web_permissions_editor($login)
 {
     global $system;
     $regperms = zb_PermissionGroup('USERREG');
     $geoperms = zb_PermissionGroup('GEO');
     $sysperms = zb_PermissionGroup('SYSTEM');
     $finperms = zb_PermissionGroup('FINANCE');
     $repperms = zb_PermissionGroup('REPORTS');
     $catvperms = zb_PermissionGroup('CATV');
     $reginputs = '';
     $geoinputs = '';
     $sysinputs = '';
     $fininputs = '';
     $repinputs = '';
     $catvinputs = '';
     $miscinputs = '';
     $inputs = wf_Link('?module=permissions', 'Back', true, 'ubButton') . '<br>';
     $inputs .= wf_HiddenInput('save', '1');
     if ($system->getRightsForUser($login, $rights, $root, $level)) {
         if ($root) {
             $inputs .= wf_tag('p', false, 'glamour') . wf_CheckInput('rootuser', __('Root administrator'), true, true) . wf_tag('p', true) . wf_CleanDiv();
         } else {
             $inputs .= wf_tag('p', false, 'glamour') . wf_CheckInput('rootuser', __('Root administrator'), true, false) . wf_tag('p', true) . wf_CleanDiv();
             foreach ($system->rights_database as $right_id => $right_desc) {
                 //sorting inputs
                 if (!isset($regperms[$right_id]) and !isset($geoperms[$right_id]) and !isset($sysperms[$right_id]) and !isset($finperms[$right_id]) and !isset($repperms[$right_id]) and !isset($catvperms[$right_id])) {
                     $miscinputs .= wf_CheckInput('_rights[' . $right_id . ']', $right_desc . ' - ' . $right_id, true, user_check_right($login, $right_id));
                 }
                 //user register rights
                 if (isset($regperms[$right_id])) {
                     $reginputs .= wf_CheckInput('_rights[' . $right_id . ']', $right_desc . ' - ' . $right_id, true, user_check_right($login, $right_id));
                 }
                 //geo rights
                 if (isset($geoperms[$right_id])) {
                     $geoinputs .= wf_CheckInput('_rights[' . $right_id . ']', $right_desc . ' - ' . $right_id, true, user_check_right($login, $right_id));
                 }
                 //system config perms
                 if (isset($sysperms[$right_id])) {
                     $sysinputs .= wf_CheckInput('_rights[' . $right_id . ']', $right_desc . ' - ' . $right_id, true, user_check_right($login, $right_id));
                 }
                 //financial inputs
                 if (isset($finperms[$right_id])) {
                     $fininputs .= wf_CheckInput('_rights[' . $right_id . ']', $right_desc . ' - ' . $right_id, true, user_check_right($login, $right_id));
                 }
                 //reports rights
                 if (isset($repperms[$right_id])) {
                     $repinputs .= wf_CheckInput('_rights[' . $right_id . ']', $right_desc . ' - ' . $right_id, true, user_check_right($login, $right_id));
                 }
                 //catv rights
                 if (isset($catvperms[$right_id])) {
                     $catvinputs .= wf_CheckInput('_rights[' . $right_id . ']', $right_desc . ' - ' . $right_id, true, user_check_right($login, $right_id));
                 }
             }
         }
     }
     //rights grid
     $label = wf_tag('h3') . __('Users registration') . wf_tag('h3', true);
     $tablecells = wf_TableCell($label . $reginputs, '', '', 'valign="top"');
     $label = wf_tag('h3') . __('System settings') . wf_tag('h3', true);
     $tablecells .= wf_TableCell($label . $sysinputs, '', '', 'valign="top"');
     $tablerows = wf_TableRow($tablecells);
     $label = wf_tag('h3') . __('Reports') . wf_tag('h3', true);
     $tablecells = wf_TableCell($label . $repinputs, '', '', 'valign="top"');
     $label = wf_tag('h3') . __('Financial management') . wf_tag('h3', true);
     $tablecells .= wf_TableCell($label . $fininputs, '', '', 'valign="top"');
     $tablerows .= wf_TableRow($tablecells);
     $label = wf_tag('h3') . __('CaTV') . wf_tag('h3', true);
     $tablecells = wf_TableCell($label . $catvinputs, '', '', 'valign="top"');
     $label = wf_tag('h3') . __('Geography') . wf_tag('h3', true);
     $tablecells .= wf_TableCell($label . $geoinputs, '', '', 'valign="top"');
     $tablerows .= wf_TableRow($tablecells);
     $label = wf_tag('h3') . __('Misc rights') . wf_tag('h3', true);
     $tablecells = wf_TableCell($label . $miscinputs, '', '', 'valign="top"');
     $tablerows .= wf_TableRow($tablecells);
     $rightsgrid = $inputs;
     $rightsgrid .= wf_Submit('Save') . wf_delimiter();
     $rightsgrid .= wf_TableBody($tablerows, '100%', 0, 'glamour');
     $permission_forms = wf_Form("", 'POST', $rightsgrid, '');
     $permission_forms .= wf_CleanDiv();
     $permission_forms .= wf_tag('br');
     //copy permissions form
     $copyinputs = wf_tag('h2') . __('Rights cloning') . wf_tag('h2', true);
     $copyinputs .= web_AdminLoginSelector($login);
     $copyinputs .= wf_HiddenInput('clonerightsnow', 'true');
     $copyinputs .= wf_Submit(__('Clone'));
     $copyform = wf_Form("", 'POST', $copyinputs, 'glamour');
     $permission_forms .= $copyform;
     show_window(__('Rights for') . ' ' . $login, $permission_forms);
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:95,代码来源:index.php


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