--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | Intranet |
+// +--------------------------------------------------------------------+
+// | This file is part of Intranet. |
+// | |
+// | Intranet is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | Intranet is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: Mon Jul 7 17:22:10 2003 |
+// | Autor: Gonzalo Merayo <gmeray@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+
+
+// +X2C includes
+require_once 'DB.php';
+// ~X2C
+
+// +X2C Class 163 :Intranet_Legajos_Estudios
+/**
+ * Estudios del agente
+ *
+ * @access public
+ */
+class Intranet_Legajos_Estudios extends DB {
+ /**
+ * @var int $agente
+ * @access public
+ */
+ var $agente;
+
+ /**
+ * @var int $datos
+ * @access public
+ */
+ var $datos;
+
+ // ~X2C
+
+ // +X2C Operation 166
+ /**
+ * @param int $agente
+ *
+ * @return void
+ * @access public
+ */
+ function Intranet_Legajos_Estudios($agente)// ~X2C
+ {
+ $this->agente = $agente;
+ $dsn = 'mysql://intranet:intranet@intranet-db/novedades';
+ $db = DB::connect($dsn);
+ if (DB::isError($db))
+ die ($db->getMessage("No pudo conectarse a la base"));
+ $sql = "SELECT *
+ FROM web005
+ WHERE documento = $agente";
+ $result = $db->query($sql);
+ if (DB::isError($result))
+ die ($result->getMessage("Query mal hecho"));
+
+ for ($fila = 0; $fila < $result->numRows(); $fila++) {
+ $this->datos[$fila] = $result->fetchRow(DB_FETCHMODE_ASSOC);
+ }
+ }
+ // -X2C
+
+ // +X2C Operation 172
+ /**
+ * @return void
+ * @access public
+ */
+ function getEstudios()// ~X2C
+ {
+ return $this->datos;
+ }
+ // -X2C
+
+} // -X2C Class :Intranet_Legajos_Estudios
+?>
\ No newline at end of file
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | Intranet |
+// +--------------------------------------------------------------------+
+// | This file is part of Intranet. |
+// | |
+// | Intranet is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | Intranet is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: Mon Jul 7 17:22:10 2003 |
+// | Autor: Gonzalo Merayo <gmeray@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+
+
+// +X2C includes
+require_once 'DB.php';
+// ~X2C
+
+// +X2C Class 155 :Intranet_Legajos_ExperienciaLaboral
+/**
+ * Antigedad laboral del agente
+ *
+ * @access public
+ */
+class Intranet_Legajos_ExperienciaLaboral extends DB {
+ /**
+ * @var int $agente
+ * @access public
+ */
+ var $agente;
+
+ /**
+ * @var int $antiguedad
+ * @access public
+ */
+ var $antiguedad;
+
+ /**
+ * @var int $experiencia
+ * @access public
+ */
+ var $experiencia;
+
+ // ~X2C
+
+ // +X2C Operation 159
+ /**
+ * @param int $agente
+ *
+ * @return void
+ * @access public
+ */
+ function Intranet_Legajos_ExperienciaLaboral($agente)// ~X2C
+ {
+ $this->agente = $agente;
+ $dsn = 'mysql://intranet:intranet@intranet-db/novedades';
+ $db = DB::connect($dsn);
+ if (DB::isError($db))
+ die ($db->getMessage("No pudo conectarse a la base"));
+ $sql = "SELECT *
+ FROM web032
+ WHERE nrodoc = $agente
+ ORDER BY desde";
+ $result_exp = $db->query($sql);
+ if (DB::isError($result_exp))
+ die ($result_exp->getMessage("Query mal hecho"));
+
+ for ($fila = 0; $fila < $result_exp->numRows(); $fila++) {
+ $this->experiencia[$fila] = $result_exp->fetchRow(DB_FETCHMODE_ASSOC);
+ }
+
+ $sql = "SELECT *
+ FROM web031
+ WHERE nrodoc = $agente";
+ $result_ant = $db->query($sql);
+ if (DB::isError($result_ant))
+ die ($result_ant->getMessage("Query mal hecho"));
+
+ if ($result_ant->numRows() > 0) {
+ $this->antiguedad = $result_ant->fetchRow(DB_FETCHMODE_ASSOC);
+ }
+
+ }
+ // -X2C
+
+ // +X2C Operation 160
+ /**
+ * @return void
+ * @access public
+ */
+ function getAntiguedad()// ~X2C
+ {
+ return $this->antiguedad;
+ }
+ // -X2C
+
+ // +X2C Operation 161
+ /**
+ * @return void
+ * @access public
+ */
+ function getExperiencia()// ~X2C
+ {
+ return $this->experiencia;
+ }
+ // -X2C
+
+} // -X2C Class :Intranet_Legajos_ExperienciaLaboral
+?>
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | Intranet |
+// +--------------------------------------------------------------------+
+// | This file is part of Intranet. |
+// | |
+// | Intranet is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | Intranet is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: Mon Jul 7 17:22:10 2003 |
+// | Autor: Gonzalo Merayo <gmeray@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+
+
+// +X2C includes
+require_once 'DB.php';
+// ~X2C
+
+// +X2C Class 154 :Intranet_Legajos_Familiares
+/**
+ * @access public
+ */
+class Intranet_Legajos_Familiares extends DB {
+ /**
+ * @var int $agente
+ * @access public
+ */
+ var $agente;
+
+ /**
+ * @var int $datos
+ * @access public
+ */
+ var $datos;
+
+ // ~X2C
+
+ // +X2C Operation 169
+ /**
+ * @param int $agente
+ *
+ * @return void
+ * @access public
+ */
+ function Intranet_Legajos_Familiares($agente)// ~X2C
+ {
+ $this->agente = $agente;
+ $dsn = 'mysql://intranet:intranet@intranet-db/novedades';
+ $db = DB::connect($dsn);
+ if (DB::isError($db))
+ die ($db->getMessage("No pudo conectarse a la base"));
+ $sql = "SELECT *
+ FROM web004
+ WHERE documento = $agente";
+ $result = $db->query($sql);
+ if (DB::isError($result))
+ die ($result->getMessage("Query mal hecho"));
+
+ for ($fila = 0; $fila < $result->numRows(); $fila++) {
+ $this->datos[$fila] = $result->fetchRow(DB_FETCHMODE_ASSOC);
+ }
+ }
+ // -X2C
+
+ // +X2C Operation 170
+ /**
+ * @return void
+ * @access public
+ */
+ function getHijos()// ~X2C
+ {
+ $fila = 0;
+ foreach (array_keys($this->datos) as $key) {
+ if($this->datos[$key]['parentesco']=="H") {
+ $aux[$fila]['nombre'] = $this->datos[$key]['nombre'];
+ $aux[$fila]['tipo_doc'] = $this->datos[$key]['tipodoc'];
+ $aux[$fila]['nro_doc'] = $this->datos[$key]['nrodoc'];
+ $aux[$fila]['fecha_nac'] = $this->datos[$key]['fecha_nac'];
+ $aux[$fila]['parentesco'] = $this->datos[$key]['parentesco'];
+ $fila++;
+ }
+ }
+ return $aux;
+ }
+ // -X2C
+
+ // +X2C Operation 171
+ /**
+ * @return void
+ * @access public
+ */
+ function getFamiliares()// ~X2C
+ {
+ $fila = 0;
+ foreach (array_keys($this->datos) as $key) {
+ if($this->datos[$key]['parentesco']!="H") {
+ $aux[$fila]['nombre'] = $this->datos[$key]['nombre'];
+ $aux[$fila]['tipo_doc'] = $this->datos[$key]['tipodoc'];
+ $aux[$fila]['nro_doc'] = $this->datos[$key]['nrodoc'];
+ $aux[$fila]['fecha_nac'] = $this->datos[$key]['fecha_nac'];
+ $aux[$fila]['parentesco'] = $this->datos[$key]['parentesco'];
+ $fila++;
+ }
+ }
+ return $aux;
+ }
+ // -X2C
+
+} // -X2C Class :Intranet_Legajos_Familiares
+?>