Esempio n. 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;
}
Esempio n. 2
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;
}