예제 #1
0
 /**
  * Return the filter values (list form)
  */
 public function getFilterValues()
 {
     $filters = array();
     if ($this->auth->hasPerm('SHOW', 'ALL_DOMAINS')) {
         $do_id = null;
         $filters['do_values'] = R3EcoGisHelper::getDomainList();
     } else {
         $do_id = $this->auth->getDomainID();
     }
     $filters['pr_values'] = R3EcoGisHelper::getProvinceList($do_id);
     $filters['mu_values'] = R3EcoGisHelper::getMunicipalityList($do_id);
     $filters['bpu_values'] = R3EcoGisHelper::getBuildingPurposeUseList($do_id);
     $filters['do_id'] = $this->do_id;
     $filters['pr_id'] = $this->pr_id;
     $filters['mu_id'] = $this->mu_id;
     $filters['bpu_id'] = $this->bpu_id;
     return $filters;
 }
예제 #2
0
 /**
  * Return the data for a single customer
  */
 public function getLookupData($id = null)
 {
     $lkp = array();
     if ($this->auth->getParam('mu_id') == '') {
         $lkp['pr_values'] = R3EcoGisHelper::getProvinceList($this->do_id);
         $lkp['mu_values'] = R3EcoGisHelper::getMunicipalityList($this->do_id);
     } else {
         $lkp['mu_values'] = array($this->auth->getParam('mu_id') => '');
     }
     $mu_id = $this->auth->getParam('mu_id');
     if ($this->act == 'add' && count($lkp['mu_values']) == 1) {
         $mu_id = key($lkp['mu_values']);
     } else {
         if ($this->act == 'mod' || $this->act == 'show') {
             $mu_id = $this->data['mu_id'];
         }
     }
     if ($mu_id != '') {
         $lkp['fr_values'] = R3EcogisHelper::getFractionList($this->do_id, $mu_id);
         $lkp['st_values'] = R3EcogisHelper::getStreetList($this->do_id, $mu_id, array('use_lkp_name' => true));
         $lkp['cm_values'] = R3EcogisHelper::getCatMunicList($this->do_id, $mu_id);
     }
     $lkp['bt_values'] = R3EcogisHelper::getBuildingTypeList($this->do_id);
     $lkp['bpu_values'] = R3EcogisHelper::getBuildingPurposeUseList($this->do_id);
     $lkp['bby_values'] = R3EcogisHelper::getBuildingBuildYearList($this->do_id);
     $lkp['bry_values'] = R3EcogisHelper::getBuildingRestructureYearList($this->do_id);
     $lkp['bu_hour_from_values'] = R3EcogisHelper::getBuildingUsageHourList($this->do_id, false);
     $lkp['bu_hour_to_values'] = R3EcogisHelper::getBuildingUsageHourList($this->do_id, true);
     $lkp['bu_day_values'] = R3EcogisHelper::getBuildingUsageDayList($this->do_id);
     $lkp['ez_values'] = R3EcogisHelper::getEnergyZoneList($this->do_id);
     $lkp['ec_values'] = R3EcogisHelper::getEnergyClassList($this->do_id);
     if ($this->data['ez_id'] != '' && $this->data['ec_id'] != '') {
         $lkp['ecl_values'] = R3EcogisHelper::getEnergyClassLimitList($this->data['ez_id'], $this->data['ec_id'], $this->do_id);
     }
     return $lkp;
 }
예제 #3
0
 public function getLookupData($id = null)
 {
     $lkp = parent::getLookupData($id);
     if ($this->auth->getParam('mu_id') == '') {
         $lkp['pr_values'] = R3EcoGisHelper::getProvinceList($this->do_id);
         $lkp['mu_values'] = R3EcoGisHelper::getMunicipalityAndMunicipalityCollectionList($this->do_id, null, null, array('join_with_global_strategy_paes' => true));
     } else {
         $lkp['mu_values'] = array($this->auth->getParam('mu_id') => '');
     }
     $mu_id = $this->auth->getParam('mu_id');
     if ($this->act == 'add' && count($lkp['mu_values']) == 1) {
         $mu_id = key($lkp['mu_values']);
     } else {
         if ($this->act == 'mod') {
             $mu_id = $this->data['mu_id'];
         }
     }
     $lkp['gpa_gauge_values'] = R3EcoGisHelper::getGlobalPlainActionTypeList($_SESSION['do_id']);
     return $lkp;
 }
