]> git.llucax.com Git - mecon/intranet.git/commitdiff
Se agregan en Servicios los Informes Parlamentarios.
authorMyrna Degano <mdegan@mecon.gov.ar>
Wed, 5 Nov 2003 17:19:25 +0000 (17:19 +0000)
committerMyrna Degano <mdegan@mecon.gov.ar>
Wed, 5 Nov 2003 17:19:25 +0000 (17:19 +0000)
17 files changed:
doc/servicios/informes/informes.xmi [new file with mode: 0644]
doc/servicios/informes/xmi2code.config [new file with mode: 0644]
doc/servicios/informes/xmi2code.tpl.php [new file with mode: 0644]
sistema/local_lib/Servicios/Informes.php [new file with mode: 0644]
sistema/www/css/servicios_informes.css [new file with mode: 0644]
sistema/www/images/servicios_informes_blanco1.gif [new file with mode: 0644]
sistema/www/images/servicios_informes_deco1.gif [new file with mode: 0644]
sistema/www/images/servicios_informes_deco2.gif [new file with mode: 0644]
sistema/www/images/servicios_informes_l1.gif [new file with mode: 0644]
sistema/www/images/servicios_informes_l2.gif [new file with mode: 0644]
sistema/www/images/servicios_informes_l296.gif [new file with mode: 0644]
sistema/www/images/servicios_informes_l320.gif [new file with mode: 0644]
sistema/www/images/servicios_informes_parl.gif [new file with mode: 0644]
sistema/www/images/servicios_informes_t1.gif [new file with mode: 0644]
sistema/www/images/servicios_informes_t2.gif [new file with mode: 0644]
sistema/www/servicios/informes/get_file.php [new file with mode: 0755]
sistema/www/servicios/informes/informes.php [new file with mode: 0644]

