Пример #1
0
 /**
  * sets some custom template fields from post request
  * 
  * @return void
  */
 public function setCustomFields()
 {
     //ugly debug code
     $pdvPercent = $this->altcfg['DOCX_NDS'];
     if (wf_CheckPost(array('customfields'))) {
         $morph = new UBMorph();
         @($this->customFields['CUSTDATE'] = $_POST['customdate']);
         @($this->customFields['CUSTREALNAME'] = $_POST['customrealname']);
         @($this->customFields['CUSTPHONE'] = $_POST['customphone']);
         @($this->customFields['CUSTSERVICE'] = $_POST['customservice']);
         @($this->customFields['CUSTNOTES'] = $_POST['customnotes']);
         @($this->customFields['CUSTSUM'] = $_POST['customsum']);
         @($this->customFields['CUSTPHONE'] = $_POST['customphone']);
         @($pdv = $this->customFields['CUSTSUM'] / 100 * $pdvPercent);
         @($this->customFields['PDV'] = $pdv);
         @($this->customFields['CUSTSUMPDV'] = $this->customFields['CUSTSUM'] + $pdv);
         @($this->customFields['CUSTSUMPDVLIT'] = $morph->sum2str($this->customFields['CUSTSUMPDV']));
         @($this->customFields['CUSTSUMLIT'] = $morph->sum2str($this->customFields['CUSTSUM']));
         if ($this->altcfg['CORPS_ENABLED']) {
             //corporate user fields
             @($this->customFields['CORPNAME'] = $_POST['corpname']);
             @($this->customFields['CORPADDRESS'] = $_POST['corpaddress']);
             @($this->customFields['CORPDOCTYPE'] = $_POST['corpdoctype']);
             @($this->customFields['CORPDOCNUM'] = $_POST['corpdocnum']);
             @($this->customFields['CORPDOCDATE'] = $_POST['corpdocdate']);
             @($this->customFields['CORPBANKACC'] = $_POST['corpbankacc']);
             @($this->customFields['CORPBANKNAME'] = $_POST['corpbankname']);
             @($this->customFields['CORPBANKMFO'] = $_POST['corpbankmfo']);
             @($this->customFields['CORPEDRPOU'] = $_POST['corpedrpou']);
             @($this->customFields['CORPNDSTAXNUM'] = $_POST['corpndstaxnum']);
             @($this->customFields['CORPINNCODE'] = $_POST['corpinncode']);
             @($this->customFields['CORPTAXTYPE'] = $_POST['corptaxtype']);
             @($this->customFields['CORPNOTES'] = $_POST['corpnotes']);
         }
         if ($this->altcfg['NETWORKS_EXT']) {
             //extended network pools management
             $extNets = new ExtNets();
             @($this->customFields['NETWORKS_EXT'] = $extNets->poolTemplateData($this->userLogin));
         }
     }
 }
Пример #2
0
 /**
  * extended network pools controller
  * 
  * @return string
  */
 protected function getExtNetsControls()
 {
     $result = '';
     if ($this->alterCfg['NETWORKS_EXT']) {
         $extNets = new ExtNets();
         //pool linking controller
         if (wf_CheckPost(array('extnetspoollinkid', 'extnetspoollinklogin'))) {
             $extNets->poolLinkLogin($_POST['extnetspoollinkid'], $_POST['extnetspoollinklogin']);
             rcms_redirect('?module=userprofile&username='******'extnetspoollinklogin']);
         }
         $result = $extNets->poolsExtractByLogin($this->login);
         $result .= ' ' . wf_modal(wf_img('skins/icon_ip.gif'), __('IP associated with pool'), $extNets->poolLinkingForm($this->login), '', '500', '120');
     }
     return $result;
 }
Пример #3
0
<?php

$altcfg = $ubillingConfig->getAlter();
if ($altcfg['NETWORKS_EXT']) {
    if (cfr('MULTINET')) {
        $extNets = new ExtNets();
        /*
         * Extnets Pool Controller
         */
        if (!wf_CheckGet(array('showipsbypoolid'))) {
            show_window(__('Network available for allocation pools') . ' (' . __('Network type') . ' - other)', $extNets->renderNetworks());
        }
        //show available pools assigned by this network
        if (wf_CheckGet(array('showpoolbynetid'))) {
            //creating an new pool
            if (wf_CheckPost(array('newpool', 'newpoolnetid', 'newpoolnetmask'))) {
                $extNets->poolCreate($_POST['newpoolnetid'], $_POST['newpool'], $_POST['newpoolnetmask'], $_POST['newpoolvlan']);
                rcms_redirect("?module=extnets&showpoolbynetid=" . $_POST['newpoolnetid']);
            }
            //deleting pool
            if (wf_CheckGet(array('deletepoolid', 'showpoolbynetid'))) {
                $extNets->poolDelete($_GET['deletepoolid']);
                rcms_redirect("?module=extnets&showpoolbynetid=" . $_GET['showpoolbynetid']);
            }
            //editing pool
            if (wf_CheckPost(array('editpoolid', 'editpoolnetid'))) {
                $extNets->poolEdit($_POST['editpoolid'], $_POST['editpoolvlan'], $_POST['editpoollogin']);
                rcms_redirect("?module=extnets&showpoolbynetid=" . $_POST['editpoolnetid']);
            }
            $poolNetCidr = $extNets->getNetworkCidr($_GET['showpoolbynetid']);
            show_window(__('Extended address pools in') . ' ' . $poolNetCidr, $extNets->renderPools($_GET['showpoolbynetid']));