2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
3 // +--------------------------------------------------------------------+
4 // | Ministerio de Economía |
6 // +--------------------------------------------------------------------+
7 // | This file is part of Intranet. |
9 // | Intranet is free software; you can redistribute it and/or modify |
10 // | it under the terms of the GNU General Public License as published |
11 // | by the Free Software Foundation; either version 2 of the License, |
12 // | or (at your option) any later version. |
14 // | Intranet is distributed in the hope that it will be useful, but |
15 // | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 // | General Public License for more details. |
19 // | You should have received a copy of the GNU General Public License |
20 // | along with Hooks; if not, write to the Free Software Foundation, |
21 // | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 // +--------------------------------------------------------------------+
23 // | Creado: Mon Jul 7 17:22:10 2003 |
24 // | Autor: Matías Sklar <msklar@mecon.gov.ar> |
25 // +--------------------------------------------------------------------+
27 // $Id: Intranet_Legajos_Familiares.php 23 2003-07-15 18:56:42Z msklar $
31 require_once 'DB.php';
34 // +X2C Class 154 :Servicios_Legajos_Familiares
38 // XXX - Pregunta llucar: POR QUE CATSO HEREDA DE DB???
39 class MECON_Legajos_Familiares extends DB {
61 function MECON_Legajos_Familiares($db,$agente) // ~X2C
63 $this->agente = $agente;
66 WHERE documento = $agente";
67 $result = $db->query($sql);
68 if (DB::isError($result))
69 trigger_error($result->getMessage('Query mal hecho'), E_USER_ERROR);
71 for ($fila = 0; $fila < $result->numRows(); $fila++) {
72 $this->datos[$fila] = $result->fetchRow(DB_FETCHMODE_ASSOC);
82 function getHijos() // ~X2C
86 if(is_array($this->datos)) {
87 foreach (array_keys($this->datos) as $key) {
88 if($this->datos[$key]['parentesco']=='H') {
89 $aux[$fila]['nombre'] = $this->datos[$key]['nombre'];
90 $aux[$fila]['tipo_doc'] = $this->datos[$key]['tipodoc'];
91 $aux[$fila]['nro_doc'] = $this->datos[$key]['nrodoc'];
92 $aux[$fila]['fecha_nac'] = $this->datos[$key]['fecha_nac'];
93 $aux[$fila]['parentesco'] = $this->datos[$key]['parentesco'];
102 // +X2C Operation 171
107 function getFamiliares() // ~X2C
111 if(is_array($this->datos)) {
112 foreach (array_keys($this->datos) as $key) {
113 if($this->datos[$key]['parentesco']!="H") {
114 $aux[$fila]['nombre'] = $this->datos[$key]['nombre'];
115 $aux[$fila]['tipo_doc'] = $this->datos[$key]['tipodoc'];
116 $aux[$fila]['nro_doc'] = $this->datos[$key]['nrodoc'];
117 $aux[$fila]['fecha_nac'] = $this->datos[$key]['fecha_nac'];
118 $aux[$fila]['parentesco'] = $this->datos[$key]['parentesco'];
127 } // -X2C Class :Servicios_Legajos_Familiares