X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/6a444056ae627fc2c1daefb58b5d2c0f001faf55..19062a773ac6436434e7539c1e43fd911f15733c:/sistema/local_lib/Servicios/Legajos/ExperienciaLaboral.php diff --git a/sistema/local_lib/Servicios/Legajos/ExperienciaLaboral.php b/sistema/local_lib/Servicios/Legajos/ExperienciaLaboral.php index 9edbdf5..ea1ef93 100644 --- a/sistema/local_lib/Servicios/Legajos/ExperienciaLaboral.php +++ b/sistema/local_lib/Servicios/Legajos/ExperienciaLaboral.php @@ -2,16 +2,16 @@ // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: // +--------------------------------------------------------------------+ // | Ministerio de Economía | -// | Intranet | +// | Intranet | // +--------------------------------------------------------------------+ -// | This file is part of Intranet. | +// | This file is part of Intranet. | // | | -// | Intranet is free software; you can redistribute it and/or modify | +// | 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 | +// | 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. | @@ -20,25 +20,25 @@ // | 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 | +// | Creado: Mon Jul 7 17:22:10 2003 | +// | Autor: Matías Sklar | // +--------------------------------------------------------------------+ // // $Id: Intranet_Legajos_ExperienciaLaboral.php 23 2003-07-15 18:56:42Z msklar $ // - - // +X2C includes require_once 'DB.php'; // ~X2C +require_once 'intranetdb.php'; -// +X2C Class 155 :Intranet_Legajos_ExperienciaLaboral +// +X2C Class 155 :Servicios_Legajos_ExperienciaLaboral /** - * Antigedad laboral del agente + * Antigüedad laboral del agente * * @access public */ +// XXX - Pregunta llucar: POR QUE CATSO HEREDA DE DB??? class Servicios_Legajos_ExperienciaLaboral extends DB { /** * @var int $agente @@ -67,31 +67,30 @@ class Servicios_Legajos_ExperienciaLaboral extends DB { * @return void * @access public */ - function Intranet_Legajos_ExperienciaLaboral($agente) // ~X2C + function Servicios_Legajos_ExperienciaLaboral($agente) // ~X2C { $this->agente = $agente; - $dsn = 'mysql://intranet:intranet@intranet-db/novedades'; - $db = DB::connect($dsn); + $db = IntranetDB::connect(); if (DB::isError($db)) - die ($db->getMessage("No pudo conectarse a la base")); + trigger_error($db->getMessage('No pudo conectarse a la base'), E_USER_ERROR); $sql = "SELECT * - FROM web032 + FROM novedades.web032 WHERE nrodoc = $agente ORDER BY desde"; $result_exp = $db->query($sql); if (DB::isError($result_exp)) - die ($result_exp->getMessage("Query mal hecho")); + trigger_error($result_exp->getMessage('Query mal hecho'), E_USER_ERROR); for ($fila = 0; $fila < $result_exp->numRows(); $fila++) { $this->experiencia[$fila] = $result_exp->fetchRow(DB_FETCHMODE_ASSOC); } $sql = "SELECT * - FROM web031 + FROM novedades.web031 WHERE nrodoc = $agente"; $result_ant = $db->query($sql); if (DB::isError($result_ant)) - die ($result_ant->getMessage("Query mal hecho")); + trigger_error($result_ant->getMessage('Query mal hecho'), E_USER_ERROR); if ($result_ant->numRows() > 0) { $this->antiguedad = $result_ant->fetchRow(DB_FETCHMODE_ASSOC); @@ -122,5 +121,5 @@ class Servicios_Legajos_ExperienciaLaboral extends DB { } // -X2C -} // -X2C Class :Intranet_Legajos_ExperienciaLaboral +} // -X2C Class :Servicios_Legajos_ExperienciaLaboral ?>