public function web_MikbillMigrationNetnumForm() { $inputs = wf_TextInput('netnum', __('networks number'), '', true, 20); $inputs .= wf_Submit(__('Save')); $form = wf_Form("", 'POST', $inputs, 'glamour'); return $form; }
function ms_ShowForm() { $inputs = __('Message') . '<br>'; $inputs .= wf_TextArea('message', '', '', true, '60x6'); $inputs .= wf_TextInput('exactuserlogins', 'Exact users, comma delimiter', '', true, '30'); $inputs .= wf_RadioInput('sendtype', 'Exact users', 'exactusers', true, true); $inputs .= wf_RadioInput('sendtype', 'Debtors', 'debtors', true); $inputs .= wf_RadioInput('sendtype', 'All users', 'allusers', true); $inputs .= wf_Submit('Send'); $form = wf_Form('', 'POST', $inputs, 'glamour'); show_window(__('Masssender'), $form); }
function web_PhpConsoleTemplateEditForm($templatekey) { $rawtemplate = zb_PhpConsoleGetTemplate($templatekey); $templatename = $rawtemplate['name']; $templatebody = $rawtemplate['body']; $inputs = wf_TextInput('edittemplatename', __('Template name'), $templatename, true, "30"); $inputs .= wf_TextArea('edittemplatebody', '', $templatebody, true, '80x10'); $inputs .= wf_Submit('Edit'); $result = wf_Form("", 'POST', $inputs, 'glamour'); $result .= wf_Link("?module=sqlconsole&devconsole=true", 'Back', true, 'ubButton'); return $result; }
function mrst_FormShow() { global $altcfg; $inputs = __('After clicking the button below for all users will perform the standard procedure reset. By default, this will reinitialize shapers and MAC bindings.'); if (!isset($altcfg['MASSRESET_NOCONFIRM'])) { $confirmKey = rand(1111, 9999); $inputs .= ' ' . __('If you are completely sure of what you wish, enter the following numbers into the next field.') . '<br>'; $inputs .= wf_HiddenInput('confirmkey', $confirmKey); $inputs .= $confirmKey . ' ⇨ ' . wf_TextInput('confirmcheck', '', '', true, 5); } $inputs .= wf_HiddenInput('runmassreset', 'true') . '<br>'; $inputs .= wf_Submit(__('I`m ready')); $form = wf_Form("", 'POST', $inputs, 'glamour'); show_window(__('Mass user reset'), $form); }
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); }
/** * Stores raw login form into private property * * @param bool $br * @param bool $container * * @return void */ protected function loadForm($br, $container) { $this->breaks = $br; $this->container = $container; if (file_exists('DEMO_MODE')) { $this->loginPreset = 'admin'; $this->passwordPreset = 'demo'; } if ($this->container) { $this->form .= wf_tag('div', false, 'ubLoginContainer'); } $inputs = wf_HiddenInput('login_form', '1'); $inputs .= wf_TextInput('username', __('Login'), $this->loginPreset, $this->breaks, $this->inputSize); $inputs .= wf_PasswordInput('password', __('Password'), $this->passwordPreset, $this->breaks, $this->inputSize); $inputs .= wf_Submit(__('Log in')); $this->form .= wf_Form("", 'POST', $inputs, 'ubLoginForm'); if ($this->container) { $this->form .= wf_tag('div', true); } }
function wf_PlPingerOptionsForm() { //previous setting if (wf_CheckPost(array('packet'))) { $currentpack = vf($_POST['packet'], 3); } else { $currentpack = ''; } if (wf_CheckPost(array('count'))) { $getCount = vf($_POST['count'], 3); if ($getCount <= 10000) { $currentcount = $getCount; } else { $currentcount = ''; } } else { $currentcount = ''; } $inputs = wf_TextInput('packet', __('Packet size'), $currentpack, false, 5); $inputs .= wf_TextInput('count', __('Count'), $currentcount, false, 5); $inputs .= wf_Submit(__('Save')); $result = wf_Form('', 'POST', $inputs, 'glamour'); return $result; }
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); }
/** * 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); }
/** * 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; }
/** * Retuns connection details edit form * * @param string $login * @return string */ public function editForm($login) { $login = mysql_real_escape_string($login); $currentData = $this->getByLogin($login); $inputs = wf_TextInput('newseal', __('Cable seal'), @$currentData['seal'], true, '40'); $inputs .= wf_TextInput('newlength', __('Cable length') . ', ' . __('m'), @$currentData['length'], true, '5'); $inputs .= wf_TextInput('newprice', __('Signup price'), @$currentData['price'], true, '5'); $inputs .= wf_HiddenInput('editcondet', 'true'); $inputs .= wf_tag('br'); $inputs .= wf_Submit(__('Save')); $result = wf_Form("", 'POST', $inputs, 'glamour'); return $result; }
/** * 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; }
/** * returns banksta processing form for some hash * * @param string $hash existing preprocessing bank statement hash * * @return string */ public function bankstaProcessingForm($hash) { $hash = mysql_real_escape_string($hash); $query = "SELECT * from `ukv_banksta` WHERE `hash`='" . $hash . "' ORDER BY `id` ASC;"; $all = simple_queryall($query); $cashPairs = array(); $cells = wf_TableCell(__('ID')); $cells .= wf_TableCell(__('Address')); $cells .= wf_TableCell(__('Real Name')); $cells .= wf_TableCell(__('Contract')); $cells .= wf_TableCell(__('Cash')); $cells .= wf_TableCell(__('Processed')); $cells .= wf_TableCell(__('Contract')); $cells .= wf_TableCell(__('Real Name')); $cells .= wf_TableCell(__('Address')); $cells .= wf_TableCell(__('Tariff')); $rows = wf_TableRow($cells, 'row1'); if (!empty($all)) { foreach ($all as $io => $each) { $AddInfoControl = wf_Link(self::URL_BANKSTA_DETAILED . $each['id'], $each['id'], false, ''); $processed = $each['processed'] ? true : false; $cells = wf_TableCell($AddInfoControl); $cells .= wf_TableCell($each['address']); $cells .= wf_TableCell($each['realname']); if (!$processed) { $editInputs = wf_TextInput('newbankcontr', '', $each['contract'], false, '6'); $editInputs .= wf_CheckInput('lockbankstarow', __('Lock'), false, false); $editInputs .= wf_HiddenInput('bankstacontractedit', $each['id']); $editInputs .= wf_Submit(__('Save')); $editForm = wf_Form('', 'POST', $editInputs); } else { $editForm = $each['contract']; } $cells .= wf_TableCell($editForm); $cells .= wf_TableCell($each['summ']); $cells .= wf_TableCell(web_bool_led($processed)); //user detection if (isset($this->contracts[$each['contract']])) { $detectedUser = $this->users[$this->contracts[$each['contract']]]; $detectedContract = wf_Link(self::URL_USERS_PROFILE . $detectedUser['id'], web_profile_icon() . ' ' . $detectedUser['contract'], false, ''); $detectedAddress = $detectedUser['street'] . ' ' . $detectedUser['build'] . '/' . $detectedUser['apt']; $detectedRealName = $detectedUser['realname']; $detectedTariff = $detectedUser['tariffid']; $detectedTariff = $this->tariffs[$detectedTariff]['tariffname']; if (!$processed) { $cashPairs[$each['id']]['bankstaid'] = $each['id']; $cashPairs[$each['id']]['userid'] = $detectedUser['id']; $cashPairs[$each['id']]['usercontract'] = $detectedUser['contract']; $cashPairs[$each['id']]['summ'] = $each['summ']; $cashPairs[$each['id']]['payid'] = $each['payid']; } $rowClass = 'row3'; //try to highlight multiple payments if (!isset($this->bankstafoundusers[$each['contract']])) { $this->bankstafoundusers[$each['contract']] = $detectedUser['id']; } else { $rowClass = 'ukvbankstadup'; } } else { $detectedContract = ''; $detectedAddress = ''; $detectedRealName = ''; $detectedTariff = ''; if ($each['processed'] == 1) { $rowClass = 'row2'; } else { $rowClass = 'undone'; } } $cells .= wf_TableCell($detectedContract); $cells .= wf_TableCell($detectedRealName); $cells .= wf_TableCell($detectedAddress); $cells .= wf_TableCell($detectedTariff); $rows .= wf_TableRow($cells, $rowClass); } } $result = wf_TableBody($rows, '100%', '0', ''); if (!empty($cashPairs)) { $cashPairs = serialize($cashPairs); $cashPairs = base64_encode($cashPairs); $cashInputs = wf_HiddenInput('bankstaneedpaymentspush', $cashPairs); $cashInputs .= wf_Submit(__('Bank statement processing')); $result .= wf_Form('', 'POST', $cashInputs, 'glamour'); } return $result; }
function web_TsmsSingleSendForm() { $inputs = wf_TextInput('sendsinglelogin', __('Login'), '', false, '20'); $inputs .= wf_Submit(__('Send')); $result = wf_Form("", "POST", $inputs, 'glamour'); return $result; }
/** * Returns search controller for CFs assigned to user * * @param string $type Type of CF to return control * @param int $typeid Type ID for change * * @return string */ function cf_TypeGetSearchControl($type, $typeid) { $type = vf($type); $typeid = vf($typeid); $result = ''; if ($type == 'VARCHAR') { $inputs = wf_HiddenInput('cftypeid', $typeid); $inputs .= wf_TextInput('cfquery', '', '', false, 20); $inputs .= wf_Submit(__('Search')); $result = wf_Form("", 'POST', $inputs, ''); } if ($type == 'TRIGGER') { $triggerOpts = array(1 => __('Yes'), 0 => __('No')); $inputs = wf_HiddenInput('cftypeid', $typeid); $inputs .= wf_Selector('cfquery', $triggerOpts, '', '', false); $inputs .= wf_Submit(__('Search')); $result = wf_Form("", 'POST', $inputs, ''); } if ($type == 'TEXT') { $inputs = wf_HiddenInput('cftypeid', $typeid); $inputs .= wf_TextInput('cfquery', '', '', false, 20); $inputs .= wf_Submit(__('Search')); $result = wf_Form("", 'POST', $inputs, ''); } return $result; }
function docsis_ModemProfileShow($modemid) { $modemid = vf($modemid, 3); $data = docsis_ModemGetData($modemid); $netdata = array(); $netdata_q = "SELECT * from `nethosts` where `ip`='" . $data['ip'] . "'"; $netdata = simple_queryall($netdata_q); $netdata = print_r($netdata, true); $netdata = nl2br($netdata); $alluserips = zb_UserGetAllIPs(); $alluserips = array_flip($alluserips); $result = wf_Link("?module=docsis", __('Back'), false, 'ubButton'); $ajaxcontainer = wf_AjaxLoader() . wf_AjaxLink("?module=docsis&ajaxsnmp=" . $modemid, __('Renew modem data'), 'ajaxdata', true, 'ubButton') . wf_tag('div', false, '', 'id="ajaxdata"') . wf_tag('div', true); $result .= wf_modal(__('Modem diagnostics'), __('Modem diagnostics'), $ajaxcontainer, 'ubButton', '500', '400'); $result .= wf_modal(__('Networking data'), __('Networking data'), $netdata, 'ubButton', '500', '400'); $result .= wf_delimiter(); if (!empty($data)) { $cells = wf_TableCell(__('ID')); $cells .= wf_TableCell($data['id'] . ' ' . wf_JSAlert("?module=docsis&deletemodem=" . $modemid, web_delete_icon(), __('Removing this may lead to irreparable results'))); $rows = wf_TableRow($cells, 'row3'); $cells = wf_TableCell(__('IP')); $cells .= wf_TableCell($data['ip']); $rows .= wf_TableRow($cells, 'row3'); $cells = wf_TableCell(__('MAC Lan')); $cells .= wf_TableCell($data['maclan']); $rows .= wf_TableRow($cells, 'row3'); $cells = wf_TableCell(__('Date')); $cells .= wf_TableCell($data['date']); $rows .= wf_TableRow($cells, 'row3'); if (isset($alluserips[$data['userbind']])) { $bindedLogin = $alluserips[$data['userbind']]; $profileLink = ' ' . wf_Link('?module=userprofile&username='******' ' . $bindedLogin, false, ''); } else { $profileLink = ''; } $cells = wf_TableCell(__('Linked user')); $cells .= wf_TableCell($data['userbind'] . $profileLink); $rows .= wf_TableRow($cells, 'row3'); $cells = wf_TableCell(__('Notes')); $cells .= wf_TableCell($data['note']); $rows .= wf_TableRow($cells, 'row3'); $result .= wf_TableBody($rows, '100%', '0', ''); $inputs = wf_TextInput('edituserbind', __('Linked user'), $data['userbind'], true, '40'); $inputs .= wf_TextInput('editnote', __('Notes'), $data['note'], true, '40'); $inputs .= wf_Submit(__('Save')); $form = wf_Form("", 'POST', $inputs, 'glamour'); $result .= $form; show_window(__('Modem profile'), $result); } else { show_window(__('Error'), __('Strange exeption')); } }
/** * returns tariff lines config form * * @return string */ protected function configForm() { $inputs = wf_TextInput('newtarifflines', __('Tariff lines masks, comma separated') . '. ' . __('You can use the * character as a symbol of lax compliance line.'), $this->config, true, '40'); $inputs .= wf_Submit(__('Save')); $result = wf_Form("", 'POST', $inputs, 'glamour'); return $result; }
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; }
/** * 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; }
/** * Passport data editing form * * @param $login - user login * @param $passportdata - user passport data array * * @return void * */ function web_PassportDataEditFormshow($login, $passportdata) { $alladdress = zb_AddressGetFulladdresslist(); @($useraddress = $alladdress[$login]); //extracting passport data if (!empty($passportdata)) { $birthdate = $passportdata['birthdate']; $passportnum = $passportdata['passportnum']; $passportdate = $passportdata['passportdate']; $passportwho = $passportdata['passportwho']; $pcity = $passportdata['pcity']; $pstreet = $passportdata['pstreet']; $pbuild = $passportdata['pbuild']; $papt = $passportdata['papt']; } else { $birthdate = ''; $passportnum = ''; $passportdate = ''; $passportwho = ''; $pcity = ''; $pstreet = ''; $pbuild = ''; $papt = ''; } //form construction $inputs = wf_tag('h3') . __('Passport data') . wf_tag('h3', true); $inputs .= wf_DatePickerPreset('editbirthdate', $birthdate, true); $inputs .= __('Birth date'); $inputs .= wf_delimiter(); $inputs .= wf_TextInput('editpassportnum', __('Passport number'), $passportnum, false, '35'); $inputs .= wf_delimiter(); $inputs .= wf_TextInput('editpassportwho', __('Issuing authority'), $passportwho, false, '35'); $inputs .= wf_delimiter(); $inputs .= wf_DatePickerPreset('editpassportdate', $passportdate, true); $inputs .= __('Date of issue'); $inputs .= wf_delimiter(); $inputs .= wf_tag('h3') . __('Registration address') . wf_tag('h3', true); $inputs .= wf_TextInput('editpcity', __('City'), $pcity, false, '20'); $inputs .= wf_delimiter(); $inputs .= wf_TextInput('editpstreet', __('Street'), $pstreet, false, '20'); $inputs .= wf_delimiter(); $inputs .= wf_TextInput('editpbuild', __('Build'), $pbuild, false, '5'); $inputs .= wf_delimiter(); $inputs .= wf_TextInput('editpapt', __('Apartment'), $papt, false, '5'); $inputs .= wf_delimiter(); $inputs .= wf_Submit(__('Save')); $form = wf_Form('', 'POST', $inputs, 'glamour'); show_window(__('Edit') . ' ' . __('passport data') . ' ' . $useraddress, $form); }
/** * returns custom documents form fields * * @return string */ public function customDocumentFieldsForm() { $rawServices = $this->altcfg['DOCX_SERVICES']; $availServices = array(); if (!empty($rawServices)) { $rawServices = explode(',', $rawServices); if (!empty($rawServices)) { foreach ($rawServices as $io => $each) { $availServices[__($each)] = __($each); } } } $inputs = wf_DatePickerPreset('customdate', curdate()); $inputs .= wf_tag('br'); $inputs .= wf_TextInput('customrealname', __('Real Name'), @$this->userData[$this->userLogin]['REALNAME'], true, '20'); $inputs .= wf_TextInput('customphone', __('Phone'), @$this->userData[$this->userLogin]['PHONE'], true, '10'); $inputs .= wf_Selector('customservice', $availServices, __('Service'), '', 'true'); $inputs .= wf_TextInput('customnotes', __('Notes'), '', true, '20'); $inputs .= wf_TextInput('customsum', __('Sum'), @$this->userData[$this->userLogin]['TARIFFPRICE'], true, '10'); if ($this->altcfg['CORPS_ENABLED']) { $inputs .= wf_tag('br') . wf_tag('span', false, 'row3') . ' ' . __('Corporate users') . ' ' . wf_tag('span', true) . wf_tag('br'); $greed = new Avarice(); $corpsRuntime = $greed->runtime('CORPS'); if (!empty($corpsRuntime)) { $corps = new Corps(); if ($corps->userIsCorporate($this->userLogin)) { //this is realy corp user $corpData = $corps->corpGetDataByLogin($this->userLogin); $inputs .= wf_TextInput('corpname', __('Corp name'), @$corpData['corpname'], true, '30'); $inputs .= wf_TextInput('corpaddress', __('Address'), @$corpData['address'], true, '30'); $inputs .= wf_TextInput('corpdoctype', __('Document type'), @$corpData['doctype'], true, '30'); $inputs .= wf_TextInput('corpdocnum', __('Document number'), @$corpData['docnum'], true, '30'); $inputs .= wf_TextInput('corpdocdate', __('Document date'), @$corpData['docdate'], true, '30'); $inputs .= wf_TextInput('corpbankacc', __('Bank account'), @$corpData['bankacc'], true, '30'); $inputs .= wf_TextInput('corpbankname', __('Bank name'), @$corpData['bankname'], true, '30'); $inputs .= wf_TextInput('corpbankmfo', __('Bank MFO'), @$corpData['bankmfo'], true, '30'); $inputs .= wf_TextInput('corpedrpou', __('EDRPOU'), @$corpData['edrpou'], true, '30'); $inputs .= wf_TextInput('corpndstaxnum', __('NDS number'), @$corpData['ndstaxnum'], true, '30'); $inputs .= wf_TextInput('corpinncode', __('INN code'), @$corpData['inncode'], true, '30'); $inputs .= wf_TextInput('corptaxtype', __('Tax type'), @$corpData['taxtype'], true, '30'); $inputs .= wf_TextInput('corpnotes', __('Notes'), @$corpData['notes'], true, '30'); } else { $inputs .= __('Private user'); } } else { $inputs .= __('No license key available'); } } $inputs .= wf_HiddenInput('customfields', 'true'); $inputs .= wf_tag('br'); $inputs .= wf_Submit(__('Create')); $result = wf_Form('', 'POST', $inputs, 'glamour'); return $result; }
log_register('CHANGE TariffNM ' . $eachchild . ' ON ' . $tariff); } } } rcms_redirect("?module=corporate&userlink=" . $userlink . "&control=tariff"); } // end of newtariff checks } //tariffs end if ($_GET['control'] == 'credit') { //group credit operations $allchildusers = cu_GetAllChildUsers($userlink); $current_credit = zb_UserGetStargazerData($parent_login); $current_credit = $current_credit['Credit']; //construct form $creditinputs = wf_TextInput('newcredit', 'New credit', $current_credit, true, '10'); $creditinputs .= wf_Submit('Save'); $creditform = wf_Form('', 'POST', $creditinputs, 'glamour'); show_window(__('Edit credit'), $creditform); //if group credit change if (isset($_POST['newcredit'])) { $credit = vf($_POST['newcredit']); //change credit for parent user $billing->setcredit($parent_login, $credit); log_register('CHANGE Credit ' . $parent_login . ' ON ' . $credit); // set credit for all child users if (!empty($allchildusers)) { foreach ($allchildusers as $eachchild) { $billing->setcredit($eachchild, $credit); log_register('CHANGE Credit ' . $eachchild . ' ON ' . $credit); }
/** * Shows report editing form * * @param string $reportfile */ function web_ReportMasterShowEditForm($reportfile) { $reports_path = DATA_PATH . "reports/"; $report_template = rcms_parse_ini_file($reports_path . $reportfile); $inputs = wf_TextInput('editreportname', __('Report name'), $report_template['REPORT_NAME'], true, 40); $inputs .= wf_TextInput('editsqlquery', __('SQL Query'), $report_template['REPORT_QUERY'], true, 40); $inputs .= wf_TextInput('editdatakeys', __('Data keys, separated by comma'), $report_template['REPORT_KEYS'], true, 40); $inputs .= wf_TextInput('editfieldnames', __('Field names, separated by comma'), $report_template['REPORT_FIELD_NAMES'], true, 40); $inputs .= web_RMTriggerSelector('editaddr', $report_template['REPORT_ADDR']) . ' ' . __('Show full address by login key') . wf_tag('br'); $inputs .= web_RMTriggerSelector('editrnames', $report_template['REPORT_RNAMES']) . ' ' . __('Show Real Names by login key') . wf_tag('br'); $inputs .= web_RMTriggerSelector('editrowcount', $report_template['REPORT_ROW_COUNT']) . ' ' . __('Show data query row count') . wf_tag('br'); $inputs .= wf_Submit(__('Save')); $form = wf_Form('', 'POST', $inputs, 'glamour'); show_window(__('Edit report'), $form); }
/** * Returns time rule editing form * * @param int $timeruleid existing time rule database ID * @return string */ public function renderEditForm($timeruleid) { $timeruleid = vf($timeruleid, 3); $query = "SELECT * from `dshape_time` WHERE `id`='" . $timeruleid . "'"; $timerule_data = simple_query($query); $sup = wf_tag('sup') . '*' . wf_tag('sup', true); $inputs = wf_tag('select', false, '', 'DISABLED'); $inputs .= wf_tag('option') . $timerule_data['tariff'] . $this->getSpeeds($timerule_data['tariff']) . wf_tag('option', true); $inputs .= wf_tag('select', true); $inputs .= wf_tag('br'); $inputs .= wf_HiddenInput('editdshapetariff', $timerule_data['tariff']); $inputs .= wf_TimePickerPresetSeconds('editthreshold1', $timerule_data['threshold1'], __('Time from') . $sup, true); $inputs .= wf_TimePickerPresetSeconds('editthreshold2', $timerule_data['threshold2'], __('Time to') . $sup, true); $inputs .= wf_TextInput('editspeed', __('Speed') . $sup, $timerule_data['speed'], true, 8); $inputs .= wf_Submit(__('Save')); $form = wf_Form('', 'POST', $inputs, 'glamour'); $form .= wf_CleanDiv(); $form .= wf_tag('br'); $form .= wf_Link('?module=dshaper', __('Back'), true, 'ubButton'); return $form; }
/** * Returns task typical problems editing form * * @return string */ function ts_TaskProblemsEditForm() { $rawNotes = zb_StorageGet('PROBLEMS'); //extract old or create new typical problems array if (!empty($rawNotes)) { $rawNotes = base64_decode($rawNotes); $rawNotes = unserialize($rawNotes); } else { $emptyArray = array(); $newNotes = serialize($emptyArray); $newNotes = base64_encode($newNotes); zb_StorageSet('PROBLEMS', $newNotes); $rawNotes = $emptyArray; } //adding and deletion subroutines if (wf_CheckPost(array('createtypicalnote'))) { $toPush = strip_tags($_POST['createtypicalnote']); array_push($rawNotes, $toPush); $newNotes = serialize($rawNotes); $newNotes = base64_encode($newNotes); zb_StorageSet('PROBLEMS', $newNotes); log_register('TASKMAN ADD TYPICALPROBLEM'); rcms_redirect("?module=taskman&probsettings=true"); } if (wf_CheckPost(array('deletetypicalnote', 'typicalnote'))) { $toUnset = $_POST['typicalnote']; if (($delkey = array_search($toUnset, $rawNotes)) !== false) { unset($rawNotes[$delkey]); } $newNotes = serialize($rawNotes); $newNotes = base64_encode($newNotes); zb_StorageSet('PROBLEMS', $newNotes); log_register('TASKMAN DELETE TYPICALPROBLEM'); rcms_redirect("?module=taskman&probsettings=true"); } $rows = ''; $result = wf_Link("?module=taskman", __('Back'), true, 'ubButton'); if (!empty($rawNotes)) { foreach ($rawNotes as $eachNote) { $cells = wf_TableCell($eachNote); $rows .= wf_TableRow($cells, 'row3'); } } $result .= wf_TableBody($rows, '100%', '0', ''); $result .= wf_delimiter(); $addinputs = wf_TextInput('createtypicalnote', __('Create'), '', true, '20'); $addinputs .= wf_Submit(__('Save')); $addform = wf_Form("", "POST", $addinputs, 'glamour'); $result .= $addform; $delinputs = ts_TaskTypicalNotesSelector(false); $delinputs .= wf_HiddenInput('deletetypicalnote', 'true'); $delinputs .= wf_Submit(__('Delete')); $delform = wf_Form("", "POST", $delinputs, 'glamour'); $result .= $delform; return $result; }
/** * Returns time machine search form * * @return string */ function web_SwitchTimeMachineSearchForm() { $inputs = wf_TextInput('switchdeadlogsearch', __('Location') . ', ' . __('IP'), '', false, 30); $inputs .= wf_Submit(__('Search')); $result = wf_Form('', 'POST', $inputs, 'glamour'); return $result; }
$nasbwdurl = mysql_real_escape_string($_POST['editnasbwdurl']); $netid = vf($_POST['networkselect']); simple_update_field('nas', 'nastype', $nastype, $targetnas); simple_update_field('nas', 'nasip', $nasip, $targetnas); simple_update_field('nas', 'nasname', $nasname, $targetnas); simple_update_field('nas', 'bandw', $nasbwdurl, $targetnas); simple_update_field('nas', 'netid', $netid, $targetnas); zb_NasConfigSave(); log_register("NAS EDIT " . $nasip); rcms_redirect("?module=nas&edit=" . $nasid); } $nasdata = zb_NasGetData($nasid); $currentnetid = $nasdata['netid']; $currentnasip = $nasdata['nasip']; $currentnasname = $nasdata['nasname']; $currentnastype = $nasdata['nastype']; $currentbwdurl = $nasdata['bandw']; $nastypes = array('local' => 'Local NAS', 'rscriptd' => 'rscriptd', 'mikrotik' => 'MikroTik', 'radius' => 'Radius'); $editinputs = multinet_network_selector($currentnetid) . "<br>"; $editinputs .= wf_Selector('editnastype', $nastypes, 'NAS type', $currentnastype, true); $editinputs .= wf_TextInput('editnasip', 'IP', $currentnasip, true, '15'); $editinputs .= wf_TextInput('editnasname', 'NAS name', $currentnasname, true, '15'); $editinputs .= wf_TextInput('editnasbwdurl', 'Bandwidthd URL', $currentbwdurl, true, '25'); $editinputs .= wf_Submit('Save'); $editform = wf_Form('', 'POST', $editinputs, 'glamour'); show_window(__('Edit') . ' NAS', $editform); show_window('', wf_Link("?module=nas", 'Back', true, 'ubButton')); } } else { show_error(__('You cant control this module')); }
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; }
public function document_add_form_show($item, $item_id) { $inputs = wf_HiddenInput(self::FORM_ADD . '[' . $item . '_id]', $item_id); $inputs .= wf_TextInput(self::FORM_ADD . '[title]', __('Title'), null, true, '20'); $inputs .= __('Select document from HDD') . wf_tag('br'); $inputs .= wf_tag('input', false, '', 'id="fileselector" type="file" name="' . self::FORM_ADD . '[file]"') . wf_tag('br'); $inputs .= wf_Submit('Upload'); return bs_UploadFormBody('', 'POST', $inputs, 'glamour'); }
/** * 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; }