diff --git a/doc/servicios/informes/informes.xmi b/doc/servicios/informes/informes.xmi
new file mode 100644 (file)
index 0000000..a9774b4
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="org.omg/standards/UML" verified="false" timestamp="" xmi.version="1.2" >
+ <XMI.header>
+  <XMI.documentation>
+   <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+   <XMI.exporterVersion>1.1.5</XMI.exporterVersion>
+   <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+  </XMI.documentation>
+  <XMI.model xmi.name="informes" href="/home/mdegan/public_html/intranet/doc/servicios/informes/informes.xmi" />
+  <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+  <docsettings viewid="188" documentation="" uniqueid="192" />
+  <umlobjects>
+   <UML:Class stereotype="class" package="" xmi.id="189" abstract="0" documentation="Clase para la visualizaciOn de Informes Parlamentarios por Intranet.
+Esto es provisorio, hasta tanto se defina cOmo han de actualizarse y mostrarse estos informes en la nueva Intranet.
+" name="Servicios_Informes" static="0" scope="200" >
+    <UML:Operation stereotype="" package="" xmi.id="191" type="string" abstract="0" documentation="" name="getCSS" static="0" scope="200" />
+    <UML:Operation stereotype="" package="" xmi.id="192" type="string" abstract="0" documentation="" name="toHtml" static="0" scope="200" />
+   </UML:Class>
+   <UML:Class stereotype="" package="" xmi.id="190" abstract="0" documentation="x2c:extern
+x2c:include:HTML/Table.php
+" name="HTML_Table" static="0" scope="200" />
+   <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="500" rolea="189" roleb="190" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
+  </umlobjects>
+  <diagrams>
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="494" snapy="10" showatts="1" xmi.id="188" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,18,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="467" >
+    <widgets>
+     <UML:ClassWidget usesdiagramfillcolour="0" width="105" showattsigs="601" usesdiagramusefillcolour="0" x="72" linecolour="#ff0000" y="167" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="49" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="189" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="1" width="73" showattsigs="601" usesdiagramusefillcolour="1" x="55" linecolour="none" y="44" showopsigs="601" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="190" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+    </widgets>
+    <messages/>
+    <associations>
+     <UML:AssocWidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="190" roleBdoc="" widgetaid="189" roleAdoc="" documentation="" type="500" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,0,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,0,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,0,50,0,0,0,0,0" />
+      <linepath>
+       <startpoint startx="124" starty="167" />
+       <endpoint endx="91" endy="72" />
+      </linepath>
+     </UML:AssocWidget>
+    </associations>
+   </diagram>
+  </diagrams>
+  <listview>
+   <listitem open="1" type="800" id="-1" label="Views" >
+    <listitem open="1" type="801" id="-1" label="Logical View" >
+     <listitem open="0" type="807" id="188" label="class diagram" />
+     <listitem open="0" type="813" id="190" label="HTML_Table" />
+     <listitem open="1" type="813" id="189" label="Servicios_Informes" >
+      <listitem open="0" type="815" id="191" label="getCSS" />
+      <listitem open="0" type="815" id="192" label="toHtml" />
+     </listitem>
+    </listitem>
+    <listitem open="1" type="802" id="-1" label="Use Case View" />
+    <listitem open="1" type="821" id="-1" label="Component View" />
+    <listitem open="0" type="823" id="-1" label="Diagrams" />
+    <listitem open="1" type="827" id="-1" label="Deployment View" />
+   </listitem>
+  </listview>
+ </XMI.content>
+</XMI>
diff --git a/doc/servicios/informes/xmi2code.config b/doc/servicios/informes/xmi2code.config
new file mode 100644 (file)
index 0000000..79972cf
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ! vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+ ! **********************************************************************
+ ! *                      Ministerio de Economía                        *
+ ! *                             Intranet                              *
+ ! **********************************************************************
+ ! * This file is part of Intranet.                                    *
+ ! *                                                                    *
+ ! * Intranet is free software; you can redistribute it and/or modify  *
+ ! * it under the terms of the GNU General Public License as published  *
+ ! * by the Free Software Foundation; either version 2 of the License,  *
+ ! * or (at your option) any later version.                             *
+ ! *                                                                    *
+ ! * Intranet is distributed in the hope that it will be useful, but   *
+ ! * WITHOUT ANY WARRANTY; without even the implied warranty of         *
+ ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
+ ! * General Public License for more details.                           *
+ ! *                                                                    *
+ ! * You should have received a copy of the GNU General Public License  *
+ ! * along with Hooks; if not, write to the Free Software Foundation,   *
+ ! * Inc., 59 Temple Place, Suite 330, Boston, MA  02111*1307  USA      *
+ ! **********************************************************************
+ ! * Creado: Mon Jun 23 14:09:15 ART 2003                               *
+ ! * Autor: Martin Marrese <mmarre@mecon.gov.ar>
+ ! *********************************************************************+
+ ! 
+ ! $Id: xmi2code.config 50 2003-08-12 19:00:38Z mmarre $
+ ! 
+ !-->
+
+<xmi2code>
+  <option key="target" value="*"/>
+  <option key="xmi-input" value="informes.xmi"/>
+  <option key="config-file" value="xmi2code.config"/>
+  <option key="config-file-set" value="false"/>
+  <option key="handler" value="umbrello"/>
+  <option key="generator-path" value="../../../sistema/local_lib/"/>
+  <option key="use-underscores-as-dirs" value="true"/>
+  <option key="use-package-as-dir" value="false"/>
+  <option key="indent" value="    "/>
+  <option key="files-case" value="preserve"/>
+  <option key="generator" value="php.pear"/>
+  <option key="template-path" value="."/>
+  <option key="php.template" value="xmi2code.tpl.php"/>
+  <option key="php.default-code" value="trigger_error('Not implemented!', E_USER_WARNING);"/>
+  <option key="php.pear.use-package-in-classnames" value="false"/>
+  <option key="php.pear.underscore-in-nonpublic" value="true"/>
+</xmi2code>
diff --git a/doc/servicios/informes/xmi2code.tpl.php b/doc/servicios/informes/xmi2code.tpl.php
new file mode 100644 (file)
index 0000000..922e1ee
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                      Ministerio de Economía                        |
+// |                             Intranet                              |
+// +--------------------------------------------------------------------+
+// | This file is part of Intranet.                                    |
+// |                                                                    |
+// | Intranet is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published  |
+// | by the Free Software Foundation; either version 2 of the License,  |
+// | or (at your option) any later version.                             |
+// |                                                                    |
+// | Intranet is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Creado: @@date                                 
+// | Autor:  Myrna Degano <mdegan@mecon.gov.ar>
+// +--------------------------------------------------------------------+
+//
+// $Id: xmi2code.tpl.php 50 2003-08-12 19:00:38Z mmarre $
+//
diff --git a/sistema/local_lib/Servicios/Informes.php b/sistema/local_lib/Servicios/Informes.php
new file mode 100644 (file)
index 0000000..c0e519b
--- /dev/null
@@ -0,0 +1,149 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// |                      Ministerio de Economía                        |
+// |                             Intranet                              |
+// +--------------------------------------------------------------------+
+// | This file is part of Intranet.                                    |
+// |                                                                    |
+// | Intranet is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published  |
+// | by the Free Software Foundation; either version 2 of the License,  |
+// | or (at your option) any later version.                             |
+// |                                                                    |
+// | Intranet is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
+// | General Public License for more details.                           |
+// |                                                                    |
+// | You should have received a copy of the GNU General Public License  |
+// | along with Hooks; if not, write to the Free Software Foundation,   |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
+// +--------------------------------------------------------------------+
+// | Creado: Tue Nov 4 18:17:24 2003                                 
+// | Autor:  Myrna Degano <mdegan@mecon.gov.ar>
+// +--------------------------------------------------------------------+
+//
+// $Id: xmi2code.tpl.php 50 2003-08-12 19:00:38Z mmarre $
+//
+
+require_once 'DB.php';
+require_once 'MECON/HTML/Image.php';
+require_once 'MECON/HTML/Link.php';
+
+
+// +X2C includes
+require_once 'HTML/Table.php';
+// ~X2C
+
+// +X2C Class 189 :Servicios_Informes
+/**
+ * Clase para la visualizaciOn de Informes Parlamentarios por Intranet.
+Esto es provisorio, hasta tanto se defina cOmo han de actualizarse y mostrarse estos informes en la nueva Intranet.
+ *
+ * @access public
+ */
+class Servicios_Informes extends HTML_Table {
+    // ~X2C
+
+    // +X2C Operation 191
+    /**
+     * @return string
+     * @access public
+     */
+    function getCSS() // ~X2C
+    {
+       $css = '/sistemas/intranet/css/servicios_informes.css';
+       return $css;
+    }
+    // -X2C
+
+    // +X2C Operation 192
+    /**
+     * @return string
+     * @access public
+     */
+    function toHtml() // ~X2C
+    {
+       //Base de Datos
+       $dbh = DB::connect("mysql://mark:mark@intranet-db/MEconDAV");
+
+       //Imágenes
+       $IMG_l296 =& new MECON_HTML_Image('../../images/servicios_informes_l296.gif', '', array('height'=>'1', 'width'=>'296'));
+       $IMG_l24 =& new MECON_HTML_Image('../../images/servicios_informes_l296.gif', '', array('height'=>'1', 'width'=>'24'));
+       $IMG_l320 =& new MECON_HTML_Image('../../images/servicios_informes_l320.gif', '', array('height'=>'24', 'width'=>'320'));
+       $IMG_parl =& new MECON_HTML_Image('../../images/servicios_informes_parl.gif', '-', array('height'=>'24', 'width'=>'24'));
+       
+       //Informes
+       $SECCION = 53;
+       $sql= " SELECT  headline, Articles.article_id, publication_date
+               FROM    Articles, ArticlePublicationStates 
+               WHERE   section_id = $SECCION AND 
+                       Articles.article_publication_state_id=ArticlePublicationStates.article_publication_state_id AND 
+                       ArticlePublicationStates.publication_state_id=5 
+                       ORDER BY publication_date desc, Articles.article_id desc";
+       $informes = $dbh->getAll($sql);
+       
+       $cant_col2 = intval(count($informes)/2);
+       $cant_col1 = count($informes) - $cant_col2;
+       
+       $tabla_out =& new HTML_Table('border="0" cellPadding="0" cellSpacing="0" width="660" align="center"');
+       
+       $tabla_col1 =& new HTML_Table('border="0" cellPadding="0" cellSpacing="0" width="320"'); 
+       for ($i=0; $i<$cant_col1; $i++){
+           $tabla_col1->addRow(array($informes[$i][0]), array('class'=>'servicios_informes_informe', 'colspan'=>'2'));
+           $tabla_col1->addRow(array($IMG_l24->toHtml(), $IMG_l296->toHtml()));
+
+           //Obtener Adjuntos 
+           $sql = "SELECT file_for_article_id, mimetype, filename, caption
+                   FROM FilesForArticle
+                   WHERE article_id = ". $informes[$i][1]. " AND
+                         (oculto <> 1 OR oculto IS NULL)
+                   ORDER BY file_for_article_id ASC";
+           $adjuntos = $dbh->getAll($sql);
+           
+           foreach ($adjuntos as $item){
+               $url = '/sistemas/intranet/servicios/informes/get_file.php';
+               $link_adjunto = new MECON_HTML_Link($url, 
+                                                   $item[3], 
+                                                   array('id'=>$item[0]), 
+                                                   array('target'=>'_blank'));
+               $tabla_col1->addRow(array($IMG_parl->toHtml(), $link_adjunto->toHtml()), array('class'=>'servicios_informes_adjunto'));
+           }
+           
+           $tabla_col1->addRow(array($IMG_l320->toHtml()), array('colspan'=>'2'));
+       }    
+
+       $tabla_col2 =& new HTML_Table('border="0" cellPadding="0" cellSpacing="0" width="320"'); 
+       for ($i=$cant_col1; $i<count($informes); $i++){
+           $tabla_col2->addRow(array($informes[$i][0]), array('class'=>'servicios_informes_informe', 'colspan'=>'2'));
+           $tabla_col2->addRow(array($IMG_l24->toHtml(), $IMG_l296->toHtml()));
+
+           //Obtener Adjuntos 
+           $sql = "SELECT file_for_article_id, mimetype, filename, caption
+                   FROM FilesForArticle
+                   WHERE article_id = ". $informes[$i][1]. " AND
+                         (oculto <> 1 OR oculto IS NULL)                  
+                   ORDER BY file_for_article_id ASC";
+           $adjuntos = $dbh->getAll($sql);
+           
+           foreach ($adjuntos as $item){
+               $url = '/sistemas/intranet/servicios/informes/get_file.php';
+               $link_adjunto = new MECON_HTML_Link($url, 
+                                                   $item[3], 
+                                                   array('id'=>$item[0]), 
+                                                   array('target'=>'_blank'));
+               $tabla_col2->addRow(array($IMG_parl->toHtml(), $link_adjunto->toHtml()), array('class'=>'servicios_informes_adjunto'));
+           }
+
+           $tabla_col2->addRow(array($IMG_l320->toHtml()), array('colspan'=>'2'));
+       }    
+
+       $tabla_out->addRow(array($tabla_col1->toHtml(), $tabla_col2->toHtml()), array('align'=>'center', 'valign'=>'top'));
+
+       return $tabla_out->toHtml();
+    }
+    // -X2C
+
+} // -X2C Class :Servicios_Informes
+?>
\ No newline at end of file
diff --git a/sistema/www/css/servicios_informes.css b/sistema/www/css/servicios_informes.css
new file mode 100644 (file)
index 0000000..4c64198
--- /dev/null
@@ -0,0 +1,40 @@
+.servicios_informes_informe { \r
+       color: #003366; \r
+       font-family: arial, helvetica, sans-serif; \r
+       font-size: 10pt; \r
+       font-style: bold; \r
+       line-height: normal; \r
+       text-align: left; \r
+       vertical-align: middle ; \r
+       font-weight: bold; \r
+}\r
+.servicios_informes_titulo { \r
+       color: #000000; \r
+       font-family: arial, helvetica, sans-serif; \r
+       font-size: 12pt; \r
+       font-style: bold; \r
+       line-height: normal; \r
+       text-align: center; \r
+       vertical-align: middle ; \r
+       font-weight: bold; \r
+}\r
+.servicios_informes_subtitulo { \r
+       color: #000000; \r
+       font-family: arial, helvetica, sans-serif; \r
+       font-size: 10pt; \r
+       font-style: bold; \r
+       line-height: normal; \r
+       text-align: center; \r
+       vertical-align: middle ; \r
+       font-weight: bold; \r
+}\r
+.servicios_informes_adjunto { \r
+       color: #000000; \r
+       font-family: arial, helvetica, sans-serif; \r
+       font-size: 10pt; \r
+       font-style: normal; \r
+       line-height: normal; \r
+       text-align: left; \r
+       vertical-align: middle ; \r
+       font-weight: normal; \r
+}\r
diff --git a/sistema/www/images/servicios_informes_blanco1.gif b/sistema/www/images/servicios_informes_blanco1.gif
new file mode 100644 (file)
index 0000000..fc25609
Binary files /dev/null and b/sistema/www/images/servicios_informes_blanco1.gif differ
diff --git a/sistema/www/images/servicios_informes_deco1.gif b/sistema/www/images/servicios_informes_deco1.gif
new file mode 100644 (file)
index 0000000..0212be1
Binary files /dev/null and b/sistema/www/images/servicios_informes_deco1.gif differ
diff --git a/sistema/www/images/servicios_informes_deco2.gif b/sistema/www/images/servicios_informes_deco2.gif
new file mode 100644 (file)
index 0000000..be247f5
Binary files /dev/null and b/sistema/www/images/servicios_informes_deco2.gif differ
diff --git a/sistema/www/images/servicios_informes_l1.gif b/sistema/www/images/servicios_informes_l1.gif
new file mode 100644 (file)
index 0000000..b99eba5
Binary files /dev/null and b/sistema/www/images/servicios_informes_l1.gif differ
diff --git a/sistema/www/images/servicios_informes_l2.gif b/sistema/www/images/servicios_informes_l2.gif
new file mode 100644 (file)
index 0000000..b99eba5
Binary files /dev/null and b/sistema/www/images/servicios_informes_l2.gif differ
diff --git a/sistema/www/images/servicios_informes_l296.gif b/sistema/www/images/servicios_informes_l296.gif
new file mode 100644 (file)
index 0000000..94a0153
Binary files /dev/null and b/sistema/www/images/servicios_informes_l296.gif differ
diff --git a/sistema/www/images/servicios_informes_l320.gif b/sistema/www/images/servicios_informes_l320.gif
new file mode 100644 (file)
index 0000000..98f8319
Binary files /dev/null and b/sistema/www/images/servicios_informes_l320.gif differ
diff --git a/sistema/www/images/servicios_informes_parl.gif b/sistema/www/images/servicios_informes_parl.gif
new file mode 100644 (file)
index 0000000..fb905dc
Binary files /dev/null and b/sistema/www/images/servicios_informes_parl.gif differ
diff --git a/sistema/www/images/servicios_informes_t1.gif b/sistema/www/images/servicios_informes_t1.gif
new file mode 100644 (file)
index 0000000..5c2317b
Binary files /dev/null and b/sistema/www/images/servicios_informes_t1.gif differ
diff --git a/sistema/www/images/servicios_informes_t2.gif b/sistema/www/images/servicios_informes_t2.gif
new file mode 100644 (file)
index 0000000..41da0c8
Binary files /dev/null and b/sistema/www/images/servicios_informes_t2.gif differ
diff --git a/sistema/www/servicios/informes/get_file.php b/sistema/www/servicios/informes/get_file.php
new file mode 100755 (executable)
index 0000000..27e7921
--- /dev/null
@@ -0,0 +1,41 @@
+<?php 
+/*-----------------------------------------------------------------------------
+Intranet del Ministerio de Economía
+Informes Parlamentarios
+-------------------------------------------------------------------------------
+Este servicio es provisorio hasta tanto se decida cómo se actualizan estos
+informes sin utilizar MEconDAV
+-------------------------------------------------------------------------------
+Myrna Degano <mdegan@mecon.gov.ar>
+------------------------------------------------------------------------------*/
+
+require_once 'DB.php';
+
+//Conexión a la BD
+$dbh = DB::connect("mysql://mark:mark@intranet-db/MEconDAV");
+if (DB::isError($dbh)) {
+    die ($dbh->getMessage());
+}
+
+//Obtener Datos del Adjunto 
+$sql = "SELECT mimetype, filename, size
+        FROM FilesForArticle
+        WHERE file_for_article_id = ". $_GET['id'];
+$datos = $dbh->getAll($sql);
+
+$mime = $datos[0][0];
+$filename = $datos[0][1];
+$filesize = $datos[0][2];
+
+//Esta es la dirección en donde se alojan los adjuntos
+$dir = '/var/www/mecondav/archivos/';  
+$dir = $dir.$_GET['id'];
+
+header("Content-Type: ".$mime);
+header("Content-Disposition: attachment; filename=".$filename);
+header("Pragma: no-cache");
+header("Expires: 0");
+header("Content-Length: ".$filesize);
+
+readfile ($dir);
+?>
\ No newline at end of file
diff --git a/sistema/www/servicios/informes/informes.php b/sistema/www/servicios/informes/informes.php
new file mode 100644 (file)
index 0000000..7aff29c
--- /dev/null
@@ -0,0 +1,76 @@
+<?php 
+/*-----------------------------------------------------------------------------
+Intranet del Ministerio de Economía
+Informes Parlamentarios
+-------------------------------------------------------------------------------
+Este servicio es provisorio hasta tanto se decida cómo se actualizan estos
+informes sin utilizar MEconDAV
+-------------------------------------------------------------------------------
+Myrna Degano <mdegan@mecon.gov.ar>
+------------------------------------------------------------------------------*/
+
+require_once '../../../local_lib/HTML_DietMarco.php';
+require_once 'MECON/HTML/Image.php';
+require_once 'HTML/Table.php';
+require_once '../../../local_lib/Servicios/Informes.php';
+
+//Marco de servicios en intranet
+$MARCO     = new HTML_DietMarco('servicios', 'Informes Parlamentarios');
+$MARCO->addTitle('Informes Parlamentarios');
+
+//Imágenes
+$IMG_Blanco1_30 =& new MECON_HTML_Image('../../images/servicios_informes_blanco1.gif', '', array('height'=>'1', 'width'=>'30'));
+$IMG_Blanco1_170 =& new MECON_HTML_Image('../../images/servicios_informes_blanco1.gif', '', array('height'=>'1', 'width'=>'170'));
+$IMG_Blanco1_20 =& new MECON_HTML_Image('../../images/servicios_informes_blanco1.gif', '', array('height'=>'1', 'width'=>'20'));
+$IMG_Blanco1_1 =& new MECON_HTML_Image('../../images/servicios_informes_blanco1.gif', '', array('height'=>'6', 'width'=>'1'));
+$IMG_Blanco1_10 =& new MECON_HTML_Image('../../images/servicios_informes_blanco1.gif', '', array('height'=>'10', 'width'=>'10'));
+$IMG_l1 =& new MECON_HTML_Image('../../images/servicios_informes_l1.gif', '', array('height'=>'2', 'width'=>'760'));
+$IMG_l2 =& new MECON_HTML_Image('../../images/servicios_informes_l2.gif', '', array('height'=>'2', 'width'=>'760'));
+$IMG_t1 =& new MECON_HTML_Image('../../images/servicios_informes_t1.gif', '', array('height'=>'24', 'width'=>'30'));
+$IMG_t2 =& new MECON_HTML_Image('../../images/servicios_informes_t2.gif', '', array('height'=>'24', 'width'=>'30'));
+$IMG_deco1 =& new MECON_HTML_Image('../../images/servicios_informes_deco1.gif', '', array('height'=>'20', 'width'=>'200'));
+$IMG_deco2 =& new MECON_HTML_Image('../../images/servicios_informes_deco2.gif', '', array('height'=>'20', 'width'=>'200'));
+
+//Informes Parlamentarios
+$INFORMES =& new Servicios_Informes();
+
+//Tabla Contenedora
+$TABLA =& new HTML_Table ('border="0" cellPadding="0" cellSpacing="0" width="760"');
+$TABLA->addRow(array($IMG_Blanco1_30->toHtml(), 
+                    $IMG_Blanco1_170->toHtml(), 
+                    $IMG_Blanco1_170->toHtml(), 
+                    $IMG_Blanco1_20->toHtml(), 
+                    $IMG_Blanco1_170->toHtml(), 
+                    $IMG_Blanco1_170->toHtml(), 
+                    $IMG_Blanco1_30->toHtml()));
+$TABLA->addRow(array($IMG_l1->toHtml()), array('height'=>'2')); 
+$TABLA->updateCellAttributes(1,0, 'colspan="7"');
+$TABLA->addRow(array($IMG_t1->toHtml(), 
+                    '&nbsp;',
+                    'Servicios', '', '',
+                    '&nbsp;',
+                    $IMG_t2->toHtml())); 
+$TABLA->updateCellAttributes(2,2, array('colspan'=>'3', 'class'=>'servicios_informes_titulo'));
+$TABLA->addRow(array($IMG_l2->toHtml()), array('height'=>'2')); 
+$TABLA->updateCellAttributes(3,0, 'colspan="7"');
+$TABLA->addRow(array($IMG_deco1->toHtml(), '', 
+                    'Informes Parlamentarios', '', '',
+                    $IMG_deco2->toHtml(), '')); 
+$TABLA->updateCellAttributes(4,0, 'colspan="2"');
+$TABLA->updateCellAttributes(4,2, 'colspan="3" class="servicios_informes_subtitulo"');
+$TABLA->updateCellAttributes(4,5, 'colspan="2"');
+$TABLA->addRow(array($IMG_Blanco1_1->toHtml())); 
+$TABLA->updateCellAttributes(5,0, 'colspan="7"');
+
+$TABLA->addRow(array('<br>'.$INFORMES->toHtml().'<br>')); 
+$TABLA->updateCellAttributes(6,0, 'colspan="7"');
+
+$TABLA->addRow(array($IMG_Blanco1_10->toHtml())); 
+$TABLA->updateCellAttributes(7,0, 'colspan="7"');
+
+
+$MARCO->addStyleSheet($INFORMES->getCSS());
+$MARCO->addBodyContent($TABLA);
+$MARCO->display();
+
+?>