예제 #4
0
 /**
  * Return the filter values (list form)
  */
 public function getFilterValues()
 {
     $filters = array();
     if ($this->auth->getParam('mu_id') == '') {
         $filters['pr_values'] = R3EcoGisHelper::getProvinceList($this->do_id, array('join_with_global_strategy' => true));
         $filters['mu_values'] = R3EcoGisHelper::getMunicipalityAndMunicipalityCollectionList($this->do_id, null, null, array('join_with_global_strategy' => true));
     } else {
         $filters['mu_values'] = array($this->auth->getParam('mu_id') => '');
     }
     if (count($filters['mu_values']) == 1) {
         $mu_id = key($filters['mu_values']);
         $filters['fr_values'] = R3EcoGisHelper::getFractionList($this->do_id, $mu_id, array('used_by' => 'building'));
         $filters['st_values'] = R3EcoGisHelper::getStreetList($this->do_id, $mu_id, array('used_by' => 'building'));
     } else {
         $mu_id = null;
     }
     $filters['do_id'] = $this->do_id;
     $filters['pr_id'] = $this->pr_id;
     $filters['mu_id'] = $this->mu_id;
     $filters['mu_name'] = $this->mu_name;
     $filters['gst_name'] = $this->gst_name;
     return $filters;
 }
예제 #5
0
 /**
  * Return the data for a single customer
  */
 public function getLookupData($id = null)
 {
     $lang = R3Locale::getLanguageID();
     $db = ezcDbInstance::get();
     $lkp = array();
     $lkp['kind_values'] = array('HEATING' => _('Riscaldamento'), 'ELECTRICITY' => _('Elettrico'));
     $lkp['pr_list'] = R3EcoGisHelper::getProvinceList($this->do_id);
     $lkp['mu_list'] = R3EcoGisUtilityHelper::getAvailableMunicipalityList($this->do_id, $this->id);
     $lkp['mu_selected'] = $this->data['municipality'];
     $lkp['ges_values'] = R3EcoGisUtilityHelper::getGlobalEnergySourceList();
     return $lkp;
 }
예제 #6
0
 /**
  * Return the data for a single customer 
  */
 public function getLookupData($id = null)
 {
     $lkp = array();
     if ($this->auth->getParam('mu_id') == '') {
         $lkp['pr_values'] = R3EcoGisHelper::getProvinceList($this->do_id);
         $lkp['mu_values'] = R3EcoGisHelper::getMunicipalityList($this->do_id);
     } else {
         $lkp['mu_values'] = array($this->auth->getParam('mu_id') => '');
     }
     $mu_id = $this->auth->getParam('mu_id');
     if ($this->act == 'add' && count($lkp['mu_values']) == 1) {
         $mu_id = key($lkp['mu_values']);
     } else {
         if ($this->act == 'mod') {
             $mu_id = $this->data['mu_id'];
         }
     }
     if ($mu_id != '') {
         $lkp['fr_values'] = R3EcogisHelper::getFractionList($this->do_id, $mu_id);
         $lkp['st_values'] = R3EcogisHelper::getStreetList($this->do_id, $mu_id);
         $lkp['cm_values'] = R3EcogisHelper::getCatMunicList($this->do_id, $mu_id);
     }
     if ($this->act == 'add' && count($lkp['mu_values']) == 1) {
         $mu_id = key($lkp['mu_values']);
     } else {
         if ($this->act == 'mod') {
             $mu_id = $this->data['mu_id'];
         }
     }
     if ($mu_id !== null) {
         $lkp['st_values'] = R3EcogisHelper::getStreetList($_SESSION['do_id'], $mu_id);
     }
     return $lkp;
 }
예제 #7
0
 /**
  * Return the data for a single customer 
  */
 public function getLookupData($id = null)
 {
     $lkp = array();
     if ($this->auth->getParam('mu_id') == '') {
         $lkp['pr_values'] = R3EcoGisHelper::getProvinceList($this->do_id);
         $lkp['mu_values'] = R3EcoGisHelper::getMunicipalityAndMunicipalityCollectionList($this->do_id);
     } else {
         $lkp['mu_values'] = array($this->auth->getParam('mu_id') => '');
     }
     $mu_id = $this->auth->getParam('mu_id');
     if ($this->act == 'add' && count($lkp['mu_values']) == 1) {
         $mu_id = key($lkp['mu_values']);
     } else {
         if ($this->act == 'mod') {
             $mu_id = $this->data['mu_id'];
         }
     }
     return $lkp;
 }
