From 4f8bc31d20f46ddb617fc55800841d680337155b Mon Sep 17 00:00:00 2001 From: Myrna Degano Date: Wed, 5 Nov 2003 17:19:25 +0000 Subject: [PATCH] Se agregan en Servicios los Informes Parlamentarios. --- doc/servicios/informes/informes.xmi | 63 ++++++++ doc/servicios/informes/xmi2code.config | 49 ++++++ doc/servicios/informes/xmi2code.tpl.php | 28 ++++ sistema/local_lib/Servicios/Informes.php | 149 ++++++++++++++++++ sistema/www/css/servicios_informes.css | 40 +++++ .../www/images/servicios_informes_blanco1.gif | Bin 0 -> 43 bytes .../www/images/servicios_informes_deco1.gif | Bin 0 -> 212 bytes .../www/images/servicios_informes_deco2.gif | Bin 0 -> 214 bytes sistema/www/images/servicios_informes_l1.gif | Bin 0 -> 85 bytes sistema/www/images/servicios_informes_l2.gif | Bin 0 -> 85 bytes .../www/images/servicios_informes_l296.gif | Bin 0 -> 62 bytes .../www/images/servicios_informes_l320.gif | Bin 0 -> 216 bytes .../www/images/servicios_informes_parl.gif | Bin 0 -> 118 bytes sistema/www/images/servicios_informes_t1.gif | Bin 0 -> 102 bytes sistema/www/images/servicios_informes_t2.gif | Bin 0 -> 118 bytes sistema/www/servicios/informes/get_file.php | 41 +++++ sistema/www/servicios/informes/informes.php | 76 +++++++++ 17 files changed, 446 insertions(+) create mode 100644 doc/servicios/informes/informes.xmi create mode 100644 doc/servicios/informes/xmi2code.config create mode 100644 doc/servicios/informes/xmi2code.tpl.php create mode 100644 sistema/local_lib/Servicios/Informes.php create mode 100644 sistema/www/css/servicios_informes.css create mode 100644 sistema/www/images/servicios_informes_blanco1.gif create mode 100644 sistema/www/images/servicios_informes_deco1.gif create mode 100644 sistema/www/images/servicios_informes_deco2.gif create mode 100644 sistema/www/images/servicios_informes_l1.gif create mode 100644 sistema/www/images/servicios_informes_l2.gif create mode 100644 sistema/www/images/servicios_informes_l296.gif create mode 100644 sistema/www/images/servicios_informes_l320.gif create mode 100644 sistema/www/images/servicios_informes_parl.gif create mode 100644 sistema/www/images/servicios_informes_t1.gif create mode 100644 sistema/www/images/servicios_informes_t2.gif create mode 100755 sistema/www/servicios/informes/get_file.php create mode 100644 sistema/www/servicios/informes/informes.php diff --git a/doc/servicios/informes/informes.xmi b/doc/servicios/informes/informes.xmi new file mode 100644 index 0000000..a9774b4 --- /dev/null +++ b/doc/servicios/informes/informes.xmi @@ -0,0 +1,63 @@ + + + + + umbrello uml modeller http://uml.sf.net + 1.1.5 + UnicodeUTF8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/servicios/informes/xmi2code.config b/doc/servicios/informes/xmi2code.config new file mode 100644 index 0000000..79972cf --- /dev/null +++ b/doc/servicios/informes/xmi2code.config @@ -0,0 +1,49 @@ + + + + + diff --git a/doc/servicios/informes/xmi2code.tpl.php b/doc/servicios/informes/xmi2code.tpl.php new file mode 100644 index 0000000..922e1ee --- /dev/null +++ b/doc/servicios/informes/xmi2code.tpl.php @@ -0,0 +1,28 @@ + +// +--------------------------------------------------------------------+ +// +// $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 index 0000000..c0e519b --- /dev/null +++ b/sistema/local_lib/Servicios/Informes.php @@ -0,0 +1,149 @@ + +// +--------------------------------------------------------------------+ +// +// $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; $iaddRow(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 index 0000000..4c64198 --- /dev/null +++ b/sistema/www/css/servicios_informes.css @@ -0,0 +1,40 @@ +.servicios_informes_informe { + color: #003366; + font-family: arial, helvetica, sans-serif; + font-size: 10pt; + font-style: bold; + line-height: normal; + text-align: left; + vertical-align: middle ; + font-weight: bold; +} +.servicios_informes_titulo { + color: #000000; + font-family: arial, helvetica, sans-serif; + font-size: 12pt; + font-style: bold; + line-height: normal; + text-align: center; + vertical-align: middle ; + font-weight: bold; +} +.servicios_informes_subtitulo { + color: #000000; + font-family: arial, helvetica, sans-serif; + font-size: 10pt; + font-style: bold; + line-height: normal; + text-align: center; + vertical-align: middle ; + font-weight: bold; +} +.servicios_informes_adjunto { + color: #000000; + font-family: arial, helvetica, sans-serif; + font-size: 10pt; + font-style: normal; + line-height: normal; + text-align: left; + vertical-align: middle ; + font-weight: normal; +} diff --git a/sistema/www/images/servicios_informes_blanco1.gif b/sistema/www/images/servicios_informes_blanco1.gif new file mode 100644 index 0000000000000000000000000000000000000000..fc2560981ee1caca400e225e48d282106f907f2d GIT binary patch literal 43 ucmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE7Df>utpmhBaYhCPCMFj~25SJyItL8^ literal 0 HcmV?d00001 diff --git a/sistema/www/images/servicios_informes_deco1.gif b/sistema/www/images/servicios_informes_deco1.gif new file mode 100644 index 0000000000000000000000000000000000000000..0212be188a1170def68a7a6c94fbbfa045fd2ad6 GIT binary patch literal 212 zcmV;_04x7TNk%w1VaNa!0HOc@|NsC0>&*Ywng7CO|E)9snE?I)0ssI2A^8La6aWSQ zEC2ui0LTCo000A-2&z^4Fv>}*y*TU5ySL3Jj$~<`XceYx>%MTd#&m7p+l=pg59_|5 zaF}xtkI3W#sB8)eP$*s;jK6uCK7M Ova__cwzs%D2>?5T;%Axw literal 0 HcmV?d00001 diff --git a/sistema/www/images/servicios_informes_deco2.gif b/sistema/www/images/servicios_informes_deco2.gif new file mode 100644 index 0000000000000000000000000000000000000000..be247f54372e9e5df109ef48b1cf80fae0b9c93e GIT binary patch literal 214 zcmV;{04e`RNk%w1VaNa!0HOc@|NsC0>&*Ywng7CO|E)9snE?I)0ssI2A^8La6aWSQ zEC2ui0LTCo000A<2)f+}*y*TT=O5tEAj$~;{-l?u^>t5+A&vc!|cCPO)&i}yR z?ISE2j~yZ;z+^TAP-tU7r8WpyEOLAFIhsyJRLZDY8CflN4fHm^f#-N?zNS6+ynfH` z`~QG}f`f#GhIkTia#3_uc3Fp!l9QB`mVJp}i)0IC1CMHKqNAjxrl+W>s;jK6uCK7M Qva__cwzs&sx(f*aJ8z+7t^fc4 literal 0 HcmV?d00001 diff --git a/sistema/www/images/servicios_informes_l1.gif b/sistema/www/images/servicios_informes_l1.gif new file mode 100644 index 0000000000000000000000000000000000000000..b99eba570778bb35c0661e87a97022e41bb62a38 GIT binary patch literal 85 zcmZ?wbhEHb{K3S;Fp+`b|4b12$H>IMz@Ye(g++wnKZ6dC%>a^TU{Y)8UwQg1|Kd4Y mZgp?Ix92y1+ar%@&pMaAI<@T`_wi3Y*T3~X{}su=U=0B6h9j^5 literal 0 HcmV?d00001 diff --git a/sistema/www/images/servicios_informes_l2.gif b/sistema/www/images/servicios_informes_l2.gif new file mode 100644 index 0000000000000000000000000000000000000000..b99eba570778bb35c0661e87a97022e41bb62a38 GIT binary patch literal 85 zcmZ?wbhEHb{K3S;Fp+`b|4b12$H>IMz@Ye(g++wnKZ6dC%>a^TU{Y)8UwQg1|Kd4Y mZgp?Ix92y1+ar%@&pMaAI<@T`_wi3Y*T3~X{}su=U=0B6h9j^5 literal 0 HcmV?d00001 diff --git a/sistema/www/images/servicios_informes_l296.gif b/sistema/www/images/servicios_informes_l296.gif new file mode 100644 index 0000000000000000000000000000000000000000..94a0153f30bf4dbf38e1a96642a049a45ea965e1 GIT binary patch literal 62 zcmZ?wbhEHb)L>*}n8?7uV4Ma-{}`EoOvRrpEFuj58FYYb29P`h6Mswp%F}Q87th&p Mt9$dk9SjWC0G!njk^lez literal 0 HcmV?d00001 diff --git a/sistema/www/images/servicios_informes_l320.gif b/sistema/www/images/servicios_informes_l320.gif new file mode 100644 index 0000000000000000000000000000000000000000..98f83192d9875e5f1f077923f45c38d502a4291c GIT binary patch literal 216 zcmV;}04M)PNk%w1VL$;G0FeLy|Ns90GiLq)0ssI2A^8LZ6afDKEC2ui06+m400081 zgpaAq?GK}zwAzca-n{z{hT=$;=82~2%C_zc$MQ_q_KoNI&iDQg3<`(DqVb4KDwoWr z^9hYgr_`$TY6=7xTJCny^@_n?MVLG`mlJ1on!QG};ct2TFt^w7cSD}P=hp}DCm2XL zh*-EdScrJY*bs?ESxIN92idqO$%zT587k^_h-G?;nyR|W+UoiW8!J0YTWfoZo2$Fa S+w1!a94tIcTx<+m0027;6J-Yg literal 0 HcmV?d00001 diff --git a/sistema/www/images/servicios_informes_parl.gif b/sistema/www/images/servicios_informes_parl.gif new file mode 100644 index 0000000000000000000000000000000000000000..fb905dc436e79b11ce821db00b99582725766a90 GIT binary patch literal 118 zcmV-+0Ez!cNk%w1VHf}y0FeLy;PC$dGiLw){{R30A^8La6aWGMEC2ui02lxm0006< zl#i*)?caiwa0P&AMK^=69o;vD!iat5IJMxzrl}UqviCCa-A3&#%Q-GCi3)<^RfxqS Y3^-eoT+SghBfScJ#ggd@4lfD-JIn-E$-*MS@Si~k$Yub^GccL=)Gs*wmSgT5 zfwQNx4n;`ct9W{6Cuie<>&9Uo_ zwDKv-Ii*dPPEVf~``uH~-0f*;*vie@-f^10e{*tM(DU7Q&)Y|AF!d4jJ{}O%^4PT2 NKSFKRta(BV)&Qq&EmHsh literal 0 HcmV?d00001 diff --git a/sistema/www/servicios/informes/get_file.php b/sistema/www/servicios/informes/get_file.php new file mode 100755 index 0000000..27e7921 --- /dev/null +++ b/sistema/www/servicios/informes/get_file.php @@ -0,0 +1,41 @@ + +------------------------------------------------------------------------------*/ + +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 index 0000000..7aff29c --- /dev/null +++ b/sistema/www/servicios/informes/informes.php @@ -0,0 +1,76 @@ + +------------------------------------------------------------------------------*/ + +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(), + ' ', + 'Servicios', '', '', + ' ', + $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('
'.$INFORMES->toHtml().'
')); +$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(); + +?> -- 2.43.0