]> git.llucax.com Git - mecon/intranet.git/commitdiff
Ahora las noticias se generan dinamicamente
authorGonzalo Merayo <merayo@gmail.com>
Thu, 3 Jul 2003 20:08:48 +0000 (20:08 +0000)
committerGonzalo Merayo <merayo@gmail.com>
Thu, 3 Jul 2003 20:08:48 +0000 (20:08 +0000)
doc/noticias.xmi
lib/configuracion.php
lib/noticia.php
sistema/local_lib/HTML_Noticia.php
sistema/local_lib/configuracion.php [new file with mode: 0644]
sistema/local_lib/intranetdb.php [moved from lib/intranetdb.php with 100% similarity]
sistema/www/css/noticias.css [new file with mode: 0644]
sistema/www/images/nuevo.gif [new file with mode: 0644]
sistema/www/noticias.php

index c62be6e3f7972ae38bb1d7e77b2bc9170032c1a3..94fc8eb4d14a878d6453992bf31c1879f27be442 100644 (file)
@@ -10,7 +10,7 @@
  </XMI.header>
  <XMI.content>
   <docsettings viewid="160" documentation="
  </XMI.header>
  <XMI.content>
   <docsettings viewid="160" documentation="
-" uniqueid="183" />
+" uniqueid="185" />
   <umlobjects>
    <UML:Class stereotype="" package="lib" xmi.id="161" abstract="0" documentation="" name="noticia" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="169" type="void" abstract="0" documentation="" name="noticia" static="0" scope="200" >
   <umlobjects>
    <UML:Class stereotype="" package="lib" xmi.id="161" abstract="0" documentation="" name="noticia" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="169" type="void" abstract="0" documentation="" name="noticia" static="0" scope="200" >
@@ -34,6 +34,8 @@
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="bool" abstract="0" documentation="" name="nuevo" static="0" scope="200" />
     </UML:Operation>
     <UML:Attribute stereotype="" package="" xmi.id="172" value="" type="noticia" abstract="0" documentation="" name="noticia" static="0" scope="200" />
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="bool" abstract="0" documentation="" name="nuevo" static="0" scope="200" />
     </UML:Operation>
     <UML:Attribute stereotype="" package="" xmi.id="172" value="" type="noticia" abstract="0" documentation="" name="noticia" static="0" scope="200" />
+    <UML:Attribute stereotype="" package="" xmi.id="184" value="" type="bool" abstract="0" documentation="" name="completa" static="0" scope="200" />
+    <UML:Attribute stereotype="" package="" xmi.id="185" value="" type="int" abstract="0" documentation="" name="nuevo" static="0" scope="200" />
    </UML:Class>
    <UML:Class stereotype="" package="" xmi.id="164" abstract="0" documentation="x2c:extern" name="HTML_Table" static="0" scope="200" />
    <UML:Class stereotype="" package="lib" xmi.id="170" abstract="0" documentation="" name="seccion" static="0" scope="200" >
    </UML:Class>
    <UML:Class stereotype="" package="" xmi.id="164" abstract="0" documentation="x2c:extern" name="HTML_Table" static="0" scope="200" />
    <UML:Class stereotype="" package="lib" xmi.id="170" abstract="0" documentation="" name="seccion" static="0" scope="200" >
@@ -51,7 +53,7 @@
    <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="160" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="30000" showstereotype="0" showscope="1" font="Helvetica,8,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
     <widgets>
      <UML:ConceptWidget usesdiagramfillcolour="0" width="160" showattsigs="601" usesdiagramusefillcolour="0" x="101" linecolour="#ff0000" y="233" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="112" usefillcolor="1" showattributes="1" xmi.id="161" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
    <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="160" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="30000" showstereotype="0" showscope="1" font="Helvetica,8,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
     <widgets>
      <UML:ConceptWidget usesdiagramfillcolour="0" width="160" showattsigs="601" usesdiagramusefillcolour="0" x="101" linecolour="#ff0000" y="233" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="112" usefillcolor="1" showattributes="1" xmi.id="161" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="220" showattsigs="601" usesdiagramusefillcolour="0" x="406" linecolour="#ff0000" y="188" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="96" usefillcolor="1" showattributes="1" xmi.id="162" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="220" showattsigs="601" usesdiagramusefillcolour="0" x="408" linecolour="#ff0000" y="223" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="128" usefillcolor="1" showattributes="1" xmi.id="162" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="80" showattsigs="601" usesdiagramusefillcolour="0" x="477" linecolour="#ff0000" y="47" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" xmi.id="164" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="272" showattsigs="601" usesdiagramusefillcolour="0" x="65" linecolour="#ff0000" y="62" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="88" usefillcolor="1" showattributes="1" xmi.id="170" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
     </widgets>
      <UML:ConceptWidget usesdiagramfillcolour="0" width="80" showattsigs="601" usesdiagramusefillcolour="0" x="477" linecolour="#ff0000" y="47" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" xmi.id="164" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="272" showattsigs="601" usesdiagramusefillcolour="0" x="65" linecolour="#ff0000" y="62" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="88" usefillcolor="1" showattributes="1" xmi.id="170" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
     </widgets>
     <associations>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="164" widgetaid="162" documentation="" type="500" >
       <linepath>
     <associations>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="164" widgetaid="162" documentation="" type="500" >
       <linepath>
