示例#1
0
                simple_update_field('switches', 'snmp', $_POST['editsnmp'], "WHERE `id`='" . $switchid . "'");
                simple_update_field('switches', 'geo', $_POST['editgeo'], "WHERE `id`='" . $switchid . "'");
                if ($_POST['editparentid'] != $switchid) {
                    simple_update_field('switches', 'parentid', $_POST['editparentid'], "WHERE `id`='" . $switchid . "'");
                }
                log_register('SWITCH CHANGE [' . $switchid . ']' . ' IP ' . $_POST['editip'] . " LOC `" . $_POST['editlocation'] . "`");
                rcms_redirect("?module=switches&edit=" . $switchid);
            } else {
                show_error(__('Access denied'));
            }
        }
        //render switch edit form
        show_window(__('Edit switch'), web_SwitchEditForm($switchid));
        //minimap container
        if ($altCfg['SWYMAP_ENABLED']) {
            if (!empty($switchdata['geo'])) {
                show_window(__('Mini-map'), wf_delimiter() . web_SwitchMiniMap($switchdata));
            }
        }
        //downlinks list
        web_SwitchDownlinksList($switchid);
        //additional comments engine
        if ($altCfg['ADCOMMENTS_ENABLED']) {
            $adcomments = new ADcomments('SWITCHES');
            show_window(__('Additional comments'), $adcomments->renderComments($switchid));
        }
        show_window('', wf_Link('?module=switches', 'Back', true, 'ubButton'));
    }
} else {
    show_error(__('Access denied'));
}
示例#2
0
<?php