예제 #8
0
 /**
  * Return the data for a single customer
  */
 public function getLookupData($id = null)
 {
     R3EcoGisHelper::includeHelperClass('obj.global_consumption_row.php');
     R3EcoGisHelper::includeHelperClass('obj.global_plain_row.php');
     $lkp = array();
     $lkp['ft_id_values'] = R3EcoGisHelper::getWorkFundingTypeList($_SESSION['do_id']);
     if ($this->auth->getParam('mu_id') == '') {
         $lkp['pr_values'] = R3EcoGisHelper::getProvinceList($this->do_id);
         $lkp['mu_values'] = R3EcoGisHelper::getMunicipalityAndMunicipalityCollectionList($this->do_id);
     } else {
         $lkp['mu_values'] = array($this->auth->getParam('mu_id') => '');
     }
     $mu_id = $this->auth->getParam('mu_id');
     if ($this->act == 'add' && count($lkp['mu_values']) == 1) {
         $mu_id = key($lkp['mu_values']);
     } else {
         if ($this->act == 'mod' || $this->act == 'show') {
             $mu_id = $this->data['mu_id'];
         }
     }
     $lkp['gc_parent_values'] = R3EcoGisGlobalPlainHelper::getCategoriesListByparentId($_SESSION['do_id']);
     $lkp['consumption_energy_source_list'] = R3EcoGisGlobalConsumptionHelper::getEnergySourceList($_SESSION['do_id'], 'CONSUMPTION', array('order' => 'ges_name, gest_order, ges_order, ges.ges_id, es_order, es_name, es.es_id, udm_order, udm_name, udm.udm_id'));
     $lkp['production_energy_source_list'] = R3EcoGisActionCatalogHelper::getProductionEnergySourceList($_SESSION['do_id']);
     if ($this->act != 'add') {
         $lkp['gc_values'] = R3EcoGisGlobalPlainHelper::getCategoriesListByparentId($_SESSION['do_id'], $this->data['gc_parent_id']);
         $lkp['ac_object_values'] = R3EcoGisActionCatalogHelper::getSubCategoriesListById($_SESSION['do_id'], $this->data['mu_id'], $this->data['gc_id']);
         $lkp['gpa_values'] = R3EcoGisGlobalPlainHelper::getPlainActionList($_SESSION['do_id'], $this->data['gc_id']);
         if ($this->data['esu_id_production'] != '') {
             $lkp['es_id_production_values'] = array();
             $lkp['udm_id_production_values'] = array();
             foreach ($lkp['production_energy_source_list'][$this->data['ges_id_production']]['source'] as $esKey => $esVal) {
                 $lkp['es_id_production_values'][$esKey] = $esVal['name'];
                 foreach ($esVal['udm'] as $udmKey => $udmVal) {
                     $lkp['udm_id_production_values'][$udmKey] = $udmVal['name'];
                 }
             }
         }
     } else {
         if ($this->bu_id != '') {
             $lkp['gpa_values'] = R3EcoGisGlobalPlainHelper::getPlainActionList($_SESSION['do_id'], $this->data['gc_id']);
         }
     }
     $lkp['ac_related_actions_list'] = array();
     if (!empty($this->data['mu_id'])) {
         $lkp['ac_related_actions_list'] = $this->getActionListForRelatedSelection($this->data['mu_id'], $this->data['ac_id']);
     }
     return $lkp;
 }
예제 #9
0
 /**
  * Return the data for a single customer 
  */
 public function getLookupData($id = null)
 {
     $lkp = array();
     $trueFalse = array('T' => _('Si'), 'F' => _('No'));
     $lkp['do_template_values'] = R3EcoGisCustomerHelper::getDomainsList($this->auth);
     $lkp['do_group_values'] = R3EcoGisCustomerHelper::getGroupsList($this->auth);
     $lkp['app_language_values'] = array(1 => _('Monolingue'), 2 => _('Bilingue'));
     $lkp['app_cat_type_values'] = array('ITALY' => _('Italiano'), 'AUSTRIA' => _('Austriaco'));
     $lkp['do_build_year_type_values'] = array('FREE' => _('Inserimento libero'), 'TABLE' => _('Selezione da tabella'));
     $lkp['do_build_restructure_year_type_values'] = array('FREE' => _('Inserimento libero'), 'TABLE' => _('Selezione da tabella'));
     $lkp['do_municipality_mode_values'] = array('COMBO' => _('Combo box'), 'AUTOCOMPLETE' => _('Autocomplete'));
     $lkp['do_building_code_type_values'] = array('NONE' => _('Nessuno'), 'AUTO' => _('Automatico'), 'MANUAL' => _('Manuale'), 'PROPOSED' => _('Proposto'));
     $lkp['true_false_values'] = $trueFalse;
     $lkp['do_fraction_mode_values'] = array('COMBO' => _('Combo box'), 'AUTOCOMPLETE' => _('Autocomplete'));
     $lkp['do_street_mode_values'] = $lkp['do_fraction_mode_values'];
     $lkp['do_catastral_mode_values'] = $lkp['do_fraction_mode_values'];
     $lkp['pr_list'] = R3EcoGisHelper::getProvinceList(null);
     $lkp['mu_list'] = R3EcoGisCustomerHelper::getAvailableMunicipalityList();
     if ($this->act == 'mod') {
         $lkp['mu_selected'] = R3EcoGisCustomerHelper::getSelectedMunicipalityList($this->data['do_id']);
     }
     return $lkp;
 }