-       <startpoint startx="516" starty="188" />
+       <startpoint startx="518" starty="223" />
        <endpoint endx="517" endy="79" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="162" widgetaid="161" documentation="" type="510" >
       <linepath>
        <startpoint startx="261" starty="289" />
        <endpoint endx="517" endy="79" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="162" widgetaid="161" documentation="" type="510" >
       <linepath>
        <startpoint startx="261" starty="289" />
-       <endpoint endx="406" endy="236" />
+       <endpoint endx="408" endy="287" />
       </linepath>
      </UML:AssocWidget>
     </associations>
       </linepath>
      </UML:AssocWidget>
     </associations>
@@ -77,7 +79,9 @@
     <listitem open="1" type="801" id="-1" label="Logical View" >
      <listitem open="1" type="813" id="162" label="HTML_Noticia" >
       <listitem open="0" type="815" id="167" label="HTML_Noticia" />
     <listitem open="1" type="801" id="-1" label="Logical View" >
      <listitem open="1" type="813" id="162" label="HTML_Noticia" >
       <listitem open="0" type="815" id="167" label="HTML_Noticia" />
+      <listitem open="0" type="814" id="184" label="completa" />
       <listitem open="0" type="814" id="172" label="noticia" />
       <listitem open="0" type="814" id="172" label="noticia" />
+      <listitem open="0" type="814" id="185" label="nuevo" />
       <listitem open="0" type="815" id="175" label="setCompleta" />
       <listitem open="0" type="815" id="176" label="setNuevo" />
       <listitem open="0" type="815" id="166" label="toHTML" />
       <listitem open="0" type="815" id="175" label="setCompleta" />
       <listitem open="0" type="815" id="176" label="setNuevo" />
       <listitem open="0" type="815" id="166" label="toHTML" />
index 5a31be14b3b52b038b12ec5084a220a45fbec077..12e73c7a7ce3a1928010d00b6074d413a819c46f 100644 (file)
             'titulo_sistema'    => 'Intranet',
             'pie_sistema'       => 'Ministerio de Economia',
             'db_type'           => 'mysql',
             'titulo_sistema'    => 'Intranet',
             'pie_sistema'       => 'Ministerio de Economia',
             'db_type'           => 'mysql',
-            'db_user'           => 'intranet',
-            'db_pass'           => 'intranet',
-            'db_host'           => 'bal747f',
-            'db_name'           => 'intranet',
+            'db_user'           => 'mark',
+            'db_pass'           => 'mark',
+            'db_host'           => 'intranet-db',
+            'db_name'           => 'MEconDAV',
     );
 
 ?>
     );
 
 ?>
index 88f9f089d7619555c467e7348c33fb28a0766225..6a07def9b9dbd6d102b14bee46881fea19561db3 100644 (file)
@@ -111,4 +111,4 @@ class noticia {
     // -X2C
 
 } // -X2C Class :noticia
     // -X2C
 
 } // -X2C Class :noticia
-?>
+?>
\ No newline at end of file
index ac74f83f6b723f7c420965d3528b26413b78d725..ad25c4150367ede282d4112908414b5c98e570f4 100644 (file)
@@ -30,7 +30,8 @@
 
 
 // +X2C includes
 
 
 // +X2C includes
-require_once 'HTML_Table.php';
+require_once 'HTML/Table.php';
+require_once 'HTML/Image.php';
 // ~X2C
 
 // +X2C Class 162 :HTML_Noticia
 // ~X2C
 
 // +X2C Class 162 :HTML_Noticia
