Esempio n. 1
0
 function web_VserviceCashForm($login)
 {
     $currentvcash = zb_VserviceCashGet($login);
     $alladdr = zb_AddressGetFulladdresslist();
     $allrealnames = zb_UserGetAllRealnames();
     $form = '
         <form action="" method="POST">
         <table width="50%" border="0">
         <tr>
         <td  class="row2">' . __('Login') . '</td>
         <td  class="row3">' . $login . '</td>
         </tr>
         <tr>
         <td class="row2">' . __('Address') . '</td>
         <td class="row3">' . @$alladdr[$login] . '</td>
         </tr>
         <tr>
         <td class="row2">' . __('Real Name') . '</td>
         <td class="row3">' . @$allrealnames[$login] . '</td>
         </tr>
         <tr>
         <td class="row2">' . __('Current Cash state') . '</td>
         <td class="row3">' . $currentvcash . '</td>
         </tr>
         <tr>
         <td class="row2">' . __('New cash') . '</td>
         <td class="row3"><input name="newcash" size="5" type="text"></td>
         </tr>
         
         <tr>
         <td class="row2">' . __('Actions') . '</td>
         <td class="row3">
         <input name="operation" value="add" checked="checked" type="radio"> ' . __('Add cash') . '
         <input name="operation" value="set" type="radio"> ' . __('Set cash') . '
         </td>
         </tr>
         <tr>
         <td class="row2">' . __('Payment type') . '</td>
         <td class="row3">' . web_CashTypeSelector() . '</td>
         </tr>
          <tr>
         <td class="row2">' . __('Virtual services') . '</td>
         <td class="row3">' . web_VservicesSelector() . '</td>
         </tr>
         </table> 
         <input type="submit" value="' . __('Change') . '">
        </form>';
     return $form;
 }
Esempio n. 2
0
 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 .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . 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;
 }
Esempio n. 3
0
 show_window(__('Group operations'), $group_controls);
 show_window(__('Linked users'), web_UserArrayShower($childusers));
 //show parent user profile by default
 if (!isset($_GET['control'])) {
     $profileObj = new UserProfile($parent_login);
     $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']);
Esempio n. 4
0
/**
 * 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;
}