]> git.llucax.com Git - mecon/intranet.git/commitdiff
(no commit message)
authorGonzalo Merayo <merayo@gmail.com>
Thu, 3 Jul 2003 19:20:03 +0000 (19:20 +0000)
committerGonzalo Merayo <merayo@gmail.com>
Thu, 3 Jul 2003 19:20:03 +0000 (19:20 +0000)
doc/noticias.xmi
lib/configuracion.php [moved from sistema/local_lib/configuracion.php with 100% similarity]
lib/intranetdb.php [moved from sistema/local_lib/intranetdb.php with 100% similarity]
lib/mecondavdb.php [new file with mode: 0644]
lib/noticia.php
sistema/local_lib/HTML_Noticia.php

index 3828b705f0e50badc0e0d8367d96662c5df528c3..c62be6e3f7972ae38bb1d7e77b2bc9170032c1a3 100644 (file)
  </XMI.header>
  <XMI.content>
   <docsettings viewid="160" documentation="
-" uniqueid="179" />
+" uniqueid="183" />
   <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" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="int" abstract="0" documentation="codigo de la noticia" name="noticia" static="0" scope="200" />
     </UML:Operation>
+    <UML:Operation stereotype="" package="" xmi.id="180" type="string" abstract="0" documentation="" name="getTitulo" static="0" scope="200" />
+    <UML:Operation stereotype="" package="" xmi.id="183" type="string" abstract="0" documentation="" name="getTitulo2" static="0" scope="200" />
+    <UML:Operation stereotype="" package="" xmi.id="181" type="string" abstract="0" documentation="" name="getTexto" static="0" scope="200" />
+    <UML:Operation stereotype="" package="" xmi.id="182" type="string" abstract="0" documentation="" name="getAbstracto" static="0" scope="200" />
     <UML:Attribute stereotype="" package="" xmi.id="168" value="" type="int" abstract="0" documentation="" name="Noticia" static="0" scope="200" />
    </UML:Class>
    <UML:Class stereotype="" package="sistema/local_lib" xmi.id="162" abstract="0" documentation="" name="HTML_Noticia" static="0" scope="200" >
@@ -23,9 +27,6 @@
     <UML:Operation stereotype="" package="" xmi.id="167" type="void" abstract="0" documentation="" name="HTML_Noticia" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="noticia" abstract="0" documentation="" name="noticia" static="0" scope="200" />
     </UML:Operation>
-    <UML:Operation stereotype="" package="" xmi.id="174" type="void" abstract="0" documentation="" name="setConFoto" static="0" scope="200" >
-     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="bool" abstract="0" documentation="" name="foto" static="0" scope="200" />
-    </UML:Operation>
     <UML:Operation stereotype="" package="" xmi.id="175" type="void" abstract="0" documentation="" name="setCompleta" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="bool" abstract="0" documentation="" name="completa" static="0" scope="200" />
     </UML:Operation>
@@ -49,8 +50,8 @@
   <diagrams>
    <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="128" linecolour="#ff0000" y="220" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="48" 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="112" 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="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="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>
@@ -64,8 +65,8 @@
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="162" widgetaid="161" documentation="" type="510" >
       <linepath>
-       <startpoint startx="288" starty="244" />
-       <endpoint endx="406" endy="244" />
+       <startpoint startx="261" starty="289" />
+       <endpoint endx="406" endy="236" />
       </linepath>
      </UML:AssocWidget>
     </associations>
@@ -78,7 +79,6 @@
       <listitem open="0" type="815" id="167" label="HTML_Noticia" />
       <listitem open="0" type="814" id="172" label="noticia" />
       <listitem open="0" type="815" id="175" label="setCompleta" />
-      <listitem open="0" type="815" id="174" label="setConFoto" />
       <listitem open="0" type="815" id="176" label="setNuevo" />
       <listitem open="0" type="815" id="166" label="toHTML" />
      </listitem>
      <listitem open="0" type="807" id="160" label="class diagram" />
      <listitem open="1" type="813" id="161" label="noticia" >
       <listitem open="0" type="814" id="168" label="Noticia" />
+      <listitem open="0" type="815" id="182" label="getAbstracto" />
+      <listitem open="0" type="815" id="181" label="getTexto" />
+      <listitem open="0" type="815" id="180" label="getTitulo" />
+      <listitem open="0" type="815" id="183" label="getTitulo2" />
       <listitem open="0" type="815" id="169" label="noticia" />
      </listitem>
      <listitem open="1" type="813" id="170" label="seccion" >