@@ -44,6 +45,18 @@ class HTML_Noticia extends HTML_Table {
      */
     var $noticia;
 
      */
     var $noticia;
 
+    /**
+     * @var    bool $completa
+     * @access public
+     */
+    var $completa;
+
+    /**
+     * @var    int $nuevo
+     * @access public
+     */
+    var $nuevo;
+
     // ~X2C
 
     // +X2C Operation 166
     // ~X2C
 
     // +X2C Operation 166
@@ -53,7 +66,22 @@ class HTML_Noticia extends HTML_Table {
      */
     function toHTML() // ~X2C
     {
      */
     function toHTML() // ~X2C
     {
-        trigger_error('Not implemented!', E_USER_WARNING);
+        $this->addRow(array('Subt&iacute;tulo'), array('class' => 'subtitulo'));
+       $img_str = null;
+       if($this->nuevo)
+       {
+         $nuevo = new HTML_Image('images/nuevo.gif');
+         $img_str = $nuevo->toHTML();
+       }
+        $this->addRow(array('Título de la noticia que nos vincula con su texto completo.'.$img_str), array('class' => 'titulo_noticia'));
+        $this->addRow(array('(10/02/03)'),
+                                array('class' => 'fecha_noticia'));
+       $mas = new HTML_Image('images/mas.gif');
+        $this->addRow(array($mas->toHTML().'ver más'),
+                                array('class' => 'ver_mas'));
+        $this->addRow(array(new HTML_Image('images/linea_puntos.gif')),
+                                array('class' => 'ver_mas'));
+        return parent::toHTML();    
     }
     // -X2C
 
     }
     // -X2C
 
@@ -66,7 +94,11 @@ class HTML_Noticia extends HTML_Table {
      */
     function HTML_Noticia($noticia) // ~X2C
     {
      */
     function HTML_Noticia($noticia) // ~X2C
     {
-        trigger_error('Not implemented!', E_USER_WARNING);
+        $this->noticia = $noticia;
+       $params = array('width'      => '280',
+                       'border'     =>'0',
+                       'cellPadding'=>'0');
+       parent::HTML_Table($params);
     }
     // -X2C
 
     }
     // -X2C
 
@@ -80,7 +112,7 @@ class HTML_Noticia extends HTML_Table {
      */
     function setCompleta($completa) // ~X2C
     {
      */
     function setCompleta($completa) // ~X2C
     {
-        trigger_error('Not implemented!', E_USER_WARNING);
+        $this->completa = $completa;
     }
     // -X2C
 
     }
     // -X2C
 
@@ -93,9 +125,9 @@ class HTML_Noticia extends HTML_Table {
      */
     function setNuevo($nuevo) // ~X2C
     {
      */
     function setNuevo($nuevo) // ~X2C
     {
-        trigger_error('Not implemented!', E_USER_WARNING);
+        $this->nuevo = $nuevo;
     }
     // -X2C
 
 } // -X2C Class :HTML_Noticia
     }
     // -X2C
 
 } // -X2C Class :HTML_Noticia
-?>
\ No newline at end of file
+?>
diff --git a/sistema/local_lib/configuracion.php b/sistema/local_lib/configuracion.php
new file mode 100644 (file)
index 0000000..5a31be1
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +----------------------------------------------------------------------+
+// | PHP Version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license,      |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available at through the world-wide-web at                           |
+// | http://www.php.net/license/2_02.txt.                                 |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Created: thu apr 15 15:22:58 ART 2003
+// | Author:  Martin Marrese <mmarre@mecon.gov.ar>
+// +----------------------------------------------------------------------+
+//
+// $Id: configuracion.php 2 2003-06-24 16:54:23Z gmeray $
+// $Author: gmeray $
+// $URL: http://portal.mecon.ar/svn/bandas/sistema/lib/configuracion.php $
+// $Date: 2003-06-24 13:54:23 -0300 (Tue, 24 Jun 2003) $
+// $Rev: 2 $
+//  
+    return array (
+            'titulo_sistema'    => 'Intranet',
+            'pie_sistema'       => 'Ministerio de Economia',
+            'db_type'           => 'mysql',
+            'db_user'           => 'intranet',
+            'db_pass'           => 'intranet',
+            'db_host'           => 'bal747f',
+            'db_name'           => 'intranet',
+    );
+
+?>
diff --git a/sistema/www/css/noticias.css b/sistema/www/css/noticias.css
new file mode 100644 (file)
index 0000000..6b3c4f1
--- /dev/null
@@ -0,0 +1,57 @@
+BODY {\r
+       FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-WEIGHT: normal; LINE-HEIGHT: 10pt; TEXT-ALIGN: left\r
+}\r
+UL {\r
+       FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal\r
+}\r
+P {\r
+       FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal\r
+}\r
+.PagNegro {\r
+       COLOR: #000000; FONT-FAMILY: Verdana, Tahoma; FONT-SIZE: 8pt; TEXT-DECORATION: none\r
+}\r
+.PagRojo {\r
+       COLOR: #006699; FONT-FAMILY: Verdana, Tahoma; FONT-SIZE: 8pt; TEXT-DECORATION: none\r
+}\r
+.TextBlue {\r
+       COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal\r
+}\r
+.titulo_vinculos {\r
+       BACKGROUND-POSITION-X: left; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-WEIGHT: bold; LINE-HEIGHT: normal; TEXT-ALIGN: left\r
+}\r
+.menu {\r
+       BACKGROUND-COLOR: #ffffff; BACKGROUND-POSITION: left 50%; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle\r
+}\r
+.menu_activo {\r
+       BACKGROUND-COLOR: #ffcc99; BACKGROUND-POSITION-X: left; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle\r
+}\r
+.titulo_uno {\r
+       BACKGROUND-POSITION-X: left; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12pt; FONT-STYLE: normal; FONT-WEIGHT: bold; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle\r
+}\r
+.subtitulo {\r
+       BACKGROUND-POSITION-X: left; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-WEIGHT: bold; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle\r
+}\r
+.titulo_noticia {\r
+       BACKGROUND-POSITION-X: left; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal; TEXT-ALIGN: justify; VERTICAL-ALIGN: top\r
+}\r
+.fecha_noticia {\r
+       BACKGROUND-POSITION: left bottom; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; FONT-STYLE: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: bottom\r
+}\r
+.ver_mas {\r
+       BACKGROUND-POSITION: right bottom; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; FONT-STYLE: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal; TEXT-ALIGN: right; VERTICAL-ALIGN: middle\r
+}\r
+.textoazul {\r
+       COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-STYLE: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal\r
+}\r
+.menu1 {\r
+       BACKGROUND-COLOR: #ffffff; BACKGROUND-POSITION-X: left; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 9pt; FONT-STYLE: normal; LINE-HEIGHT: normal; MARGIN-LEFT: 10px; TEXT-ALIGN: left; VERTICAL-ALIGN: middle\r
+}\r
+.menu_activo1 {\r
+       BACKGROUND-COLOR: #ffcc99; BACKGROUND-POSITION-X: left; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 9pt; FONT-STYLE: normal; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle\r
+}\r
+.menu_activo2 {\r
+       BACKGROUND-COLOR: #ffcc99; BACKGROUND-POSITION-X: left; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; FONT-STYLE: normal; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle\r
+}\r
+.menu2 {\r
+       BACKGROUND-COLOR: #ffffff; BACKGROUND-POSITION-X: left; CLIP: rect(15px 15px 15px 15px); COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; FONT-STYLE: normal; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle\r
+}\r
diff --git a/sistema/www/images/nuevo.gif b/sistema/www/images/nuevo.gif
new file mode 100644 (file)
index 0000000..68f9053
Binary files /dev/null and b/sistema/www/images/nuevo.gif differ
index 0ffde4d364fb469a409f8e100da719cf2f8cc373..9cc65a27c287c00a9f38281d1d696731b77719b7 100644 (file)
      ?>
     </td>
     <td width='600'>
      ?>
     </td>
     <td width='600'>
-      <? include 'noticias.htm'?>
+    <?
+       require_once '../../lib/noticia.php';
+       require_once '../local_lib/HTML_Noticia.php';
+      $not = new HTML_Noticia(1);
+      $not->setNuevo(true);
+      $ht = new HTML_Table(array('width'=>'600', 'border'=>'0', 'cellspacing'=>'0'));
+      $ht->addRow(array($not, $not));
+      $ht->addRow(array($not, $not));
+      $ht->addRow(array($not, $not));
+      $ht->display();
+    ?>
     </td>
   </tr>
 </table>
     </td>
   </tr>
 </table>