コード例 #1
0
ファイル: api.usertags.php プロジェクト: l1ght13aby/Ubilling
/**
 * Render available tag types list with all needed controls
 * 
 * @return string
 */
function stg_show_tagtypes()
{
    $messages = new UbillingMessageHelper();
    $query = "SELECT * from `tagtypes` ORDER BY `id` ASC";
    $alltypes = simple_queryall($query);
    $cells = wf_TableCell(__('ID'));
    $cells .= wf_TableCell(__('Color'));
    $cells .= wf_TableCell(__('Priority'));
    $cells .= wf_TableCell(__('Text'));
    $cells .= wf_TableCell(__('Actions'));
    $rows = wf_TableRow($cells, 'row1');
    if (!empty($alltypes)) {
        foreach ($alltypes as $io => $eachtype) {
            $eachtagcolor = $eachtype['tagcolor'];
            $actions = wf_JSAlert('?module=usertags&delete=' . $eachtype['id'], web_delete_icon(), $messages->getDeleteAlert());
            $actions .= wf_JSAlert('?module=usertags&edit=' . $eachtype['id'], web_edit_icon(), $messages->getEditAlert());
            $cells = wf_TableCell($eachtype['id']);
            $cells .= wf_TableCell(wf_tag('font', false, '', 'color="' . $eachtagcolor . '"') . $eachtagcolor . wf_tag('font', true));
            $cells .= wf_TableCell($eachtype['tagsize']);
            $cells .= wf_TableCell($eachtype['tagname']);
            $cells .= wf_TableCell($actions);
            $rows .= wf_TableRow($cells, 'row3');
        }
    }
    $result = wf_TableBody($rows, '100%', 0, 'sortable');
    //construct adding form
    $inputs = wf_ColPicker('newcolor', __('Color'), '#' . rand(11, 99) . rand(11, 99) . rand(11, 99), false, '10');
    $inputs .= wf_TextInput('newtext', __('Text'), '', false, '15');
    $inputs .= web_priority_selector() . ' ';
    $inputs .= wf_HiddenInput('addnewtag', 'true');
    $inputs .= wf_Submit(__('Create'));
    $form = wf_Form("", 'POST', $inputs, 'glamour');
    $result .= $form;
    return $result;
}
コード例 #2
0
ファイル: index.php プロジェクト: l1ght13aby/Ubilling
 function web_AnnihilateFormShow($login)
 {
     $alladdress = zb_AddressGetFulladdresslist();
     $inputs = __('Be careful, this module permanently deletes user and all data associated with it. Opportunities to raise from the dead no longer.');
     $inputs .= wf_tag('br');
     $inputs .= __('To ensure that we have seen the seriousness of your intentions to enter the word сonfirm the field below.');
     $inputs .= wf_tag('br');
     $inputs .= wf_tag('input', false, '', 'type="text" name="confirmation" autocomplete="off"');
     $inputs .= wf_HiddenInput('anihilation', 'true');
     $inputs .= wf_delimiter();
     $inputs .= wf_Submit(__('I really want to stop suffering User'));
     $form = wf_Form('', 'POST', $inputs, 'glamour');
     show_window(__('Deleting user') . ' ' . @$alladdress[$login] . ' (' . $login . ')', $form);
 }
コード例 #3
0
ファイル: index.php プロジェクト: l1ght13aby/Ubilling
 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);
 }