if (cfr('NOTES')) {
    if (isset($_GET['username'])) {
        $login = vf($_GET['username']);
        // change notes if need
        if (isset($_POST['newnotes'])) {
            $notes = $_POST['newnotes'];
            zb_UserDeleteNotes($login);
            zb_UserCreateNotes($login, $notes);
            rcms_redirect("?module=notesedit&username=" . $login);
        }
        $current_notes = zb_UserGetnotes($login);
        $useraddress = zb_UserGetFullAddress($login) . ' (' . $login . ')';
        // Edit form construct
        $fieldnames = array('fieldname1' => __('Current notes'), 'fieldname2' => __('New notes'));
        $fieldkey = 'newnotes';
        $form = web_EditorStringDataForm($fieldnames, $fieldkey, $useraddress, $current_notes);
        show_window(__('Edit notes'), $form);
        //additional notes
        $altCfg = $ubillingConfig->getAlter();
        if ($altCfg['ADCOMMENTS_ENABLED']) {
            $adcomments = new ADcomments('USERNOTES');
            show_window(__('Additional comments'), $adcomments->renderComments($login));
        }
        //user controls here
        show_window('', web_UserControls($login));
    }
} else {
    show_error(__('You cant control this module'));
}
示例#3
0
                     rcms_redirect('?module=custmaps&edititem=' . $editItemId);
                 } else {
                     show_error(__('Permission denied'));
                 }
             }
             //show item edit form
             show_window(__('Edit'), $custmaps->itemEditForm($editItemId));
             //photostorage link
             if ($altCfg['PHOTOSTORAGE_ENABLED']) {
                 $imageControl = wf_Link('?module=photostorage&scope=CUSTMAPSITEMS&itemid=' . $editItemId . '&mode=list', wf_img('skins/photostorage.png') . ' ' . __('Upload images'), false, 'ubButton');
                 show_window('', $imageControl);
             }
             //additional comments
             if ($altCfg['ADCOMMENTS_ENABLED']) {
                 $adcomments = new ADcomments('CUSTMAPITEMS');
                 show_window(__('Additional comments'), $adcomments->renderComments($editItemId));
             }
         }
     } else {
         if (!wf_CheckGet(array('duplicates'))) {
             //render map items list
             show_window(__('Objects') . ': ' . $custmaps->mapGetName($_GET['showitems']), $custmaps->renderItemsList($_GET['showitems']));
         } else {
             //show duplicate map objects
             show_window(__('Show duplicates') . ': ' . $custmaps->mapGetName($_GET['showitems']), $custmaps->renderItemDuplicateList($_GET['showitems']));
         }
     }
 } else {
     $mapId = $_GET['showmap'];
     $placemarks = '';
     //additional centering and zoom
示例#4
0
                    $salary->jobEdit($_POST['editsalaryjobid'], $_POST['editsalaryemployeeid'], $_POST['editsalaryjobtypeid'], $_POST['editsalaryfactor'], $_POST['editsalaryoverprice'], $_POST['editsalarynotes']);
                    rcms_redirect($salary::URL_TS . $_GET['edittask']);
                }
                //salary job creation
                if (wf_CheckPost(array('newsalarytaskid', 'newsalaryemployeeid', 'newsalaryjobtypeid'))) {
                    $salary->createSalaryJob($_POST['newsalarytaskid'], $_POST['newsalaryemployeeid'], $_POST['newsalaryjobtypeid'], $_POST['newsalaryfactor'], $_POST['newsalaryoverprice'], $_POST['newsalarynotes']);
                    rcms_redirect($salary::URL_TS . $_GET['edittask']);
                }
            }
            //display task change form
            ts_TaskChangeForm($_GET['edittask']);
            //photostorage integration
            if ($altCfg['PHOTOSTORAGE_ENABLED']) {
                $photoStorage = new PhotoStorage('TASKMAN', $_GET['edittask']);
                $photostorageControl = wf_Link('?module=photostorage&scope=TASKMAN&mode=list&itemid=' . $_GET['edittask'], wf_img('skins/photostorage.png') . ' ' . __('Upload images'), false, 'ubButton');
                $photostorageControl .= wf_delimiter();
                $photosList = $photoStorage->renderImagesRaw();
                show_window(__('Photostorage'), $photostorageControl . $photosList);
            }
            //additional comments
            if ($altCfg['ADCOMMENTS_ENABLED']) {
                $adcomments = new ADcomments('TASKMAN');
                show_window(__('Additional comments'), $adcomments->renderComments($_GET['edittask']));
            }
        }
    } else {
        show_window(__('Typical problems'), ts_TaskProblemsEditForm());
    }
} else {
    show_error(__('Access denied'));
}
示例#5
0
 /**
  * Returns ONU edit form
  * 
  * @param int $onuId
  * 
  * @return string
  */
 public function onuEditForm($onuId)
 {
     $onuId = vf($onuId, 3);
     $result = '';
     if (isset($this->allOnu[$onuId])) {
         $messages = new UbillingMessageHelper();
         $models = array();
         if (!empty($this->allModelsData)) {
             foreach ($this->allModelsData as $io => $each) {
                 $models[$each['id']] = $each['modelname'];
             }
         }
         $inputs = wf_HiddenInput('editonu', $onuId);
         $inputs .= wf_Selector('editoltid', $this->allOltDevices, __('OLT device') . $this->sup, $this->allOnu[$onuId]['oltid'], true);
         $inputs .= wf_Selector('editonumodelid', $models, __('ONU model') . $this->sup, $this->allOnu[$onuId]['onumodelid'], true);
         $inputs .= wf_TextInput('editip', __('IP'), $this->allOnu[$onuId]['ip'], true, 20);
         $inputs .= wf_TextInput('editmac', __('MAC') . $this->sup . ' ' . $this->getSearchmacControl($this->allOnu[$onuId]['mac']), $this->allOnu[$onuId]['mac'], true, 20);
         $inputs .= wf_TextInput('editserial', __('Serial number'), $this->allOnu[$onuId]['serial'], true, 20);
         $inputs .= wf_TextInput('editlogin', __('Login'), $this->allOnu[$onuId]['login'], true, 20);
         $inputs .= wf_Submit(__('Save'));
         $result = wf_Form('', 'POST', $inputs, 'glamour');
         $result .= wf_CleanDiv();
         $result .= wf_delimiter();
         $result .= wf_Link('?module=ponizer', __('Back'), false, 'ubButton');
         if (!empty($this->allOnu[$onuId]['login'])) {
             $result .= wf_Link('?module=userprofile&username='******'login'], wf_img('skins/icon_user.gif') . ' ' . __('User profile'), false, 'ubButton');
         }
         $result .= wf_JSAlertStyled('?module=ponizer&deleteonu=' . $onuId, web_delete_icon() . ' ' . __('Delete'), $messages->getDeleteAlert(), 'ubButton');
     } else {
         $result = wf_tag('div', false, 'alert_error') . __('Strange exeption') . ': ONUID_NOT_EXISTS' . wf_tag('div', true);
     }
     //Signal history chart
     $result .= $this->onuSignalHistory($onuId);
     //additional comments handling
     if ($this->altCfg['ADCOMMENTS_ENABLED']) {
         $adcomments = new ADcomments('PONONU');
         $result .= wf_delimiter();
         $result .= wf_tag('h3') . __('Additional comments') . wf_tag('h3', true);
         $result .= $adcomments->renderComments($onuId);
     }
     return $result;
 }
