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); }
/** * Returns user profile fileds search form * * @return string */ function web_UserSearchFieldsForm() { $fieldinputs = wf_TextInput('searchquery', 'Search by', '', true, '40'); $fieldinputs .= wf_RadioInput('searchtype', 'Real Name', 'realname', true, true); $fieldinputs .= wf_RadioInput('searchtype', 'Login', 'login', true); $fieldinputs .= wf_RadioInput('searchtype', 'Phone', 'phone', true); $fieldinputs .= wf_RadioInput('searchtype', 'Mobile', 'mobile', true); $fieldinputs .= wf_RadioInput('searchtype', 'Email', 'email', true); $fieldinputs .= wf_RadioInput('searchtype', 'Notes', 'note', true); $fieldinputs .= wf_RadioInput('searchtype', 'Contract', 'contract', true); $fieldinputs .= wf_RadioInput('searchtype', 'Payment ID', 'payid', true); $fieldinputs .= wf_RadioInput('searchtype', 'IP', 'ip', true); $fieldinputs .= wf_RadioInput('searchtype', 'MAC', 'mac', true); $fieldinputs .= wf_tag('br'); $fieldinputs .= wf_Submit('Search'); $form = wf_Form('', 'POST', $fieldinputs); return $form; }
/** * Returns user profile fileds search form * * @return string */ function web_UserSearchFieldsForm() { global $ubillingConfig; $altCf = $ubillingConfig->getAlter(); $fieldinputs = wf_TextInput('searchquery', 'Search by', '', true, '40'); $fieldinputs .= wf_RadioInput('searchtype', 'Real Name', 'realname', true, true); $fieldinputs .= wf_RadioInput('searchtype', 'Login', 'login', true); $fieldinputs .= wf_RadioInput('searchtype', 'Phone', 'phone', true); $fieldinputs .= wf_RadioInput('searchtype', 'Mobile', 'mobile', true); $fieldinputs .= wf_RadioInput('searchtype', 'Email', 'email', true); $fieldinputs .= wf_RadioInput('searchtype', 'Notes', 'note', true); $fieldinputs .= wf_RadioInput('searchtype', 'Contract', 'contract', true); $fieldinputs .= wf_RadioInput('searchtype', 'Payment ID', 'payid', true); $fieldinputs .= wf_RadioInput('searchtype', 'IP', 'ip', true); $fieldinputs .= wf_RadioInput('searchtype', 'MAC', 'mac', true); if ($altCf['SWITCHES_EXTENDED']) { $fieldinputs .= wf_RadioInput('searchtype', 'Switch ID', 'swid', true); } $fieldinputs .= wf_tag('br'); $fieldinputs .= wf_Submit('Search'); $form = wf_Form('', 'POST', $fieldinputs); return $form; }
/** * returns bank statement upload form * * @return string */ public function bankstaLoadForm() { $uploadinputs = wf_HiddenInput('uploadukvbanksta', 'true'); $uploadinputs .= __('Bank statement') . wf_tag('br'); $uploadinputs .= wf_tag('input', false, '', 'id="fileselector" type="file" name="ukvbanksta"') . wf_tag('br'); $uploadinputs .= __('Bankstatement type'); $uploadinputs .= wf_RadioInput('ukvbankstatype', __('Oschadbank'), 'oschad', false, true); $uploadinputs .= wf_RadioInput('ukvbankstatype', __('Oschadbank terminal'), 'oschadterm', false, false); $uploadinputs .= wf_RadioInput('ukvbankstatype', __('PrivatBank'), 'privatbankdbf', true, false); $uploadinputs .= wf_Submit('Upload'); $uploadform = bs_UploadFormBody('', 'POST', $uploadinputs, 'glamour'); return $uploadform; }
function web_TsmsMassendForm() { $tariffsRaw = zb_TariffsGetAll(); $alltariffs = array(); if (!empty($tariffsRaw)) { foreach ($tariffsRaw as $io => $each) { $alltariffs[$each['name']] = $each['name']; } } $inputs = wf_RadioInput('msendtype', __('Debtors with balance less then 0'), 'msenddebtors', true, true); $inputs .= wf_RadioInput('msendtype', __('Users who have money left for 5 days'), 'msendless5', true, false); $inputs .= wf_RadioInput('msendtype', __('Users who have zero balance'), 'msendzero', true, false); $inputs .= wf_RadioInput('msendtype', __('All users with mobile'), 'msendall', true, false); $inputs .= wf_RadioInput('msendtype', __('All users with tariff'), 'msendtariff', false, false); $inputs .= wf_Selector('msendtariffname', $alltariffs, '', '', true); $inputs .= wf_Submit(__('Search')); $result = wf_Form("", "POST", $inputs, 'glamour'); return $result; }
$default_profile = $profileObj->render(); show_window(__('User profile'), $default_profile); } else { //show controls if ($_GET['control'] == 'cash') { //group cash operations $allchildusers = cu_GetAllChildUsers($userlink); //cash add form construct $cashtypes = zb_CashGetAllCashTypes(); $cashinputs = wf_TextInput('newcash', 'New cash', '', true, 5); $cashinputs .= web_CashTypeSelector() . ' ' . __('Cash type'); $cashinputs .= '<br>'; $cashinputs .= wf_RadioInput('operation', 'Add cash', 'add', false, true); $cashinputs .= wf_RadioInput('operation', 'Correct saldo', 'correct', false, false); $cashinputs .= wf_RadioInput('operation', 'Mock payment', 'mock', false, false); $cashinputs .= wf_RadioInput('operation', 'Set cash', 'set', true, false); $cashinputs .= wf_TextInput('newpaymentnote', 'Payment note', '', true, 35); $cashinputs .= '<br>'; $cashinputs .= wf_Submit('Add cash'); $cashform = wf_Form('', 'POST', $cashinputs, 'glamour'); show_window(__('Add cash'), $cashform); show_window('', web_UserControls($parent_login)); //if someone adds cash if (wf_CheckPost(array('newcash'))) { $operation = vf($_POST['operation']); $cashtype = vf($_POST['cashtype']); $cash = $_POST['newcash']; if (isset($_POST['newpaymentnote'])) { $note = mysql_real_escape_string($_POST['newpaymentnote']); } //add cash to parent user
function catv_CashAddForm($userid) { $catvconf = catv_LoadConfig(); $userid = vf($userid, 3); $userdata = catv_UserGetData($userid); $usertariff = $userdata['tariff']; $tariffdata = catv_TariffGetData($usertariff); $tariffprice = $tariffdata['price']; $tariffname = $tariffdata['name']; $currentbalance = $userdata['cash']; $allmonth = months_array(); $localized_month = array(); $curyear = curyear(); $curmonth = date("m"); $curdatetime = curdatetime(); $alladdress = catv_UsersGetFullAddressList(); $realname = catv_UserGetData($userid); $realname = $realname['realname']; //rebuild months array foreach ($allmonth as $io => $eachmonth) { $localized_month[$io] = rcms_date_localise($eachmonth); } //build cash adding form $cells = wf_TableCell(__('Full address'), '', 'row2'); $cells .= wf_TableCell(@$alladdress[$userid], '', 'row3'); $rows = wf_TableRow($cells); $cells = wf_TableCell(__('Real name'), '', 'row2'); $cells .= wf_TableCell($realname, '', 'row3'); $rows .= wf_TableRow($cells); $cells = wf_TableCell(__('Balance'), '', 'row2'); $cells .= wf_TableCell($currentbalance, '', 'row3'); $rows .= wf_TableRow($cells); $cells = wf_TableCell(__('Current tariff'), '', 'row2'); $cells .= wf_TableCell($tariffname, '', 'row3'); $rows .= wf_TableRow($cells); $cells = wf_TableCell(__('Fee'), '', 'row2'); $cells .= wf_TableCell($tariffprice . ' ' . $catvconf['CURRENCY'], '', 'row3'); $rows .= wf_TableRow($cells); $cashinputs = wf_TableBody($rows, '650', '0', ''); $cashinputs .= wf_HiddenInput('createpayment', 'true'); $cashinputs .= wf_tag('div') . wf_TextInput('newpayment', 'Cash', '', true, '5') . wf_tag('div', true); $cashinputs .= wf_Selector('from_month', $localized_month, 'From month', $curmonth, false); $cashinputs .= wf_YearSelector('from_year', 'From year', true); //cash operation type $cashinputs .= wf_RadioInput('optype', __('Add cash'), 'add', false, true); $cashinputs .= wf_RadioInput('optype', __('Correct saldo'), 'corr', false, false); $cashinputs .= wf_RadioInput('optype', __('Mock payment'), 'mock', false, false); $cashinputs .= wf_RadioInput('optype', __('Set cash'), 'set', false, false); $cashinputs .= wf_delimiter(); $cashinputs .= wf_tag('hr'); $cashinputs .= __('You can also specify the following options if you wish') . '<br>'; $cashinputs .= wf_TextInput('date', 'Payment date', $curdatetime, true, 20); $cashinputs .= wf_Selector('to_month', $localized_month, 'To month', $curmonth, false); $cashinputs .= wf_YearSelector('to_year', 'To year', true); $cashinputs .= wf_TextInput('notes', 'Notes', '', true, 50); $cashinputs .= wf_Submit('Add'); $cashaddform = wf_Form('', 'POST', $cashinputs, 'glamour', ''); return $cashaddform; }
/** * Returns set of inputs, required for SMS-Fly service configuration * * @return string */ protected function renderSmsflyConfigInputs() { $inputs = wf_tag('h2') . __('SMS-Fly') . ' ' . wf_Link(self::URL_ME . '&showmisc=smsflybalance', wf_img_sized('skins/icon_dollar.gif', __('Balance'), '10', '10'), true) . wf_tag('h2', true); $inputs .= wf_TextInput('editsmsflygateway', __('SMS-Fly API address'), $this->settings['SMSFLY_GATEWAY'], true, 30); $inputs .= wf_TextInput('editsmsflylogin', __('User login to access SMS-Fly API'), $this->settings['SMSFLY_LOGIN'], true, 20); $inputs .= wf_TextInput('editsmsflypassword', __('User password for access SMS-Fly API'), $this->settings['SMSFLY_PASSWORD'], true, 20); $inputs .= wf_TextInput('editsmsflysign', __('SMS-Fly') . ' ' . __('Sign') . ' (' . __('Alphaname') . ')', $this->settings['SMSFLY_SIGN'], true, 20); $smsServiceFlag = $this->settings['SMS_SERVICE'] == 'smsfly' ? true : false; $inputs .= wf_RadioInput('defaultsmsservice', __('Use SMS-Fly as default SMS service'), 'smsfly', true, $smsServiceFlag); return $inputs; }
/** * Returns primary cash management form * * @global object $ubillingConfig * @param array $fieldnames * @param string $fieldkey * @param string $useraddress * @param string $olddata * @param float $tariff_price * @return string */ function web_EditorCashDataForm($fieldnames, $fieldkey, $useraddress, $olddata = '', $tariff_price = '') { global $ubillingConfig; $field1 = $fieldnames['fieldname1']; $field2 = $fieldnames['fieldname2']; //cash suspect checking $alterconf = $ubillingConfig->getAlter(); if ($alterconf['SUSP_PAYMENTS_NOTIFY']) { $suspnotifyscript = js_CashCheck($alterconf['SUSP_PAYMENTS_NOTIFY']); $cashfieldanchor = 'onchange="checkcashfield();"'; } else { $suspnotifyscript = ''; $cashfieldanchor = ''; } if ($alterconf['SETCASH_ONLY_ROOT']) { if (cfr('ROOT')) { $setCashControl = wf_RadioInput('operation', __('Set cash'), 'set', false, false); } else { $setCashControl = ''; } } else { $setCashControl = wf_RadioInput('operation', __('Set cash'), 'set', false, false); } $radio = wf_RadioInput('operation', __('Add cash'), 'add', false, true); $radio .= wf_RadioInput('operation', __('Correct saldo'), 'correct', false, false); $radio .= wf_RadioInput('operation', __('Mock payment'), 'mock', false, false); $radio .= $setCashControl; //cash input widget $cashInputControl = wf_tag('input', false, '', ' type="text" name="' . $fieldkey . '" size="5" id="cashfield" ' . $cashfieldanchor . ''); $cashInputControl .= ' ' . __('The expected payment') . ': ' . $tariff_price; $cells = wf_TableCell(__('User'), '', 'row2'); $cells .= wf_TableCell($useraddress, '', 'row3'); $rows = wf_TableRow($cells); $cells = wf_TableCell($field1, '', 'row2'); $cells .= wf_TableCell(wf_tag('b') . $olddata . wf_tag('b', true), '', 'row3'); $rows .= wf_TableRow($cells); $cells = wf_TableCell($field2, '', 'row2'); $cells .= wf_TableCell($cashInputControl, '', 'row3'); $rows .= wf_TableRow($cells); $cells = wf_TableCell(__('Actions'), '', 'row2'); $cells .= wf_TableCell($radio, '', 'row3'); $rows .= wf_TableRow($cells); $cells = wf_TableCell(__('Payment type'), '', 'row2'); $cells .= wf_TableCell(web_CashTypeSelector(), '', 'row3'); $rows .= wf_TableRow($cells); $cells = wf_TableCell(__('Payment notes'), '', 'row2'); $cells .= wf_TableCell(wf_TextInput('newpaymentnote', '', '', false, 40), '', 'row3'); $rows .= wf_TableRow($cells); $table = wf_TableBody($rows, '100%', 0, ''); $table .= wf_Submit(__('Payment')); $form = $suspnotifyscript; $form .= wf_Form('', 'POST', $table, ''); $form .= wf_delimiter(); return $form; }