예제 #10
0
 /**
  * Return the data for a single customer
  */
 public function getLookupData($id = null)
 {
     $lang = R3Locale::getLanguageID();
     $db = ezcDbInstance::get();
     $lkp = array();
     if ($this->auth->getParam('mu_id') == '') {
         $lkp['pr_values'] = R3EcoGisHelper::getProvinceList($this->do_id);
         $lkp['mu_values'] = R3EcoGisHelper::getMunicipalityList($this->do_id);
     } else {
         $lkp['mu_values'] = array($this->auth->getParam('mu_id') => '');
     }
     $mu_id = $this->auth->getParam('mu_id');
     if ($this->act == 'add' && count($lkp['mu_values']) == 1) {
         $mu_id = key($lkp['mu_values']);
     } else {
         if ($this->act == 'mod') {
             $mu_id = $this->data['mu_id'];
         }
     }
     $lkp['es_values'] = R3Opt::getOptList('energy_source_udm_data', 'es_id', 'es_name_' . R3Locale::getLanguageID(), array('constraints' => "do_id={$this->do_id} AND mu_id IS NULL"));
     // AND esu_is_private IS FALSE"));
     if ($this->data['es_id'] != '') {
         $sqlUDM = "SELECT udm_id, udm_name_{$lang} AS udm_name\r\n                       FROM energy_source_udm_data\r\n                       WHERE do_id IS NULL AND es_id={$this->data['es_id']}\r\n                       GROUP BY udm_id, udm_name_{$lang}\r\n                       ORDER BY udm_name, udm_id";
         $lkp['udm_values'] = $db->query($sqlUDM)->fetchAll(PDO::FETCH_COLUMN | PDO::FETCH_UNIQUE);
     }
     return $lkp;
 }
예제 #11
0
 /**
  * Return the data for a single customer
  */
 public function getLookupData($id = null)
 {
     $lkp = array();
     if ($this->auth->getParam('mu_id') == '') {
         $lkp['pr_values'] = R3EcoGisHelper::getProvinceList($this->do_id);
         $lkp['mu_values'] = R3EcoGisHelper::getMunicipalityAndMunicipalityCollectionList($this->do_id);
     } else {
         $lkp['mu_values'] = array($this->auth->getParam('mu_id') => '');
     }
     $mu_id = $this->auth->getParam('mu_id');
     if ($this->act == 'add' && count($lkp['mu_values']['data']) == 1) {
         $mu_id = key($lkp['mu_values']['data']);
     } else {
         if ($this->act == 'mod' || $this->act == 'show') {
             $mu_id = $this->data['mu_id'];
         }
     }
     $lkp['global_strategy_list'] = R3EcoGisSimulationHelper::getGlobalStrategyList($this->do_id, $mu_id);
     $lkp['summary_type_list'] = R3EcoGisSimulationHelper::getSummaryTypeList();
     $lkp['summary_table_list'] = array('NORMAL' => _('Espansa'), 'GROUPED' => _('Raggruppata'));
     $lkp['do_id'] = $this->do_id;
     $lkp['pr_id'] = $this->pr_id;
     $lkp['mu_id'] = $this->mu_id;
     return $lkp;
 }
예제 #12
0
 /**
  * Return the data for a single customer
  */
 public function getLookupData($id = null)
 {
     $lkp = array();
     if ($this->auth->getParam('mu_id') == '') {
         $lkp['pr_values'] = R3EcoGisHelper::getProvinceList($this->do_id);
         $lkp['mu_values'] = R3EcoGisHelper::getMunicipalityAndMunicipalityCollectionList($this->do_id);
     } else {
         $lkp['mu_values'] = array($this->auth->getParam('mu_id') => '');
     }
     return $lkp;
 }