From 29c3aacc96b54b91f072e7413ec04f5d2c766a9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Marrese?= Date: Wed, 20 Aug 2003 20:20:51 +0000 Subject: [PATCH 1/1] Cambio el atributo licencia por un metodo deLicencia --- lib/MECON/NovedadesDia.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/MECON/NovedadesDia.php b/lib/MECON/NovedadesDia.php index 929fe9b..e1ce6e3 100644 --- a/lib/MECON/NovedadesDia.php +++ b/lib/MECON/NovedadesDia.php @@ -32,8 +32,6 @@ class NovedadesDia { var $novedades = array(); - var $licencia = null; - var $agente = null; var $fecha = null; @@ -58,6 +56,20 @@ class NovedadesDia { $this->BuscarNovedadDiaria(); } + function deLicencia() + { + $licencias = array('Adp','Asa','Fal','Fran','FES/REL','Grem','Interrup','Sus','10a', ->'10a/d','10c','10d','10g','10h','10i','10j','10j/c','13Ia','13Ia/s','13Ia/u','13Ib',->'13Ic','13Id','13Id/a','13Id/h','13Ie','13Ig','13IIa','13IIb','13IIc','13IId', ->'13IIe','1363/97-2','14a','14b','14b1','14b2','14c','14d','14f','14g','14h','15a', ->'15b','15c','9'); + $anti_licencias = ('Interr/13a','Interr/9'); + foreach($this->novedades as $nov) + { + if(in_array($nov->codigo, $anti_licencias)) + return false; + if(in_array($nov->codigo, $licencias)) + return true; + } + return false; + } + function enComicion() { foreach($this->novedades as $nov) @@ -113,7 +125,6 @@ class NovedadesDia { $novedad = new Novedad(); $novedad->codigo = $r[0]; array_push($this->novedades, $novedad); - $this->licencia = $r[0]; } } -- 2.43.0