![]() |
Documentación GVHIDRA 3.1.5
|
Métodos públicos | |
CustomMainWindow () | |
CustomMainWindow () | |
CustomMainWindow () | |
Métodos públicos estáticos | |
static | getHost () |
static | getHost () |
Métodos privados | |
obtenerTemplates_c () |
Definición en la línea 3 del archivo CustomMainWindow.php.
CustomMainWindow | ( | ) |
Definición en la línea 5 del archivo CustomMainWindow.php.
{ parent::__construct(); //Cargamos propiedades especficas del CS //Cuando estamos en desarrollo registramos todos los movimientos $conf = ConfigFramework::getConfig(); //Fija la ubicacion del directorio de compilacion $dir_templates_c = $this->obtenerTemplates_c(); $conf->setTemplatesCompilationDir($dir_templates_c); /* para evitar un error de STRICT que dice que tienes que indicar la zona horaria por defecto*/ date_default_timezone_set("Europe/Madrid"); //***********************DSN***********************// if ($this->getHost() == 'adolfo') { $dsn_log = array( 'phptype' => 'pgsql', 'username' => 'igep_alog', 'password' => 'errlog', 'hostspec' => 'lola.coput.gva.es', 'database' => 'marte', ); $g_dsn_ora = array( 'phptype' => 'oci8', 'username' => 'igep_acons', 'password' => 'paco', 'hostspec' => 'lola.luna', ); $g_dsn_ptc = array( 'phptype' => 'pgsql', 'username' => 'ptc_ac', 'password' => 'ptcrocc', 'hostspec' => 'lola.coput.gva.es', 'database' => 'marte', //'port' => '5432', en pgsql ); $conf->setDSN('gvh_dsn_log',$dsn_log); $conf->setDSN('gvh_dsn_ora',$g_dsn_ora); $conf->setDSN('gvh_dsn_ptc',$g_dsn_ptc); } //*******************FIN DSN***********************// //****************Listas desplegables del custom****************// //Municipios $conf->setList_DBSource('MUNICIPIOS','select cmun as "valor",dmun as "descripcion" from tcom_municipios'); //Municipios CV $conf->setList_DBSource('MUNICIPIOS-CV','select cmun as "valor",dmun as "descripcion" from tcom_municipios where cpro in (\'03\',\'12\',\'46\')'); //Comarcas $conf->setList_DBSource('COMARCAS','select DISTINCT tcom_comarcas.ccom as "valor",dcom as "descripcion" from tcom_comarcas, tcom_municipios WHERE tcom_municipios.ccom = tcom_comarcas.ccom'); //Provincias $conf->setList_DBSource('PROVINCIAS','select cpro as "valor",dpro as "descripcion" from tcom_provincias'); //Provincias-CV $conf->setList_DBSource('PROVINCIAS-CV','select cpro as "valor",dpro as "descripcion" from tcom_provincias where cpro in (\'03\',\'12\',\'46\')'); //Direcciones Generales CIT $conf->setList_DBSource('DIRGRAL','select cdg as "valor",ddg as "descripcion" from tcom_dirgral WHERE cdg in (\'01\',\'05\',\'06\',\'03\',\'04\',\'17\',\'18\')'); //Direcciones Generales CIT Activas $conf->setList_DBSource('DIRGRAL-ACTIVAS',"select cdg as \"valor\",ddg as \"descripcion\" from tcom_dirgral WHERE dg='S' and activo='S'"); //Versiones de las aplicaciones de la CIT $str_aplicacion = $conf->getApplicationName(); $str_modulo = ComunSession::hayModulo('M_INTRANET'); $consulta = " select numver as \"valor\", case when numver like '%ctual' THEN ' Otros' ELSE numver END as \"descripcion\", coalesce(max(fver),current_date-10000) from tptc_peticiones WHERE (numver LIKE '%.%' OR numver like '%ctual' or ('".$str_modulo."'='1' and numver='Prxima')) and estado='SO' and VISIBLEUSER = 'S' AND APLICACION = '".$str_aplicacion."' GROUP BY NUMVER ORDER BY 3 DESC"; $conf->setList_DBSource('VERSIONESAPLICACION',$consulta); //Peticiones $conf->setList_DBSource('PETICIONES','select estado as "valor", desc_estado as "descripcion" from tptc_estado_peticiones'); //****************Fin Listas desplegables del custom****************// //**************** ventanas de seleccion del custom****************// //Provincia $conf->setSelectionWindow_DBSource('PROVINCIAS','select cpro, dpro from tcom_provincias',array('cpro','dpro')); //Servicios $conf->setSelectionWindow_DBSource('SERVICIOS','select cdg, cserv, dserv from vcom_servicios',array('cdg','cserv','dserv')); //Servicios activos $conf->setSelectionWindow_DBSource('SERVICIOS-ACTIVOS','select cdg, cserv, dserv from vcom_servicios where activo=\'S\'',array('cdg','cserv','dserv')); //**************** Fin ventanas de seleccion del custom****************// }
CustomMainWindow | ( | ) |
Definición en la línea 5 del archivo CustomMainWindow.php.
{ parent::__construct(); //Cargamos propiedades especficas del CS //Cuando estamos en desarrollo registramos todos los movimientos $conf = ConfigFramework::getConfig(); //Fija la ubicacion del directorio de compilacion $dir_templates_c = 'templates_c/'; $conf->setTemplatesCompilationDir($dir_templates_c); }
CustomMainWindow | ( | ) |
Definición en la línea 5 del archivo CustomMainWindow.php.
{ parent::__construct(); /*INCLUIR EL CDIGO DE CONFIGURACION PROPIO DE CS*/ $conf = ConfigFramework::getConfig(); //Cdigo para definir la ubicacin del templates_c if ($this->getHost()=='gardel') { $aplicacion = $conf->getApplicationName(); $dirbase = "/var/tmp/CWHTM/$aplicacion/"; $ruta = $_SERVER['SCRIPT_NAME']; //$_SERVER['REQUEST_URI']; /*Comprobamos si nos encontramos en desarrollo (la ruta contiene referencias a usuario)*/ $ini_usuario = strpos($ruta,'~'); $fin_usuario = strpos($ruta,'/',$ini_usuario) - 1; if ($ini_usuario) { /*Cogemos el nombre de usuario y montamos la ruta.*/ $usuario = substr($ruta,($ini_usuario)+1,$fin_usuario); $dir_templates_c = $dirbase.$usuario.'templates_c/'; } else /*Estamos en desarrollo/htdocs */ $dir_templates_c = $dirbase.'templates_c/'; } else { $dir_templates_c = 'templates_c/'; } $conf->setTemplatesCompilationDir($dir_templates_c); }
static getHost | ( | ) | [static] |
Obtiene el host que esta sirviendo el PHP Usado para:
Definición en la línea 38 del archivo CustomMainWindow.php.
{ $maquina = $_SERVER['HTTP_HOST']; if (stristr($maquina, 'gardel') or stristr($maquina, '172.19.16.20')) return 'gardel'; elseif (stristr($maquina, 'adolfo') or stristr($maquina, '172.19.16.104')) return 'adolfo'; else return lower($maquina); }
static getHost | ( | ) | [static] |
Obtiene el host que esta sirviendo el PHP Usado para:
Definición en la línea 148 del archivo CustomMainWindow.php.
{ $maquina = $_SERVER['HTTP_HOST']; if ((stristr($maquina, 'gardel') or stristr($maquina, '172.19.16.20'))) return 'gardel'; elseif (stristr($maquina, 'adolfo') or stristr($maquina, '172.19.16.104')) return 'adolfo'; else return strtolower($maquina); }
obtenerTemplates_c | ( | ) | [private] |
Definición en la línea 110 del archivo CustomMainWindow.php.
{ //MIGRACION igep-4_0_0: PARCHE PARA ENTORNO DE PREPRODUCCION //Debemos indicar en los pasos de migracin que es obligatorio rellenar el compileDir en el XML //Quitaremos este metodo entero if($_SERVER['SERVER_PORT']>90) return 'templates_c/'; //FIN PARCHE PAR ENTORNO DE PREPRODUCCION //Cdigo para definir la ubicacin del templates_c if ($this->getHost()=='gardel') { $aplicacion = ConfigFramework::getApplicationName(); $dirbase = "/var/tmp/CWHTM/$aplicacion/"; $ruta = $_SERVER['SCRIPT_NAME']; //$_SERVER['REQUEST_URI']; /*Comprobamos si nos encontramos en desarrollo (la ruta contiene referencias a usuario)*/ $ini_usuario = strpos($ruta,'~'); $fin_usuario = strpos($ruta,'/',$ini_usuario) - 1; if ($ini_usuario) { /*Cogemos el nombre de usuario y montamos la ruta.*/ $usuario = substr($ruta,($ini_usuario)+1,$fin_usuario); $dir_templates_c = $dirbase.$usuario.'templates_c/'; } else /*Estamos en desarrollo/htdocs */ $dir_templates_c = $dirbase.'templates_c/'; } else { $dir_templates_c = 'templates_c/'; } return $dir_templates_c; }