--- /dev/null
+; Configuración de la base de datos.
+; $Id$
+
+dsn = "mysql://intranet:intranet@bal747f/intranet"
+
+[opciones]
+persistent = true
+;optimize = performance
+;debug = 0
+;autofree = false
+;seqname_format = "%s_seq"
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de EconomÃa |
+// | AI (Administrador de Intranet) |
+// +--------------------------------------------------------------------+
+// | This file is part of AI. |
+// | |
+// | AI 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. |
+// | |
+// | AI 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: Wed Jul 2 17:53:43 2003 |
+// | Autor: Leandro Lucarella <llucar@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C includes
+require_once 'DB.php';
+// ~X2C
+
+// +X2C Class 503 :AIDB
+/**
+ * Base de datos del Administrador de Intranet.
+ *
+ * @access public
+ */
+class AIDB extends DB {
+ // ~X2C
+
+ // +X2C Operation 506
+ /**
+ * @return &mixed
+ * @access public
+ */
+ function &connect() // ~X2C
+ {
+ $conf = parse_ini_file(dirname(__FILE__) . '/../conf/AIDB.ini', true);
+ return DB::connect($conf['dsn'], $conf['opciones']);
+ }
+ // -X2C
+
+} // -X2C Class :AIDB
+
+?>
\ No newline at end of file
* @return void
* @access public
*/
- function AIError($codigo, $mensaje = '')// ~X2C
+ function AIError($codigo, $mensaje = '') // ~X2C
{
$this->PEAR_Error($mensaje, $codigo);
}
* @return void
* @access public
*/
- function GrupoSecciones($grupo = 0)// ~X2C
+ function GrupoSecciones($grupo = 0) // ~X2C
{
$this->grupo = $grupo;
}
* @return PEAR_Error
* @access public
*/
- function cargar($db)// ~X2C
+ function cargar($db) // ~X2C
{
$grupo = intval($this->grupo);
if (is_a($db, 'db_result')) {
* @return PEAR_Error
* @access public
*/
- function guardar($db)// ~X2C
+ function guardar($db) // ~X2C
{
$grupo = intval($this->grupo);
$where = '';
* @return PEAR_Error
* @access public
*/
- function borrar($db)// ~X2C
+ function borrar($db) // ~X2C
{
$grupo = intval($this->grupo);
if ($grupo) {
* @return PEAR_Error
* @access public
*/
- function cargarHijos($db)// ~X2C
+ function cargarHijos($db) // ~X2C
{
$grupo = intval($this->grupo);
$result = $db->query("SELECT * FROM grupo_secciones WHERE grupo_padre = $grupo");
* @return GrupoSecciones
* @access public
*/
- function __clone()// ~X2C
+ function __clone() // ~X2C
{
return $this;
}
} // -X2C Class :GrupoSecciones
-?>
+?>
\ No newline at end of file
* @return void
* @access public
*/
- function Servicio($servicio = 0)// ~X2C
+ function Servicio($servicio = 0) // ~X2C
{
$this->servicio = $servicio;
}
* @return PEAR_Error
* @access public
*/
- function cargar($db)// ~X2C
+ function cargar($db) // ~X2C
{
$servicio = intval($this->servicio);
if (is_a($db, 'db_result')) {
* @return PEAR_Error
* @access public
*/
- function guardar($db)// ~X2C
+ function guardar($db) // ~X2C
{
$servicio = intval($this->servicio);
$where = '';
* @return PEAR_Error
* @access public
*/
- function borrar($db)// ~X2C
+ function borrar($db) // ~X2C
{
$servicio = intval($this->servicio);
if ($servicio) {
* @return PEAR_Error
* @access public
*/
- function cargarHijos($db)// ~X2C
+ function cargarHijos($db) // ~X2C
{
$servicio = intval($this->servicio);
$result = $db->query("SELECT * FROM servicio WHERE servicio_padre = $servicio");
* @return Servicio
* @access public
*/
- function __clone()// ~X2C
+ function __clone() // ~X2C
{
return $this;
}
} // -X2C Class :Servicio
-?>
+?>
\ No newline at end of file
* @return void
* @access public
*/
- function Sistema($sistema = 0)// ~X2C
+ function Sistema($sistema = 0) // ~X2C
{
$this->sistema = $sistema;
}
* @return PEAR_Error
* @access public
*/
- function cargar($db)// ~X2C
+ function cargar($db) // ~X2C
{
$sistema = intval($this->sistema);
if (is_a($db, 'db_result')) {
* @return PEAR_Error
* @access public
*/
- function guardar($db)// ~X2C
+ function guardar($db) // ~X2C
{
$sistema = intval($this->sistema);
$where = '';
* @return PEAR_Error
* @access public
*/
- function borrar($db)// ~X2C
+ function borrar($db) // ~X2C
{
$sistema = intval($this->sistema);
if ($sistema) {
* @return Sistema
* @access public
*/
- function __clone()// ~X2C
+ function __clone() // ~X2C
{
return $this;
}
} // -X2C Class :Sistema
-?>
+?>
\ No newline at end of file
$LAYOUT->setCellAttributes(0, 1, array('width' => '10'));
$LAYOUT->setCellContents(0, 1, ' ');
+// Siempre uso mi base de datos.
+require_once 'AIDB.php';
+$db =& AIDB::connect();
+
?>