示例#6
0
 /**
  * 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));
     }
 }
示例#7
0
 /**
  * Renders outcoming operation view interface
  * 
  * @param int $id
  * @return string
  */
 public function outcomingView($id)
 {
     $id = vf($id, 3);
     $result = '';
     if (isset($this->allOutcoming[$id])) {
         $operationData = $this->allOutcoming[$id];
         $cells = wf_TableCell(__('ID') . ' ' . $this->qrControl('out', $id), '30%', 'row2');
         $cells .= wf_TableCell($id);
         $rows = wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Date'), '30%', 'row2');
         $cells .= wf_TableCell($operationData['date']);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Destination'), '30%', 'row2');
         $cells .= wf_TableCell($this->outDests[$operationData['desttype']] . $this->outDestControl($operationData['desttype'], $operationData['destparam']));
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Category'), '30%', 'row2');
         $cells .= wf_TableCell(@$this->allCategories[$this->allItemTypes[$operationData['itemtypeid']]['categoryid']]);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Warehouse item type'), '30%', 'row2');
         $cells .= wf_TableCell(@$this->allItemTypeNames[$operationData['itemtypeid']]);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Count'), '30%', 'row2');
         $cells .= wf_TableCell($operationData['count'] . ' ' . $this->unitTypes[$this->allItemTypes[$operationData['itemtypeid']]['unit']]);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Price per unit'), '30%', 'row2');
         $cells .= wf_TableCell($operationData['price']);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Sum'), '30%', 'row2');
         $cells .= wf_TableCell($operationData['price'] * $operationData['count']);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Warehouse storage'), '30%', 'row2');
         $cells .= wf_TableCell($this->allStorages[$operationData['storageid']]);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Notes'), '30%', 'row2');
         $cells .= wf_TableCell($operationData['notes']);
         $rows .= wf_TableRow($cells, 'row3');
         $result .= wf_TableBody($rows, '100%', 0, 'wh_viewer');
         if ($this->altCfg['PHOTOSTORAGE_ENABLED']) {
             $photoStorage = new PhotoStorage(self::PHOTOSTORAGE_SCOPE, $operationData['itemtypeid']);
             $result .= $photoStorage->renderImagesRaw();
         }
     } else {
         $result = $this->messages->getStyledMessage(__('Strange exeption') . ' NO_EXISTING_OUTCOME_ID', 'error');
     }
     //ADcomments support
     if ($this->altCfg['ADCOMMENTS_ENABLED']) {
         $adcomments = new ADcomments('WAREHOUSEOUTCOME');
         $result .= wf_tag('h3') . __('Additional comments') . wf_tag('h3', true);
         $result .= $adcomments->renderComments($id);
     }
     return $result;
 }
