<?php
//retrouver mes variables
include "foo.php3";
$tableau=explode("/", $PATH_INFO);
$x=count($tableau);
$idi=$tableau[$x-3];
$lettras=$tableau[$x-1];

$existe=0;
if ((($idi !="es") && ($idi!="en")&&($idi !="fr")&& ($idi !="po")) || (($lettras>10) || ($lettras<1))) {
include "error.php3";
}
else {

include "bibo.php3";
include "bibcv.php3";

include "head7.php3";

?>
<HTML>

<!--secunda zona de navigacion (Páginas del directorio)-->
<table width="640"  border="0">
<tr>
<td bgcolor="#5050d1">
<table width="630"  border="0">
<tr>
<td bgcolor="#eeeeee" align="center">
<!-- 
<font face="helvetica, verdana, arial,  sans serif" size="2">
</font> -->

<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan=2 align="center"><b>Leyendas</b></td>
</tr>
<tr>
<td>
<img src="/mistica/bdd/img/@.gif" width="51" height="23" border="0" alt="e-mail"> 
<font size="2">Dirección de correo electrónico</font>
</td>
<td>
<img src="/mmistica/bdd/img/pp.gif" width="55" height="24" border="0" alt="p&aacute;gina Personal con Presentacion"> 
<font size="2">Página personal con su presentación</font>
</td>
</tr>
<tr>
<td>
<img src="/mistica/bdd/img/www.gif" width="51" height="23" border="0" alt="URL personal">
<font size="2">URL o página personal externa</font>
</td>
<td valign="middle">
<img src="/mistica/bdd/img/p.gif" width="55" height="24" border="0" alt="P&aacute;gina Personal sin Presentacion">
<font size="2">Página personal sin su presentación</font>
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr></table>
<br>
<br>
<br>
<?php
//interro de la base
$conn=pg_pconnect("dbname=emec2 user=postgres");
$letters=array(
1=>array("a", "b"),
2=>array("c"),
3=>array("d", "e", "f"),
4=>array("g", "h", "i"),
5=>array("j", "k", "l"),
6=>array("m", "n"),
7=>array("o", "p"),
8=>array("q", "r"),
9=>array("s", "t", "u"),
10=>array("v", "w", "x", "y", "z"));

$equalett=$letters[$lettras];

for ($g=0; $g<count($equalett); $g++) {
$equation="$equation apellido_miembro like '$equalett[$g]%' OR";
}
$equation=substr($equation, 0, -2);

//generation du tableau des membres de la CV

echo "<table width=\"100%\" bgcolor=\"#eeeeee\" border=\"0\" cellspacing=\"3\" 
cellpadding=\"3\"> 
<tr> <td width=\"15%\"><b>Apellidos</b></td>
<td width=\"15%\">Nombres</td>
<td width=\"15%\">Institución</td> 
<td width=\"10%\">País</td>
<td width=\"5%\">Sx</td>
<td width=\"20%\">Campo</td>
<td width=\"5%\">Año de nacimiento</td> 
<td width=\"20%\">Enlaces</td></tr>"; 


$infos=pg_exec ($conn, "select apellido_miembro, nombre_miembro, institucion, pais, sexo, campo, edad, e_mail_miembro, URL_pagina_institucion, id_miembro
 from cv where id_miembro>'2' and $equation order by apellido_miembro");
if (pg_numrows($infos)>0) {


$u=0;
while ($u<pg_numrows($infos)) {
$inf= pg_fetch_row ($infos,$u);
$inf[0]=stripslashes($inf[0]);
$inf[1]=stripslashes($inf[1]);
$inf01="$inf[0] $inf[1]";
$k=foo($inf01);
$k=strtolower($k);
$inf[0]=htmlentities($inf[0]);
$autortab=explode ("-", $inf[0]);
for ($erx=0; $erx<count($autortab); $erx++) {
$autortab[$erx]=ucwords($autortab[$erx]);
}
$inf[0]=implode ("-", $autortab);
$inf[1]=htmlentities($inf[1]);
$inf[1]=ucwords($inf[1]);
$inf[2]=stripslashes($inf[2]);
$inf[2]=htmlentities($inf[2]);
$inf[3]=stripslashes($inf[3]);
$inf[3]=htmlentities($inf[3]);
$inf[4]=strtoupper($inf[4]);
$inf[5]=stripslashes($inf[5]);
$inf[5]=htmlentities($inf[5]);
$inf[8]=stripslashes($inf[8]);
$arrinfos[$k]=array("apellido"=>"$inf[0]", "nombre"=>"$inf[1]", "institucion"=>"$inf[2]", "pais"=>"$inf[3]", "sexo"=>"$inf[4]", "campo"=>"$inf[5]", "edad"=>"$inf[6]","email"=>"$inf[7]", "URL"=>"$inf[8]", "id"=>"$inf[9]");
$u++;
}
ksort($arrinfos);
for (reset($arrinfos); $key=key($arrinfos); next($arrinfos)) {
$apellido=$arrinfos[$key]["apellido"];
$nombre=$arrinfos[$key]["nombre"];
$institucion=$arrinfos[$key]["institucion"];
$pais=$arrinfos[$key]["pais"];
$sexo=$arrinfos[$key]["sexo"];
$campo=$arrinfos[$key]["campo"];
$edad=$arrinfos[$key]["edad"];
$email=$arrinfos[$key]["email"];
$longemail=strlen($email);
$url=$arrinfos[$key]["URL"];
$longurl=strlen($url);
$uri=$arrinfos[$key]["id"];
$urlperso="http://funredes.org/mistica/bdd/cv/pagina.php3/$uri";
$querpagina=pg_exec($conn, "select id_chunk_pagina from  pagina_personal where id_miembro='$uri'");
$pp=pg_numrows($querpagina);
echo"<tr><td width=\"15%\"><font size =\"2\"><b>$apellido &nbsp</b></font></td>
 <td width=\"15%\"><font size=\"2\">$nombre &nbsp</font></td>
<td width=\"15%\"><font size=\"2\">$institucion &nbsp</font></td>
 <td width=\"10%\"><font size=\"2\">$pais &nbsp</font></td> 
<td width=\"5%\"><font size=\"2\">$sexo &nbsp</font></td> 
<td  width=\"20%\"><font size=\"2\">$campo &nbsp</font></td>
<td  width=\"5%\"><font size=\"2\">$edad &nbsp</font></td>
<td width=\"20%\">";
if ($longemail !=0) {
echo "<a href=\"mailto:$email\">";
}
if ($longurl !=0) {
echo "<img src=\"img/@.gif\" width=\"51\" height=\"23\"order=\"0\" alt=\"$url\"></a>";
}
if ($pp==0) {
echo "<br> <a href=\"$urlperso\"><img src=\"img/p.gif\" width=\"55\" height=\"24\" border=\"0\" alt=\"P&aacute;ginas personales de $apellido\"></a> </td></tr>";
}
else {
echo "<br> <a href=\"$urlperso\"><img src=\"img/p.gif\" width=\"55\" height=\"24\" border=\"0\" alt=\"P&aacute;ginas personales de $apellido\"></a> </td></tr>";
}
}


echo"</table></table>";
}


?>
<HR>
<table width="640"  border="0" bgcolor="#eeeeee">
<tr>
<td>
<A HREF="javascript:history.go(-1)" onMouseOver="if (VersionNavigateur(3.0,4.0))img7.src='img/backcolor.gif' " onMouseOut="img7.src='img/backnegro.gif' "><img name="img7" src="img/backnegro.gif" width=18 height=18 border=0 alt="Su p&aacute;gina precedente" onLoad="tempImg=new Image(0,0); tempImg.src='img/backcolor.gif'"></A>
</td>
<td align="center">
<A HREF="#top" onMouseOver="if (VersionNavigateur(3.0,4.0))img6.src='img/topcolor.gif' " onMouseOut="img6.src='img/topnegro.gif' "><img name="img6" src="img/topnegro.gif" width=18 height=18 border=0 alt="Encabezado" onLoad="tempImg=new Image(0,0); tempImg.src='img/topcolor.gif'"></A>
 </td>
<td align="right">
<A HREF="javascript:history.go(+1)" onMouseOver="if (VersionNavigateur(3.0,4.0))img8.src='img/forwardcolor.gif' " onMouseOut="img8.src='img/forwardnegro.gif' "><img name="img8" src="img/forwardnegro.gif" width=18 height=18 border=0 alt="Vuestra pagin&aacute; siguiente" onLoad="tempImg=new Image(0,0); tempImg.src='img/forwardcolor.gif'"></A>
</td></tr>
</table>
<table width="640"  border="0">
<tr>
 <td align="center">
<font face="helvetica, verdana, arial, sans serif" size="2">
<A HREF="../../creditos.html">Cr&eacute;ditos</A> | 
<A HREF="../../mapa.html">Mapa del sitio</A> | Correo: <A HREF="MAILTO:webmistica@funredes.org">&lt;webmistica@funredes.org&gt;</A>
 </font>
</td>
</tr>
 <tr><td align="center">
<font face="helvetica, verdana, arial, sans serif" size="2">
<?
echo "$SCRIPT_FILENAME";
?>
<br>
Última modificación: 16/12/1999
</font>
</td>
</tr>
</table>
<!-- OR - 16/12 - 11:00am -->
</BODY>
</HTML>
<?
}
?>










