-<?php
+<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
+-------------------------------------------------------------------------------
+ mlib
+-------------------------------------------------------------------------------
+This file is part of mlib.
+
+mlib 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.
+
+mlib 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; if not,
+write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+Boston, MA 02111-1307 USA
+-------------------------------------------------------------------------------
+Creado: <sin datos>
+Autor: <sin datos>
+-------------------------------------------------------------------------------
+$Id$
+-----------------------------------------------------------------------------*/
/**
* Paginador de tablas, a partir de un array
-* Basado en MECON_DB_Pager
+* Basado en MLIB_DB_Pager
*/
-class MECON_Array_Pager
+class MLIB_Array_Pager
{
var $currentpage = 0;
var $current = 0;
* @param int $maxpages Cantidad máxima de páginas a mostrar
* @param int $numrows Nro. de filas de la tabla
*/
- function MECON_Array_Pager (&$res, $from = 0, $limit = 10, $maxpages = 21, $numrows = null)
+ function MLIB_Array_Pager (&$res, $from = 0, $limit = 10, $maxpages = 21, $numrows = null)
{
$this->dbh = $res->dbh;
$this->result = $res;
/**
* Calcula los datos necesarios para que funcione el paginador
- * (es igual a MECON_DB_Pager)
+ * (es igual a MLIB_DB_Pager)
* @return mixed PEAR_Error if error.
*/
function build()
* @see http://vulcanonet.com/soft/pager/
*/
-class MECON_DB_Pager extends DB_Result
+class MLIB_DB_Pager extends DB_Result
{
var $currentpage = 0;
* and supply later to the constructor
* @deprecated
*/
- function MECON_DB_Pager (&$res, $from = 0, $limit = 10, $maxpages = 21, $numrows = null)
+ function MLIB_DB_Pager (&$res, $from = 0, $limit = 10, $maxpages = 21, $numrows = null)
{
$this->dbh = $res->dbh;
$this->result = $res->result;
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
/**
* Indica que las condiciones deben concatenarse con <tt>OR</tt>.
*/
-define('MECON_DBO_OR', 'OR');
+define('MLIB_DBO_OR', 'OR');
/**
* Indica que las condiciones deben concatenarse con <tt>AND</tt>.
*/
-define('MECON_DBO_AND', 'AND');
+define('MLIB_DBO_AND', 'AND');
/**
* @example DBO.php
* para consulta.
*/
-// +X2C Class 16 :MECON_DBO
+// +X2C Class 16 :MLIB_DBO
/**
* Interfaz genérica para objetos que pueden ser guardados y/o operan con bases de datos.
Utilizando esta interfaz se pueden hacer objetos genericos que manejen DBO, como por ejemplo tablas para listarlos. La forma común de recorrer una serie de resultados de una búsqueda de DBO puede verse en el método buscar().
* @access public
* @abstract
*/
-class MECON_DBO {
+class MLIB_DBO {
// ~X2C
// +X2C Operation 17
Si hay un error, devuelve un PEAR_Error, si no devuelve la cantidad de objetos encontrados y carga el primero (si hay al menos un resultado).
En el caso típico, se setea la propiedad que es la clave de la base de datos (siendo el resto nulas). Por ejemplo:
@code
-class miDBO extends MECON_DBO {
+class miDBO extends MLIB_DBO {
// Definición...
}
$db = DB::connect('mi DSN');
Si alguna clave es <tt>null</tt>, generalmente se guarda un objeto nuevo autoincrementando la clave en <tt>null</tt>. Si todas las claves son distintas de <tt>null</tt> y existe un objeto con las mismas claves, se modifica del existente los campos que el objeto no tenga en <tt>null</tt>; si no existe da error a menos que se use el indicador <tt>\$nuevo</tt>, en cuyo caso se agrega como nuevo. Si hay un error, devuelve un PEAR_Error. Si se guardan los datos bien, devuelve <tt>true</tt>.
Por ejemplo:
@code
-class miDBO extends MECON_DBO {
+class miDBO extends MLIB_DBO {
// Definición...
}
$db = DB::connect('mi DSN');
Si hay un error, devuelve un PEAR_Error. Si no, devuelve la cantidad de objetos borrados de la base de datos.
Por ejemplo:
@code
-class miDBO extends MECON_DBO {
+class miDBO extends MLIB_DBO {
// Definición...
}
$db = DB::connect('mi DSN');
Si hay un error, devuelve un PEAR_Error. Si no, devuelve un DB_Result con los resultados de la búsqueda.
Por ejemplo:
@code
-class miDBO extends MECON_DBO {
+class miDBO extends MLIB_DBO {
// Definición...
}
$db = DB::connect('mi DSN');
$miDBO = new MiDBO();
$miDBO->nombre = 'rez';
-$res = $miDBO->buscar($db, MECON_DBO_AND, 'nombre ASC');
+$res = $miDBO->buscar($db, MLIB_DBO_AND, 'nombre ASC');
if (PEAR::isError($res)) {
echo 'Hubo un error.';
} else {
Es similar a cargar, ya que se hace un <tt>SELECT</tt> con un <tt>WHERE</tt> basado en los atributos no nulos pero puede concatenarse con <tt>AND</tt> u <tt>OR</tt> y se busca con <tt>LIKE</tt> para que dea más general.
*
* @param DB $db Base de datos a utilizar en la búsqueda.
- * @param int $operador Indica que operador se usa para la búsqueda. Puede ser MECON_DBO_AND o MECON_DBO_OR.
+ * @param int $operador Indica que operador se usa para la búsqueda. Puede ser MLIB_DBO_AND o MLIB_DBO_OR.
* @param mixed $orden Campos por los cuales ordenar. El formato es <tt>campo (ASC|DESC)</tt> (siedo <tt>ASC</tt> si se lo ordena de forma ascendente y <tt>DESC</tt> si se lo ordena de forma descendente). Puede pasarse un <em>string</em> o un <em>array</em> con varios <em>strings</em> con este formato para ordenarlo por más de un campo a la vez.
*
* @return mixed
* @access public
* @abstract
*/
- function buscar($db = null, $operador = MECON_DBO_OR, $orden = '') // ~X2C
+ function buscar($db = null, $operador = MLIB_DBO_OR, $orden = '') // ~X2C
{
trigger_error('Not implemented!', E_USER_WARNING);
}
// -X2C
-} // -X2C Class :MECON_DBO
+} // -X2C Class :MLIB_DBO
?>
\ No newline at end of file
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
*
* @access public
*/
-class MECON_Date extends Date {
+class MLIB_Date extends Date {
/**
* Obtiene la fecha de inicio del próximo mes.
*
- * @return MECON_Date.
+ * @return MLIB_Date.
* @access public
*/
function getBeginOfNextMonth()
{
- return new MECON_Date(Date_Calc::beginOfNextMonth(
+ return new MLIB_Date(Date_Calc::beginOfNextMonth(
$this->day, $this->month, $this->year, '%Y-%m-%d'));
}
/**
* Obtiene la fecha de fin del próximo mes.
*
- * @return MECON_Date.
+ * @return MLIB_Date.
* @access public
*/
function getEndOfNextMonth()
{
- return new MECON_Date(Date_Calc::endOfNextMonth(
+ return new MLIB_Date(Date_Calc::endOfNextMonth(
$this->day, $this->month, $this->year, '%Y-%m-%d'));
}
/**
* Obtiene la fecha de inicio del mes anterior.
*
- * @return MECON_Date.
+ * @return MLIB_Date.
* @access public
*/
function getBeginOfPrevMonth()
{
- return new MECON_Date(Date_Calc::beginOfPrevMonth(
+ return new MLIB_Date(Date_Calc::beginOfPrevMonth(
$this->day, $this->month, $this->year, '%Y-%m-%d'));
}
/**
* Obtiene la fecha de fin del mes anterior.
*
- * @return MECON_Date.
+ * @return MLIB_Date.
* @access public
*/
function getEndOfPrevMonth()
{
- return new MECON_Date(Date_Calc::endOfPrevMonth(
+ return new MLIB_Date(Date_Calc::endOfPrevMonth(
$this->day, $this->month, $this->year, '%Y-%m-%d'));
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
* @todo Probar. Agregar _updateDBInfo() a todas las funciones de Date que
* modifiquen la fecha.
*/
-class MECON_Feriado extends Date {
+class MLIB_Feriado extends Date {
/**
* Base de datos a usar para las consultas.
/// Descripción del feriado.
var $descripcion;
- function MECON_Feriado($db, $date = null) {
+ function MLIB_Feriado($db, $date = null) {
$this->_db = $db;
parent::Date($date);
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id: Graph.php 428 2003-11-18 14:30:30Z mmarre $
-----------------------------------------------------------------------------*/
-require_once 'MECON/Graph/external/jpgraph/src/jpgraph.php';
+require_once 'MLIB/Graph/external/jpgraph/src/jpgraph.php';
/**
* Liberia base para el manejo de graficos.
*/
-class MECON_Graph {
+class MLIB_Graph {
/**
* @return void
* @access public
*/
- function MECON_graph($tipo, $ancho=300, $alto=200,$titulo,$attrib_gral=NULL)
+ function MLIB_graph($tipo, $ancho=300, $alto=200,$titulo,$attrib_gral=NULL)
{
$this->_tipo=$tipo;
$this->_ancho= $ancho;
if(($this->_tipo=="torta")||($this->_tipo=="torta3D"))
{
- require_once 'MECON/Graph/external/jpgraph/src/jpgraph_pie.php';
- require_once 'MECON/Graph/external/jpgraph/src/jpgraph_pie3d.php';
+ require_once 'MLIB/Graph/external/jpgraph/src/jpgraph_pie.php';
+ require_once 'MLIB/Graph/external/jpgraph/src/jpgraph_pie3d.php';
$this->_grafico= new PieGraph($ancho,$alto);
if ($tipo=="lineas")
{
$valido=true;
- require_once 'MECON/Graph/external/jpgraph/src/jpgraph_line.php';
+ require_once 'MLIB/Graph/external/jpgraph/src/jpgraph_line.php';
$plot= new LinePlot($secuencia);
if (isset($atributos['colorRelleno']))
if ($tipo=="barras")
{
$valido=true;
- require_once 'MECON/Graph/external/jpgraph/src/jpgraph_bar.php';
+ require_once 'MLIB/Graph/external/jpgraph/src/jpgraph_bar.php';
$plot= new BarPlot($secuencia);
if (isset($atributos['colorRelleno']))
if ($tipo=="puntos")
{
$valido=true;
- require_once 'MECON/Graph/external/jpgraph/src/jpgraph_scatter.php';
+ require_once 'MLIB/Graph/external/jpgraph/src/jpgraph_scatter.php';
$plot= new ScatterPlot($secuencia);
if (isset($atributos['tipoMarca']))
*
* Ejemplo de Uso:
* @code
- * require_once 'MECON/Graph.php';
+ * require_once 'MLIB/Graph.php';
*
* $v1 = array(12,8,19,3,10,5);
* $v2 = array(1,28,9,13,1,5);
*
- * $graph =& new MECON_Graph ("xy", 300, 300, 'PRUEBA');
+ * $graph =& new MLIB_Graph ("xy", 300, 300, 'PRUEBA');
*
* $b1plot = $graph->agregarSecuencia("barras", $v1);
* $b2plot = $graph->agregarSecuencia("barras", $v2);
*
* Ejemplo de uso:
* @code
- * require_once 'MECON/Graph.php';
+ * require_once 'MLIB/Graph.php';
*
* $valores = array (4, 6, 23, 14, 30);
- * $nuevos = MECON_Graph::porcentajes($valores);
+ * $nuevos = MLIB_Graph::porcentajes($valores);
*
* // se obtiene (5, 8, 30, 18, 39) (%)
*
*/
function porcentajes ($valores)
{
- require_once 'MECON/Graph/external/jpgraph/src/jpgraph_pie.php';
+ require_once 'MLIB/Graph/external/jpgraph/src/jpgraph_pie.php';
$plot = new PiePlot ($valores);
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
require_once 'HTML/Table.php';
-require_once 'MECON/HTML/Image.php';
+require_once 'MLIB/HTML/Image.php';
/**
* DESC
*
* @access public
*/
-class MECON_HTML_Arbol extends HTML_Table
+class MLIB_HTML_Arbol extends HTML_Table
{
/**
* @return void
* @access public
*/
- function MECON_HTML_Arbol($datos, $titulo, $link_append = '')
+ function MLIB_HTML_Arbol($datos, $titulo, $link_append = '')
{
parent::HTML_Table(array(
'width' => '132',
* @access public
*/
function getCSS() {
- return '/MECON/css/html/arbol';
+ return '/MLIB/css/html/arbol';
}
/**
{
$bullets = array(
'',
- '/MECON/images/arbol_bullet_1.gif',
- '/MECON/images/arbol_bullet_2.gif',
- '/MECON/images/arbol_bullet_3.gif'
+ '/MLIB/images/arbol_bullet_1.gif',
+ '/MLIB/images/arbol_bullet_2.gif',
+ '/MLIB/images/arbol_bullet_3.gif'
);
$alts = array(
'',
'-',
'·'
);
- $classes = array('mecon_html_arbol_menu', 'mecon_html_arbol_menu1',
- 'mecon_html_arbol_menu1', 'mecon_html_arbol_menu2');
+ $classes = array('MLIB_html_arbol_menu', 'MLIB_html_arbol_menu1',
+ 'MLIB_html_arbol_menu1', 'MLIB_html_arbol_menu2');
$tabulados = 7;
$atr = array(
'border' => '0',
);
$margen = ' ';
if ($n) {
- $margen = new MECON_HTML_Image('/MECON/images/blanco.gif', str_repeat(' ', $n), $atr);
+ $margen = new MLIB_HTML_Image('/MLIB/images/blanco.gif', str_repeat(' ', $n), $atr);
$margen = $margen->toHtml();
}
$imagen = '';
if (@$bullets[$n]) {
- $imagen = new MECON_HTML_Image($bullets[$n], @$alts[$n]);
+ $imagen = new MLIB_HTML_Image($bullets[$n], @$alts[$n]);
$imagen = $imagen->toHtml();
}
foreach ($dat as $e) {
$titulo = $e['titulo'];
- if(isset($e['activo']) && $e['activo'] != 0) $class = 'mecon_html_arbol_menu_activo';
+ if(isset($e['activo']) && $e['activo'] != 0) $class = 'MLIB_html_arbol_menu_activo';
else $class = @$classes[$n] ? $classes[$n] : end($classes);
if(isset($e['bold'])) $class .= '_bold';
if(!is_null($e['link'])) {
'border' => '0',
'cellspacing' => '2',
'cellpadding' => '0',
- 'class' => 'mecon_html_arbol_bodytext'));
+ 'class' => 'MLIB_html_arbol_bodytext'));
$titulo = new HTML_Table(array(
'width' => '132',
'height' => '26',
'cellspacing' => '0',
'cellpadding' => '0',
'align' => 'center',
- 'background' => '/MECON/images/arbol_titulo.gif'));
+ 'background' => '/MLIB/images/arbol_titulo.gif'));
$titulo->addRow(array($this->titulo), array(
'align' => 'center',
- 'class' => 'mecon_html_arbol_titulo'));
+ 'class' => 'MLIB_html_arbol_titulo'));
$this->addRow(array($titulo), array('bgcolor' => '#FFFFFF'));
$this->expandir($this->datos, 0, $t_interna);
$this->addRow(array($t_interna->toHTML()));
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/HTML/Arbol.php';
+require_once 'MLIB/HTML/Arbol.php';
require_once 'DB.php';
/**
*
* @access public
*/
-class MECON_HTML_ArbolDB extends MECON_HTML_Arbol
+class MLIB_HTML_ArbolDB extends MLIB_HTML_Arbol
{
/**
* @return void
* @access public
*/
- function MECON_HTML_ArbolDB($dbdata, $titulo, $link_append = '', $expandir = false)
+ function MLIB_HTML_ArbolDB($dbdata, $titulo, $link_append = '', $expandir = false)
{
if(isset($dbdata['id_padre']))
$this->padre = $dbdata['id_padre'];
}
}
- parent::MECON_HTML_Arbol(array(), $titulo, $link_append);
+ parent::MLIB_HTML_Arbol(array(), $titulo, $link_append);
$this->datos = $this->BuscarHijos(0);
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
*
* @access public
*/
-class MECON_HTML_Error {
+class MLIB_HTML_Error {
/**
* Mensaje de error.
*
* @return void
* @access public
*/
- function MECON_HTML_Error($msg = '')
+ function MLIB_HTML_Error($msg = '')
{
// TODO - hacer que se le pueda pasar un PEAR_Error y que le saque el mensaje solita.
$this->msg = $msg;
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/HTML/Link.php';
-require_once 'MECON/HTML/Image.php';
+require_once 'MLIB/HTML/Link.php';
+require_once 'MLIB/HTML/Image.php';
/**
* Ícono.
* Básicamente es una imágen con un link.
* Ejemplo:
* @code
- * require_once 'MECON/HTML/Icon.php';
- * require_once 'MECON/HTML/Link.php';
+ * require_once 'MLIB/HTML/Icon.php';
+ * require_once 'MLIB/HTML/Link.php';
* // Crea un ícono de IR sin link.
- * $icono1 = new MECON_HTML_Icon('ir');
+ * $icono1 = new MLIB_HTML_Icon('ir');
* // Crea un ícono de ELIMINAR que apunta a 'algun/lugar'.
- * $icono2 = new MECON_HTML_Icon('eliminar', 'algun/lugar');
+ * $icono2 = new MLIB_HTML_Icon('eliminar', 'algun/lugar');
* // Crea un ícono de NUEVO que apunta a 'algun/lugar?id=3&cant=10', tiene el
* // texto alternativo '>>' y 1 píxel de borde.
- * $icono3 = new MECON_HTML_Icon('nuevo',
- * new MECON_HTML_Link('algun/lugar', '', array('id' => 3, $cant => 10)),
+ * $icono3 = new MLIB_HTML_Icon('nuevo',
+ * new MLIB_HTML_Link('algun/lugar', '', array('id' => 3, $cant => 10)),
* '>>', array('border' => 1));
* // Muestra todos los íconos.
* $icon1->display();
*
* @access public
*/
-class MECON_HTML_Icon extends MECON_HTML_Image {
+class MLIB_HTML_Icon extends MLIB_HTML_Image {
/**
* Link a donde apunta la imagen.
*
* @param $nombre Nombre de la imágen.
* @param $link Link a donde apunta. Si es null, no tiene un link.
- Puede ser un link o un MECON_HTML_Link.
+ Puede ser un link o un MLIB_HTML_Link.
* @param $alt Texto alternativo para la imagen.
* @param $attrs Atributos de la imágen.
* @param $align Alineación de la imagen con respecto al texto.
*/
- function MECON_HTML_Icon($nombre, $link = null, $alt = null, $attrs =
+ function MLIB_HTML_Icon($nombre, $link = null, $alt = null, $attrs =
array(), $align = 'right')
{
if (is_readable($nombre))
}
else
{
- $src = "/MECON/images/general_$nombre";
+ $src = "/MLIB/images/general_$nombre";
}
if (is_null($alt)) {
$alt = '(' . strtoupper($nombre{0}) . ')';
}
- parent::MECON_HTML_Image($src, $alt, $attrs);
+ parent::MLIB_HTML_Image($src, $alt, $attrs);
$this->setLink($link);
$this->_align = $align;
}
*/
function setLink($link)
{
- if (!is_a($link, 'mecon_html_link') and !is_null($link)) {
- $this->_link = new MECON_HTML_Link($link);
+ if (!is_a($link, 'MLIB_html_link') and !is_null($link)) {
+ $this->_link = new MLIB_HTML_Link($link);
} else {
$this->_link = $link;
}
}
if ($this->_align == 'left') {
- $link->addContents(new MECON_HTML_Image($this->getSrc(),
+ $link->addContents(new MLIB_HTML_Image($this->getSrc(),
$this->getAlt(), $this->getAttributes()), true);
}
elseif ($this->_align == 'right') {
- $link->addContents(new MECON_HTML_Image($this->getSrc(),
+ $link->addContents(new MLIB_HTML_Image($this->getSrc(),
$this->getAlt(), $this->getAttributes()));
}
return $link;
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
require_once 'HTML/Common.php';
// ~X2C
-// +X2C Class 537 :MECON_HTML_Image
+// +X2C Class 537 :MLIB_HTML_Image
/**
* HTML Image representation.
*
* @package HTML
* @access public
*/
-class MECON_HTML_Image extends HTML_Common {
+class MLIB_HTML_Image extends HTML_Common {
// ~X2C
// +X2C Operation 169
* @return void
* @access public
*/
- function MECON_HTML_Image($src = '', $alt = '', $attrs = array()) // ~X2C
+ function MLIB_HTML_Image($src = '', $alt = '', $attrs = array()) // ~X2C
{
if (is_array($attrs)) {
$attrs['src'] = $src;
}
// -X2C
-} // -X2C Class :MECON_HTML_Image
+} // -X2C Class :MLIB_HTML_Image
?>
\ No newline at end of file
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
* @package HTML
* @access public
*/
-class MECON_HTML_Link extends HTML_Common {
+class MLIB_HTML_Link extends HTML_Common {
/**
* Variables to send via GET HTTP method.
*
* @return void
* @access public
*/
- function MECON_HTML_Link($href = '', $contents = '', $getVars = array(), $attrs = array())
+ function MLIB_HTML_Link($href = '', $contents = '', $getVars = array(), $attrs = array())
{
if (is_array($attrs)) {
$attrs['href'] = $href;
if (!isset($attrs['class'])){
- $attrs['class'] = 'mecon_html_link';
+ $attrs['class'] = 'MLIB_html_link';
}
} else {
$attrs .= " href=$href";
*/
function getCSS()
{
- return '/MECON/css/html/link';
+ return '/MLIB/css/html/link';
}
/**
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
require_once 'HTML/Page.php';
/**
- * Clase para crear paginas sin tener que utilizar MECON_Marco.
+ * Clase para crear paginas sin tener que utilizar MLIB_Marco.
* Obtiene los css de los objetos que se le agregan
*
* @access public
*/
-class MECON_HTML_Page extends HTML_Page {
+class MLIB_HTML_Page extends HTML_Page {
/**
* Constructor.
* @return void
* @access public
*/
- function MECON_HTML_Page()
+ function MLIB_HTML_Page()
{
parent::HTML_Page(
array (
*/
function getCSS()
{
- return '/MECON/css/html/page';
+ return '/MLIB/css/html/page';
}
/**
*/
function exitError($msg)
{
- require_once 'MECON/HTML/Error.php';
+ require_once 'MLIB/HTML/Error.php';
if (is_a($msg, 'pear_error')) {
$msg = $msg->getMessage();
}
- $this->addBodyContent(new MECON_HTML_Error($msg));
+ $this->addBodyContent(new MLIB_HTML_Error($msg));
$this->display();
exit;
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/HTML/QuickFormSimple.php';
-require_once 'MECON/HTML/QuickForm/Renderer/Tabla.php';
+require_once 'MLIB/HTML/QuickFormSimple.php';
+require_once 'MLIB/HTML/QuickForm/Renderer/Tabla.php';
/**
* QuickForm de uso general del MECON.
*/
-class MECON_HTML_QuickForm extends MECON_HTML_QuickFormSimple {
+class MLIB_HTML_QuickForm extends MLIB_HTML_QuickFormSimple {
var $renderer;
- function MECON_HTML_QuickForm($formName='', $method='post', $action='', $target='_self', $attributes=null)
+ function MLIB_HTML_QuickForm($formName='', $method='post', $action='', $target='_self', $attributes=null)
{
- parent::MECON_HTML_QuickFormSimple($formName, $method, $action, $target, $attributes);
- $this->renderer =& new MECON_HTML_QuickForm_Renderer_Tabla();
+ parent::MLIB_HTML_QuickFormSimple($formName, $method, $action, $target, $attributes);
+ $this->renderer =& new MLIB_HTML_QuickForm_Renderer_Tabla();
}
function toHtml()
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
require_once 'HTML/QuickForm/Renderer.php';
-require_once 'MECON/HTML/Tabla.php';
+require_once 'MLIB/HTML/Tabla.php';
/**
* QuickForm renderer que usa Tabla como backend.
*
* @access public
*/
-class MECON_HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer {
+class MLIB_HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer {
/**
* Tabla usada para dibujar el formulario.
*
* @access public
*/
- function MECON_HTML_QuickForm_Renderer_Tabla($param = array())
+ function MLIB_HTML_QuickForm_Renderer_Tabla($param = array())
{
$this->HTML_QuickForm_Renderer();
if (is_a($param, 'Tabla')) {
$this->setTable($param);
}
else {
- $this->tabla =& new MECON_HTML_Tabla($param);
+ $this->tabla =& new MLIB_HTML_Tabla($param);
}
} // end constructor
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
require_once 'HTML/QuickForm/Renderer.php';
-require_once 'MECON/HTML/Tabla.php';
+require_once 'MLIB/HTML/Tabla.php';
/**
* QuickForm renderer que usa Tabla como backend. Es similar a
- * MECON_HTML_QuickForm_Renderer_Tabla pero dibuja la tabla horizontalmente.
+ * MLIB_HTML_QuickForm_Renderer_Tabla pero dibuja la tabla horizontalmente.
* Ej:
* <code>
- * $form = new MECON_HTML_QuickForm();
- * $form->renderer = new MECON_HTML_QuickForm_Renderer_TablaHorizontal(array('width' => 400));
+ * $form = new MLIB_HTML_QuickForm();
+ * $form->renderer = new MLIB_HTML_QuickForm_Renderer_TablaHorizontal(array('width' => 400));
* // Sigo creando el formulario normalmente...
* </code>
*/
-class MECON_HTML_QuickForm_Renderer_TablaHorizontal extends HTML_QuickForm_Renderer {
+class MLIB_HTML_QuickForm_Renderer_TablaHorizontal extends HTML_QuickForm_Renderer {
/**
* Tabla usada para dibujar el formulario.
*
* @access public
*/
- function MECON_HTML_QuickForm_Renderer_TablaHorizontal($param = array(), $opts = array())
+ function MLIB_HTML_QuickForm_Renderer_TablaHorizontal($param = array(), $opts = array())
{
parent::HTML_QuickForm_Renderer();
$this->_opts = $opts;
$this->setTable($param);
}
else {
- $this->setTable(new MECON_HTML_Tabla($param));
+ $this->setTable(new MLIB_HTML_Tabla($param));
}
} // end constructor
require_once('HTML/QuickForm/element.php');
require_once('HTML/QuickForm/radio.php');
-require_once('MECON/defaults.php');
-require_once 'MECON/HTML/Image.php';
+require_once('MLIB/defaults.php');
+require_once 'MLIB/HTML/Image.php';
/**
* Class to dynamically create HTML Select elements from a date
*
* @author Bertrand Mansion <bmansion@mamasam.com>
* @access public
*/
-class MECON_HTML_QuickForm_caritas extends HTML_QuickForm_element {
+class MLIB_HTML_QuickForm_caritas extends HTML_QuickForm_element {
// {{{ properties
/**
* @return void
*/
- function MECON_HTML_QuickForm_caritas($elementName=null, $elementLabel=null, $options=array(), $attributes=null) {
+ function MLIB_HTML_QuickForm_caritas($elementName=null, $elementLabel=null, $options=array(), $attributes=null) {
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_type = 'caritas';
function _createRadios() {
$this->caritas= array();
$elementName = $this->name;
- $dir = MECON_DIR_FS_IMG.'/caritas';
+ $dir = MLIB_DIR_FS_IMG.'/caritas';
$cant=5;
$i=1;
foreach ($this->listarArchivos($dir,'','.gif') as $nombre) {
$strHtml .= $element->toHtml();
}
}
- $imagen =& new MECON_HTML_Image(MECON_DIR_IMG."/caritas/$nombre");
+ $imagen =& new MLIB_HTML_Image(MLIB_DIR_IMG."/caritas/$nombre");
$strHtml .= ' ' . $imagen->toHtml() . ' ';
if (!($i++ % $this->_cols))
$strHtml .= '<br>';
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
* Modificado para que cumpla con los requisitos de mecon
*
*/
-class MECON_HTML_QuickForm_mdate extends HTML_QuickForm_date {
+class MLIB_HTML_QuickForm_mdate extends HTML_QuickForm_date {
// {{{ constructor
/**
* @access public
* @return void
*/
- function MECON_HTML_QuickForm_mdate($elementName=null, $elementLabel=null, $options=array(), $attributes=null) {
+ function MLIB_HTML_QuickForm_mdate($elementName=null, $elementLabel=null, $options=array(), $attributes=null) {
$this->_locale = array ('es' => array (
'weekdays_short'=> array ('' => '--', 'Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'),
'weekdays_long' => array ('' => '--', 'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'),
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
/**
* QuickForm de uso general del MECON.
*/
-class MECON_HTML_QuickFormSimple extends HTML_QuickForm {
+class MLIB_HTML_QuickFormSimple extends HTML_QuickForm {
- function MECON_HTML_QuickFormSimple($formName='', $method='post', $action='', $target='_self', $attributes=null)
+ function MLIB_HTML_QuickFormSimple($formName='', $method='post', $action='', $target='_self', $attributes=null)
{
parent::HTML_QuickForm($formName, $method, $action, $target, $attributes);
- $this->registerElementType('mdate', 'MECON/HTML/QuickForm/mdate.php', 'MECON_HTML_QuickForm_mdate');
- $this->registerRule('fecha', 'function', 'validate', 'MECON_HTML_QuickForm_mdate');
- $this->registerElementType('caritas', 'MECON/HTML/QuickForm/caritas.php', 'MECON_HTML_QuickForm_caritas');
+ $this->registerElementType('mdate', 'MLIB/HTML/QuickForm/mdate.php', 'MLIB_HTML_QuickForm_mdate');
+ $this->registerRule('fecha', 'function', 'validate', 'MLIB_HTML_QuickForm_mdate');
+ $this->registerElementType('caritas', 'MLIB/HTML/QuickForm/caritas.php', 'MLIB_HTML_QuickForm_caritas');
$this->setRequiredNote('<font color="red">*</font> indica un campo obligatorio');
$this->setJsWarnings('Hay errores en el formulario:', 'Por favor corríjalos antes de continuar.');
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
require_once 'HTML/Table.php';
-require_once 'MECON/HTML/Image.php';
-require_once 'MECON/HTML/Link.php';
+require_once 'MLIB/HTML/Image.php';
+require_once 'MLIB/HTML/Link.php';
/**
* Libreria para le manejo de las tablas de los sistemas de intranet.
*
*/
-class MECON_HTML_Tabla extends HTML_Table {
+class MLIB_HTML_Tabla extends HTML_Table {
/**
* Valores de Configuracion particular
*
* @access public
*/
- function MECON_HTML_Tabla($attrs = null, $estilo = 'comun') {
+ function MLIB_HTML_Tabla($attrs = null, $estilo = 'comun') {
// Obtengo los valores particulares de configuracion.
$this->_conf = include(dirname(__FILE__) . '/Tabla/estilo_' . $estilo . '.php');
// Seteo los atributos para la tabla
* $tabla->addLink('nuevos', 'nuevos.php');
* }
* $tabla->addLink('volver',
- * new MECON_HTML_Link('atras.php'));
+ * new MLIB_HTML_Link('atras.php'));
* $tabla->addLink('anterior',
- * new MECON_HTML_Link('previo.php', 'Persona Anterior'));
+ * new MLIB_HTML_Link('previo.php', 'Persona Anterior'));
* $tabla->addLink('siguiente',
- * new MECON_HTML_Link('previo.php', 'Siguiente persona',
+ * new MLIB_HTML_Link('previo.php', 'Siguiente persona',
* array('pers' => 'prox')));
* @endcode
*
* @param string $id Identificador del link predefinido. Puede ser 'volver',
* 'nuevo', 'nuevos', 'buscar', 'anterior' y 'siguiente'.
- * @param MECON_HTML_Link $link Link a usar. Si no tiene contenidos, se pone
+ * @param MLIB_HTML_Link $link Link a usar. Si no tiene contenidos, se pone
* uno por defecto. Si es null, se pone como
* link la página actual.
*
$link = @$_SERVER['PHP_SELF'];
}
if (is_string($link)) {
- $link = new MECON_HTML_Link($link, '');
+ $link = new MLIB_HTML_Link($link, '');
}
switch ($id) {
case 'nuevo':
- $img = new MECON_HTML_Image('/MECON/images/general_nuevo', ' >>');
+ $img = new MLIB_HTML_Image('/MLIB/images/general_nuevo', ' >>');
// Si no tiene titulo, le pone titulo por defecto.
if (!$link->getContents()) {
$link->setContents('Nuevo');
$this->updateCabecera($link, 'derecha');
break;
case 'nuevos':
- $img = new MECON_HTML_Image('/MECON/images/general_muchos_nuevo', ' >>');
+ $img = new MLIB_HTML_Image('/MLIB/images/general_muchos_nuevo', ' >>');
// Si no tiene titulo, le pone titulo por defecto.
if (!$link->getContents()) {
$link->setContents('Nuevos');
$this->updateCabecera($link, 'derecha');
break;
case 'buscar':
- $img = new MECON_HTML_Image('/MECON/images/general_lupa', ' ?>');
+ $img = new MLIB_HTML_Image('/MLIB/images/general_lupa', ' ?>');
// Si no tiene titulo, le pone titulo por defecto.
if (!$link->getContents()) {
$link->setContents('Buscar');
$this->updateCabecera($link, 'derecha');
break;
case 'siguiente':
- $img = new MECON_HTML_Image('/MECON/images/general_posterior', ' >>');
+ $img = new MLIB_HTML_Image('/MLIB/images/general_posterior', ' >>');
// Si no tiene titulo, le pone titulo por defecto.
if (!$link->getContents()) {
$link->setContents('Siguiente');
$this->updatePie($link, 'derecha');
break;
case 'volver':
- $img = new MECON_HTML_Image('/MECON/images/general_anterior', '<< ');
+ $img = new MLIB_HTML_Image('/MLIB/images/general_anterior', '<< ');
// Si no tiene titulo, le pone titulo por defecto.
$cont = $link->getContents() ? $link->getContents() : 'Volver';
$link->setContents($img);
$this->updateCabecera($link, 'izquierda');
break;
case 'anterior':
- $img = new MECON_HTML_Image('/MECON/images/general_anterior', '<< ');
+ $img = new MLIB_HTML_Image('/MLIB/images/general_anterior', '<< ');
// Si no tiene titulo, le pone titulo por defecto.
$cont = $link->getContents() ? $link->getContents() : 'Anterior';
$link->setContents($img);
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 tw=80 fdm=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_claro_cabecera',
+ 'class' => 'mlib_html_tabla_claro_cabecera',
), // }}}
'celda_titulo' => array( // {{{
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_claro_titulo',
+ 'class' => 'mlib_html_tabla_claro_titulo',
), // }}}
'celda_comun' => array( // {{{
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_claro_comun',
+ 'class' => 'mlib_html_tabla_claro_comun',
), // }}}
), // }}}
);
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 tw=80 fdm=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
// Opciones para la tabla {{{
return array (
- 'css' => '/MECON/css/html/tabla/comun',
+ 'css' => '/MLIB/css/html/tabla/comun',
'atributos' => array ( // {{{
'tabla_contenedora' => array( // {{{
'width' => '100%',
'bgcolor' => '#336699',
'valign' => 'middle',
'align' => 'center',
- 'class' => 'mecon_html_tabla_comun_cabecera',
+ 'class' => 'mlib_html_tabla_comun_cabecera',
), // }}}
'celda_titulo' => array( // {{{
'bgcolor' => '#DDEEFF',
'valign' => 'middle',
'align' => 'center',
- 'class' => 'mecon_html_tabla_comun_titulo',
+ 'class' => 'mlib_html_tabla_comun_titulo',
), // }}}
'celda_comun' => array( // {{{
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'center',
- 'class' => 'mecon_html_tabla_comun_comun',
+ 'class' => 'mlib_html_tabla_comun_comun',
), // }}}
), // }}}
);
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 tw=80 fdm=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
// Opciones para la tabla {{{
return array (
- 'css' => '/MECON/css/html/tabla/impresion',
+ 'css' => '/MLIB/css/html/tabla/impresion',
'atributos' => array ( // {{{
'tabla_contenedora' => array( // {{{
'width' => '100%',
'bgcolor' => '#666666',
'valign' => 'middle',
'align' => 'center',
- 'class' => 'mecon_html_tabla_impresion_cabecera',
+ 'class' => 'mlib_html_tabla_impresion_cabecera',
), // }}}
'celda_titulo' => array( // {{{
'bgcolor' => '#CCCCCC',
'valign' => 'middle',
'align' => 'center',
- 'class' => 'mecon_html_tabla_impresion_titulo',
+ 'class' => 'mlib_html_tabla_impresion_titulo',
), // }}}
'celda_comun' => array( // {{{
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'center',
- 'class' => 'mecon_html_tabla_impresion_comun',
+ 'class' => 'mlib_html_tabla_impresion_comun',
), // }}}
), // }}}
);
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 tw=80 fdm=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
// Opciones para la tabla {{{
return array (
- 'css' => '/MECON/css/html/tabla/llamativo',
+ 'css' => '/MLIB/css/html/tabla/llamativo',
'atributos' => array ( // {{{
'tabla_contenedora' => array( // {{{
'width' => '100%',
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_llamativo_cabecera',
+ 'class' => 'mlib_html_tabla_llamativo_cabecera',
), // }}}
'celda_titulo' => array( // {{{
'bgcolor' => '#FFCC99',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_llamativo_titulo',
+ 'class' => 'mlib_html_tabla_llamativo_titulo',
), // }}}
'celda_comun' => array( // {{{
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_llamativo_comun',
+ 'class' => 'mlib_html_tabla_llamativo_comun',
), // }}}
), // }}}
);
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 tw=80 fdm=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
// Opciones para la tabla {{{
return array (
- 'css' => '/MECON/css/html/tabla/medio',
+ 'css' => '/MLIB/css/html/tabla/medio',
'atributos' => array ( // {{{
'tabla_contenedora' => array( // {{{
'width' => '100%',
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_medio_cabecera',
+ 'class' => 'mlib_html_tabla_medio_cabecera',
), // }}}
'celda_comun' => array( // {{{
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'center',
- 'class' => 'mecon_html_tabla_medio_comun',
+ 'class' => 'mlib_html_tabla_medio_comun',
), // }}}
'celda_titulo' => array( // {{{
'bgcolor' => '#6285A4',
'valign' => 'middle',
'align' => 'center',
- 'class' => 'mecon_html_tabla_medio_titulo',
+ 'class' => 'mlib_html_tabla_medio_titulo',
), // }}}
), // }}}
);
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 tw=80 fdm=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
// Opciones para la tabla {{{
return array (
- 'css' => '/MECON/css/html/tabla/oscuro',
+ 'css' => '/MLIB/css/html/tabla/oscuro',
'atributos' => array ( // {{{
'tabla_contenedora' => array( // {{{
'width' => '100%',
'bgcolor' => '#003366',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_oscuro_cabecera',
+ 'class' => 'mlib_html_tabla_oscuro_cabecera',
), // }}}
'celda_titulo' => array( // {{{
'bgcolor' => '#6285A4',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_oscuro_titulo',
+ 'class' => 'mlib_html_tabla_oscuro_titulo',
), // }}}
'celda_comun' => array( // {{{
'bgcolor' => '#FFFFFF',
'valign' => 'middle',
'align' => 'left',
- 'class' => 'mecon_html_tabla_oscuro_comun',
+ 'class' => 'mlib_html_tabla_oscuro_comun',
), // }}}
), // }}}
);
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
require_once 'DB.php';
-require_once 'MECON/DB/Pager.php';
-require_once 'MECON/Array/Pager.php';
-require_once 'MECON/HTML/Error.php';
-require_once 'MECON/HTML/Link.php';
-require_once 'MECON/HTML/Icon.php';
-require_once 'MECON/HTML/Tabla.php';
+require_once 'MLIB/DB/Pager.php';
+require_once 'MLIB/Array/Pager.php';
+require_once 'MLIB/HTML/Error.php';
+require_once 'MLIB/HTML/Link.php';
+require_once 'MLIB/HTML/Icon.php';
+require_once 'MLIB/HTML/Tabla.php';
/// Prefijo a usar para las variables GET que genera la tabla.
-define('MECON_HTML_TABLADB_GET_VAR_PREFIX', '_');
+define('MLIB_HTML_TABLADB_GET_VAR_PREFIX', '_');
/**
* Libreria para le manejo de las tablas de los sistemas de intranet.
*
*/
-class MECON_HTML_TablaDB extends MECON_HTML_Tabla {
+class MLIB_HTML_TablaDB extends MLIB_HTML_Tabla {
/**
* Descripción de los elementos listados.
*
* @access public
*/
- function MECON_HTML_TablaDB($desc = null, $attrs = null, $estilo = 'comun') {
+ function MLIB_HTML_TablaDB($desc = null, $attrs = null, $estilo = 'comun') {
if ($desc) {
$this->_desc = $desc;
}
- parent::MECON_HTML_Tabla($attrs, $estilo);
+ parent::MLIB_HTML_Tabla($attrs, $estilo);
}
/**
* Obtiene el prefijo usado para las variables de GET que genera la tabla.
*/
function getGetVarPrefix() {
- return MECON_HTML_TABLADB_GET_VAR_PREFIX;
+ return MLIB_HTML_TABLADB_GET_VAR_PREFIX;
}
/**
* Agrega un páginador a la tabla, basado en un resultado de una base de datos.
* Ejemplo:
* @code
- * $tabla = new MECON_HTML_TablaDB('personas', array('width' => '100%'));
+ * $tabla = new MLIB_HTML_TablaDB('personas', array('width' => '100%'));
* $result = $db->query('SELECT nombre, apellido FROM tabla');
* if (DB::isError($result)) {
* trigger_error('Error', E_USER_ERROR);
* Si se pasa null, se incluyen <tt>'anterior'</tt>,
* <tt>'siguiente'</tt> y <tt>'paginas'</tt>.
* @param mixed $link Dirección a la que apuntan los links generados. Puede
- * ser un MECON_HTML_Link (para poder pasar variables por
+ * ser un MLIB_HTML_Link (para poder pasar variables por
* GET) o un string.
- * @param int $limit Parámetro usado para crear el MECON_DB_Pager.
- * @param int $maxpages Parámetro usado para crear el MECON_DB_Pager.
+ * @param int $limit Parámetro usado para crear el MLIB_DB_Pager.
+ * @param int $maxpages Parámetro usado para crear el MLIB_DB_Pager.
* @param string $getvar Nombre de la variable GET a usar para indicar el número
* de página actual (se le pone el \ref setGetPrefix prefijo)
*
- * @return MECON_DB_Pager Pager que se puede usar para realizar los fetch de
+ * @return MLIB_DB_Pager Pager que se puede usar para realizar los fetch de
* los resultados de la página actual.
*
- * @see MECON_DB_Pager, addRows().
+ * @see MLIB_DB_Pager, addRows().
*/
function addPager($result, $tipo = null, $link = null, $limit = 10, $maxpages = 21, $getvar = 'from') {
// Creo el pager con el resultado.
$pager = (is_array($result))?
- new MECON_Array_Pager($result, @$_GET[$this->getGetVarPrefix().$getvar], $limit, $maxpages):
- new MECON_DB_Pager($result, @$_GET[$this->getGetVarPrefix().$getvar], $limit, $maxpages);
+ new MLIB_Array_Pager($result, @$_GET[$this->getGetVarPrefix().$getvar], $limit, $maxpages):
+ new MLIB_DB_Pager($result, @$_GET[$this->getGetVarPrefix().$getvar], $limit, $maxpages);
// Obtengo un link válido.
if (!$link) {
$link = @$_SERVER['PHP_SELF'];
}
if (is_string($link)) {
- $link = new MECON_HTML_Link($link, '');
+ $link = new MLIB_HTML_Link($link, '');
}
// Si es el tipo por defecto pone paginador nada más.
if (!$tipo) {
}
} else {
$id = $this->addRow(array(
- new MECON_HTML_Error("No se encontraron {$this->_desc}.")));
+ new MLIB_HTML_Error("No se encontraron {$this->_desc}.")));
$this->updateCellAttributes($id, 0,
array('colspan' => count($campos)
+ count($this->_prependRowsData)
* @param mixed $obj Objeto a usar. Puede ser un objeto instanciado o un
* string con el nombre de la clase.
*
- * @see La interfaz MECON_DBO que tiene el método MECON_DBO::cargar().
+ * @see La interfaz MLIB_DBO que tiene el método MLIB_DBO::cargar().
*/
function addRowsObject($result, $campos, $obj) {
if (is_string($obj)) {
* Agrega una columna arbitraria a la tabla basado en valores de una fila.
* Ejemplo:
* @code
- * $tabla = new MECON_HTML_TablaDB('personas', array('width' => '100%'));
+ * $tabla = new MLIB_HTML_TablaDB('personas', array('width' => '100%'));
* $result = $db->query('SELECT nombre, apellido, activo FROM tabla');
* if (DB::isError($result)) {
* trigger_error('Error', E_USER_ERROR);
* array('nombre', array('activo', 'checked_callback')));
* // Agrega el nombre con un link a un popup (sin javascript).
* $tabla->addRowsData(
- * new MECON_HTML_Link('popup.php', '%s', array('nombre' => null),
+ * new MLIB_HTML_Link('popup.php', '%s', array('nombre' => null),
* array('target' => '_blank')),
* 'nombre',
* 'prepend');
* @endcode
*
* @param mixed $format Si es un string, especifica el formato a usar al
- * estilo de sprintf. Si es un MECON_HTML_Link, se
+ * estilo de sprintf. Si es un MLIB_HTML_Link, se
* traduce cada variable por GET que empiece con el
* \ref getGetVarPrefix "prefijo" y cuyo valor sea null
* al campo correspondiente de la DB:
- * @code $tabla->addRowsData(new MECON_HTML_Link('abm.php', 'Ver %s',
+ * @code $tabla->addRowsData(new MLIB_HTML_Link('abm.php', 'Ver %s',
* array($tabla->getGetVarPrefix().'id' => null), 'nombre'); @endcode
* Si el valor en vez de ser null es un string, se
* fija si existe una función con ese nombre para llamar
* con el campo de la DB como argumento para
* formatearlo:
- * @code $tabla->addRowsData(new MECON_HTML_Link('print.php', 'Mostrar',
+ * @code $tabla->addRowsData(new MLIB_HTML_Link('print.php', 'Mostrar',
* array($tabla->getGetVarPrefix().'campo1' => 'callback_campo1'));
* function callback_campo1($campo1) {
* return 'El campo1 es '.strtoupper($campo3);
* } @endcode
* Si no existe la función, se toma el string como
* formato para sprintf para darle formato:
- * @code $tabla->addRowsData(new MECON_HTML_Link('print.php', 'Ver',
+ * @code $tabla->addRowsData(new MLIB_HTML_Link('print.php', 'Ver',
* array($tabla->getGetVarPrefix().'campo1' => 'campo1: %s')); @endcode
* @param mixed $campos Campos de la DB a usar como argumentos del sprintf.
* Puede ser un string para pasar un solo campo sin
list($format, $campos) = $data;
// Si tiene formatos y argumentos.
if ($campos) {
- // Si el formato es un MECON_HTML_Link, uso como formato a
+ // Si el formato es un MLIB_HTML_Link, uso como formato a
// su contenido.
- if (is_a($format, 'mecon_html_link')) {
+ if (is_a($format, 'MLIB_html_link')) {
$args = array($format->getContents());
} else {
$args = array($format);
$args[] = $campo;
}
// Si es un link, le seteo los contenidos procesados.
- if (is_a($format, 'mecon_html_link')) {
+ if (is_a($format, 'MLIB_html_link')) {
$format->setContents(call_user_func_array('sprintf', $args));
// Si no formateo la cadena con los argumentos procesados.
} else {
}
}
// Si es un link, traduce las variables GET.
- if (is_a($format, 'mecon_html_link')) {
+ if (is_a($format, 'MLIB_html_link')) {
$format = $this->_translateGetVars($format, $row);
}
// devuelve la columna.
* Traduce las variables GET de un link.
* Puede formatearlas con printf() o llamando una callback.
*
- * @param MECON_HTML_Link $link Link con las variables GET a formatear.
+ * @param MLIB_HTML_Link $link Link con las variables GET a formatear.
* @param mixed $row Fila de un resultado de una base de dotos. Puede ser un
* array asociativo o un objeto (en cuyo caso cada campo
* debe ser un atributo del mismo).
*
- * @return MECON_HTML_Link Link con las variables GET traducidas.
+ * @return MLIB_HTML_Link Link con las variables GET traducidas.
*
* @protected
*/
* Agrega un ícono predefinido a la tabla.
* Ejemplo:
* @code
- * $tabla = new MECON_HTML_TablaDB('personas', array('width' => '100%'));
+ * $tabla = new MLIB_HTML_TablaDB('personas', array('width' => '100%'));
* $result = $db->query('SELECT id, nombre, apellido, activo FROM tabla');
* if (DB::isError($result)) {
* trigger_error('Error', E_USER_ERROR);
* para conocer de que formas se puede formatear un
* campo).
* @param mixed $link Si es un string, se usa como URL del link a generar.
- * Si es un MECON_HTML_Link, se usa como base para el
+ * Si es un MLIB_HTML_Link, se usa como base para el
* link a generar y se le va agregando las variables de
* GET generadas por el parámetro $campos (el link es
* procesado de la misma forma en que es procesado el
$link = @$_SERVER['PHP_SELF'];
}
if (is_string($link)) {
- $link = new MECON_HTML_Link($link, '');
+ $link = new MLIB_HTML_Link($link, '');
}
// Traducción para compatibilidad para atrás.
switch ($id) {
break;
}
if ($activo === true) {
- $img = new MECON_HTML_Icon($id, $link, null,
+ $img = new MLIB_HTML_Icon($id, $link, null,
array('title' => ucfirst($id)));
$l = $img->getLink();
foreach ($campos as $campo) {
}
$this->addRowsData($l, array(), $lugar);
} elseif ($activo === false) {
- $img = new MECON_HTML_Icon($id.'_des', null, '-',
+ $img = new MLIB_HTML_Icon($id.'_des', null, '-',
array('title' => ucfirst($id)));
$this->addRowsData($img, array(), $lugar);
} else {
$campos[] = $activo;
$this->addRowsData('%s', array(array($campos,
- 'MECON_HTML_TablaDB_callback_addRowsIcon',
+ 'MLIB_HTML_TablaDB_callback_addRowsIcon',
array($id, $link, $activo))), $lugar);
}
}
* @return Campo formateado.
* @protected
*/
-function MECON_HTML_TablaDB_callback_addRowsIcon($campos, $args) {
+function MLIB_HTML_TablaDB_callback_addRowsIcon($campos, $args) {
list($tipo, $link, $activo) = $args;
if ($campos[$activo]) {
- $img = new MECON_HTML_Icon($tipo, $link, null,
+ $img = new MLIB_HTML_Icon($tipo, $link, null,
array('title' => ucfirst($tipo)));
$l = $img->getLink();
foreach ($campos as $campo => $valor) {
- $l->setGetVar(MECON_HTML_TablaDB::getGetVarPrefix().$campo, $valor);
+ $l->setGetVar(MLIB_HTML_TablaDB::getGetVarPrefix().$campo, $valor);
}
return $l->toHtml();
} else {
- $img = new MECON_HTML_Icon($tipo.'_des', null, '-',
+ $img = new MLIB_HTML_Icon($tipo.'_des', null, '-',
array('title' => ucfirst($tipo)));
return $img->toHtml();
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
require_once 'PEAR.php';
-require_once 'MECON/Marco/Copete.php';
-require_once 'MECON/Marco/Menu.php';
-require_once 'MECON/Marco/MenuPrincipal.php';
+require_once 'MLIB/Marco/Copete.php';
+require_once 'MLIB/Marco/Menu.php';
+require_once 'MLIB/Marco/MenuPrincipal.php';
//Agregado para el uso de HTML_Page (Uso la version Original de Pear)
-require_once 'MECON/HTML/Page.php';
+require_once 'MLIB/HTML/Page.php';
require_once 'HTML/Table.php';
//Defino los directorios por default
define ('DIR_CACHE' , '/tmp' );
//Defino las constantes
-define ('SCRIPT_DIR_BASE', '/MECON/js/' );
-define ('ESTILO_DIR_BASE', '/MECON/css/');
+define ('SCRIPT_DIR_BASE', '/MLIB/js/' );
+define ('ESTILO_DIR_BASE', '/MLIB/css/');
define ('SCRIPT_GENERICO', 'marco.js' );
define ('ESTILO_GENERICO', 'marco.css' );
*
* @access public
*/
-class MECON_Marco extends MECON_HTML_Page {
+class MLIB_Marco extends MLIB_HTML_Page {
/**
* Array con los datos de configuracion del sistema.
*
* Constructor. Recibe como parametro el path del archivo de configuracion
*
* @param string $arch_configuracion indicacion de la ubicacion y nombre del archivo de configuracion
- * @param MECON_Perm $obj_permiso Objeto Permisos
+ * @param MLIB_Perm $obj_permiso Objeto Permisos
*
* @return void
* @access public
*/
- function MECON_Marco($arch_configuracion, $obj_permiso = null)
+ function MLIB_Marco($arch_configuracion, $obj_permiso = null)
{
//Creo el objeto pagina
- parent::MECON_HTML_Page();
+ parent::MLIB_HTML_Page();
//Obtengo y arreglo la configuracion
$this->_obtenerConfiguracion($arch_configuracion);
//Agrego el objeto permiso a la configuracion
//Agrego la opcion seleccionada de espacios a la configuracion
$this->_configuracion['espacios'] = $this->_espacios;
//Creo el menu principal
- $menu = new MECON_Marco_MenuPrincipal ($this->_configuracion);
+ $menu = new MLIB_Marco_MenuPrincipal ($this->_configuracion);
//Agrego el contenido de la pagina
$body = array ( 'body' => $this->_body, 'menuVertical' => $this->_menuVertical);
//Page
*/
function addSubTitle($subtitulo)
{
- if (is_a($subtitulo, 'mecon_html_link')) {
+ if (is_a($subtitulo, 'MLIB_html_link')) {
$subtitulo->updateAttributes(
- array('class' => 'mecon_marco_subtitle'));
+ array('class' => 'MLIB_marco_subtitle'));
}
if (method_exists($subtitulo, 'tohtml')) {
$subtitulo = $subtitulo->toHtml();
/**
* Permite hacer que en el copete aparezca un icono de ayuda, en un lugar predefinido. Sobreescribe lo seteado anteriormente por cualquier metodo.
*
- * @param mixed $ayuda Objeto MECON_HTML_Link o string para utilizar en el map.
+ * @param mixed $ayuda Objeto MLIB_HTML_Link o string para utilizar en el map.
*
* @return void
* @access public
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/HTML/Image.php';
+require_once 'MLIB/HTML/Image.php';
/**
- * Manejo del copete de los sistemas que utilizan MECON_Marco
+ * Manejo del copete de los sistemas que utilizan MLIB_Marco
*
* @access public
*/
-class MECON_Marco_Copete {
+class MLIB_Marco_Copete {
/**
* Nombre del directorio en donde se encuentra el sistema. Es case sensitive.
*
* El directorio es case sensitive.
*
* @param string $directorio Nombre del directorio en donde se encuentra el sistema.
- * @param mixed $ayuda Objeto MECON_HTML_Link o string para armar el map de la ayuda.
+ * @param mixed $ayuda Objeto MLIB_HTML_Link o string para armar el map de la ayuda.
* @param string $sistema Nombre del sistema con el cual se esta trabajando.
*
* @return void
* @access public
*/
- function MECON_Marco_Copete($directorio, $ayuda = null, $sistema = '')
+ function MLIB_Marco_Copete($directorio, $ayuda = null, $sistema = '')
{
$this->_directorio = $directorio;
$this->_sistema = $sistema;
function toHtml()
{
if (!is_null($this->_directorio)) {
- $image = new MECON_HTML_Image(
+ $image = new MLIB_HTML_Image(
$this->_directorio.'/copete',
'Intranet - Ministerio de Economía - ' . $this->_sistema,
array(
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/HTML/Image.php';
+require_once 'MLIB/HTML/Image.php';
-define('MECON_MARCO_IMAGENANIMADA_DIR_GENERAL', '/MECON/images');
+define('MLIB_MARCO_IMAGENANIMADA_DIR_GENERAL', '/MLIB/images');
/**
* Clase para el manejo de la animacion de las imagenes. Utilizada
*
* @access public
*/
-class MECON_Marco_ImagenAnimada {
+class MLIB_Marco_ImagenAnimada {
/**
* Nombre del archivo imagen.
*
* @return void
* @access public
*/
- function MECON_Marco_ImagenAnimada($imagenComun, $imagenMouseOn = '',
+ function MLIB_Marco_ImagenAnimada($imagenComun, $imagenMouseOn = '',
$imagenSelect = '', $directorio = '', $nombre = '', $link = '',
$alt = '')
{
function toHtml()
{
$src = $this->getSeleccionada() ? $this->_imgSelect : $this->_imgComun;
- $img = new MECON_HTML_Image($src, $this->_alt, array('name' => $this->_nombre, 'border' => 0));
+ $img = new MLIB_HTML_Image($src, $this->_alt, array('name' => $this->_nombre, 'border' => 0));
$html = $img->toHtml();
if ($this->getHabilitada()) {
if ($this->getSeleccionada()) {
return "$directorio/$imagen";
}
else {
- return MECON_MARCO_IMAGENANIMADA_DIR_GENERAL . "/$imagen";
+ return MLIB_MARCO_IMAGENANIMADA_DIR_GENERAL . "/$imagen";
}
}
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/Marco/Seccion.php';
-require_once 'MECON/Marco/ImagenAnimada.php';
+require_once 'MLIB/Marco/Seccion.php';
+require_once 'MLIB/Marco/ImagenAnimada.php';
require_once 'HTML/Table.php';
define ('MENU_SERIALIZADO' , 'MenuSerializado');
*
* @access public
*/
-class MECON_Marco_Menu {
+class MLIB_Marco_Menu {
/**
* Array con los resultados para agregar a la pagina.
- * Sobre este array MECON_Marco realiza un foreach para agregar lo que
+ * Sobre este array MLIB_Marco realiza un foreach para agregar lo que
* corresponda.
*
* @var array $resultado
* @return void
* @access public
*/
- function MECON_Marco_Menu($configuracion = null)
+ function MLIB_Marco_Menu($configuracion = null)
{
$this->_configuracion = $configuracion;
$this->_tabla =& new HTML_Table (
*/
function _armarEncabezado($titulo)
{
- return '<div class="mecon_marco_subtitle">'.$titulo.'</div>';
+ return '<div class="MLIB_marco_subtitle">'.$titulo.'</div>';
}
/**
$ver = false;
}
if ($ver) {
- $tmp = new MECON_Marco_Seccion ($sec, $this->_configuracion);
+ $tmp = new MLIB_Marco_Seccion ($sec, $this->_configuracion);
array_push($this->_componentes, $tmp->toHtml($linksel));
if ($cuenta == $i) {
$ultimo = 1;
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/Marco/Menu.php';
-require_once 'MECON/HTML/Image.php';
+require_once 'MLIB/Marco/Menu.php';
+require_once 'MLIB/HTML/Image.php';
/**
* Clase que se encarga del manejo de los menues horizontales
*
* @access public
*/
-class MECON_Marco_MenuHorizontal extends MECON_Marco_Menu {
+class MLIB_Marco_MenuHorizontal extends MLIB_Marco_Menu {
/**
* Funcion para agregar el cuerpo de la pagina a la pagina
*
'width="'.$width.'%"');
}
- $imagen = new MECON_HTML_Image('/MECON/images/general_linea.gif',
+ $imagen = new MLIB_HTML_Image('/MLIB/images/general_linea.gif',
str_repeat('=', 108));
$tmp = $this->_tabla->addRow(array($imagen->toHtml()),
'align="center" height="1" colspan="'. $colspan .'"');
$this->_tabla->addRow($row,
'align="left" bgcolor="#FFFFFF" colspan="'
. $colspan .'"');
- $imagen = new MECON_HTML_Image('/MECON/images/general_linea2.gif',
+ $imagen = new MLIB_HTML_Image('/MLIB/images/general_linea2.gif',
str_repeat('.', 108), 'border="0" align="center"');
$this->_tabla->addRow(array ($imagen->toHtml()),
'align="center" colspan="'. $colspan .'"');
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/Marco/Menu.php';
-require_once 'MECON/HTML/Image.php';
+require_once 'MLIB/Marco/Menu.php';
+require_once 'MLIB/HTML/Image.php';
/**
* Clase que se encarga del manejo de los menues ocultos.
*
* @access public
*/
-class MECON_Marco_MenuOculto extends MECON_Marco_Menu {
+class MLIB_Marco_MenuOculto extends MLIB_Marco_Menu {
/**
* Funcion para agregar el cuerpo de la pagina a la pagina
*
{
$this->resultado[] = $this->_armarEncabezado($titulo .
$this->_configuracion['subtitulo']);
- $this->resultado[] =& new MECON_HTML_Image(
- '/MECON/images/general_linea2.gif',
+ $this->resultado[] =& new MLIB_HTML_Image(
+ '/MLIB/images/general_linea2.gif',
str_repeat('-', 108),
'border="0" align="center"');
if ($menu) {
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
require_once 'HTML/Table.php';
-require_once 'MECON/HTML/Image.php';
-require_once 'MECON/Marco/MenuHorizontal.php';
+require_once 'MLIB/HTML/Image.php';
+require_once 'MLIB/Marco/MenuHorizontal.php';
/**
*
* @access public
*/
-class MECON_Marco_MenuPrincipal extends MECON_Marco_MenuHorizontal {
+class MLIB_Marco_MenuPrincipal extends MLIB_Marco_MenuHorizontal {
/**
* Contiene el objeto seccion que se encuentra seleccionada. Se utiliza para mostrar el menu.
*
* @return void
* @access public
*/
- function MECON_Marco_MenuPrincipal($configuracion)
+ function MLIB_Marco_MenuPrincipal($configuracion)
{
- parent::MECON_Marco_Menu($configuracion);
+ parent::MLIB_Marco_Menu($configuracion);
if (!is_null($configuracion['secciones'] || $configuracion['secciones'] == '')) {
$this->_armarArraySecciones($this->_obtenerConfSecciones());
//ARMO EL MENU PRINCIPAL
$colspan = count($this->_componentes);
//Agrego el copete
- $copete =& new MECON_Marco_Copete
+ $copete =& new MLIB_Marco_Copete
(@$this->_configuracion['directorios']['imagenes'],
@$this->_configuracion['ayuda'],
@$this->_configuracion['titulo_sistema']
'width="'.$width.'%"');
}
//Agrego la linea de separacion
- $tmp = $this->_tabla->addRow(array(new MECON_HTML_Image(
- '/MECON/images/general_linea.gif', str_repeat('=', 108)
+ $tmp = $this->_tabla->addRow(array(new MLIB_HTML_Image(
+ '/MLIB/images/general_linea.gif', str_repeat('=', 108)
)),'align="center" height="1"');
$this->_tabla->updateCellAttributes($tmp, 0, 'colspan="'.$colspan.'"');
),'align="left" bgcolor="#FFFFFF" colspan="'.
$colspan .'"');
$this->_tabla->addRow(array(
- new MECON_HTML_Image('/MECON/images/general_linea2.gif',
+ new MLIB_HTML_Image('/MLIB/images/general_linea2.gif',
str_repeat('-', 108))),
'border="0" align="center" colspan="'. $colspan .'"');
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/Marco/Menu.php';
+require_once 'MLIB/Marco/Menu.php';
/**
* Clase que se encarga del manejo de los menues verticales
*
* @access public
*/
-class MECON_Marco_MenuVertical extends MECON_Marco_Menu {
+class MLIB_Marco_MenuVertical extends MLIB_Marco_Menu {
/**
* Funcion para agregar el cuerpo de la pagina a la pagina
*
$TABLA = new HTML_Table('width=152 align="left" cellspacing="0"
cellpadding="0" border="0" height="1"
- background="/MECON/images/general_titulo_menu.gif"');
- $menutmp ='<div class="mecon_marco_subtitle_vertical"> '.$titulo.'</div>';
+ background="/MLIB/images/general_titulo_menu.gif"');
+ $menutmp ='<div class="MLIB_marco_subtitle_vertical"> '.$titulo.'</div>';
$TABLA->addRow(array ($menutmp),'align="left"');
$TABLA->updateCellAttributes(0,0,'colspan="2"');
$TABLA->addRow(
array(
- '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=36>',
- '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=118>'
+ '<IMG height="3" src="/MLIB/images/general_linea_relieve.gif" width=36>',
+ '<IMG height="3" src="/MLIB/images/general_linea_relieve.gif" width=118>'
)
);
foreach ($this->_componentesVertical as $comp) {
$TABLA->addRow($comp,'align="left" height="3"
- background="/MECON/images/general_fondo_gris"');
+ background="/MLIB/images/general_fondo_gris"');
$TABLA->updateColAttributes(0,
'align="right" width="34" height="3"');
$TABLA->updateColAttributes(1,'align="left" width="118"');
$TABLA->addRow(
array(
- '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=36>',
- '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=118>'
+ '<IMG height="3" src="/MLIB/images/general_linea_relieve.gif" width=36>',
+ '<IMG height="3" src="/MLIB/images/general_linea_relieve.gif" width=118>'
)
);
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/Marco/ImagenAnimada.php';
-require_once 'MECON/Marco/Menu.php';
-require_once 'MECON/Marco/MenuHorizontal.php';
-require_once 'MECON/Marco/MenuVertical.php';
-require_once 'MECON/Marco/MenuOculto.php';
+require_once 'MLIB/Marco/ImagenAnimada.php';
+require_once 'MLIB/Marco/Menu.php';
+require_once 'MLIB/Marco/MenuHorizontal.php';
+require_once 'MLIB/Marco/MenuVertical.php';
+require_once 'MLIB/Marco/MenuOculto.php';
/**
* Clase para el manejo de las secciones
*
* @access public
*/
-class MECON_Marco_Seccion {
+class MLIB_Marco_Seccion {
/**
* Nombre de la seccion.
*
* @return void
* @access public
*/
- function MECON_Marco_Seccion($seccion, $configuracion)
+ function MLIB_Marco_Seccion($seccion, $configuracion)
{
$this->_nombre = @strval($seccion['nombre']);
$imgComun = @strval($seccion['imagenComun']);
$this->_tipoMenu = @strval(strtolower($seccion['tipoMenu']));
$this->_link = @strval($seccion['link']);
- $this->_imagen = new MECON_Marco_ImagenAnimada( $imgComun,
+ $this->_imagen = new MLIB_Marco_ImagenAnimada( $imgComun,
$imgMouseOn,
$imgSelect,
$configuracion['directorios']['imagenes'],
function _cargarHijos($hijos)
{
if ($this->_tipoMenu == 'vertical'){
- $tmp = new MECON_Marco_MenuVertical($this->_configuracion);
+ $tmp = new MLIB_Marco_MenuVertical($this->_configuracion);
}
elseif ($this->_tipoMenu == 'horizontal') {
- $tmp = new MECON_Marco_MenuHorizontal($this->_configuracion);
+ $tmp = new MLIB_Marco_MenuHorizontal($this->_configuracion);
}
else {
- $tmp = new MECON_Marco_MenuOculto($this->_configuracion);
+ $tmp = new MLIB_Marco_MenuOculto($this->_configuracion);
}
foreach ($hijos as $hijo) {
$hijo['alt'] = @$hijo['alt'] ? $hijo['alt'] : $hijo['nombre'];
$sec = array ();
if ($this->verifSeccionSeleccionada($link_sel)) {
- $sec[] = $link_start.'<img src="/MECON/images/general_carpeta_f3" border="0">'.$link_end;
+ $sec[] = $link_start.'<img src="/MLIB/images/general_carpeta_f3" border="0">'.$link_end;
}
else {
- $sec[] = $link_start.'<img src="/MECON/images/general_carpeta" border="0">'.$link_end;
+ $sec[] = $link_start.'<img src="/MLIB/images/general_carpeta" border="0">'.$link_end;
}
$nombre = strstr($this->_nombre, '-');
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/PDF/external/phppdflib.class.php';
+require_once 'MLIB/PDF/external/phppdflib.class.php';
/**
* Liberia base para el manejo de pdf's.
*/
-class MECON_PDF {
+class MLIB_PDF {
/**
* Orientacion (portrait o landscape).
* @return void
* @access public
*/
- function MECON_PDF($tam = "a4", $ori = "portrait", $nombre = "Doc.pdf")
+ function MLIB_PDF($tam = "a4", $ori = "portrait", $nombre = "Doc.pdf")
{
setlocale (LC_ALL, 'en_US');
$this->orientacion = $ori;
$this->_pdf = new pdffile;
- $this->_config = include 'MECON/PDF/medidas.php';
+ $this->_config = include 'MLIB/PDF/medidas.php';
$this->_config = $this->_config[$tam];
$this->_nombre = $nombre;
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
/**
* Libreria de Contenidos PDF.
*/
-class MECON_PDF_Contenido {
+class MLIB_PDF_Contenido {
/**
* Class Constructor. Para que se aviven de redefinir este metodo
*
- * @param &Object $MARCO MECON_PDF_Marco
+ * @param &Object $MARCO MLIB_PDF_Marco
*
* @return void
* @access public
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/PDF/Contenido.php';
+require_once 'MLIB/PDF/Contenido.php';
/**
* Libreria de header en PDF.
*/
-class MECON_PDF_Header extends MECON_PDF_Contenido {
+class MLIB_PDF_Header extends MLIB_PDF_Contenido {
/**
* Funcion que agrega el contenido del encabezado al PDF.
*
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @return void
* @access public
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/PDF/Header.php';
+require_once 'MLIB/PDF/Header.php';
/**
* Libreria de header por defecto en PDF.
*/
-class MECON_PDF_HeaderDefecto extends MECON_PDF_Header {
+class MLIB_PDF_HeaderDefecto extends MLIB_PDF_Header {
/**
* Configuración del encabezado. Solamente lo que hace al tamaño y
* orientación pasados por parametro en el constructor.
* @return void
* @access public
*/
- function MECON_PDF_HeaderDefecto($tam = "a4", $ori = "portrait") {
- $tmp = include 'MECON/PDF/HeaderDefecto/medidas.php' ;
+ function MLIB_PDF_HeaderDefecto($tam = "a4", $ori = "portrait") {
+ $tmp = include 'MLIB/PDF/HeaderDefecto/medidas.php' ;
$this->_config = $tmp[$tam][$ori]['encabezado'];
//Ver en donde poner esto
/**
* Funcion que agrega el contenido del encabezado al PDF.
*
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @return void
* @access public
/**
* Funcion que agrega el logo al encabezado de una pagina.
*
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @return void
* @access protected
* Funcion que agrega la seccion al encabezado de una pagina.
*
* @return void
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @access protected
*/
* Funcion que agrega la subseccion al encabezado de una pagina.
*
* @return void
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @access protected
*/
* Funcion que agrega el paginador al encabezado de una pagina.
*
* @return void
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @access protected
*/
* Funcion que permite agregar la fecha al encabezado de una pagina.
*
* @return void
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @access protected
*/
* Funcion que arma el recuadro del encabezado de las paginas.
*
* @return void
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @access protected
*/
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80 foldmethod=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
/**
* Este archivo contiene las coordenadas y estilos de los diferentes componentes
- * de MECON_PDF_Marco. Las cordenadas Arrancan en (0,0)
+ * de MLIB_PDF_Marco. Las cordenadas Arrancan en (0,0)
Y ^
|
'X' => 7,
'Y' => 665,
'path' =>
- '/var/www/meconlib/www/images/pdf_logo_portrait.jpg',
+ '/var/www/mlib/www/images/pdf_logo_portrait.jpg',
),
'linea1' => array (
'Xi' => 150,
'X' => 7,
'Y' => 495,
'path' =>
- '/var/www/meconlib/www/images/pdf_logo_portrait.jpg',
+ '/var/www/mlib/www/images/pdf_logo_portrait.jpg',
),
'linea1' => array (
'Xi' => 150,
'X' => 7,
'Y' => 829,
'path' =>
- '/var/www/meconlib/www/images/pdf_logo_portrait.jpg',
+ '/var/www/mlib/www/images/pdf_logo_portrait.jpg',
),
'linea1' => array (
'Xi' => 150,
'X' => 7,
'Y' => 505,
'path' =>
- '/var/www/meconlib/www/images/pdf_logo_portrait.jpg',
+ '/var/www/mlib/www/images/pdf_logo_portrait.jpg',
),
'linea1' => array (
'Xi' => 150,
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/PDF/Contenido.php';
+require_once 'MLIB/PDF/Contenido.php';
/**
* Libreria de imagenes para PDF.
*/
-class MECON_PDF_Imagen extends MECON_PDF_Contenido {
+class MLIB_PDF_Imagen extends MLIB_PDF_Contenido {
/**
* Imagen de Image_Transform.
var $_param;
/**
- * Array de MECON_PDF_Texto para agregar al lado de las imagenes.
+ * Array de MLIB_PDF_Texto para agregar al lado de las imagenes.
* @var array $contenido
* @access protected
*/
* @param string $orientacion Orientacion que tendran las nuevas paginas que
* esta clase genere.
* @param bool $encabezado Indica si las paginas nuevas que genere esta
- * clase tendran el encabezado de MECON_PDF_Marco.
+ * clase tendran el encabezado de MLIB_PDF_Marco.
* @param array $param Parametros de la imagen.
*
* @return void
* @access public
*/
- function MECON_PDF_Imagen($resource = null, $align = "center", $orientacion =
+ function MLIB_PDF_Imagen($resource = null, $align = "center", $orientacion =
null, $encabezado = true, $param = array()) {
$this->_resource = $resource;
$this->_align = $align;
/**
* Permite agregar texto contenido que sera puesto al lado de las imagenes.
*
- * @param Object $TEXTO MECON_PDF_Texto.
+ * @param Object $TEXTO MLIB_PDF_Texto.
*
* @return void
* @access public
* Funcion que agrega el contenido de la tabla que se este utilizando al
* PDF.
*
- * @param &Object $MARCO MECON_PDF_Marco
+ * @param &Object $MARCO MLIB_PDF_Marco
*
* @return void
* @access public
$this->_resource->scaleByX($anchoPagina);
}
//Obtego el nombre temporal
- $tmp_path = tempnam('/tmp/', 'MECON_PDF_Images_');
+ $tmp_path = tempnam('/tmp/', 'MLIB_PDF_Images_');
//Salvo la imagen temporalmente
$this->_resource->save($tmp_path, 'png');
//Obtengo la posicion Y
/**
* Agrega al pdf el texto adjunto a la imagen.
*
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
* @param array $tam Tamaño de la imagen.
* @param int $alto Alto disponible en la pagina.
*
/**
* Agrega objeto por objeto el contenido al pdf general.
*
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
* @param array $coord Coordenadas para el texto.
* @param int $alto Alto disponible en la pagina.
- * @param Object $TEXTO MECON_PDF_Texto.
+ * @param Object $TEXTO MLIB_PDF_Texto.
*
* @return void
* @access protected
/**
* Permite obtener el valor X segun la alineacion.
*
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
* @param int width Ancho de la imagen a agregar.
*
* @return int
/**
* Funcion que se encarga de crear las nuevas paginas.
*
- * @param &Object $MARCO MECON_PDF_Marco
+ * @param &Object $MARCO MLIB_PDF_Marco
*
* @return void
* @access protected
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/PDF.php';
-require_once 'MECON/PDF/Separador.php';
-require_once 'MECON/PDF/HeaderDefecto.php';
+require_once 'MLIB/PDF.php';
+require_once 'MLIB/PDF/Separador.php';
+require_once 'MLIB/PDF/HeaderDefecto.php';
/**
* Libreria que crea un marco estandar para los pdfs.
*/
-class MECON_PDF_Marco extends MECON_PDF {
+class MLIB_PDF_Marco extends MLIB_PDF {
/**
- * Objeto MECON_PDF_Separador que se utilizara por defecto.
+ * Objeto MLIB_PDF_Separador que se utilizara por defecto.
* @var Object $separador
* @access protected
*/
var $_separador_defecto;
/**
- * Array de objetos MECON_PDF_Contenido
+ * Array de objetos MLIB_PDF_Contenido
* @var array $contenido
* @access protected
*/
var $_excepciones = array ();
/**
- * MECON_PDF_Header. Objeto que hay que utilizar como enzabezado. Si hay
+ * MLIB_PDF_Header. Objeto que hay que utilizar como enzabezado. Si hay
* algo aqui se desecha el encabezado por defecto.
* @var Object $header
* @access public
* @return void
* @access public
*/
- function MECON_PDF_Marco($tam = "a4", $ori = "portrait", $nom = 'Doc.pdf') {
- $this->MECON_PDF($tam, $ori, $nom);
+ function MLIB_PDF_Marco($tam = "a4", $ori = "portrait", $nom = 'Doc.pdf') {
+ $this->MLIB_PDF($tam, $ori, $nom);
$this->tamanio = $tam;
$this->_resetConf();
- $this->_separador_defecto =& new MECON_PDF_Separador();
+ $this->_separador_defecto =& new MLIB_PDF_Separador();
}
/**
{
if(is_null($pagina));
$pagina = $this->numPage();
- $tmp = include 'MECON/PDF/Marco/medidas.php' ;
+ $tmp = include 'MLIB/PDF/Marco/medidas.php' ;
$tmp = $tmp[$this->tamanio][$this->getOrientation($pagina)];
$tmp['Xi'] = $this->_config['Xi'];
$tmp['Yi'] = $this->_config['Yi'];
* @access protected
*/
function _crearHeaderDefecto() {
- $this->header =& new MECON_PDF_HeaderDefecto($this->tamanio,
+ $this->header =& new MLIB_PDF_HeaderDefecto($this->tamanio,
$this->getOrientation($this->numPage()));
if (@$this->logo) {
$this->header->logo = $this->logo;
if ($this->_contenido) {
foreach ($this->_contenido as $cont) {
$cont->toPDF($this);
- //MECON_PDF_Marco se pasa por referencia para que se agregen las
+ //MLIB_PDF_Marco se pasa por referencia para que se agregen las
//paginas a medida que se van necesitando. Esto permite que varie el
//tipo de contenido que se agrega.
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80 foldmethod=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
/**
* Este archivo contiene las coordenadas y estilos de los diferentes componentes
- * de MECON_PDF_Marco. Las cordenadas Arrancan en (0,0)
+ * de MLIB_PDF_Marco. Las cordenadas Arrancan en (0,0)
Y ^
|
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/PDF/Separador.php';
+require_once 'MLIB/PDF/Separador.php';
/**
* Manejo de los saltos de pagina.
*/
-class MECON_PDF_SaltoPagina extends MECON_PDF_Separador {
+class MLIB_PDF_SaltoPagina extends MLIB_PDF_Separador {
/**
* Class Constructor
* @return void
* @access public
*/
- function MECON_PDF_SaltoPagina() {
- $this->MECON_PDF_Separador();
+ function MLIB_PDF_SaltoPagina() {
+ $this->MLIB_PDF_Separador();
}
/**
* Funcion que agrega el salto de pagina al PDF
*
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @return void
* @access public
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/PDF/Contenido.php';
+require_once 'MLIB/PDF/Contenido.php';
/**
* Manejo de los separadores del contenido de los PDF's.
* @TODO Por ahora es muy basica y lo unico que agrega es un espacio en blanco
- * (Disminuye el espacio disponible en MECON_PDF_Marco para el contenido), en un
+ * (Disminuye el espacio disponible en MLIB_PDF_Marco para el contenido), en un
* futuro la idea es que pueda variarse el separador.
*/
-class MECON_PDF_Separador extends MECON_PDF_Contenido {
+class MLIB_PDF_Separador extends MLIB_PDF_Contenido {
/**
* Linea a agregar en el separador
* @return void
* @access public
*/
- function MECON_PDF_Separador($altura = 27, $linea = false) {
+ function MLIB_PDF_Separador($altura = 27, $linea = false) {
$this->_alto = $altura;
$this->_linea = $linea;
}
/**
* Funcion que agrega el separador al PDF
*
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @return void
* @access public
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/PDF/Contenido.php';
+require_once 'MLIB/PDF/Contenido.php';
/**
* Libreria que permite agregar una tabla a un pdf.
*/
-class MECON_PDF_Tabla extends MECON_PDF_Contenido {
+class MLIB_PDF_Tabla extends MLIB_PDF_Contenido {
/**
* Configuracion
var $_config;
/**
- * Objeto MECON_HTML_Tabla.
- * @var &Object $tabla MECON_HTML_Tabla
+ * Objeto MLIB_HTML_Tabla.
+ * @var &Object $tabla MLIB_HTML_Tabla
* @access protected
*/
var $_tabla;
/**
- * Objeto MECON_PDF_Marco
+ * Objeto MLIB_PDF_Marco
* @var &Object $marco
* @access protected
*/
/**
* Class Constructor
*
- * @param &Object $TABLA MECON_HTML_Tabla
+ * @param &Object $TABLA MLIB_HTML_Tabla
* @param string $orientacion Orientacion que deben tener las nuevas paginas
* que genere la tabla.
*
* @return void
* @access public
*/
- function MECON_PDF_Tabla($TABLA, $orientacion = null, $encabezado = true) {
+ function MLIB_PDF_Tabla($TABLA, $orientacion = null, $encabezado = true) {
$this->_tabla = $TABLA;
$this->_orientacion = $orientacion;
- $this->_config = include 'MECON/PDF/Tabla/medidas.php';
+ $this->_config = include 'MLIB/PDF/Tabla/medidas.php';
$this->_encabezado = $encabezado;
}
* Funcion que agrega el contenido de la tabla que se este utilizando al
* PDF.
*
- * @param &Object $MARCO MECON_PDF_Marco
+ * @param &Object $MARCO MLIB_PDF_Marco
*
* @return void
* @access public
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80 foldmethod=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/PDF/Contenido.php';
+require_once 'MLIB/PDF/Contenido.php';
/**
* Libreria de texto en PDF.
*/
-class MECON_PDF_Texto extends MECON_PDF_Contenido {
+class MLIB_PDF_Texto extends MLIB_PDF_Contenido {
/**
* Parrafos que componen el texto.
* @param string $orientacion Orientacion que tendran las nuevas paginas que
* esta clase genere.
* @param bool $encabezado Indica si las paginas nuevas que genere esta
- * clase tendran el encabezado de MECON_PDF_Marco.
+ * clase tendran el encabezado de MLIB_PDF_Marco.
*
* @return void
* @access public
*/
- function MECON_PDF_Texto($orientacion = null, $encabezado = true) {
+ function MLIB_PDF_Texto($orientacion = null, $encabezado = true) {
$this->_orientacion = $orientacion;
$this->_encabezado = $encabezado;
}
/**
* Funcion que se encarga de crear las nuevas paginas.
*
- * @param &Object $MARCO MECON_PDF_Marco
+ * @param &Object $MARCO MLIB_PDF_Marco
*
* @return void
* @access protected
/**
* Funcion que agrega el contenido del texto al PDF.
*
- * @param &Object $MARCO MECON_PDF_Marco.
+ * @param &Object $MARCO MLIB_PDF_Marco.
*
* @return void
* @access public
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80 foldmethod=marker:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
| Xi Xf X
* Para probar diferentes tamanios de hojas utilizar
- * meconlib/script/PDF_Tam_Hojas.php
+ * mlib/script/PDF_Tam_Hojas.php
*/
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
require_once 'DB.php'; // FIXME - esto debe volar!!!
-require_once 'MECON/Tiempo/Intervalo.php';
+require_once 'MLIB/Tiempo/Intervalo.php';
/**
* Representa un conjunto de entradas y salidas para formar una banda horaria
* @version $Rev$
* @author Gonzalo Merayo <gmeray@mecon.gov.ar>
*/
-class MECON_Tiempo_Banda {
+class MLIB_Tiempo_Banda {
var $intervalos;
var $db;
* Constructor.
* @param $db Conexión opcional a una base de datos.
*/
- function MECON_Tiempo_Banda($db = null)
+ function MLIB_Tiempo_Banda($db = null)
{
$this->db = $db;
$this->intervalos = array();
{
if($int != null)
$inconsistencia = true;
- $int = new Mecon_Tiempo_Intervalo(new Mecon_Tiempo_Hora( $r[1] ),
- new Mecon_Tiempo_Hora( $r[1] ));
+ $int = new MLIB_Tiempo_Intervalo(new MLIB_Tiempo_Hora( $r[1] ),
+ new MLIB_Tiempo_Hora( $r[1] ));
}
if($r[0] == 'S')
{
if($int != null)
{
- $int->setFin( new Mecon_Tiempo_Hora( $r[1] ) );
+ $int->setFin( new MLIB_Tiempo_Hora( $r[1] ) );
$this->agregarIntervalo( $int );
$int = null;
}
{
if($result->numRows() > 0)
{//Version Light o Serenos
- $int = new Mecon_Tiempo_Intervalo(new Mecon_Tiempo_Hora('00:00'),
- new Mecon_Tiempo_Hora('00:00'));
+ $int = new MLIB_Tiempo_Intervalo(new MLIB_Tiempo_Hora('00:00'),
+ new MLIB_Tiempo_Hora('00:00'));
while( $r = $result->fetchRow() )
{
if($r[0] == 'E')
{
// if($int != null)
//$inconsistencia = true;
- $int = new Mecon_Tiempo_Intervalo(new Mecon_Tiempo_Hora( $r[1] ),
- new Mecon_Tiempo_Hora( $r[1] ));
+ $int = new MLIB_Tiempo_Intervalo(new MLIB_Tiempo_Hora( $r[1] ),
+ new MLIB_Tiempo_Hora( $r[1] ));
}
if($r[0] == 'S')
{
if($int != null)
{
- $int->setFin( new Mecon_Tiempo_Hora( $r[1] ) );
+ $int->setFin( new MLIB_Tiempo_Hora( $r[1] ) );
$this->agregarIntervalo( $int );
$int = null;
}
{
if($int != null)
$inconsistencia = true;
- $int = new Mecon_Tiempo_Intervalo(new Mecon_Tiempo_Hora( $r[1] ),
- new Mecon_Tiempo_Hora( $r[1] ));
+ $int = new MLIB_Tiempo_Intervalo(new MLIB_Tiempo_Hora( $r[1] ),
+ new MLIB_Tiempo_Hora( $r[1] ));
}
if($r[0] == 'S')
{
if($int != null)
{
- $int->setFin( new Mecon_Tiempo_Hora( $r[1] ) );
+ $int->setFin( new MLIB_Tiempo_Hora( $r[1] ) );
$this->agregarIntervalo( $int );
$int = null;
}
else
{
//Version Light o Serenos
- $int = new Mecon_Tiempo_Intervalo(new Mecon_Tiempo_Hora('00:00'),
- new Mecon_Tiempo_Hora('00:00'));
+ $int = new MLIB_Tiempo_Intervalo(new MLIB_Tiempo_Hora('00:00'),
+ new MLIB_Tiempo_Hora('00:00'));
if(!is_null($accesos))
{
{
// if($int != null)
//$inconsistencia = true;
- $int = new Mecon_Tiempo_Intervalo(new Mecon_Tiempo_Hora( $r[1] ),
- new Mecon_Tiempo_Hora( $r[1] ));
+ $int = new MLIB_Tiempo_Intervalo(new MLIB_Tiempo_Hora( $r[1] ),
+ new MLIB_Tiempo_Hora( $r[1] ));
}
if($r[0] == 'S')
{
if($int != null)
{
- $int->setFin( new Mecon_Tiempo_Hora( $r[1] ) );
+ $int->setFin( new MLIB_Tiempo_Hora( $r[1] ) );
$this->agregarIntervalo( $int );
$int = null;
}
{
if ($intervalo->invertido()) {
$intervalo->_chequear();
- $this->agregarIntervalo(new MECON_Tiempo_Intervalo(new MECON_Tiempo_Hora('00:00'), new MECON_Tiempo_Hora ('24:00')));
+ $this->agregarIntervalo(new MLIB_Tiempo_Intervalo(new MLIB_Tiempo_Hora('00:00'), new MLIB_Tiempo_Hora ('24:00')));
$this->sacarIntervalo($intervalo);
return true;
}
$d = $int->getDuracion();
if($d->greater($t)) {
#con cortar alcanza
- $ini = new MECON_Tiempo_Hora();
+ $ini = new MLIB_Tiempo_Hora();
$ini->copy($int->inicio);
$ini->add($t);
/*TODO guardar este tiempo como rechazado*/
*/
function chequearIntervalo($intervalo)
{
- $t = new MECON_Tiempo_Hora();
+ $t = new MLIB_Tiempo_Hora();
foreach ($this->intervalos as $i)
$t->add($i->superponer($intervalo));
$d = $intervalo->getDuracion();
*/
function chequearBanda($banda)
{
- $f = new MECON_Tiempo_Hora();
+ $f = new MLIB_Tiempo_Hora();
foreach ($banda->intervalos as $i)
$f->add($this->chequearIntervalo($i));
return $f;
/**
* Chequea si el período pasado como argumento se superpone con la banda.
- * @param $periodo Puede ser un MECON_Tiempo_Intervalo o MECON_Tiempo_Banda.
+ * @param $periodo Puede ser un MLIB_Tiempo_Intervalo o MLIB_Tiempo_Banda.
* @return true si se superpone, false si no.
*/
function seSuperpone($periodo)
{
$intervalos = array($periodo);
- if (is_a($periodo, 'mecon_tiempo_banda')) {
+ if (is_a($periodo, 'MLIB_tiempo_banda')) {
$intervalos = $periodo->intervalos;
}
foreach ($intervalos as $i) {
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
* @version $Rev$
* @author Gonzalo Merayo <gmeray@mecon.gov.ar>
*/
-class MECON_Tiempo_Hora extends Date_Span {
+class MLIB_Tiempo_Hora extends Date_Span {
function set($str)
{
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
$Id$
-----------------------------------------------------------------------------*/
-require_once 'MECON/Tiempo/Hora.php';
+require_once 'MLIB/Tiempo/Hora.php';
/**
* Representa un Intervalo entre 2 horas del mismo dia
* @version $Rev$
* @author Gonzalo Merayo <gmeray@mecon.gov.ar>
*/
-class MECON_Tiempo_Intervalo {
+class MLIB_Tiempo_Intervalo {
/**
*
* Hora de inicio del intervalo
* fin es anterior a la de inicio.
*
*/
- function MECON_Tiempo_Intervalo($inicio = null, $fin = null, $chequear = true)
+ function MLIB_Tiempo_Intervalo($inicio = null, $fin = null, $chequear = true)
{
if (!$inicio) {
- $inicio = new MECON_Tiempo_Hora;
+ $inicio = new MLIB_Tiempo_Hora;
}
if (!$fin) {
- $fin = new MECON_Tiempo_Hora;
+ $fin = new MLIB_Tiempo_Hora;
}
$this->inicio = $inicio;
$this->fin = $fin;
function getDuracion()
{
- $c = new MECON_Tiempo_Hora;
+ $c = new MLIB_Tiempo_Hora;
$c->copy($this->fin);
$c->subtract($this->inicio);
return $c;
*/
function cortar($c)
{
- if(is_a($c, 'mecon_tiempo_hora')) {
+ if(is_a($c, 'MLIB_tiempo_hora')) {
return $this->cortarHora($c);
- } elseif (is_a($c, 'mecon_tiempo_intervalo')) {
+ } elseif (is_a($c, 'MLIB_tiempo_intervalo')) {
return $this->cortarIntervalo($c);
} else {
return false;
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
/**
* Liberia base para el manejo de xls's.
*/
-class MECON_XLS {
+class MLIB_XLS {
/**
* _xls_data, mantiene el binario temporal del xls
*
var $_tabla;
/**
- * MECON_XLS Constructor,
+ * MLIB_XLS Constructor,
* @attrib tabla HTML_Tabla tabla de la que saca los datos
* @return void
*/
- function MECON_XLS($tabla)
+ function MLIB_XLS($tabla)
{
$this->_tabla=$tabla;
}
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.
-----------------------------------------------------------------------------*/
/**
- * Configuración general de MECONlib.
+ * Configuración general de mlib.
*
- * @package MECON
+ * @package MLIB
*/
-if (!defined('MECON_DIR_ROOT')) {
+if (!defined('MLIB_DIR_ROOT')) {
/**
* Directorio raíz respecto de la web.
*/
- define('MECON_DIR_ROOT', '/MECON');
+ define('MLIB_DIR_ROOT', '/MLIB');
}
-if (!defined('MECON_DIR_FS')) {
+if (!defined('MLIB_DIR_FS')) {
/**
* Directorio raíz respecto del sistema de archivos.
*/
- define('MECON_DIR_FS', '/var/www/meconlib');
+ define('MLIB_DIR_FS', '/var/www/mlib');
}
-if (!defined('MECON_DIR_FS_IMG')) {
+if (!defined('MLIB_DIR_FS_IMG')) {
/**
* Directorio de imagenes respecto del sistema de archivos.
*/
- define('MECON_DIR_FS_IMG', MECON_DIR_FS.'/www/images');
+ define('MLIB_DIR_FS_IMG', MLIB_DIR_FS.'/www/images');
}
-if (!defined('MECON_DIR_CSS')) {
+if (!defined('MLIB_DIR_CSS')) {
/**
* Directorio donde se encuentran las hojas de estilo.
*/
- define('MECON_DIR_CSS', MECON_DIR_ROOT.'/css');
+ define('MLIB_DIR_CSS', MLIB_DIR_ROOT.'/css');
}
-if (!defined('MECON_DIR_IMG')) {
+if (!defined('MLIB_DIR_IMG')) {
/**
* Directorio donde se encuentran las imágenes.
*/
- define('MECON_DIR_IMG', MECON_DIR_ROOT.'/images');
+ define('MLIB_DIR_IMG', MLIB_DIR_ROOT.'/images');
}
-if (!defined('MECON_DIR_JS')) {
+if (!defined('MLIB_DIR_JS')) {
/**
* Directorio donde se encuentran los JavaScripts.
*/
- define('MECON_DIR_JS', MECON_DIR_ROOT.'/js');
+ define('MLIB_DIR_JS', MLIB_DIR_ROOT.'/js');
}
-if (!defined('MECON_DB_DSN')) {
+if (!defined('MLIB_DB_DSN')) {
/**
* DSN de la DB a usar por defecto.
*/
- define('MECON_DB_DSN', 'mysql://intranet:intranet@localhost/intranet');
+ define('MLIB_DB_DSN', 'mysql://intranet:intranet@localhost/intranet');
}
-if (!defined('MECON_DB_OPTS')) {
+if (!defined('MLIB_DB_OPTS')) {
/**
* Opciones de la DB a usar por defecto.
*/
- //define('MECON_DB_OPTS', array('persistent' => true));
+ //define('MLIB_DB_OPTS', array('persistent' => true));
}
?>
\ No newline at end of file
<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de Economía
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib 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.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib 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.