Example #1
0
/**
 * Returns wizard-like new user location form
 * 
 * @return string
 */
function web_UserRegFormLocation()
{
    $aptsel = '';
    $servicesel = '';
    if (!isset($_POST['citysel'])) {
        $citysel = web_CitySelectorAc();
        // onChange="this.form.submit();
        $streetsel = '';
    } else {
        $citydata = zb_AddressGetCityData($_POST['citysel']);
        $citysel = $citydata['cityname'] . wf_HiddenInput('citysel', $citydata['id']);
        $streetsel = web_StreetSelectorAc($citydata['id']);
    }
    if (isset($_POST['streetsel'])) {
        $streetdata = zb_AddressGetStreetData($_POST['streetsel']);
        $streetsel = $streetdata['streetname'] . wf_HiddenInput('streetsel', $streetdata['id']);
        $buildsel = web_BuildSelectorAc($_POST['streetsel']);
    } else {
        $buildsel = '';
    }
    if (isset($_POST['buildsel'])) {
        $submit_btn = '';
        $builddata = zb_AddressGetBuildData($_POST['buildsel']);
        $buildsel = $builddata['buildnum'] . wf_HiddenInput('buildsel', $builddata['id']);
        $aptsel = web_AddressBuildShowAptsCheck($builddata['id']) . web_AptCreateForm();
        $servicesel = multinet_service_selector();
        //contrahens user diff
        $alter_conf = rcms_parse_ini_file(CONFIG_PATH . "alter.ini");
        if (isset($alter_conf['LOGIN_GENERATION'])) {
            if ($alter_conf['LOGIN_GENERATION'] == 'DEREBAN') {
                $agentCells = wf_TableCell(zb_RegContrAhentSelect('regagent', $alter_conf['DEFAULT_ASSIGN_AGENT']));
                $agentCells .= wf_TableCell(__('Contrahent name'));
                $submit_btn .= wf_TableRow($agentCells, 'row2');
            }
        }
        $submit_btn .= wf_tag('tr', false, 'row3');
        $submit_btn .= wf_tag('td', false);
        $submit_btn .= wf_Submit(__('Save'));
        $submit_btn .= wf_tag('td', true);
        $submit_btn .= wf_tag('td', false);
        $submit_btn .= wf_tag('td', true);
        $submit_btn .= wf_tag('tr', true);
    } else {
        $submit_btn = '';
    }
    $formInputs = wf_tag('tr', false, 'row3');
    $formInputs .= wf_tag('td', false, '', 'width="50%"') . $citysel . wf_tag('td', true);
    $formInputs .= wf_tag('td', false) . __('City') . wf_tag('td', true);
    $formInputs .= wf_tag('tr', true);
    $formInputs .= wf_tag('tr', false, 'row3');
    $formInputs .= wf_tag('td', false) . $streetsel . wf_tag('td', true);
    $formInputs .= wf_tag('td', false) . __('Street') . wf_tag('td', true);
    $formInputs .= wf_tag('tr', true);
    $formInputs .= wf_tag('tr', false, 'row3');
    $formInputs .= wf_tag('td', false) . $buildsel . wf_tag('td', true);
    $formInputs .= wf_tag('td', false) . __('Build') . wf_tag('td', true);
    $formInputs .= wf_tag('tr', true);
    $formInputs .= wf_tag('tr', false, 'row3');
    $formInputs .= wf_tag('td', false) . $aptsel . wf_tag('td', true);
    $formInputs .= wf_tag('td', false) . __('Apartment') . wf_tag('td', true);
    $formInputs .= wf_tag('tr', true);
    $formInputs .= wf_tag('tr', false, 'row3');
    $formInputs .= wf_tag('td', false) . $servicesel . wf_tag('td', true);
    $formInputs .= wf_tag('td', false) . __('Service') . wf_tag('td', true);
    $formInputs .= wf_tag('tr', true);
    $formInputs .= wf_tag('br');
    $formInputs .= $submit_btn;
    $formData = wf_Form('', 'POST', $formInputs);
    $form = wf_TableBody($formData, '100%', '0', 'glamour');
    $form .= wf_tag('div', false, '', 'style="clear:both;"') . wf_tag('div', true);
    return $form;
}
Example #2
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;
}
Example #3
0
/**
 * Returns user occupancy form
 * 
 * @return string
 */
function web_AddressOccupancyForm()
{
    $inputs = '';
    if (!isset($_POST['citysel'])) {
        $inputs = __('City') . ' ' . web_CitySelectorAc();
    } else {
        $cityname = zb_AddressGetCityData($_POST['citysel']);
        $cityname = $cityname['cityname'];
        $inputs .= web_ok_icon() . ' ';
        $inputs .= wf_HiddenInput('citysel', $_POST['citysel']);
        $inputs .= $cityname . wf_tag('br');
        if (!isset($_POST['streetsel'])) {
            $inputs .= __('Street') . ' ' . web_StreetSelectorAc($_POST['citysel']);
        } else {
            $streetname = zb_AddressGetStreetData($_POST['streetsel']);
            $streetname = $streetname['streetname'];
            $inputs .= web_ok_icon() . ' ';
            $inputs .= wf_HiddenInput('streetsel', $_POST['streetsel']);
            $inputs .= $streetname . wf_tag('br');
            if (!isset($_POST['buildsel'])) {
                $inputs .= __('Build') . ' ' . web_BuildSelectorAc($_POST['streetsel']);
            } else {
                $buildnum = zb_AddressGetBuildData($_POST['buildsel']);
                $buildnum = $buildnum['buildnum'];
                $inputs .= web_ok_icon() . ' ';
                $inputs .= wf_HiddenInput('buildsel', $_POST['buildsel']);
                $inputs .= $buildnum . wf_tag('br');
                $inputs .= web_AddressBuildShowAptsCheck($_POST['buildsel']) . web_AptCreateForm();
                $inputs .= wf_Submit(__('Create'));
            }
        }
    }
    $form = wf_Form('', 'POST', $inputs, '');
    return $form;
}