示例#8
0
 /**
  * returns some existing user profile
  * 
  * @param int $userid existing user`s ID
  * 
  * @return string
  */
 public function userProfile($userid)
 {
     $userid = vf($userid, 3);
     if (isset($this->users[$userid])) {
         $userData = $this->users[$userid];
         $rows = '';
         //zero apt numbers as private builds
         if ($this->altCfg['ZERO_TOLERANCE']) {
             $apt = $userData['apt'] == '0' ? '' : '/' . $userData['apt'];
         } else {
             $apt = '/' . $userData['apt'];
         }
         //photostorage integration
         if ($this->altCfg['PHOTOSTORAGE_ENABLED']) {
             $photoControl = wf_Link(self::URL_PHOTOSTORAGE . $userid, wf_img_sized('skins/photostorage.png', __('Upload images'), '10'), false);
         } else {
             $photoControl = '';
         }
         //additional user comments
         if ($this->altCfg['ADCOMMENTS_ENABLED']) {
             $adcomments = new ADcomments('UKVUSERPROFILE');
         }
         //task creation control
         if ($this->altCfg['CREATETASK_IN_PROFILE']) {
             $shortAddress = $userData['street'] . ' ' . $userData['build'] . $apt;
             $taskForm = ts_TaskCreateFormUnified($shortAddress, $userData['mobile'], $userData['phone'], '');
             $taskControl = wf_modal(wf_img('skins/createtask.gif', __('Create task')), __('Create task'), $taskForm, '', '420', '500');
         } else {
             $taskControl = '';
         }
         $cells = wf_TableCell(__('Full address') . ' ' . $taskControl, '20%', 'row2');
         $cells .= wf_TableCell($userData['city'] . ' ' . $userData['street'] . ' ' . $userData['build'] . $apt);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Real Name') . ' ' . $photoControl, '20%', 'row2');
         $cells .= wf_TableCell($userData['realname']);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Phone'), '20%', 'row2');
         $cells .= wf_TableCell($userData['phone']);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Mobile'), '20%', 'row2');
         $cells .= wf_TableCell($userData['mobile']);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(wf_tag('b') . __('Contract') . wf_tag('b', true), '20%', 'row2');
         $cells .= wf_TableCell(wf_tag('b') . $userData['contract'] . wf_tag('b', true));
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Tariff'), '20%', 'row2');
         $cells .= wf_TableCell(@$this->tariffs[$userData['tariffid']]['tariffname']);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(wf_tag('b') . __('Cash') . wf_tag('b', true), '20%', 'row2');
         $cells .= wf_TableCell(wf_tag('b') . $userData['cash'] . wf_tag('b', true));
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Connected'), '20%', 'row2');
         $cells .= wf_TableCell(web_bool_led($userData['active']));
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('User contract date'), '20%', 'row2');
         $cells .= wf_TableCell($userData['regdate']);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Internet account'), '20%', 'row2');
         $inetLink = !empty($userData['inetlogin']) ? wf_Link(self::URL_INET_USER_PROFILE . $userData['inetlogin'], web_profile_icon() . ' ' . $userData['inetlogin'], false, '') : '';
         $cells .= wf_TableCell($inetLink);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Cable seal'), '20%', 'row2');
         $cells .= wf_TableCell($userData['cableseal']);
         $rows .= wf_TableRow($cells, 'row3');
         $cells = wf_TableCell(__('Notes'), '20%', 'row2');
         $cells .= wf_TableCell($userData['notes']);
         $rows .= wf_TableRow($cells, 'row3');
         $profileData = wf_TableBody($rows, '100%', 0, '');
         $profilePlugins = '';
         if (cfr('UKV')) {
             $profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modal(wf_img('skins/icon_orb_big.gif', __('User lifestory')), __('User lifestory'), $this->userLifeStoryForm($userid), '', '800', '600') . __('Details') . wf_tag('div', true);
         }
         if (cfr('UKVCASH')) {
             $profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modal(wf_img('skins/ukv/money.png', __('Cash')), __('Finance operations'), $this->userManualPaymentsForm($userid), '', '600', '250') . __('Cash') . wf_tag('div', true);
         }
         if (cfr('UKVREG')) {
             $profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modalAuto(wf_img('skins/ukv/useredit.png', __('Edit user')), __('Edit user'), $this->userEditForm($userid), '') . __('Edit') . wf_tag('div', true);
         }
         if (cfr('UKVSEAL')) {
             $profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modalAuto(wf_img('skins/ukv/cableseal.png', __('Cable seal')), __('Cable seal'), $this->userCableSealForm($userid), '') . __('Cable seal') . wf_tag('div', true);
         }
         if (cfr('UKVDEL')) {
             $profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modal(wf_img('skins/annihilation.gif', __('Deleting user')), __('Deleting user'), $this->userDeletionForm($userid), '', '800', '300') . __('Delete') . wf_tag('div', true);
         }
         //main view construction
         $profilecells = wf_tag('td', false, '', 'valign="top"') . $profileData . wf_tag('td', true);
         $profilerows = wf_TableRow($profilecells);
         $profilecells = wf_tag('td', false, '', 'width="128" valign="top"') . $profilePlugins . wf_tag('td', true);
         $profilerows .= wf_TableRow($profilecells);
         $result = wf_TableBody($profilerows, '100%', '0');
         $result .= $this->userPaymentsRender($userid);
         //additional user comments
         if ($this->altCfg['ADCOMMENTS_ENABLED']) {
             $result .= wf_tag('h3') . __('Additional comments') . wf_tag('h3', true);
             $result .= $adcomments->renderComments($userid);
         }
         return $result;
     } else {
         throw new Exception(self::EX_USER_NOT_EXISTS);
     }
 }