コード例 #4
0
ファイル: index.php プロジェクト: nightflyza/Ubilling
 /**
  * Returns FDB cache lister MAC filters setup form
  * 
  * @return string
  */
 function web_FDBTableFiltersForm()
 {
     $currentFilters = '';
     $oldFilters = zb_StorageGet('FDBCACHEMACFILTERS');
     if (!empty($oldFilters)) {
         $currentFilters = base64_decode($oldFilters);
     }
     $inputs = __('One MAC address per line') . wf_tag('br');
     $inputs .= wf_TextArea('newmacfilters', '', $currentFilters, true, '40x10');
     $inputs .= wf_HiddenInput('setmacfilters', 'true');
     $inputs .= wf_CheckInput('deletemacfilters', __('Cleanup'), true, false);
     $inputs .= wf_Submit(__('Save'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
コード例 #5
0
ファイル: api.loginform.php プロジェクト: l1ght13aby/Ubilling
 /**
  * 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);
     }
 }
コード例 #6
0
ファイル: api.radius.php プロジェクト: l1ght13aby/Ubilling
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);
    }
}
コード例 #7
0
 /**
  * Returns comment edit form
  * 
  * @param int $commentid existing database comment ID
  * @return string
  */
 protected function commentEditForm($commentid)
 {
     $result = '';
     if (isset($this->data[$commentid])) {
         $inputs = wf_HiddenInput('adcommentsmodifyid', $commentid);
         $inputs .= wf_TextArea('adcommentsmodifytext', '', $this->data[$commentid]['text'], true, '60x10');
         $inputs .= wf_Submit(__('Save'));
         $result = wf_Form('', 'POST', $inputs, 'glamour');
     }
     return $result;
 }
コード例 #8
0
ファイル: api.switches.php プロジェクト: carriercomm/Ubilling
/**
 * 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;
}
コード例 #9
0
ファイル: api.condet.php プロジェクト: nightflyza/Ubilling
 /**
  * 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;
 }
コード例 #10
0
 /**
  * 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);
 }
コード例 #11
0
ファイル: api.dshaper.php プロジェクト: l1ght13aby/Ubilling
 /**
  * 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;
 }
コード例 #12
0
ファイル: api.cf.php プロジェクト: l1ght13aby/Ubilling
/**
 * 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;
}
コード例 #13
0
ファイル: index.php プロジェクト: l1ght13aby/Ubilling
 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'));
     }
 }
コード例 #14
0
ファイル: api.address.php プロジェクト: l1ght13aby/Ubilling
 /**
  * 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;
 }
コード例 #15
0
ファイル: api.cemetery.php プロジェクト: l1ght13aby/Ubilling
 /**
  * Renders full cemetary log for some user
  * 
  * @param string $login
  * 
  * @return string
  */
 public function renderCemeteryLog($login)
 {
     $result = '';
     if (!empty($this->allDead)) {
         $cells = wf_TableCell(__('Date'));
         $cells .= wf_TableCell(__('Status'));
         $rows = wf_TableRow($cells, 'row1');
         foreach ($this->allDead as $io => $each) {
             if ($each['login'] == $login) {
                 $led = $each['state'] ? web_bool_led(0) : web_bool_led(1);
                 $cells = wf_TableCell($each['date']);
                 $cells .= wf_TableCell($led);
                 $rows .= wf_TableRow($cells, 'row3');
             }
         }
         $result = wf_TableBody($rows, '100%', 0, 'sortable');
         if (cfr('USERREG')) {
             if ($this->isUserDead($login)) {
                 $inputs = wf_HiddenInput('cemeterysetasundead', $login);
                 $inputs .= wf_Submit(__('Set user connected'));
                 $result .= wf_Form('', 'POST', $inputs, 'glamour');
             } else {
                 $inputs = wf_HiddenInput('cemeterysetasdead', $login);
                 $inputs .= wf_Submit(__('Set user disconnected'));
                 $result .= wf_Form('', 'POST', $inputs, 'glamour');
             }
         }
     }
     return $result;
 }
コード例 #16
0
ファイル: api.crm.php プロジェクト: l1ght13aby/Ubilling
/**
 * Shows user register form of express card 
 * 
 * 
 * @return string
 */
function web_ExpressCardRegForm()
{
    $altconf = rcms_parse_ini_file(CONFIG_PATH . "alter.ini");
    $allcontracts = zb_UserGetAllContracts();
    //contract proposal
    $top_offset = 100000;
    //contract generation mode default
    if ($altconf['CONTRACT_GENERATION_DEFAULT']) {
        for ($i = 1; $i < $top_offset; $i++) {
            if (!isset($allcontracts[$i])) {
                $contract = $i;
                break;
            }
        }
    } else {
        //alternate generation method
        $max_contract = max(array_keys($allcontracts));
        $contract = $max_contract + 1;
    }
    $mac = '14:' . '88' . ':' . rand(10, 99) . ':' . rand(10, 99) . ':' . rand(10, 99) . ':' . rand(10, 99);
    $phone = '';
    $mobile = '';
    $email = '';
    $notes = '';
    $stgdata = '';
    $currenttariff = '';
    $birthdate = '';
    $passportnum = '';
    $passportdate = '';
    $passportwho = '';
    $pcity = '';
    $pstreet = '';
    $pbuild = '';
    $papt = '';
    $inputs = zb_AjaxLoader() . wf_delimiter();
    $inputs .= __('Contract');
    $inputs .= wf_TextInput('newcontract', '', $contract, false, '10');
    $inputs .= __('Contract date');
    $inputs .= wf_DatePickerPreset('newcontractdate', @$allcontractdates[$contract]);
    $inputs .= wf_delimiter();
    $inputs .= __('Surname');
    $inputs .= wf_TextInput('newsurname', '', '', false, '20');
    $inputs .= __('Name');
    $inputs .= wf_TextInput('newname', '', '', false, '20');
    $inputs .= __('Patronymic');
    $inputs .= wf_TextInput('newpatronymic', '', '', false, '20');
    $inputs .= __('Birth date');
    $inputs .= wf_DatePickerPreset('newbirthdate', $birthdate);
    $inputs .= wf_delimiter();
    $inputs .= __('Passport number');
    $inputs .= wf_TextInput('newpassportnum', '', $passportnum, false, '30');
    $inputs .= __('Date of issue');
    $inputs .= wf_DatePickerPreset('newpassportdate', $passportdate);
    $inputs .= __('Issuing authority');
    $inputs .= wf_TextInput('newpassportwho', '', $passportwho, false, '40');
    $inputs .= wf_delimiter();
    $inputs .= __('Phone');
    $inputs .= wf_TextInput('newphone', '', $phone, false, '20');
    $inputs .= __('Mobile');
    $inputs .= wf_TextInput('newmobile', '', $mobile, false, '20');
    $inputs .= __('email');
    $inputs .= wf_TextInput('newemail', '', $email, false, '20');
    $inputs .= wf_delimiter();
    $inputs .= wf_tag('fieldset');
    //address data form
    $inputs .= __('Address of service') . ' ';
    //new address creation form
    $inputs .= web_ExpressAddressOccupancyForm();
    $inputs .= wf_delimiter();
    //additional address fields
    $inputs .= __('Registration address') . ' ';
    $inputs .= zb_JSHider();
    $inputs .= web_PaddressUnhideBox();
    $inputs .= web_HidingDiv('paddress');
    $inputs .= __('City');
    $inputs .= wf_TextInput('newpcity', '', $pcity, false, '20');
    $inputs .= __('Street');
    $inputs .= wf_TextInput('newpstreet', '', $pstreet, false, '20');
    $inputs .= __('Build');
    $inputs .= wf_TextInput('newpbuild', '', $pbuild, false, '5');
    $inputs .= __('Apartment');
    $inputs .= wf_TextInput('newpapt', '', $papt, false, '5');
    $inputs .= wf_tag('div', true);
    $inputs .= wf_tag('fieldset', true);
    $inputs .= wf_delimiter();
    $inputs .= __('Tariff');
    $inputs .= web_ExpressTariffSelector('newtariff', $currenttariff);
    $inputs .= __('Service');
    $inputs .= web_ExpressServiceSelectorReg();
    $inputs .= __('IP');
    $inputs .= wf_tag('span', false, '', 'id="dipbox"');
    $allservices = multinet_get_services();
    if (!empty($allservices)) {
        $firstService = $allservices[0];
        $firstNet = $firstService['netid'];
        @($ip_proposal = multinet_get_next_freeip('nethosts', 'ip', $firstNet));
        if (empty($ip_proposal)) {
            show_window('', wf_modalOpened(__('Error'), __('No free IP available in selected pool'), '400', '250'));
        }
    } else {
        $ip_proposal = __('Error');
    }
    $inputs .= wf_TextInput('editip', '', $ip_proposal, false, '20');
    $inputs .= wf_tag('span', true);
    //dummy login proposal
    $login = zb_RegLoginProposal('', '', '', '', $ip_proposal);
    $inputs .= __('MAC');
    $inputs .= wf_TextInput('newmac', '', $mac, false, '20');
    $inputs .= __('Login');
    $inputs .= wf_TextInput('newlogin', '', $login, false, '20');
    $inputs .= wf_delimiter();
    $inputs .= __('Notes');
    $inputs .= wf_TextInput('newnotes', '', $notes, false, '120');
    $inputs .= wf_HiddenInput('expresscardreg', 'true');
    $inputs .= wf_delimiter();
    $inputs .= wf_Submit('Let register that user');
    $expresscardform = wf_Form("", "POST", $inputs, 'expresscard');
    show_window(__('Express card user register'), $expresscardform);
}
コード例 #17
0
/**
 * Returns user full address search form
 * 
 * @return string
 */
function web_UserSearchAddressForm()
{
    $form = wf_tag('form', false, '', 'action="" method="POST"');
    $form .= wf_tag('table', false, '', 'width="100%" border="0"');
    if (!isset($_POST['citysel'])) {
        $cells = wf_TableCell(__('City'), '40%');
        $cells .= wf_TableCell(web_CitySelectorAc());
        $form .= wf_TableRow($cells, 'row3');
    } else {
        // if city selected
        $cityname = zb_AddressGetCityData($_POST['citysel']);
        $cityname = $cityname['cityname'];
        $cells = wf_TableCell(__('City'), '40%');
        $cells .= wf_TableCell(web_ok_icon() . ' ' . $cityname . wf_HiddenInput('citysel', $_POST['citysel']));
        $form .= wf_TableRow($cells, 'row3');
        if (!isset($_POST['streetsel'])) {
            $cells = wf_TableCell(__('Street'), '40%');
            $cells .= wf_TableCell(web_StreetSelectorAc($_POST['citysel']));
            $form .= wf_TableRow($cells, 'row3');
        } else {
            // if street selected
            $streetname = zb_AddressGetStreetData($_POST['streetsel']);
            $streetname = $streetname['streetname'];
            $cells = wf_TableCell(__('Street'), '40%');
            $cells .= wf_TableCell(web_ok_icon() . ' ' . $streetname . wf_HiddenInput('streetsel', $_POST['streetsel']));
            $form .= wf_TableRow($cells, 'row3');
            if (!isset($_POST['buildsel'])) {
                $cells = wf_TableCell(__('Build'), '40%');
                $cells .= wf_TableCell(web_BuildSelectorAc($_POST['streetsel']));
                $form .= wf_TableRow($cells, 'row3');
            } else {
                //if build selected
                $buildnum = zb_AddressGetBuildData($_POST['buildsel']);
                $buildnum = $buildnum['buildnum'];
                $cells = wf_TableCell(__('Build'), '40%');
                $cells .= wf_TableCell(web_ok_icon() . ' ' . $buildnum . wf_HiddenInput('buildsel', $_POST['buildsel']));
                $form .= wf_TableRow($cells, 'row3');
                if (!isset($_POST['aptsel'])) {
                    $cells = wf_TableCell(__('Apartment'), '40%');
                    $cells .= wf_TableCell(web_AptSelectorAc($_POST['buildsel']));
                    $form .= wf_TableRow($cells, 'row3');
                } else {
                    //if apt selected
                    $aptnum = zb_AddressGetAptDataById($_POST['aptsel']);
                    $aptnum = $aptnum['apt'];
                    $cells = wf_TableCell(__('Apartment'), '40%');
                    $cells .= wf_TableCell(web_ok_icon() . ' ' . $aptnum . wf_HiddenInput('aptsel', $_POST['aptsel']));
                    $form .= wf_TableRow($cells, 'row3');
                    $cells = wf_TableCell(wf_HiddenInput('aptsearch', $_POST['aptsel']));
                    $cells .= wf_TableCell(wf_Submit(__('Find')));
                    $form .= wf_TableRow($cells, 'row3');
                }
            }
        }
    }
    $form .= wf_tag('table', true);
    $form .= wf_tag('form', true);
    return $form;
}
コード例 #18
0
ファイル: api.ubim.php プロジェクト: nightflyza/Ubilling
/**
 * Return conversation form for some thread
 * 
 * @param string $to - thread username 
 * 
 * @return string
 */
function im_ConversationForm($to)
{
    $inputs = wf_HiddenInput('im_message_to', $to);
    $inputs .= wf_TextArea('im_message_text', '', '', true, '60x4');
    $inputs .= wf_Submit('Send message');
    $result = wf_Form("", 'POST', $inputs, 'glamour');
    return $result;
}
コード例 #19
0
ファイル: api.custmaps.php プロジェクト: l1ght13aby/Ubilling
 /**
  * Returns custom map editing form
  * 
  * @param int $id
  * 
  * @return string
  */
 protected function mapEditForm($id)
 {
     $inputs = wf_TextInput('editmapname', __('Name'), $this->allMaps[$id]['name'], true, '30');
     $inputs .= wf_HiddenInput('editmapid', $id);
     $inputs .= wf_Submit(__('Create'));
     $result = wf_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
コード例 #20
0
ファイル: api.ticketing.php プロジェクト: l1ght13aby/Ubilling
/**
 * Returns reply edit form
 * 
 * @param int $replyid
 * 
 * @return string
 */
function web_TicketReplyEditForm($replyid)
{
    $replyid = vf($replyid, 3);
    $ticketdata = zb_TicketGetData($replyid);
    $replytext = $ticketdata['text'];
    $inputs = wf_HiddenInput('editreply', $replyid);
    $inputs .= wf_TextArea('editreplytext', '', $replytext, true, '60x10');
    $inputs .= wf_Submit('Save');
    $form = wf_Form('', 'POST', $inputs, 'glamour');
    return $form;
}
コード例 #21
0
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);
}
コード例 #22
0
 /**
  * Formats existing menu data into printable HTML code as personalization form
  * 
  * @return string
  */
 public function getEditForm()
 {
     $result = '';
     $tmpArr = array();
     if (!empty($this->categories)) {
         if (!empty($this->rawData)) {
             foreach ($this->rawData as $io => $each) {
                 //table headers
                 if (!isset($tmpArr[$each['CATEGORY']])) {
                     $formCells = wf_TableCell(__('Module'), '50%');
                     $formCells .= wf_TableCell(__('Hidden'));
                     $formCells .= wf_TableCell(__('Fast access'));
                     $formRows = wf_TableRow($formCells, 'row1');
                     $tmpArr[$each['CATEGORY']] = $formRows;
                 }
                 //table rows
                 $icon = !empty($each['ICON']) ? $each['ICON'] : self::DEFAULT_ICON;
                 $icon = $this->iconsPath . $icon;
                 $name = __($each['NAME']);
                 $checkRight = !empty($each['NEED_RIGHT']) ? cfr($each['NEED_RIGHT']) : true;
                 $checkOption = !empty($each['NEED_OPTION']) ? @$this->altCfg[$each['NEED_OPTION']] : true;
                 if ($checkRight and $checkOption) {
                     $formCells = wf_TableCell(wf_Link($each['URL'], wf_img($icon) . ' ' . $name, false));
                     $disabledFlag = isset($this->disabled[$io]) ? true : false;
                     $formCells .= wf_TableCell(wf_CheckInput('_glmdisabled[' . $io . ']', '', false, $disabledFlag));
                     $fastAccessFlag = isset($this->fastAccess[$io]) ? true : false;
                     $formCells .= wf_TableCell(wf_CheckInput('_glmfastacc[' . $io . ']', '', false, $fastAccessFlag));
                     $formRows = wf_TableRow($formCells, 'row3');
                     $tmpArr[$each['CATEGORY']] .= $formRows;
                 }
             }
         }
         foreach ($this->categories as $eachCategoryName => $eachCategoryId) {
             $result .= wf_tag('h3', false) . __($eachCategoryName) . wf_tag('h3', true);
             $result .= wf_TableBody($tmpArr[$eachCategoryId], '100%', 0, '');
         }
     }
     if (!empty($result)) {
         $result .= wf_HiddenInput('glcustomconfedit', 'true');
         $result .= wf_tag('br');
         $result .= wf_Submit(__('Save'));
         $result = wf_Form('', 'POST', $result, '');
     }
     return $result;
 }
コード例 #23
0
 /**
  * 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;
 }
コード例 #24
0
ファイル: index.php プロジェクト: syscenter/ubilling-sms
 function web_TsmsMassendConfirm($userarray)
 {
     global $td_users, $td_mobiles, $td_realnames, $td_realnamestrans, $td_tariffprices, $td_alladdress;
     global $ubillingConfig;
     $altCfg = $ubillingConfig->getAlter();
     $template = tsms_GetTemplate();
     $excludeUsers = tsms_GetExcludeUsers();
     $excludeArr = array();
     //ignoring DEAD_TAGID users
     if ($altCfg['CEMETERY_ENABLED']) {
         $cemetery = new Cemetery();
         $excludeCemetery = $cemetery->getAllTagged();
         if (!empty($excludeCemetery)) {
             foreach ($excludeCemetery as $eecl => $eecld) {
                 $excludeUsers[$eecl] = 'NOP';
             }
         }
     }
     $cells = wf_TableCell(__('Login'));
     $cells .= wf_TableCell(__('Address'));
     $cells .= wf_TableCell(__('Real Name'));
     $cells .= wf_TableCell(__('SMS'));
     $cells .= wf_TableCell(__('Mobile'));
     $cells .= wf_TableCell(__('Tariff'));
     $cells .= wf_TableCell(__('Balance'));
     $cells .= wf_TableCell(__('Credit'));
     $rows = wf_TableRow($cells, 'row1');
     if (!empty($userarray)) {
         //excluded users handling
         if (!empty($excludeUsers)) {
             $excludeResult = wf_tag('h3') . __('Next users will be ignored while SMS sending') . wf_tag('h3', true);
             foreach ($excludeUsers as $excludeLogin => $nop) {
                 unset($userarray[$excludeLogin]);
                 $excludeArr[$excludeLogin] = $excludeLogin;
             }
         } else {
             $excludeResult = '';
         }
         foreach ($userarray as $login => $phone) {
             $message = tsms_ParseTemplate($login, $template);
             $smsContainer = wf_modal(__('Show'), __('SMS'), $message, '', '300', '200');
             $cells = wf_TableCell(wf_Link("?module=userprofile&username="******"", 'POST', $inputs, 'glamour');
     $result = $confirmForm;
     $result .= wf_TableBody($rows, '100%', '0', 'sortable');
     //showing which users will be excluded
     if (!empty($excludeUsers)) {
         $result .= $excludeResult;
         $result .= web_UserArrayShower($excludeArr);
     }
     return $result;
 }
コード例 #25
0
ファイル: api.teskman.php プロジェクト: carriercomm/Ubilling
/**
 * 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;
}
コード例 #26
0
ファイル: api.deploy.php プロジェクト: l1ght13aby/Ubilling
function zb_LicenseLister()
{
    $avarice = new Avarice();
    $all = $avarice->getLicenseKeys();
    $cells = wf_TableCell(__('Module'));
    $cells .= wf_TableCell(__('Actions'));
    $rows = wf_TableRow($cells, 'row1');
    if (!empty($all)) {
        foreach ($all as $io => $each) {
            //construct edit form
            $editinputs = wf_HiddenInput('editdbkey', $each['KEY']);
            $editinputs .= wf_TextArea('editlicense', '', $each['LICENSE'], true, '50x10');
            $editinputs .= wf_Submit(__('Save'));
            $editform = wf_Form("", 'POST', $editinputs, 'glamour');
            $editcontrol = wf_modal(web_edit_icon(), __('Edit'), $editform, '', '500', '300');
            //construct deletion controls
            $deletecontrol = wf_JSAlert('?module=licensekeys&licensedelete=' . $each['KEY'], web_delete_icon(), __('Removing this may lead to irreparable results'));
            $cells = wf_TableCell($each['MODULE']);
            $cells .= wf_TableCell($deletecontrol . ' ' . $editcontrol);
            $rows .= wf_TableRow($cells, 'row3');
        }
    }
    //constructing license creation form
    $addinputs = wf_TextArea('createlicense', '', '', true, '50x10');
    $addinputs .= wf_Submit(__('Add'));
    $addform = wf_Form("", 'POST', $addinputs, 'glamour');
    $addcontrol = wf_modal(wf_img('skins/icon_add.gif', __('Add')) . ' ' . __('Add'), __('Add'), $addform, 'ubButton', '500', '300');
    $result = wf_TableBody($rows, '100%', 0, '');
    $result .= $addcontrol;
    show_window(__('Installed license keys'), $result);
}
コード例 #27
0
ファイル: api.ukv.php プロジェクト: l1ght13aby/Ubilling
 /**
  * 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;
 }
コード例 #28
0
ファイル: index.php プロジェクト: nightflyza/Ubilling
 /**
  * Returns nethost option modify form
  * 
  * @param $allLeases - all available leases parsed from log
  * @param $login - user`s  login 
  * 
  * @return string
  */
 function web_opt82_ShowForm($allLeases, $login)
 {
     $result = '';
     $currentData = opt82_GetCurrentOptions($login);
     $cells = wf_TableCell(__('IP'));
     $cells .= wf_TableCell($currentData['hostip']);
     $rows = wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Remote-ID'));
     $cells .= wf_TableCell($currentData['remoteid']);
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Circuit-ID'));
     $cells .= wf_TableCell($currentData['circuitid']);
     $rows .= wf_TableRow($cells, 'row3');
     $currentTable = wf_TableBody($rows, '30%', '0', '');
     $result .= $currentTable;
     $result .= wf_delimiter();
     $inputs = wf_Selector('newopt82', $allLeases, __('New DHCP option 82'), '', true);
     $inputs .= wf_HiddenInput('edithostid', $currentData['hostid']);
     $inputs .= wf_HiddenInput('edithostip', $currentData['hostip']);
     $inputs .= wf_CheckInput('setrandomopt82', __('Set random'), true, false);
     $inputs .= wf_Submit(__('Save'));
     $form = wf_Form('', 'POST', $inputs, 'glamour');
     $result .= $form;
     $result .= wf_delimiter();
     $result .= web_UserControls($login);
     return $result;
 }
コード例 #29
0
ファイル: index.php プロジェクト: l1ght13aby/Ubilling
 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');
 }
コード例 #30
0
ファイル: index.php プロジェクト: l1ght13aby/Ubilling
 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;
 }