<?xml version="1.0"?>
<?xml-stylesheet href="NULL" type="application/x-xsp"?>
<?xml-stylesheet href="/ip2wp.xsl.en" type="text/xsl"?>
<?xml-stylesheet href="/wp2html.xsl.en" type="text/xsl"?>

<xsp:page
  language="Perl"
  xmlns:xsp="http://apache.org/xsp/core/v1" 
  xmlns:esql="http://apache.org/xsp/SQL/v2" 
  xmlns:conv="http://xmlns.knowscape.com/xsp/CharsetConv"
  xmlns:web="http://axkit.org/NS/xsp/webutils/v1"
> 
<page>
<xsp:logic>
  my @foo=split('/', <web:request_uri/>);
  my $usuario = $foo[$#foo-1] unless $#foo&lt;1;
  my $rfc = '';
</xsp:logic>

<!--<personal version="0.0">-->

<!--Conexión a la base de datos personal2001-->
<esql:connection>
  <esql:driver>Pg</esql:driver>
  <esql:dburl>dbname=sica host=xalli</esql:dburl>
  <esql:username>postgres</esql:username>
  <esql:execute-query>
     <esql:query>
      select *  from datos_per where login='<xsp:expr>$usuario</xsp:expr>'
    </esql:query>
    <esql:results> 
       <esql:row-results>

	  <xsp:logic>
#
# Reading rfc from esql
# 
	    $rfc .= do <conv:charset-convert><esql:get-string column="rfc"/></conv:charset-convert>;
	  </xsp:logic>

	  <nombre><conv:charset-convert><esql:get-string column="nombre"/></conv:charset-convert></nombre>
	  <telefono><conv:charset-convert><esql:get-string column="tel"/></conv:charset-convert></telefono>
<!-- Medidas ANTI-SPAM:
  no publicar el correo en forma legible para evitar que los robots de web
  puedan obtener (facilmente) las direcciones de correo eletronico del CIE.
  HD
-->
<e-mail><conv:charset-convert><esql:get-string column="login"/>@cie.unam.mx</conv:charset-convert></e-mail>
       </esql:row-results> 
    </esql:results>        
  </esql:execute-query>
</esql:connection>



<!--Conexión a la base de datos informe2002-->
<esql:connection>
  <esql:driver>Pg</esql:driver>
  <esql:dburl>dbname=informe2002 host=mazatl</esql:dburl>
  <esql:username>postgres</esql:username>
  <esql:execute-query>

<!--Actividades docentes 2002-->
  <esql:query>
  select materia, nivel, facultad, semestre  from cursos_sem  where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results> 
      <profesor>
        <materia><conv:charset-convert><esql:get-string column="materia" />
        </conv:charset-convert></materia> 
        <nivel><conv:charset-convert><esql:get-string column="nivel" />
        </conv:charset-convert> </nivel>
        <facultad><conv:charset-convert><esql:get-string column="facultad" />
        </conv:charset-convert></facultad>
        <semestre><conv:charset-convert><esql:get-string column="semestre" />
        </conv:charset-convert></semestre>
      </profesor>          
    </esql:row-results>
  </esql:results>

<!-- Distinciones 2002 -->
  <esql:query>
  select nombre,inst from distinciones where (rfc='<xsp:expr>$rfc</xsp:expr>' and pub like 'S%')
  </esql:query>
  <esql:results>
    <esql:row-results>
      <distincion>
        <nombre><conv:charset-convert><esql:get-string column="nombre" />
        </conv:charset-convert></nombre>
        <descripcion><conv:charset-convert><esql:get-string column="inst"/>
        </conv:charset-convert></descripcion> 
      </distincion>
    </esql:row-results>		  
  </esql:results>

<!--Publicaciones 2002-->
  <esql:query>
  select * from articulos where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results>   
      <publicacion> 
        <tipo><conv:charset-convert><esql:get-string column="tipo_art" /></conv:charset-convert></tipo>       
        <titulo><conv:charset-convert><esql:get-string column="titulo" /></conv:charset-convert></titulo>       
        <autor><conv:charset-convert><esql:get-string column="autores"/></conv:charset-convert></autor> 
        <revista><conv:charset-convert><esql:get-string column="nom_rev"/></conv:charset-convert></revista>
        <paginas><esql:get-string column="pags"/></paginas>
        <vol><esql:get-string column="vol"/></vol>
        <anno><esql:get-string column="fecha"/></anno>   
      </publicacion>
    </esql:row-results>
  </esql:results>

<!--Libro 2002-->
  <esql:query>
  select autores, titulo, edit, isbn from libros where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results>
      <libro>
        <titulo><conv:charset-convert><esql:get-string column="titulo"/>
        </conv:charset-convert></titulo>
        <autor><conv:charset-convert><esql:get-string column="autores"/>
        </conv:charset-convert></autor>
	<isbn><conv:charset-convert><esql:get-string column="isbn"/>
        </conv:charset-convert></isbn>
	<editorial><conv:charset-convert><esql:get-string column="edit"/>
        </conv:charset-convert></editorial>
      </libro>
    </esql:row-results>
  </esql:results>

<!--Capitulo 2002-->
  <esql:query>
    select nombre,editores, titulo, autores2, edit, pags, periodo, isbn from capitulos_lib where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results>
      <capitulo>
        <titulo><conv:charset-convert><esql:get-string column="nombre"/>
        </conv:charset-convert></titulo>
	<autor><conv:charset-convert><esql:get-string column="autores2"/>
        </conv:charset-convert></autor>
	<paginas><conv:charset-convert><esql:get-string column="pags"/>
        </conv:charset-convert></paginas> 
      <libro>
        <titulo><conv:charset-convert><esql:get-string column="titulo"/>
        </conv:charset-convert></titulo>
	<autor><conv:charset-convert><esql:get-string column="editores"/>
        </conv:charset-convert></autor>
	<isbn><conv:charset-convert><esql:get-string column="isbn"/>
        </conv:charset-convert></isbn>
	<editorial><conv:charset-convert><esql:get-string column="edit"/>
        </conv:charset-convert></editorial>
      </libro>
        <anno><esql:get-string column="periodo"/></anno>   
      </capitulo>
    </esql:row-results>
  </esql:results>

<!-- Propiedad Industrial/Intelectual 2002-->
    <esql:query>
      select titulo,tipo_pat,registro from patentes where rfc='<xsp:expr>$rfc</xsp:expr>'
    </esql:query>
    <esql:results>
       <esql:row-results>
          <patentes>
            <titulo><conv:charset-convert><esql:get-string column="titulo"/></conv:charset-convert></titulo>
            <tipo_pat><conv:charset-convert><esql:get-string column="tipo_pat"/></conv:charset-convert></tipo_pat> 
            <registro><conv:charset-convert><esql:get-string column="registro"/></conv:charset-convert></registro>
          </patentes>
       </esql:row-results>
    </esql:results>

<!--Tesis dirigidas 2002-->
 <esql:query>
<!--
   select * from frh where rfc='<xsp:expr>$rfc</xsp:expr>' and (tipo_part=1 or tipo_part=2) 
-->
select frh.nombre_est,frh.inst,nivel_frh.nivel,frh.titulo,frh.fecha from frh,nivel_frh where (rfc='<xsp:expr>$rfc</xsp:expr>') and (tipo_part=1 or tipo_part=2) and (frh.nivel=nivel_frh.cla_niv)

 </esql:query>
 <esql:results>
   <esql:row-results>
     <tesis>              
       <alumno><conv:charset-convert><esql:get-string column="nombre_est"/></conv:charset-convert></alumno>
       <institucion><conv:charset-convert><esql:get-string column="inst"/></conv:charset-convert></institucion>
       <nivel><conv:charset-convert><esql:get-string column="nivel"/></conv:charset-convert></nivel>
       <titulo><conv:charset-convert><esql:get-string column="titulo"/></conv:charset-convert></titulo>
       <fecha><conv:charset-convert><esql:get-string column="fecha"/></conv:charset-convert></fecha>
     </tesis>
   </esql:row-results> 
 </esql:results>     


 <esql:no-results>
   <p>No hay datos</p>
 </esql:no-results>
 </esql:execute-query>
</esql:connection>



<!--Conexión a la base de datos informe2003-->
<esql:connection>
  <esql:driver>Pg</esql:driver>
  <esql:dburl>dbname=informe2003 host=mazatl</esql:dburl>
  <esql:username>postgres</esql:username>
  <esql:execute-query>


<!--Proyectos 2003-->
    <esql:query>
      select nombre_proy, tipo_part, tinv_proy,financ_proy,no_reg_part from proyectos1 where rfc='<xsp:expr>$rfc</xsp:expr>'
    </esql:query>
    <esql:results>
       <esql:row-results>
          <proyecto>
            <nombre><conv:charset-convert><esql:get-string column="nombre_proy"/></conv:charset-convert></nombre>
            <descripcion><conv:charset-convert><esql:get-string column="tipo_part"/></conv:charset-convert></descripcion>
            <patrocinador><conv:charset-convert><esql:get-string column="tinv_proy"/></conv:charset-convert></patrocinador>
            <fecha>
               <fecha_inicial><esql:get-string column="financ_proy"/></fecha_inicial>
	       <fecha_final><esql:get-string column="no_reg_part"/></fecha_final> 
            </fecha>
          </proyecto>
       </esql:row-results> 
    </esql:results>     
<!--Actividades docentes 2002-->
  <esql:query>
  select materia, nivel, facultad, semestre  from cursos_sem  where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results> 
      <profesor>
        <materia><conv:charset-convert><esql:get-string column="materia" />
        </conv:charset-convert></materia> 
        <nivel><conv:charset-convert><esql:get-string column="nivel" />
        </conv:charset-convert> </nivel>
        <facultad><conv:charset-convert><esql:get-string column="facultad" />
        </conv:charset-convert></facultad>
        <semestre><conv:charset-convert><esql:get-string column="semestre" />
        </conv:charset-convert></semestre>
      </profesor>          
    </esql:row-results>
  </esql:results>

<!-- Distinciones 2002 -->
  <esql:query>
  select nombre,inst from distinciones where (rfc='<xsp:expr>$rfc</xsp:expr>' and pub='Sí')
  </esql:query>
  <esql:results>
    <esql:row-results>
      <distincion>
        <nombre><conv:charset-convert><esql:get-string column="nombre" />
        </conv:charset-convert></nombre>
        <descripcion><conv:charset-convert><esql:get-string column="inst"/>
        </conv:charset-convert></descripcion> 
      </distincion>
    </esql:row-results>		  
  </esql:results>

<!--Publicaciones 2002-->
  <esql:query>
  select * from articulos where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results>   
      <publicacion> 
        <tipo><conv:charset-convert><esql:get-string column="tipo_art" /></conv:charset-convert></tipo>       
        <titulo><conv:charset-convert><esql:get-string column="titulo" /></conv:charset-convert></titulo>       
        <autor><conv:charset-convert><esql:get-string column="autores"/></conv:charset-convert></autor> 
        <revista><conv:charset-convert><esql:get-string column="nom_rev"/></conv:charset-convert></revista>
        <paginas><esql:get-string column="pags"/></paginas>
        <vol><esql:get-string column="vol"/></vol>
        <anno><esql:get-string column="fecha"/></anno>   
      </publicacion>
    </esql:row-results>
  </esql:results>

<!--Libro 2002-->
  <esql:query>
  select autores, titulo, edit, isbn from libros where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results>
      <libro>
        <titulo><conv:charset-convert><esql:get-string column="titulo"/>
        </conv:charset-convert></titulo>
        <autor><conv:charset-convert><esql:get-string column="autores"/>
        </conv:charset-convert></autor>
	<isbn><conv:charset-convert><esql:get-string column="isbn"/>
        </conv:charset-convert></isbn>
	<editorial><conv:charset-convert><esql:get-string column="edit"/>
        </conv:charset-convert></editorial>
      </libro>
    </esql:row-results>
  </esql:results>

<!--Capitulo 2002-->
  <esql:query>
    select nombre,editores, titulo, autores2, edit, pags, periodo, isbn from capitulos_lib where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results>
      <capitulo>
        <titulo><conv:charset-convert><esql:get-string column="nombre"/>
        </conv:charset-convert></titulo>
	<autor><conv:charset-convert><esql:get-string column="autores2"/>
        </conv:charset-convert></autor>
	<paginas><conv:charset-convert><esql:get-string column="pags"/>
        </conv:charset-convert></paginas> 
      <libro>
        <titulo><conv:charset-convert><esql:get-string column="titulo"/>
        </conv:charset-convert></titulo>
	<autor><conv:charset-convert><esql:get-string column="editores"/>
        </conv:charset-convert></autor>
	<isbn><conv:charset-convert><esql:get-string column="isbn"/>
        </conv:charset-convert></isbn>
	<editorial><conv:charset-convert><esql:get-string column="edit"/>
        </conv:charset-convert></editorial>
      </libro>
        <anno><esql:get-string column="periodo"/></anno>   
      </capitulo>
    </esql:row-results>
  </esql:results>

<!-- Propiedad Industrial/Intelectual 2002-->
    <esql:query>
      select titulo,tipo_pat,registro from patentes where rfc='<xsp:expr>$rfc</xsp:expr>'
    </esql:query>
    <esql:results>
       <esql:row-results>
          <patentes>
            <titulo><conv:charset-convert><esql:get-string column="titulo"/></conv:charset-convert></titulo>
            <tipo_pat><conv:charset-convert><esql:get-string column="tipo_pat"/></conv:charset-convert></tipo_pat> 
            <registro><conv:charset-convert><esql:get-string column="registro"/></conv:charset-convert></registro>
          </patentes>
       </esql:row-results>
    </esql:results>

<!--Tesis dirigidas 2002-->
 <esql:query>
<!--
   select * from frh where rfc='<xsp:expr>$rfc</xsp:expr>' and (tipo_part=1 or tipo_part=2) 
-->
select frh.nombre_est,frh.inst,nivel_frh.nivel,frh.titulo,frh.fecha from frh,nivel_frh where (rfc='<xsp:expr>$rfc</xsp:expr>') and (tipo_part=1 or tipo_part=2) and (frh.nivel=nivel_frh.cla_niv)

 </esql:query>
 <esql:results>
   <esql:row-results>
     <tesis>              
       <alumno><conv:charset-convert><esql:get-string column="nombre_est"/></conv:charset-convert></alumno>
       <institucion><conv:charset-convert><esql:get-string column="inst"/></conv:charset-convert></institucion>
       <nivel><conv:charset-convert><esql:get-string column="nivel"/></conv:charset-convert></nivel>
       <titulo><conv:charset-convert><esql:get-string column="titulo"/></conv:charset-convert></titulo>
       <fecha><conv:charset-convert><esql:get-string column="fecha"/></conv:charset-convert></fecha>
     </tesis>
   </esql:row-results> 
 </esql:results>     


 <esql:no-results>
   <p>No hay datos</p>
 </esql:no-results>
 </esql:execute-query>
</esql:connection>


<!--Conexión a la base de datos informe2004-->
<esql:connection>
  <esql:driver>Pg</esql:driver>
  <esql:dburl>dbname=sica host=xalli</esql:dburl>
  <esql:username>postgres</esql:username>
  <esql:execute-query>

<!--Proyectos 2004
    <esql:query>
      select nombre_proy, tipo_part, tinv_proy,financ_proy,no_reg_part from proyectos_np where rfc='<xsp:expr>$rfc</xsp:expr>'     </esql:query>     <esql:results>        <esql:row-results>
          <proyecto>
            <nombre><conv:charset-convert><esql:get-string column="nombre_proy"/></conv:charset-convert></nombre>
            <descripcion><conv:charset-convert><esql:get-string column="tipo_part"/></conv:charset-convert></descripcion>
            <patrocinador><conv:charset-convert><esql:get-string column="tinv_proy"/></conv:charset-convert></patrocinador>
            <fecha>
               <fecha_inicial><esql:get-string column="financ_proy"/></fecha_inicial>
               <fecha_final><esql:get-string column="no_reg_part"/></fecha_final>
            </fecha>
          </proyecto>
       </esql:row-results>
    </esql:results>

-->

<!--Actividades docentes 2004-->
  <esql:query>
  select materia, nivel, facultad, semestre  from cursos where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results> 
      <profesor>
        <materia><conv:charset-convert><esql:get-string column="materia" />
        </conv:charset-convert></materia> 
        <nivel><conv:charset-convert><esql:get-string column="nivel" />
        </conv:charset-convert> </nivel>
        <facultad><conv:charset-convert><esql:get-string column="facultad" />
        </conv:charset-convert></facultad>
        <semestre><conv:charset-convert><esql:get-string column="semestre" />
        </conv:charset-convert></semestre>
      </profesor>          
    </esql:row-results>
  </esql:results>

<!-- Distinciones 2004 -->
  <esql:query>
  select nombre,inst from distinciones where (rfc='<xsp:expr>$rfc</xsp:expr>' and pub like 'S%')
  </esql:query>
  <esql:results>
    <esql:row-results>
      <distincion>
        <nombre><conv:charset-convert><esql:get-string column="nombre" />
        </conv:charset-convert></nombre>
        <descripcion><conv:charset-convert><esql:get-string column="inst"/>
        </conv:charset-convert></descripcion> 
      </distincion>
    </esql:row-results>		  
  </esql:results>

<!--Publicaciones 2004-->
  <esql:query>
 
<!--
 select * from articulos where rfc='<xsp:expr>$rfc</xsp:expr>'
-->
select articulos.tipo_art,articulos.autor,articulos.autores,articulos.titulo,revistas.nom_rev,articulos.vol,articulos.pag_ini,articulos.pag_fin,articulos.fecha,articulos.anno where articulos.rfc='<xsp:expr>$rfc</xsp:expr>' and articulos.num_rev=revistas.id_rev;

  </esql:query>
  <esql:results>
    <esql:row-results>   
      <publicacion> 
        <tipo><conv:charset-convert><esql:get-string column="tipo_art" /></conv:charset-convert></tipo>       
        <titulo><conv:charset-convert><esql:get-string column="titulo" /></conv:charset-convert></titulo>       
        <autor><conv:charset-convert><esql:get-string column="autor"/> <esql:get-string column="autores"/></conv:charset-convert></autor> 
        <revista><conv:charset-convert><esql:get-string column="nom_rev"/></conv:charset-convert></revista>
        <paginas><esql:get-string column="pag_ini"/> <esql:get-string column="pag_fin"/></paginas>
        <vol><esql:get-string column="vol"/></vol>
        <anno><esql:get-string column="anno"/></anno>   
      </publicacion>
    </esql:row-results>
  </esql:results>

<!--Libro 2004-->
  <esql:query>
  select autores, titulo, edit, isbn from libros where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results>
      <libro>
        <titulo><conv:charset-convert><esql:get-string column="titulo"/>
        </conv:charset-convert></titulo>
        <autor><conv:charset-convert><esql:get-string column="autores"/>
        </conv:charset-convert></autor>
	<isbn><conv:charset-convert><esql:get-string column="isbn"/>
        </conv:charset-convert></isbn>
	<editorial><conv:charset-convert><esql:get-string column="edit"/>
        </conv:charset-convert></editorial>
      </libro>
    </esql:row-results>
  </esql:results>

<!--Capitulo 2004-->
  <esql:query>
    select nombre,editores, titulo, autores2, edit, pags, periodo, isbn from capitulos_lib where rfc='<xsp:expr>$rfc</xsp:expr>'
  </esql:query>
  <esql:results>
    <esql:row-results>
      <capitulo>
        <titulo><conv:charset-convert><esql:get-string column="nombre"/>
        </conv:charset-convert></titulo>
	<autor><conv:charset-convert><esql:get-string column="autores2"/>
        </conv:charset-convert></autor>
	<paginas><conv:charset-convert><esql:get-string column="pags"/>
        </conv:charset-convert></paginas> 
      <libro>
        <titulo><conv:charset-convert><esql:get-string column="titulo"/>
        </conv:charset-convert></titulo>
	<autor><conv:charset-convert><esql:get-string column="editores"/>
        </conv:charset-convert></autor>
	<isbn><conv:charset-convert><esql:get-string column="isbn"/>
        </conv:charset-convert></isbn>
	<editorial><conv:charset-convert><esql:get-string column="edit"/>
        </conv:charset-convert></editorial>
      </libro>
        <anno><esql:get-string column="periodo"/></anno>   
      </capitulo>
    </esql:row-results>
  </esql:results>

<!-- Propiedad Industrial/Intelectual 2004-->
    <esql:query>
      select titulo,tipo_pat,registro from patentes where rfc='<xsp:expr>$rfc</xsp:expr>'
    </esql:query>
    <esql:results>
       <esql:row-results>
          <patentes>
            <titulo><conv:charset-convert><esql:get-string column="titulo"/></conv:charset-convert></titulo>
            <tipo_pat><conv:charset-convert><esql:get-string column="tipo_pat"/></conv:charset-convert></tipo_pat> 
            <registro><conv:charset-convert><esql:get-string column="registro"/></conv:charset-convert></registro>
          </patentes>
       </esql:row-results>
    </esql:results>

<!--Tesis dirigidas 2004-->
 <esql:query>
select alumnos.ap_alu,alumnos.nom_alu,inst_frh.nombre_inst,nivel_frh.nivel,frh_gral.titulo,frh_gral.fecha_final
where (frh_gral.rfc='<xsp:expr>$rfc</xsp:expr>') 
  and (frh_gral.tipo_part&lt;3) 
  and (frh_gral.nivel&gt;1) 
  and (frh_gral.nivel=nivel_frh.cla_niv) 
  and (frh_gral.id_alu=alumnos.id_alu) 
  and (frh_gral.inst=inst_frh.id)
<!--
   select * from frh where rfc='<xsp:expr>$rfc</xsp:expr>' and (tipo_part=1 or tipo_part=2) 
select alumnos.ap_alu,alumnos.nom_alu,inst_frh.nombre_inst,nivel_frh.nivel,frh_gral.titulo where (frh_gral.rfc ='<xsp:expr>$rfc</xsp:expr>') and (frh_gral.tipo_part=1 or frh_gral.tipo_part=2) and (frh_gral.nivel=nivel_frh.cla_niv) and frh_gral.id_alu=alumnos.id_alu and inst_frh.id=frh_gral.inst;
-->
 </esql:query>
 <esql:results>
   <esql:row-results>
     <tesis>
       <alumno>
	<conv:charset-convert>
	 <esql:get-string column="ap_alu"/>
	 <esql:get-string column="nom_alu"/>
	</conv:charset-convert>
       </alumno>
       <institucion><conv:charset-convert><esql:get-string column="nombre_inst"/></conv:charset-convert></institucion>
       <nivel><conv:charset-convert><esql:get-string column="nivel"/></conv:charset-convert></nivel>
       <titulo><conv:charset-convert><esql:get-string column="titulo"/></conv:charset-convert></titulo>
       <fecha><conv:charset-convert><esql:get-string column="fecha_final"/></conv:charset-convert></fecha>
     </tesis>
   </esql:row-results> 
 </esql:results>     


 <esql:no-results>
   <p>No hay datos 2004</p>
 </esql:no-results>
 </esql:execute-query>
</esql:connection>


</page>
</xsp:page>
