<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="." type="application/x-xsp"?>
<?xml-stylesheet href="/personalpage+css.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>
<instpage/>
<homepage>/~<xsp:expr>$usuario</xsp:expr></homepage>

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

<!--Conexión a la base de datos personal2001-->
<esql:connection>
  <esql:driver>Pg</esql:driver>
  <esql:dburl>dbname=personal2001</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>
          <author e-mail="eogm@cie.unam.mx">eogm</author>
	  <nombre><conv:charset-convert><esql:get-string column="nombre"/></conv:charset-convert></nombre>
	  <e-mail><conv:charset-convert><esql:get-string column="login"/>@cie.unam.mx</conv:charset-convert></e-mail>
	  <foto><conv:charset-convert><esql:get-string column=""/></conv:charset-convert></foto>                    
          <telefono tipo="ext"><conv:charset-convert><esql:get-string column="tel"/></conv:charset-convert></telefono>
          <grado><conv:charset-convert><esql:get-string column="niv_est"/></conv:charset-convert></grado>
          <especialidad><conv:charset-convert><esql:get-string column="especialidad"/></conv:charset-convert></especialidad>
          <sni><conv:charset-convert><esql:get-string column="otros_est"/></conv:charset-convert></sni>
	  <pride><conv:charset-convert><esql:get-string column="estimulos"/></conv:charset-convert></pride>
	  <nombramiento><conv:charset-convert><esql:get-string column="cat"/></conv:charset-convert></nombramiento>
	  <rfc>
          <xsp:expr>
#
# Reading rfc from esql
#
          $rfc .= do <conv:charset-convert><esql:get-string column="rfc"/></conv:charset-convert>;
          </xsp:expr>
          </rfc>
       </esql:row-results> 
    </esql:results>        
  </esql:execute-query>
</esql:connection>

<esql:connection>
  <esql:driver>Pg</esql:driver>
  <esql:dburl>dbname=informe2002</esql:dburl>
  <esql:username>postgres</esql:username>
  <esql:execute-query> 

<esql:query>select nombre_linea from lineas where rfc='<xsp:expr>$rfc</xsp:expr>'</esql:query>

<esql:results>
    <esql:row-results>
      <linea>
        <nombre><conv:charset-convert><esql:get-string column="nombre_linea" />
        </conv:charset-convert></nombre>
      </linea>
    </esql:row-results>
</esql:results>
  </esql:execute-query>
</esql:connection>

<esql:connection>
  <esql:driver>Pg</esql:driver>
  <esql:dburl>dbname=informe2003</esql:dburl>
  <esql:username>postgres</esql:username>
  <esql:execute-query>

<esql:query>select nombre_linea from lineas where rfc='<xsp:expr>$rfc</xsp:expr>'</esql:query>

<esql:results>
    <esql:row-results>
      <linea>
        <nombre><conv:charset-convert><esql:get-string column="nombre_linea" />
        </conv:charset-convert></nombre>
      </linea>
    </esql:row-results>
</esql:results>
  </esql:execute-query>
</esql:connection>


</page>

</xsp:page>