diff --git a/lib/mecondavdb.php b/lib/mecondavdb.php
new file mode 100644 (file)
index 0000000..7cb4e98
--- /dev/null
@@ -0,0 +1,58 @@
+<?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: Mon Jun 9 17:53:31 2003
+// | Author:  Gonzalo Merayo <gmeray@mecon.gov.ar>
+// +----------------------------------------------------------------------+
+//
+// $Id: bandadb.php 14 2003-07-03 14:24:24Z gmeray $
+// $Author: gmeray $
+// $URL: http://portal.mecon.ar/svn/bandas/sistema/local_lib/bandadb.php $
+// $Date: 2003-07-03 11:24:24 -0300 (Thu, 03 Jul 2003) $
+// $Rev: 14 $
+//
+
+#require_once 'PEAR.php';
+require_once 'DB.php';
+
+PEAR::SetErrorHandling(PEAR_ERROR_TRIGGER);
+
+
+// +X2C Class 121 :BandaDB
+/**
+ * @access public
+ */
+class MEconDAVDB extends DB {
+  // ~X2C
+
+  // +X2C Operation 122
+  /**
+   * @return void
+   * @access public
+   */
+  function connect() // ~X2C
+  {
+    $conf = include 'configuracion.php';
+    $dsn = $conf['db_type'].'://'.$conf['db_user'].':'.$conf['db_pass'].'@'.$conf['db_host'].'/'.$conf['db_name'];
+    $db = DB::connect($dsn,true);
+    if (DB::isError($db)) {
+      die ($db->getMessage());
+    }
+    return $db;
+  }
+  // -X2C
+
+} // -X2C Class :BandaDB
+?>
index 0580e8de688b6ec944572c914f760f8dacd86ab9..88f9f089d7619555c467e7348c33fb28a0766225 100644 (file)
@@ -27,7 +27,7 @@
 // $Id: xmi2code.tpl.php 1 2003-06-23 18:29:20Z gmeray $
 //
 
-
+require_once 'mecondavdb.php';
 
 
 // +X2C Class 161 :noticia
@@ -52,9 +52,63 @@ class noticia {
      */
     function noticia($noticia) // ~X2C
     {
-        trigger_error('Not implemented!', E_USER_WARNING);
+        $this->noticia;
+        $db = MEconDAVDB::Connect();
+       $query = "SELECT headline, title, abstract, article
+                 FROM Articles
+                 WHERE Article_id = $noticia";
+       $result = $db->query($query);
+       $row = $result->fetchRow();
+       $this->titulo2 = $row[0];
+       $this->titulo = $row[1];
+       $this->abstracto = $row[2];
+       $this->texto = $row[3];
+    }
+    // -X2C
+
+    // +X2C Operation 180
+    /**
+     * @return string
+     * @access public
+     */
+    function getTitulo() // ~X2C
+    {
+        return $this->titulo;
+    }
+    // -X2C
+
+    // +X2C Operation 181
+    /**
+     * @return string
+     * @access public
+     */
+    function getTexto() // ~X2C
+    {
+        return $this->texto;
+    }
+    // -X2C
+
+    // +X2C Operation 182
+    /**
+     * @return string
+     * @access public
+     */
+    function getAbstracto() // ~X2C
+    {
+        return $this->abstracto;
+    }
+    // -X2C
+
+    // +X2C Operation 183
+    /**
+     * @return string
+     * @access public
+     */
+    function getTitulo2() // ~X2C
+    {
+        return $this->titulo2;
     }
     // -X2C
 
 } // -X2C Class :noticia
-?>
\ No newline at end of file
+?>
index 38a740753b863078a408ae2e5259e80b82bc856a..ac74f83f6b723f7c420965d3528b26413b78d725 100644 (file)
@@ -70,18 +70,6 @@ class HTML_Noticia extends HTML_Table {
     }
     // -X2C
 
-    // +X2C Operation 174
-    /**
-     * @param  bool $foto 
-     *
-     * @return void
-     * @access public
-     */
-    function setConFoto($foto) // ~X2C
-    {
-        trigger_error('Not implemented!', E_USER_WARNING);
-    }
-    // -X2C
 
     // +X2C Operation 175
     /**