/** * shows selected signup request by its ID * * @param int $requid Existing signup request ID * * @return void */ public function showRequest($reqid) { $requid = vf($reqid, 3); $reqdata = $this->getData($reqid); if (empty($reqdata['apt'])) { $apt = 0; } else { $apt = $reqdata['apt']; } $shortaddress = $reqdata['street'] . ' ' . $reqdata['build'] . '/' . $apt; $taskCreateControls = wf_modal(wf_img('skins/createtask.gif', __('Create task')), __('Create task'), ts_TaskCreateFormSigreq($shortaddress, $reqdata['phone']), '', '420', '500'); $cells = wf_TableCell(__('Date')); $cells .= wf_TableCell($reqdata['date'] . ' ' . $taskCreateControls); $rows = wf_TableRow($cells, 'row3'); $whoislink = self::URL_WHOIS . $reqdata['ip']; $iplookup = wf_Link($whoislink, $reqdata['ip'], false, ''); $cells = wf_TableCell(__('IP')); $cells .= wf_TableCell($iplookup); $rows .= wf_TableRow($cells, 'row3'); $reqAddress = $reqdata['street'] . ' ' . $reqdata['build'] . '/' . $apt; //Construct capability create form if enabled if ($this->altcfg['CAPABDIR_ENABLED']) { $capabDir = new CapabilitiesDirectory(true); $capabCreateForm = $capabDir->createForm($reqAddress, $reqdata['phone'], $reqdata['service'] . ' ' . $reqdata['notes']); $capabControl = wf_modal(wf_img_sized('skins/icon_cake.png', __('Available connection capabilities'), 10), __('Create connection capability'), $capabCreateForm, '', '400', '300'); } else { $capabControl = ''; } $cells = wf_TableCell(__('Full address')); $cells .= wf_TableCell($reqAddress . ' ' . $capabControl); $rows .= wf_TableRow($cells, 'row3'); $cells = wf_TableCell(__('Real Name')); $cells .= wf_TableCell($reqdata['realname']); $rows .= wf_TableRow($cells, 'row3'); $cells = wf_TableCell(__('Phone')); $cells .= wf_TableCell($reqdata['phone']); $rows .= wf_TableRow($cells, 'row3'); $cells = wf_TableCell(__('Service')); $cells .= wf_TableCell($reqdata['service']); $rows .= wf_TableRow($cells, 'row3'); $cells = wf_TableCell(__('Processed')); $cells .= wf_TableCell(web_bool_led($reqdata['state'])); $rows .= wf_TableRow($cells, 'row3'); $cells = wf_TableCell(__('Notes')); $notes = nl2br($reqdata['notes']); $notes = str_replace('Tariff:', __('Tariff') . ':', $notes); $notes = str_replace('Email:', __('Email') . ':', $notes); $cells .= wf_TableCell($notes); $rows .= wf_TableRow($cells, 'row3'); $result = wf_TableBody($rows, '100%', '0', 'glamour'); $actlinks = wf_Link('?module=sigreq', __('Back'), false, 'ubButton'); if ($reqdata['state'] == 0) { $actlinks .= wf_Link('?module=sigreq&reqdone=' . $reqid, wf_img_sized('skins/icon_active.gif', '', '10') . ' ' . __('Close'), false, 'ubButton'); } else { $actlinks .= wf_Link('?module=sigreq&requndone=' . $reqid, wf_img_sized('skins/icon_inactive.gif', '', '10') . ' ' . __('Open'), false, 'ubButton'); } $deletelink = ' ' . wf_JSAlert("?module=sigreq&deletereq=" . $reqid, web_delete_icon(), 'Are you serious'); show_window(__('Signup request') . ': ' . $reqid . $deletelink, $result); show_window('', $actlinks); //additional comments if ($this->altcfg['ADCOMMENTS_ENABLED']) { $adcomments = new ADcomments('SIGREQ'); show_window(__('Additional comments'), $adcomments->renderComments($requid)); } }
<?php if (cfr('CAPAB')) { $altercfg = rcms_parse_ini_file(CONFIG_PATH . "alter.ini"); if ($altercfg['CAPABDIR_ENABLED']) { $capabilities = new CapabilitiesDirectory(); //process deletion if (wf_CheckGet(array('delete'))) { if (cfr('ROOT')) { $capabilities->deleteCapability($_GET['delete']); rcms_redirect("?module=capabilities"); } else { show_error(__('Permission denied')); } } //process creation if (wf_CheckPost(array('newaddress', 'newphone'))) { $newaddress = $_POST['newaddress']; $newphone = $_POST['newphone']; @($newnotes = $_POST['newnotes']); $capabilities->addCapability($newaddress, $newphone, $newnotes); rcms_redirect("?module=capabilities"); } //show editing form if (wf_CheckGet(array('edit'))) { //editing processing if (wf_CheckPost(array('editaddress', 'editphone'))) { $capabilities->editCapability($_GET['edit'], $_POST['editaddress'], $_POST['editphone'], $_POST['editstateid'], @$_POST['editnotes'], @$_POST['editprice'], $_POST['editemployeeid']); rcms_redirect("?module=capabilities"); } show_window(__('Edit'), $capabilities->editForm($_GET['edit']));