/** * ecogis.global_subcategory fields definition */ public function defFields() { $fields = array(array('name' => 'ft_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'do_id', 'type' => 'domain'), array('name' => 'ft_name_1', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'required' => true, 'label' => _('Nome') . getLangNameShort(1), 'list' => true, 'edit' => true, 'delete_name' => true), array('name' => 'ft_name_2', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'label' => _('Nome') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'ft_has_extradata', 'type' => 'boolean', 'width' => 80, 'label' => _('Dati aggiuntivi'), 'visible' => true), array('name' => 'ft_order', 'type' => 'number', 'required' => true, 'default' => 0, 'width' => 100, 'label' => _('Ordinamento'))); return $fields; }
public function defFields() { $mu_id = R3EcogisHelper::getDefaultMunicipality(); $fields = array(array('name' => 'st_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'mu_id', 'type' => 'lookup', 'width' => 200, 'label' => _('Comune'), 'kind' => $this->act != 'add' ? 'readonly' : null, 'required' => true, 'lookup' => array('table' => 'municipality', 'list_field' => 'mu_name_<LANG>'), 'filter' => array('type' => 'select', 'fields' => array('mu_id', 'mu_name_<LANG>'), 'where' => 'do_id=<DOMAIN_ID>', 'cond_where' => array('mu_id' => $mu_id)), 'visible' => $mu_id == '', 'default' => $mu_id), array('name' => 'st_code', 'type' => 'text', 'label' => _('Codice'), 'filter' => array('type' => 'text', 'label' => 'Codice/nome', 'mask' => "(%s ILIKE '%%%2\$s%%') OR (st_name_1 ILIKE '%%%2\$s%%') OR (st_name_2 ILIKE '%%%2\$s%%')"), 'width' => 200, 'attr' => array('sortable' => true, 'order_fields' => 'st_code_pad, st_name_1, st_name_2, st_id')), array('name' => 'st_name_1', 'type' => 'text', 'required' => true, 'label' => _('Nome') . getLangNameShort(1), 'delete_name' => true), array('name' => 'st_name_2', 'type' => 'text', 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'label' => _('Nome') . getLangNameShort(2)), array('name' => 'st_lkp_name_1', 'type' => 'text', 'required' => false, 'label' => _('Nome lookup') . getLangNameShort(1)), array('name' => 'st_lkp_name_2', 'type' => 'text', 'required' => false, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'label' => _('Nome lookup') . getLangNameShort(2)), array('name' => 'st_visible', 'type' => 'boolean', 'default' => true, 'label' => _('Visibile'))); return $fields; }
/** * Create the table header * param string $order The table order */ public function createListTableHeader(&$order) { $this->simpleTable->addSimpleField(_('Codice'), 'gt_code', 'text', 150, array('sortable' => true)); $this->simpleTable->addSimpleField(_('Nome') . getLangNameShort(1), 'gt_name_1', 'text', null, array('sortable' => true)); if (R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1) { $this->simpleTable->addSimpleField(_('Nome') . getLangNameShort(2), 'gt_name_2', 'text', null, array('sortable' => true)); } $this->simpleTable->addSimpleField(_('Nome') . getLangNameShort(3), 'gt_name_3', 'text', null, array('sortable' => true)); $this->simpleTable->addSimpleField(_('Azione'), '', 'link', 50); $this->tableHtml = $this->simpleTable->CreateTableHeader($order); }
/** * ecogis.global_subcategory fields definition */ public function defFields() { $fields = array(array('name' => 'get_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'get_code', 'type' => 'text', 'label' => _('Codice'), 'required' => true, 'width' => 200), array('name' => 'get_name_1', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'required' => true, 'label' => _('Nome') . getLangNameShort(1), 'list' => true, 'edit' => true, 'delete_name' => true), array('name' => 'get_name_2', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'label' => _('Nome') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'get_name_3', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'label' => _('Nome') . getLangNameShort(3)), array('name' => 'get_show_label', 'type' => 'boolean', 'width' => 80, 'label' => _('Mostra label categoria'), 'default' => true), array('name' => 'get_order', 'type' => 'number', 'required' => true, 'default' => 0, 'label' => _('Ordinamento'))); return $fields; }
/** * ecogis.global_subcategory fields definition */ public function defFields() { $fields = array(array('name' => 'ges_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'get_id', 'type' => 'lookup', 'label' => _('Tipo fonte'), 'required' => true, 'width' => 200, 'lookup' => array('table' => 'global_energy_type', 'list_field' => 'get_name_<LANG>')), array('name' => 'ges_name_1', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'required' => true, 'label' => _('Nome') . getLangNameShort(1), 'list' => true, 'edit' => true, 'delete_name' => true), array('name' => 'ges_name_2', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'label' => _('Nome') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'ges_name_3', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'label' => _('Nome') . getLangNameShort(3))); return $fields; }
public function defFields() { $fields = array(array('name' => 'bry_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'do_id', 'type' => 'domain'), array('name' => 'bry_name_1', 'type' => 'text', 'required' => true, 'label' => _('Descrizione') . getLangNameShort(1), 'delete_name' => true), array('name' => 'bry_name_2', 'type' => 'text', 'label' => _('Descrizione') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'bry_start_year', 'type' => 'text', 'required' => true, 'label' => _('Anno inizio') . getLangNameShort(1)), array('name' => 'bry_end_year', 'type' => 'text', 'label' => _('Anno fine') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'bry_order', 'type' => 'number', 'required' => true, 'default' => 0, 'width' => 100, 'label' => _('Ordinamento'))); return $fields; }
/** * ecogis.building_purpose_use fields definition */ public function defFields() { $fields = array(array('name' => 'bpu_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'do_id', 'type' => 'domain'), array('name' => 'bpu_name_1', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'required' => true, 'label' => _('Nome') . getLangNameShort(1), 'list' => true, 'edit' => true, 'delete_name' => true), array('name' => 'bpu_name_2', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'label' => _('Nome') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'bpu_has_extradata', 'type' => 'boolean', 'width' => 80, 'label' => _('Dati aggiuntivi'), 'visible' => true), array('name' => 'bpu_order', 'type' => 'number', 'required' => true, 'default' => 0, 'width' => 100, 'label' => _('Ordinamento')), array('name' => 'gc_id', 'type' => 'lookup', 'label' => _('Categoria inventario fissa'), 'lookup' => array('table' => 'global_category_data', 'list_field' => "gc_full_name_<LANG>")), array('name' => 'sbpu_id', 'type' => 'lookup', 'label' => _('Categoria pubblica'), 'width' => 150, 'lookup' => array('table' => 'stat_building_purpose_use', 'list_field' => "sbpu_name_<LANG>"), 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'ENABLE_PUBLIC_SITE', 'F') == 'T')); return $fields; }
/** * ecogis.device_type fields definition */ public function defFields() { $fields = array(array('name' => 'dt_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'do_id', 'type' => 'domain'), array('name' => 'et_id', 'type' => 'lookup', 'label' => _('Tipo fonte'), 'required' => true, 'width' => 200, 'lookup' => array('table' => 'energy_type', 'list_field' => 'et_name_<LANG>', 'where' => "et_is_private IS FALSE AND et_code IN ('HEATING', 'ELECTRICITY', 'WATER')")), array('name' => 'dt_name_1', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'required' => true, 'label' => _('Nome') . getLangNameShort(1), 'list' => true, 'edit' => true, 'delete_name' => true), array('name' => 'dt_name_2', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'label' => _('Nome') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'dt_has_extradata', 'type' => 'boolean', 'width' => 80, 'label' => _('Dati aggiuntivi'), 'visible' => true), array('name' => 'dt_is_consumption', 'type' => 'boolean', 'width' => 80, 'default' => true, 'label' => _('Impianto a consumo'), 'visible' => true), array('name' => 'dt_is_production', 'type' => 'boolean', 'width' => 80, 'label' => _('Impianto a produzione'), 'visible' => true), array('name' => 'dt_order', 'type' => 'number', 'required' => true, 'default' => 0, 'width' => 100, 'label' => _('Ordinamento'))); return $fields; }
public function defFields() { $fields = array(array('name' => 'udm_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'do_id', 'type' => 'domain'), array('name' => 'udm_name_1', 'type' => 'text', 'required' => true, 'label' => _('Nome') . getLangNameShort(1), 'delete_name' => true), array('name' => 'udm_name_2', 'type' => 'text', 'label' => _('Nome') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'udm_is_electricity', 'type' => 'boolean', 'label' => _('UDM Elettrico')), array('name' => 'udm_order', 'type' => 'number', 'required' => true, 'default' => 0, 'width' => 100, 'label' => _('Ordinamento'))); return $fields; }
public function defFields() { $fields = array(array('name' => 'st_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'st_parent_id', 'type' => 'lookup', 'label' => _('Principale'), 'required' => true, 'width' => 200, 'lookup' => array('table' => $this->table, 'list_field' => 'st_title_short_<LANG>', 'alias' => 'get_name', 'pk' => array('st_parent_id', 'st_id'), 'where' => "st_parent_id IS NULL AND (do_id IS NULL OR do_id={$this->do_id})"), 'filter' => array('type' => 'select', 'fields' => array('st_id', 'st_title_short_<LANG>'), 'where' => "st_parent_id IS NULL AND (do_id IS NULL OR do_id={$this->do_id})", 'orderby' => 'st_order, st_title_short_<LANG>')), array('name' => 'st_order', 'type' => 'number', 'required' => true, 'default' => 0, 'width' => 40, 'label' => _('Ordinamento')), array('name' => 'st_code', 'type' => 'text', 'required' => true, 'label' => _('Codice')), array('name' => 'st_title_short_1', 'type' => 'text', 'required' => true, 'label' => _('Titolo corto') . getLangNameShort(1)), array('name' => 'st_title_short_2', 'type' => 'text', 'label' => _('Titolo corto') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'st_title_long_1', 'type' => 'text', 'label' => _('Titolo lungo') . getLangNameShort(1), 'list' => false), array('name' => 'st_title_long_2', 'type' => 'text', 'label' => _('Titolo lungo') . getLangNameShort(2), 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'list' => false), array('name' => 'st_has_absolute_data', 'type' => 'boolean', 'width' => 50, 'label' => _('Dati assoluti')), array('name' => 'st_udm_1', 'type' => 'text', 'label' => _('Unità di misura assoluta') . getLangNameShort(1), 'list' => false), array('name' => 'st_udm_2', 'type' => 'text', 'label' => _('Unità di misura assoluta') . getLangNameShort(2), 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'list' => false), array('name' => 'st_has_relative_data', 'type' => 'boolean', 'width' => 50, 'label' => _('Dati relativi')), array('name' => 'st_udm_relative_1', 'type' => 'text', 'label' => _('Unità di misura relativa') . getLangNameShort(1), 'list' => false), array('name' => 'st_udm_relative_2', 'type' => 'text', 'label' => _('Unità di misura relativa') . getLangNameShort(2), 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'list' => false), array('name' => 'st_descr_1', 'type' => 'memo', 'label' => _('Descrizione superiore') . getLangNameShort(1), 'list' => false), array('name' => 'st_descr_2', 'type' => 'memo', 'label' => _('Descrizione superiore') . getLangNameShort(2), 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'list' => false), array('name' => 'st_lower_descr_1', 'type' => 'memo', 'label' => _('Descrizione inferiore') . getLangNameShort(1), 'list' => false), array('name' => 'st_lower_descr_2', 'type' => 'memo', 'label' => _('Descrizione inferiore') . getLangNameShort(2), 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'list' => false), array('name' => 'st_enable', 'type' => 'boolean', 'width' => 50, 'label' => _('Attiva (calcolata)')), array('name' => 'st_visible', 'type' => 'boolean', 'width' => 50, 'label' => _('Visibile (su sito pubblico)')), array('name' => 'st_has_province_data', 'type' => 'boolean', 'width' => 50, 'label' => _('Statistica con dati provinciali')), array('name' => 'st_has_municipality_data', 'type' => 'boolean', 'width' => 50, 'label' => _('Statistica con dati comunali')), array('name' => 'st_has_year', 'type' => 'boolean', 'width' => 50, 'label' => _('Statistica con periodo temporale')), array('name' => 'st_has_building_purpose_use', 'type' => 'boolean', 'width' => 50, 'label' => _("Filtro per dest.uso")), array('name' => 'st_has_building_build_year', 'type' => 'boolean', 'width' => 50, 'label' => _('Filtro per periodo costruzione')), array('name' => 'st_render_preview_as_grid', 'type' => 'boolean', 'width' => 50, 'label' => _('Rendering anteprima con griglia'))); return $fields; }
public function defFields() { $mu_id = R3EcogisHelper::getDefaultMunicipality(); $fields = array(array('name' => 'cm_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'mu_id', 'type' => 'lookup', 'width' => 200, 'label' => _('Comune'), 'required' => true, 'lookup' => array('table' => 'municipality', 'list_field' => 'mu_name_<LANG>'), 'filter' => array('type' => 'select', 'fields' => array('mu_id', 'mu_name_<LANG>'), 'where' => 'do_id=<DOMAIN_ID>', 'cond_where' => array('mu_id' => $mu_id)), 'visible' => $mu_id == '', 'default' => $mu_id), array('name' => 'cm_code', 'type' => 'text', 'label' => _('Codice'), 'width' => 200), array('name' => 'cm_name_1', 'type' => 'text', 'required' => true, 'label' => _('Nome') . getLangNameShort(1), 'delete_name' => true), array('name' => 'cm_name_2', 'type' => 'text', 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'label' => _('Nome') . getLangNameShort(2)), array('name' => 'cm_visible', 'type' => 'boolean', 'default' => true, 'label' => _('Visibile'))); return $fields; }
/** * ecogis.global_subcategory fields definition */ public function defFields() { $fields = array(array('name' => 'gc_id', 'type' => 'number', 'is_primary_key' => true), array('name' => 'do_id', 'type' => 'domain'), array('name' => 'gc_code', 'type' => 'text', 'width' => 100, 'required' => false, 'label' => _('Codice'), 'list' => true, 'edit' => true), array('name' => 'gc_parent_id', 'type' => 'lookup', 'label' => _('Macro categoria'), 'required' => true, 'width' => 200, 'lookup' => array('table' => 'global_category', 'list_field' => 'gc_name_<LANG>', 'alias' => 'get_name', 'pk' => array('gc_parent_id', 'gc_id'), 'where' => "gc_parent_id IS NULL AND (do_id IS NULL OR do_id={$this->do_id})"), 'filter' => array('type' => 'select', 'fields' => array('gc_id', 'gc_name_<LANG>'), 'where' => "gc_parent_id IS NULL AND (do_id IS NULL OR do_id={$this->do_id})")), array('name' => 'gc_name_1', 'type' => 'text', 'width' => array(null, 300), 'required' => true, 'label' => _('Nome') . getLangNameShort(1), 'list' => true, 'edit' => true, 'delete_name' => true), array('name' => 'gc_name_2', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'label' => _('Nome') . getLangNameShort(2), 'required' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1, 'visible' => R3AuthInstance::get()->getConfigValue('APPLICATION', 'NUM_LANGUAGES', 1) > 1), array('name' => 'gc_name_3', 'type' => 'text', 'size' => 80, 'width' => array(null, 300), 'label' => _('Nome') . getLangNameShort(3)), array('name' => 'gc_order', 'type' => 'number', 'required' => true, 'width' => 50, 'default' => 0, 'label' => _('Ordinamento piano azione')), array('name' => 'gc_visible', 'type' => 'boolean', 'width' => 80, 'label' => _('Visibile'), 'visible' => true, 'default' => true), array('name' => 'gc_total_only', 'type' => 'boolean', 'width' => 80, 'label' => _('Solo totale'), 'visible' => true), array('name' => 'gc_has_extradata', 'type' => 'boolean', 'width' => 80, 'label' => _('Dati aggiuntivi settore piano azione'), 'visible' => true)); return $fields; }
<?php /* ------------------------------ PHP configuration assignment ------------------------------ */ $smarty->assign('config', array('precision' => ini_get('precision'), 'safe_mode' => ini_get('precision'), 'max_execution_time ' => ini_get('max_execution_time '), 'max_input_time' => ini_get('max_input_time'), 'memory_limit' => ini_get('memory_limit'), 'error_reporting' => ini_get('error_reporting'), 'display_errors' => ini_get('display_errors'), 'post_max_size' => ini_get('post_max_size'), 'default_mimetype' => ini_get('default_mimetype'), 'default_charset' => ini_get('default_charset'), 'file_uploads' => ini_get('file_uploads'), 'upload_max_filesize' => ini_get('upload_max_filesize'))); /* ------------------------------ CONSTANT ------------------------------ */ $smarty->assign('LANG_NAME_SHORT_FMT_1', getLangNameShort(1)); $smarty->assign('LANG_NAME_SHORT_FMT_2', getLangNameShort(2)); $smarty->assign('LANG_NAME_SHORT_FMT_3', getLangNameShort(3)); $smarty->assign('LANG_NAME_1', getLangName(1, true)); $smarty->assign('LANG_NAME_2', getLangName(2, true)); $smarty->assign('LANG_NAME_3', getLangName(3, true)); $smarty->assign('R3_CSS_URL', R3_CSS_URL); $smarty->assign('R3_JS_URL', R3_JS_URL); $smarty->assign('R3_ICONS_URL', R3_ICONS_URL); /* ------------------------------ Permission & DB settings assignment ------------------------------ */ if (isset($auth) && ($auth->isAuth() || $auth->getStatus() == AUTH_PASSWORD_EXPIRED || $auth->getStatus() == AUTH_PASSWORD_REPLACE)) { // Some user information $smarty->assign('USER_ID', $auth->getUID()); $smarty->assign('USER_MUNICIPALITY', $auth->getParam('mu_id')); $smarty->assign('USER_LOGIN', $auth->getLogin()); $smarty->assign('USER_NAME', $auth->getParam('us_name')); if ($auth->getParam('mu_id') != '') { $smarty->assign('USER_MUNICIPALITY', R3EcoGisHelper::getMunicipalityName($auth->getParam('mu_id'))); } $smarty->assign('USER_IP', $auth->getParam('us_last_ip')); $smarty->assign('DOMAIN_NAME', $auth->getDomainName()); $smarty->assign('APPLICATION_CODE', $auth->getParam('app_code')); $smarty->assign('APPLICATION_NAME', $auth->getParam('app_name')); $numLanguages = $auth->getConfigValue('APPLICATION', 'NUM_LANGUAGES'); /** Permission */ foreach ($auth->getAllPermsAsString() as $_value) {