• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wf_Selector函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: web_MikbillMigrationNetworksForm

 public function web_MikbillMigrationNetworksForm($counter)
 {
     $period = array('day' => __('day'), 'month' => __('month'));
     $inputs = wf_TextInput('db_user', __('Database user'), '', true, 20);
     $inputs .= wf_TextInput('db_pass', __('Database password'), '', true, 20);
     $inputs .= wf_TextInput('db_host', __('Database host'), '', true, 20);
     $inputs .= wf_TextInput('db_name', __('Database name'), 'mikbill', true, 20);
     $inputs .= wf_Selector('tariff_period', $period, __('Tariff period'), '', true);
     $inputs .= wf_delimiter();
     $radius = array('0' => __('no'), '1' => __('yes'));
     $nettype = array('dhcpstatic' => 'DHCP static hosts', 'dhcpdynamic' => 'DHCP dynamic hosts', 'dhcp82' => 'DHCP option 82', 'dhcp82_vpu' => 'DHCP option 82 + vlan per user', 'pppstatic' => 'PPP static network', 'pppdynamic' => 'PPP dynamic network', 'other' => 'Other type');
     if (isset($counter)) {
         for ($i = $counter; $i > 0; $i--) {
             $inputs .= wf_TextInput("network[{$i}][start_ip]", __('First IP'), '', true, 26);
             $inputs .= wf_TextInput("network[{$i}][last_ip]", __('Last IP'), '', true, 26);
             $inputs .= wf_TextInput("network[{$i}][net]", __('Network/CIDR'), '', true, 26);
             $inputs .= wf_Selector("network[{$i}][type]", $nettype, __('Network type'), '', true);
             $inputs .= wf_Selector("network[{$i}][radius]", $radius, __('Use Radius'), '', true);
             $inputs .= wf_delimiter();
         }
         $inputs .= wf_Submit(__('Send'));
         $form = wf_Form("", 'POST', $inputs, 'glamour');
         return $form;
     } else {
         return "error netnum is empty";
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:27,代码来源:api.migration.php


示例2: web_EventsAdminSelector

 /**
  * Returns selector of administrator logins
  * 
  * @param string $name
  * @param string $label
  * @return string
  */
 function web_EventsAdminSelector($name, $label = '')
 {
     $all = rcms_scandir(USERS_PATH);
     $alllogins = array('' => '-');
     if (!empty($all)) {
         foreach ($all as $each) {
             $alllogins[$each] = $each;
         }
     }
     $result = wf_Selector($name, $alllogins, $label, '', false);
     return $result;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:19,代码来源:index.php


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


示例4: web_AdminLoginSelector

 /**
  * Returns login selector with all of administrator users
  * 
  * @param string $excludeuser
  * @return string
  */
 function web_AdminLoginSelector($excludeuser = '')
 {
     $alladdmins = rcms_scandir(USERS_PATH);
     $alllogins = array();
     if (!empty($alladdmins)) {
         foreach ($alladdmins as $eachlogin) {
             $alllogins[$eachlogin] = $eachlogin;
         }
     }
     if (!empty($excludeuser)) {
         unset($alllogins[$excludeuser]);
     }
     $result = wf_Selector('admincopyselector', $alllogins, __('Copy rights of this administrator for current user'), '', false);
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:21,代码来源:index.php


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


示例6: web_NasTemplateEditForm

function web_NasTemplateEditForm($id)
{
    $id = vf($id, 3);
    $allradiusnas_q = "SELECT * from `nas` WHERE `nastype`='radius'";
    $allradiusnas = simple_queryall($allradiusnas_q);
    $template_q = "SELECT * from `nastemplates` WHERE `id`='" . $id . "'";
    $template_data = simple_query($template_q);
    $nasselector = array();
    if (!empty($allradiusnas)) {
        foreach ($allradiusnas as $io => $eachnas) {
            $nasselector[$eachnas['id']] = $eachnas['id'] . ':' . $eachnas['nasname'];
        }
        $addinputs = wf_Selector('editnasid', $nasselector, 'Network Access Servers', $template_data['nasid'], true);
        $addinputs .= wf_HiddenInput('edittemplateid', $template_data['id']);
        $addinputs .= wf_TextArea('editnastemplate', '', $template_data['template'], true, '60x10');
        $addinputs .= wf_Submit('Change');
        $addform = wf_Form('', 'POST', $addinputs, 'glamour');
        show_window(__('Edit template'), $addform);
    }
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:20,代码来源:api.radius.php


示例7: alertsSearchForm

 /**
  * Returns previous alerts search form
  * 
  * @return string
  */
 public function alertsSearchForm()
 {
     $result = '';
     $availTaskNames = array();
     if (!empty($this->allTasks)) {
         foreach ($this->allTasks as $io => $each) {
             $availTaskNames[$each['name']] = $each['name'];
         }
     }
     $inputs = wf_Selector('previousalertsearch', $availTaskNames, __('Name'), '', false);
     $inputs .= wf_Submit(__('Search'));
     $result = wf_Form("", 'POST', $inputs, 'glamour');
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:19,代码来源:api.watchdog.php


示例8: web_AskoziaAliasesForm

 function web_AskoziaAliasesForm()
 {
     global $numAliases;
     $createinputs = wf_TextInput('newaliasnum', __('Phone'), '', true);
     $createinputs .= wf_TextInput('newaliasname', __('Alias'), '', true);
     $createinputs .= wf_Submit(__('Create'));
     $createform = wf_Form('', 'POST', $createinputs, 'glamour');
     $result = $createform;
     if (!empty($numAliases)) {
         $delArr = array();
         foreach ($numAliases as $num => $eachname) {
             $delArr[$num] = $num . ' - ' . $eachname;
         }
         $delinputs = wf_Selector('deletealias', $delArr, __('Delete alias'), '', false);
         $delinputs .= wf_Submit(__('Delete'));
         $delform = wf_Form('', 'POST', $delinputs, 'glamour');
         $result .= $delform;
     }
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:20,代码来源:index.php


示例9: multinet_show_networks_form

function multinet_show_networks_form()
{
    $altcfg = rcms_parse_ini_file(CONFIG_PATH . "alter.ini");
    $useRadArr = array('0' => __('No'), '1' => __('Yes'));
    $sup = wf_tag('sup') . '*' . wf_tag('sup', true);
    $inputs = wf_HiddenInput('addnet', 'true');
    $inputs .= wf_TextInput('firstip', __('First IP') . $sup, '', true, '20');
    $inputs .= wf_TextInput('lastip', __('Last IP') . $sup, '', true, '20');
    $inputs .= multinet_nettype_selector() . ' ' . __('Network type') . wf_tag('br');
    $inputs .= wf_TextInput('desc', __('Network/CIDR') . $sup, '', true, '20');
    if ($altcfg['FREERADIUS_ENABLED']) {
        $inputs .= wf_Selector('use_radius', $useRadArr, __('Use Radius'), '', true);
        $inputs .= wf_tag('br');
    } else {
        $inputs .= wf_HiddenInput('use_radius', '0');
    }
    $inputs .= wf_Submit(__('Add'));
    $form = wf_Form("", 'POST', $inputs, 'glamour');
    show_window(__('Add network'), $form);
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:20,代码来源:api.networking.php


示例10: renderAddForm

 /**
  * Returns time rule adding form
  * 
  * @return string
  */
 public function renderAddForm()
 {
     $sup = wf_tag('sup') . '*' . wf_tag('sup', true);
     $inputs = wf_Selector('newdshapetariff', $this->selectorParams, __('Tariff'), '', true);
     $inputs .= wf_TimePickerPresetSeconds('newthreshold1', '', __('Time from') . $sup . ' ', true);
     $inputs .= wf_TimePickerPresetSeconds('newthreshold2', '', __('Time to') . $sup . ' ', true);
     $inputs .= wf_TextInput('newspeed', __('Speed') . $sup, '', true, 8);
     $inputs .= wf_Submit(__('Create'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:16,代码来源:api.dshaper.php


示例11: zb_SwitchReplaceForm

/**
 * Returns NP switches replacement form
 * 
 * @param int $fromSwitchId
 * 
 * @return string
 */
function zb_SwitchReplaceForm($fromSwitchId)
{
    $fromSwitchId = vf($fromSwitchId, 3);
    $result = '';
    $query = "SELECT * from `switches` WHERE `desc` LIKE '%NP%' ORDER BY `id` DESC";
    $raw = simple_queryall($query);
    $paramsNp = array();
    $employee = array();
    $employee = ts_GetActiveEmployee();
    if (!empty($raw)) {
        foreach ($raw as $io => $eachNp) {
            $paramsNp[$eachNp['id']] = $eachNp['location'] . ' - ' . $eachNp['ip'];
        }
    }
    $inputs = wf_HiddenInput('switchreplace', $fromSwitchId);
    $inputs .= wf_Selector('toswtichreplace', $paramsNp, 'NP ' . __('Switch'), '', false);
    $inputs .= wf_Selector('replaceemployeeid', $employee, __('Worker'), '', false);
    $inputs .= wf_Submit('Save');
    $result = wf_Form('', 'POST', $inputs, 'glamour');
    $result .= wf_CleanDiv();
    $result .= wf_delimiter();
    $result .= wf_Link('?module=switches&edit=' . $fromSwitchId, __('Back'), false, 'ubButton');
    return $result;
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:31,代码来源:api.switches.php


示例12: ts_TaskChangeForm


//.........这里部分代码省略.........
                $smsDataCells = wf_TableCell(__('Message'), '', 'row2');
                $smsDataCells .= wf_TableCell(zb_TranslitString($newSmsText));
                $smsDataRows .= wf_TableRow($smsDataCells, 'row3');
                $smsDataTable = wf_TableBody($smsDataRows, '100%', '0', 'glamour');
                $smsInputs = $smsDataTable;
                $smsInputs .= wf_HiddenInput('postsendemployee', $smsEmployee);
                $smsInputs .= wf_HiddenInput('postsendsmstext', $newSmsText);
                $smsInputs .= wf_Submit(__('Send SMS'));
                $smsForm = wf_Form('', 'POST', $smsInputs, '');
                $smsData = wf_modal(wf_img_sized('skins/icon_mobile.gif', __('Send SMS'), '10'), __('Send SMS'), $smsForm, '', '400', '200');
            }
        }
        $tablecells = wf_TableCell(__('ID'), '30%');
        $tablecells .= wf_TableCell($taskdata['id']);
        $tablerows = wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Task creation date') . ' / ' . __('Administrator'));
        $tablecells .= wf_TableCell($taskdata['date'] . ' / ' . $taskdata['admin']);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Target date'));
        $tablecells .= wf_TableCell(wf_tag('strong') . $taskdata['startdate'] . ' ' . $taskdata['starttime'] . wf_tag('strong', true));
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Task address'));
        $tablecells .= wf_TableCell($addresslink);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Login'));
        $tablecells .= wf_TableCell($taskLogin . $loginType);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Phone'));
        $tablecells .= wf_TableCell($taskdata['phone']);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Job type'));
        $tablecells .= wf_TableCell(@$alljobtypes[$taskdata['jobtype']]);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Who should do'));
        $tablecells .= wf_TableCell(@$allemployee[$taskdata['employee']] . ' ' . $smsData);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Job note'));
        $tablecells .= wf_TableCell(nl2br($taskdata['jobnote']));
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $result .= wf_TableBody($tablerows, '100%', '0', 'glamour');
        $result .= wf_tag('div', false, '', 'style="clear:both;"') . wf_tag('div', true);
        // show task preview
        show_window(__('View task') . ' ' . $modform, $result);
        //Salary accounting
        if ($altercfg['SALARY_ENABLED']) {
            if (cfr('SALARYTASKSVIEW')) {
                $salary = new Salary();
                show_window(__('Additional jobs done'), $salary->taskJobCreateForm($_GET['edittask']));
            }
        }
        //warehouse integration
        if ($altercfg['WAREHOUSE_ENABLED']) {
            if (cfr('WAREHOUSE')) {
                $warehouse = new Warehouse();
                show_window(__('Additionally spent materials'), $warehouse->taskMaterialsReport($_GET['edittask']));
            }
        }
        //if task undone
        if ($taskdata['status'] == 0) {
            $sup = wf_tag('sup') . '*' . wf_tag('sup', false);
            $inputs = wf_HiddenInput('changetask', $taskid);
            $inputs .= wf_DatePicker('editenddate') . wf_tag('label', false) . __('Finish date') . $sup . wf_tag('label', true) . wf_tag('br');
            $inputs .= wf_tag('br');
            $inputs .= wf_Selector('editemployeedone', $activeemployee, __('Worker done'), $taskdata['employee'], true);
            $inputs .= wf_tag('br');
            $inputs .= wf_tag('label', false) . __('Finish note') . wf_tag('label', true) . wf_tag('br');
            $inputs .= wf_TextArea('editdonenote', '', '', true, '35x3');
            $inputs .= wf_tag('br');
            $inputs .= $jobgencheckbox;
            $inputs .= wf_Submit(__('This task is done'));
            $form = wf_Form("", 'POST', $inputs, 'glamour');
            if (cfr('TASKMANDELETE')) {
                show_window('', wf_JSAlertStyled('?module=taskman&deletetask=' . $taskid, web_delete_icon() . ' ' . __('Remove this task - it is an mistake'), $messages->getDeleteAlert(), 'ubButton'));
            }
            //show editing form
            if (cfr('TASKMANDONE')) {
                show_window(__('If task is done'), $form);
            }
        } else {
            $donecells = wf_TableCell(__('Finish date'), '30%');
            $donecells .= wf_TableCell($taskdata['enddate']);
            $donerows = wf_TableRow($donecells, 'row3');
            $donecells = wf_TableCell(__('Worker done'));
            $donecells .= wf_TableCell($allemployee[$taskdata['employeedone']]);
            $donerows .= wf_TableRow($donecells, 'row3');
            $donecells = wf_TableCell(__('Finish note'));
            $donecells .= wf_TableCell($taskdata['donenote']);
            $donerows .= wf_TableRow($donecells, 'row3');
            $doneresult = wf_TableBody($donerows, '100%', '0', 'glamour');
            if (cfr('TASKMANDELETE')) {
                $doneresult .= wf_JSAlertStyled('?module=taskman&deletetask=' . $taskid, web_delete_icon() . ' ' . __('Remove this task - it is an mistake'), $messages->getDeleteAlert(), 'ubButton');
            }
            if (cfr('TASKMANDONE')) {
                $doneresult .= ' ';
                $doneresult .= wf_JSAlertStyled('?module=taskman&setundone=' . $taskid, wf_img('skins/icon_key.gif') . ' ' . __('No work was done'), $messages->getEditAlert(), 'ubButton');
            }
            show_window(__('Task is done'), $doneresult);
        }
    }
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:101,代码来源:api.teskman.php


示例13: catchAjRequest

 /**
  * Returns ajax inputs of required type
  * 
  * @return string
  */
 public function catchAjRequest()
 {
     $result = '';
     if (wf_CheckGet(array('ajinput'))) {
         $request = vf($_GET['ajinput']);
         switch ($request) {
             case 'addcash':
                 $result .= wf_HiddenInput('newschedaction', 'addcash');
                 $result .= wf_TextInput('newschedparam', __('Sum'), '', true, 5);
                 break;
             case 'corrcash':
                 $result .= wf_HiddenInput('newschedaction', 'corrcash');
                 $result .= wf_TextInput('newschedparam', __('Sum'), '', true, 5);
                 break;
             case 'setcash':
                 $result .= wf_HiddenInput('newschedaction', 'setcash');
                 $result .= wf_TextInput('newschedparam', __('Sum'), '', true, 5);
                 break;
             case 'credit':
                 $result .= wf_HiddenInput('newschedaction', 'credit');
                 $result .= wf_TextInput('newschedparam', __('New credit'), '', true, 5);
                 break;
             case 'creditexpire':
                 $result .= wf_HiddenInput('newschedaction', 'creditexpire');
                 $result .= wf_DatePickerPreset('newschedparam', curdate()) . ' ' . __('New credit expire') . wf_tag('br');
                 break;
             case 'tariffchange':
                 $result .= wf_HiddenInput('newschedaction', 'tariffchange');
                 $result .= web_tariffselector('newschedparam') . ' ' . __('Tariff name') . wf_tag('br');
                 break;
             case 'tagadd':
                 $result .= wf_HiddenInput('newschedaction', 'tagadd');
                 $allTags = array();
                 $allTagsRaw = simple_queryall("SELECT * from `tagtypes`");
                 if (!empty($allTagsRaw)) {
                     foreach ($allTagsRaw as $io => $each) {
                         $allTags[$each['id']] = $each['tagname'];
                     }
                 }
                 $result .= wf_Selector('newschedparam', $allTags, __('Tag'), '', true);
                 break;
             case 'tagdel':
                 $result .= wf_HiddenInput('newschedaction', 'tagdel');
                 $allTags = array();
                 $allTagsRaw = simple_queryall("SELECT * from `tagtypes`");
                 if (!empty($allTagsRaw)) {
                     foreach ($allTagsRaw as $io => $each) {
                         $allTags[$each['id']] = $each['tagname'];
                     }
                 }
                 $result .= wf_Selector('newschedparam', $allTags, __('Tag'), '', true);
                 break;
             case 'freeze':
                 $result .= wf_HiddenInput('newschedaction', 'freeze');
                 $result .= wf_HiddenInput('newschedparam', '');
                 break;
             case 'unfreeze':
                 $result .= wf_HiddenInput('newschedaction', 'unfreeze');
                 $result .= wf_HiddenInput('newschedparam', '');
                 break;
             case 'reset':
                 $result .= wf_HiddenInput('newschedaction', 'reset');
                 $result .= wf_HiddenInput('newschedparam', '');
                 break;
             case 'setspeed':
                 $result .= wf_HiddenInput('newschedaction', 'setspeed');
                 $result .= wf_TextInput('newschedparam', __('New speed override'), '', true, 5);
                 break;
             case 'down':
                 $result .= wf_HiddenInput('newschedaction', 'down');
                 $result .= wf_HiddenInput('newschedparam', '');
                 break;
             case 'undown':
                 $result .= wf_HiddenInput('newschedaction', 'undown');
                 $result .= wf_HiddenInput('newschedparam', '');
                 break;
             case 'ao':
                 $result .= wf_HiddenInput('newschedaction', 'ao');
                 $result .= wf_HiddenInput('newschedparam', '');
                 break;
             case 'unao':
                 $result .= wf_HiddenInput('newschedaction', 'unao');
                 $result .= wf_HiddenInput('newschedparam', '');
                 break;
         }
         $result .= wf_TextInput('newschednote', __('Notes'), '', true, 30);
         $result .= wf_Submit(__('Create'));
         if ($request == 'noaction') {
             $result = __('Please select action');
         }
     }
     die($result);
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:98,代码来源:api.dealwithit.php


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


示例15: reportStreets

 /**
  * renders streets report
  * 
  * @return void
  */
 public function reportStreets()
 {
     $ukvCities = array();
     $ukvStreets = array();
     //loads cities and streets occupied by UKV users
     $ukvCities_q = "SELECT DISTINCT `city` from `ukv_users` ORDER BY `city` ASC";
     $ukvCitiesRaw = simple_queryall($ukvCities_q);
     if (!empty($ukvCitiesRaw)) {
         foreach ($ukvCitiesRaw as $ieuc => $euc) {
             $ukvCities[$euc['city']] = $euc['city'];
         }
     }
     $ukvStreets_q = "SELECT DISTINCT `street` from `ukv_users` ORDER BY `street` ASC";
     $ukvStreetsRaw = simple_queryall($ukvStreets_q);
     if (!empty($ukvStreetsRaw)) {
         foreach ($ukvStreetsRaw as $ieus => $eus) {
             $ukvStreets[$eus['street']] = $eus['street'];
         }
     }
     //main codepart
     $citySelected = wf_CheckPost(array('streetreportcity')) ? $_POST['streetreportcity'] : '';
     $streetSelected = wf_CheckPost(array('streetreportstreet')) ? $_POST['streetreportstreet'] : '';
     $inputs = wf_Selector('streetreportcity', $ukvCities, __('City'), $citySelected, false);
     $inputs .= wf_Selector('streetreportstreet', $ukvStreets, __('Street'), $streetSelected, false);
     $inputs .= wf_Submit(__('Show'));
     $form = wf_Form('', 'POST', $inputs, 'glamour');
     show_window(__('Streets report'), $form);
     if (wf_CheckPost(array('streetreportcity', 'streetreportstreet')) or wf_CheckGet(array('rc', 'rs'))) {
         //set form data
         if (wf_CheckPost(array('streetreportcity', 'streetreportstreet'))) {
             $citySearch = $_POST['streetreportcity'];
             $streetSearch = $_POST['streetreportstreet'];
         }
         //or printable report
         if (wf_CheckGet(array('rc', 'rs'))) {
             $citySearch = $_GET['rc'];
             $streetSearch = $_GET['rs'];
         }
         if (!empty($this->users)) {
             $counter = 0;
             $cells = wf_TableCell(__('Contract'), '10%');
             $cells .= wf_TableCell(__('Full address'), '31%');
             $cells .= wf_TableCell(__('Real Name'), '30%');
             $cells .= wf_TableCell(__('Tariff'), '15%');
             $cells .= wf_TableCell(__('Cash'), '7%');
             $cells .= wf_TableCell(__('Status'), '7%');
             $rows = wf_TableRow($cells, 'row1');
             foreach ($this->users as $io => $eachUser) {
                 if ($eachUser['city'] == $citySearch and $eachUser['street'] == $streetSearch) {
                     $cells = wf_TableCell($eachUser['contract']);
                     $fullAddress = $this->userGetFullAddress($eachUser['id']);
                     $profileLink = wf_Link(self::URL_USERS_PROFILE . $eachUser['id'], web_profile_icon() . ' ', false, '');
                     $cells .= wf_TableCell($profileLink . $fullAddress);
                     $cells .= wf_TableCell($eachUser['realname']);
                     $cells .= wf_TableCell($this->tariffs[$eachUser['tariffid']]['tariffname']);
                     $cells .= wf_TableCell($eachUser['cash']);
                     $cells .= wf_TableCell(web_bool_led($eachUser['active'], true));
                     $rows .= wf_TableRow($cells, 'row3');
                     $counter++;
                 }
             }
             $result = wf_TableBody($rows, '100%', '0', 'sortable');
             $result .= __('Total') . ': ' . $counter;
             if (wf_CheckGet(array('printable'))) {
                 $this->reportPrintable($citySearch . ' / ' . $streetSearch, $result);
             } else {
                 $printlink = wf_Link(self::URL_REPORTS_MGMT . 'reportStreets&rc=' . $citySearch . '&rs=' . $streetSearch . '&printable=true', wf_img('skins/icon_print.png', __('Print')), false, '');
                 show_window($citySearch . ' / ' . $streetSearch . ' ' . $printlink, $result);
             }
         } else {
             show_window(__('Result'), __('Any users found'));
         }
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:79,代码来源:api.ukv.php


示例16: web_MigrationPreprocessing

 function web_MigrationPreprocessing($filename, $delimiter, $encoding)
 {
     $path = 'exports/';
     $raw_data = file_get_contents($path . $filename);
     $parsed_data = array();
     if ($encoding != 'utf-8') {
         $raw_data = iconv($encoding, 'utf-8', $raw_data);
     }
     $raw_data = explodeRows($raw_data);
     if (!empty($raw_data)) {
         foreach ($raw_data as $eachrow) {
             if (!empty($eachrow)) {
                 $parsed_data[] = explode($delimiter, $eachrow);
             }
         }
     }
     if (sizeof($parsed_data) > 1) {
         $col_count = sizeof($parsed_data[0]);
         $cells = wf_TableCell(__('Column number'));
         $cells .= wf_TableCell(__('Column content'));
         $rows = wf_TableRow($cells, 'row1');
         foreach ($parsed_data[0] as $col_num => $col_data) {
             $cells = wf_TableCell($col_num);
             $cells .= wf_TableCell($col_data);
             $rows .= wf_TableRow($cells, 'row3');
         }
         $first_row = wf_TableBody($rows, '100%', '0', '');
         show_window(__('Found count of data columns'), $col_count);
         show_window(__('First of imported data rows'), $first_row);
         //construct of data processing form
         $rowNumArr = array();
         for ($i = 0; $i < $col_count; $i++) {
             $rowNumArr[$i] = $i;
         }
         $login_arr = $rowNumArr + array('RANDOM' => __('Generate Random'));
         $password_arr = $rowNumArr + array('RANDOM' => __('Generate Random'));
         $ip_arr = $rowNumArr;
         $mac_arr = $rowNumArr + array('RANDOM' => __('Generate Random'));
         $tariff_arr = $rowNumArr;
         $cash_arr = $rowNumArr;
         $credit_arr = $rowNumArr + array('ZERO' => __('Set to zero'));
         $creditex_arr = $rowNumArr + array('NONE' => __('Set to none'));
         $phone_arr = $rowNumArr + array('NONE' => __('Set to none'));
         $mobile_arr = $rowNumArr + array('NONE' => __('Set to none'));
         $email_arr = $rowNumArr + array('NONE' => __('Set to none'));
         $address_arr = $rowNumArr + array('NONE' => __('Set to none'));
         $realname_arr = $rowNumArr + array('NONE' => __('Set to none'));
         $contract_arr = $rowNumArr + array('NONE' => __('Set to none'));
         $ao_arr = $rowNumArr + array('AO_1' => __('AlwaysOnline=1'));
         $down_arr = $rowNumArr + array('DOWN_0' => __('Down=0'));
         $passive_arr = $rowNumArr + array('PASSIVE_0' => __('Passive=0'));
         $regtype_arr = array('SQL' => 'Show SQL dump', 'UB' => 'Ubilling live register');
         //data column setting form
         $inputs = wf_Selector('login_col', $login_arr, __('User login'), '', true);
         $inputs .= wf_Selector('password_col', $password_arr, __('User password'), '', true);
         $inputs .= wf_Selector('ip_col', $ip_arr, __('User IP'), '', true);
         $inputs .= wf_Selector('mac_col', $mac_arr, __('User MAC'), '', true);
         $inputs .= wf_Selector('tariff_col', $tariff_arr, __('User tariff'), '', true);
         $inputs .= wf_Selector('cash_col', $cash_arr, __('User cash'), '', true);
         $inputs .= wf_Selector('credit_col', $credit_arr, __('User credit limit'), '', true);
         $inputs .= wf_Selector('creditex_col', $creditex_arr, __('User credit expire date'), '', true);
         $inputs .= wf_Selector('phone_col', $phone_arr, __('User phone'), '', true);
         $inputs .= wf_Selector('mobile_col', $mobile_arr, __('User mobile'), '', true);
         $inputs .= wf_Selector('email_col', $email_arr, __('User email'), '', true);
         $inputs .= wf_Selector('address_col', $address_arr, __('User address'), '', true);
         $inputs .= wf_Selector('realname_col', $realname_arr, __('User realname'), '', true);
         $inputs .= wf_Selector('contract_col', $contract_arr, __('User contract'), '', true);
         $inputs .= wf_Selector('ao_col', $ao_arr, __('User AlwaysOnline state'), '', true);
         $inputs .= wf_Selector('down_col', $down_arr, __('User Down state'), '', true);
         $inputs .= wf_Selector('passive_col', $passive_arr, __('User Passive state'), '', true);
         $inputs .= wf_Selector('regtype', $regtype_arr, __('User registration mode'), '', true);
         $inputs .= multinet_network_selector() . __('Target network') . wf_delimiter();
         $inputs .= wf_HiddenInput('import_rawdata', base64_encode(serialize($parsed_data)));
         $inputs .= wf_Submit('Save this column pointers and continue import');
         $colform = wf_Form("?module=migration&setpointers=true", 'POST', $inputs, 'glamour');
         show_window(__('Select data columns and their values'), $colform);
     } else {
         show_error(__('Parsing error'));
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:80,代码来源:index.php


示例17: itemLocationForm

 /**
  * Returns item location form
  * 
  * @return string
  */
 protected function itemLocationForm()
 {
     $result = wf_Selector('newitemtype', $this->itemTypes, __('Type'), '', true);
     $result .= wf_TextInput('newitemname', __('Name'), '', true, 20);
     $result .= wf_TextInput('newitemlocation', __('Location'), '', true, 20);
     $result .= wf_Submit(__('Create'));
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:13,代码来源:api.custmaps.php


示例18: renderCorpsFlowsDateForm

 /**
  * Returns year/month selectors form
  * 
  * @return string
  */
 public function renderCorpsFlowsDateForm()
 {
     $allagents = zb_ContrAhentGetAllData();
     $tmpArr = array();
     $tmpArr[''] = __('Any');
     if (!empty($allagents)) {
         foreach ($allagents as $io => $eachagent) {
             $tmpArr[$eachagent['id']] = $eachagent['contrname'];
         }
     }
     /**
      * Again and again we're drowning in this web
      * Again and again we make the same mistake
      * Always hunting the same lamb
      * All we get is the same crap....
      */
     $inputs = wf_YearSelector('yearsel', __('Year'), false) . ' ';
     $inputs .= wf_MonthSelector('monthsel', __('Month'), '', false) . ' ';
     $inputs .= wf_Selector('agentsel', $tmpArr, __('Contrahent name'), '', false);
     $inputs .= wf_Submit(__('Show'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:28,代码来源:api.fundsflow.php


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


示例20: renderReport

 /**
  * Renders tags assign report
  * 
  * @return void
  */
 public function renderReport()
 {
     $result = $this->panel();
     $messages = new UbillingMessageHelper();
     $months = months_array_localized();
     $reportTmp = array();
     $totalCount = 0;
     if (!empty($this->allnames)) {
         $result .= wf_tag('br');
         $inputs = wf_YearSelector('reportyear', __('Year'), false) . ' ';
         $curTagid = wf_CheckPost(array('reporttagid')) ? vf($_POST['reporttagid'], 3) : '';
         $inputs .= wf_Selector('reporttagid', $this->allnames, __('Tag'), $curTagid, false) . ' ';
         $inputs .= wf_Submit(__('Show'));
         $result .= wf_Form('', 'POST', $inputs, 'glamour');
     } else {
         $result .= $messages->getStyledMessage(__('Nothing found'), 'info');
     }
     if (wf_CheckPost(array('reportyear', 'reporttagid'))) {
         $tagid = vf($_POST['reporttagid'], 3);
         $year = vf($_POST['reportyear'], 3);
         $datemask = $year . '-%';
         $query = "SELECT * from `weblogs` WHERE `date` LIKE '" . $datemask . "' AND `event` LIKE 'TAGADD (%' AND `event` LIKE '%TAGID%';";
         $raw = simple_queryall($query);
         if (!empty($raw)) {
             foreach ($raw as $io => $each) {
                 $eventtagid = preg_match("/\\[[^\\]]*\\]/", $each['event'], $matches);
                 @($eventtagid = vf($matches[0], 3));
                 if (!empty($eventtagid)) {
                     if ($eventtagid == $tagid) {
                         $eventTime = strtotime($each['date']);
                         $eventMonth = date("m", $eventTime);
                         if (!isset($reportTmp[$eventMonth])) {
                             $reportTmp[$eventMonth] = 1;
                         } else {
                             $reportTmp[$eventMonth]++;
                         }
                         $totalCount++;
                     }
                 }
             }
         }
         $cells = wf_TableCell($year);
         $cells .= wf_TableCell(__('Month'));
         $cells .= wf_TableCell($this->allnames[$tagid]);
         $cells .= wf_TableCell(__('Visual'));
         $rows = wf_TableRow($cells, 'row1');
         foreach ($months as $monthNumber => $monthName) {
             $cells = wf_TableCell($monthNumber);
             $cells .= wf_TableCell($monthName);
             $monthData = isset($reportTmp[$monthNumber]) ? $reportTmp[$monthNumber] : 0;
             $cells .= wf_TableCell($monthData);
             $cells .= wf_TableCell(web_bar($monthData, $totalCount), '', '', 'sorttable_customkey="' . $monthData . '"');
             $rows .= wf_TableRow($cells, 'row3');
         }
         $result .= wf_TableBody($rows, '100%', '0', 'sortable');
         $result .= wf_tag('b') . __('Total') . ':' . wf_tag('b', true) . ' ' . $totalCount;
     }
     show_window(__('Tags'), $result);
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:64,代码来源:

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wf_Submit函数代码示例发布时间:2022-05-23
下一篇:
PHP wf_Link函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap