
<HTML><HEAD><TITLE>Monstrear un miembro</TITLE></HEAD>
<BODY>
<?php
include ("tete.php3");
include "foo.php3";
$conn=pg_pconnect("dbname=emecmistica user=postgres"); 
?>
<H2>QUE FICHA DE MIEMBRO DESEA CONSULTAR?<H2>
<FORM ACTION="consmiem.php3" METHOD="POST">
<H3>NUMERO ID DEL MIEMBRO:</H3>
<INPUT TYPE=text NAME=id_miembro VALUE="<?echo $id_miembro?>"><BR>
<?
echo $id_miembro;
$querymem = pg_exec($conn,"select id_miembro, apellido_miembro, nombre_miembro from communidad where NOT id_miembro ='0' order by apellido_miembro");  

?>
<SELECT NAME="id_miembro" size=10> 
<?php

$v=0;
while ($v<pg_numrows($querymem)) {
$remo= pg_fetch_row ($querymem,$v);
$remo[1]=stripslashes($remo[1]);
$k=foo($remo[1]);
$remo[2]=stripslashes($remo[2]);
$remo[1]=ucwords($remo[1]);
$remo[2]=ucwords($remo[2]);
$arrcr[$k]=array("nom"=>"$remo[1]", "prenom"=>"$remo[2]", "id"=>"$remo[0]");
$v++;
}
ksort($arrcr);
for (reset($arrcr); $key=key($arrcr); next($arrcr)) {
$comid=$arrcr[$key]["id"];
$nom=$arrcr[$key]["nom"];
$prenom=$arrcr[$key]["prenom"];

echo "<option value=\"$comid\">$comid &nbsp; $nom &nbsp; $prenom </option>"; 
} 
?>
</SELECT><br> 
 <br>
<br>
<INPUT TYPE="Submit" name="submit" value="Buscar">
</FORM>
</BODY>
</HTML>
<?php
if ($submit) {
if (!$id_miembro) {
$id_miembro=$id_membro;
}
$conn=pg_pconnect("dbname=emecmistica user=postgres"); 
$queryview = pg_exec($conn,"select id_miembro, apellido_miembro,
nombre_miembro, e_mail_miembro, institucion, URL_pagina_institucion, sexo,
id_campo, id_pais, URL_pagina_personal, edad, URL_pagina_otra, e_mail_otros from
communidad where
id_miembro='$id_miembro'");
$x=pg_numrows($queryview);
for($n=0;$n<pg_numrows($queryview); $n++) {  	
$get = pg_fetch_row($queryview,$n);
$get[1]=stripslashes($get[1]);
$get[1]=ucwords($get[1]);
$get[1]=htmlentities($get[1]);
$get[2]=stripslashes($get[2]);
$get[2]=ucwords($get[2]);
$get[2]=htmlentities($get[2]);
$get[4]=stripslashes($get[4]);
$get[5]=stripslashes($get[5]);
$get[9]=stripslashes($get[9]);
$get[11]=stripslashes($get[11]);
$get[12]=stripslashes($get[12]);
}
echo "<table width=\"100%\" bgcolor=\"oldlace\" border=\"0\" cellspacing=\"3\" 
cellpadding=\"3\"><tr><td width=\"20%\"><b>ID</b></td><td width=\"80%\">$get[0]</td></tr> 
<tr><td width=\"20%\"><b>Apellido del miembro</b></td>
<td width=\"80%\">$get[1]</td></tr>
 <tr><td width=\"20%\"><b>Nombre</b></td><td width=\"80%\">$get[2]&nbsp</td></tr> 
<tr><td width=\"20%\"><b>E-mail del miembro</b></td><td width=\"80%\">$get[3]&nbsp</td></tr>
<tr><td width=\"20%\"><b>Otras direcciones electronicas</b></td><td width=\"80%\">$get[12]&nbsp</td></tr>
<tr><td width=\"20%\"><b>Institucion</b></td><td width=\"80%\">$get[4]&nbsp</td></tr>
 <tr><td width=\"20%\"><b>URL de la pagina de la institucion</b></td><td width=\"80%\">$get[5]
&nbsp</td></tr>
 <tr><td width=\"20%\"><b>URL de la pagina personal en Mistica</b></td><td width=\"80%\">$get[9]
&nbsp</td></tr><tr><td width=\"20%\"><b>Otra pagina web</b></td><td width=\"80%\">$get[11]&nbsp</td></tr> 
<tr><td width=\"20%\"><b>Ano de nacimiento</b></td><td width=\"80%\">$get[10]&nbsp</td></tr>
<tr><td width=\"20%\"><b>Sexo</b></td><td width=\"80%\">$get[6]&nbsp</td></tr> </table>";

$idcampo=$get[7];
if ($idcampo) {
$querycampi = pg_exec($conn,"select campo_es from campo where id_campo='$idcampo'");
for($r=0;$r<pg_numrows($querycampi); $r++) { 
$stor=pg_fetch_row($querycampi,$r);
$stor[0]= stripslashes($stor[0]);
$stor[0]=htmlentities($stor[0]);
$stor[0]=ucwords($stor[0]);
}
echo "<table width=\"100%\" bgcolor=\"oldlace\" border=\"0\" cellspacing=\"3\" 
cellpadding=\"3\"><tr><td width=\"20%\"><b>Campo de actividad</b></td><td width=\"80%\">$stor[0]</td></tr>
</table>";
}
else {
echo "<table width=\"100%\" bgcolor=\"oldlace\" border=\"0\" cellspacing=\"3\" 
cellpadding=\"3\"><tr><td width=\"20%\"><b>Campo de actividad</b></td><td width=\"80%\">&nbsp</td></tr>
</table>";
}




$idpa=$get[8];
if ($get[8]) {
$querypa = pg_exec($conn,"select pais_es from pais where id_pais='$idpa'");
for($m=0;$m<pg_numrows($querypa); $m++) { 
$sto=pg_fetch_row($querypa,$m);
$sto[0]= stripslashes($sto[0]);
$sto[0]=htmlentities($sto[0]);
$sto[0]=ucwords($sto[0]);
}
echo "<table width=\"100%\" bgcolor=\"oldlace\" border=\"0\" cellspacing=\"3\" 
cellpadding=\"3\"><tr><td width=\"20%\"><b>Pais</b></td><td width=\"80%\">$sto[0]</td></tr>
</table>";
}
else {
echo "<table width=\"100%\" bgcolor=\"oldlace\" border=\"0\" cellspacing=\"3\" 
cellpadding=\"3\"><tr><td width=\"20%\"><b>Pais</b></td><td width=\"80%\">&nbsp</td></tr>
</table>";
}
//interro suscrip
$querysus = pg_exec($conn,"select codigo_idioma, fecha_suscripcion,
fecha_unsuscripcion from suscripcion where
id_miembro='$id_miembro'");
for ($z=0;$z<pg_numrows($querysus); $z++) {
$got = pg_fetch_row($querysus,$z);
echo "<table width=\"100%\" bgcolor=\"oldlace\" border=\"0\" cellspacing=\"3\" 
cellpadding=\"3\"><tr><td width=\"20%\"><b> Suscripcion<br>Desuscripcion</b></td>
<td width=\"80%\">Mistica-$got[0]&nbsp $got[1]<br>&nbsp &nbsp &nbsp &nbsp $got[2]</td></tr></table>";
}
echo "<form action=\"premier.html\"><INPUT TYPE=\"Submit\" name=\"submit\" value=
\"Pagina Principal\"></form>";
}
?>
  
