
<?php
$conn=pg_pconnect("dbname=emecmistica user=postgres");
//retrouver mes variables
$tableau=explode("/", $PATH_INFO);
$x=count($tableau);
$idi=$tableau[$x-3];
$cat=$tableau[$x-1];

if (($idi !="es") && ($idi!="en")&&($idi !="fr")&& ($idi !="po")) {
include "error.php3";
}
elseif (($cat !="C1")&& ($cat!="C2")&&($cat!="C3") && ($cat!="C4") && ($cat!="C5")) {
include "error.php3";
}

else {

$arraytres=array (
"cli"=> array ("es"=>"Al cliquear en una categor&iacute;a, se puede acceder la
lista de todos los correos electr&oacute;nicos pertinentes.", "en"=>"By clicking 
        on one category, you can access the list will all the messages stored 
        in chosen category.", "fr"=>"", "po"=>""),
 "produ"=> array
("es"=>"Las producciones de la comunidad virtual de MISTICA", "en"=>"MISTICA
Virtual Community Archives", "fr"=>"Les archives de la communaut&eacute;
virtuelle de MISTICA","po"=> "As produ&ccedil;&otilde;es da comunidade virtual
MISTICA"),   
 "indic4"=> array("es"=>"<P> La
secci&oacute;n de los dem&aacute;s correos: es la categor&iacute;a central
as&iacute; que contiene la mayor&iacute;a de los mensajes y, por lo tanto,
informaci&oacute;n. </P> <P> Se encuentran los mensajes siguientes, por orden
cronol&oacute;gico:", "en"=>"<p>Here the majority of messages is stored. This
is the &quot;heart&quot; of our community, as it contains the majority of
information. Therefore, we hope that you will access this pages regularly and
that you will find  them useful in you work. </p>        <P> The current
messages are (chronological list):", " fr"=>" <p> Cette section est celle
o&ugrave; la majorit&eacute; des contributions sont archiv&eacute;es. C'est
donc la cat&eacute;gorie \"centrale\" de la comunaut&eacute; virtuelle, celle
contient qui le plus grand nombre de messages, le plus d'informations. </p>
<p> Se trouvent actuellement disponibles (par ordre chronologique)
:","po"=>"<P> Mensagens armazenados:")); 
 

//tableau coord

$coord = array(
    "cm"  => array("es"=>"Coordinación Mistica","en"=>"Mistica Coordination","fr"=>"Coordination Mistica","po"=>"Coordenação Mistica"),
    "ce"  => array("es"=>"Coordinación EMEC","en"=>"EMEC Coordination","fr"=>"Coordination EMEC","po"=>"EMEC Coordenação"));
?> 
<?php
$tabcat=array (

"C1"=>array("es"=>"El almacén de los correos de administración (suscribir, etc.) Dado que estos correos se usan sólo para la gestión interna, no están disponibles.", "en"=>"This is the section where the administration messages will be stored (subscription, etc.). ", "en"=>"These messages, as used only for purposes of internal MISTICA management, will not be accessible.", "fr"=>"Cette section est celle o&ugrave;l'on va garder les messages &quot;administratifs&quot;        (abonnement &agrave; la liste, etc). </P><P>&Eacute;tant donn&eacute; que ces messages ne sont utilis&eacute;s que dans le cadre de la coordination        interne de la liste, ils ne seront pas publi&eacute;s.", "po"=>" As mensagens de administração serão somadas esta categoria (subscrição etc.)"),

"C2"=>array("es"=>"Aquí 
        se puede acceder las contribuciones rechazadas por no haber seguido ni 
        las reglas ni los procedimientos (por ejemplo, el tema del mensaje está 
        fuera del tema de la lista). Estos correos se guardarán en el web durante 
        un mes para evitar cualquiera discusión de censura.</p>
      <p>Nota: <br>La coordinación Mistica dado el 
        bajo n&uacute;mero de rechazo (señal de unas reglas bien entendidas y 
        aceptadas en la CV) ha decidido aumentar el tiempo de conservación de 
        los mensajes rechazados en el Web.", "en"=>"Here you can access the original messages 
        in English that were rejected 
        because they did not respect the rules (for example, messages out of focus). 
        However, these messages will be kept on the web during one month in to 
        prevent the censorship argument.</p>
      <p>Note:<br>
        Mistica Coordination because of the low number of rejected messages has 
        decided to leave them for longer time on the web.</p>
      <p>These messages are are not translated 
        and are therefore published only in the language in which they were submitted 
        to Mistica List.", "fr"=>"Ici on peut trouver les contributions 
        refusées car elles ne respectent pas les règles (par exemple les messages 
        hors-sujet). Ces messages sont gardés sur le site, pour prévenir toute 
        accusation de censure (archivage limité dans le temps).", "po"=>"As contribuições rejeitadas porque eles 
      não respeitam as regras (por exemplo, mensagens fora de foco), mas durante 
      qual será mantido na teia um mês (para prevenir o argumento de censura)"),

"C3"=>array("es"=>"El almacén de las contribuciones cuyos temas tienen límites temporales 
(por ejemplo, publicidades para una conferencia). </font></p>
<p><a
href=\"/mistica/castellano/emec/produccion/c3/deseos/\">DESEOS</a>   
- dar un clic aquí para ver los mensajes de felicidades que hemos
recibido.Estos mensajes no fueron distribuidos a la lista; sin
embargo, son archivados en esta sección. Son mensajes integrales sin
traducciones.", "en"=>"Here you can find the contributions limited in time
(for example, advertisement for a conference).</p> <p><a
href=\"/mistica/castellano/emec/produccion/c3/deseos/\">GREETINGS</a>:
 click here to check out greetings messages we received. These messages  were
not distributed on the list; instead, they are collected in this  special
section. <br>These are integral messages without the translation.", "fr"=>"Ici on trouve 
les contributions limitées dans le temps (par exemple publicité pour une 
conférence). </p>
<p><a
href=\"/mistica/castellano/emec/produccion/c3/deseos/\">VOEUX</a> 
: cliquez ici pour lire les messages de voeux que nous avons recus. Ces 
messages n'ont pas été distribués sur la liste ; cependant, ils sont archivés 
dans cette section. Ce sont des messages intégraux qui n'ont pas été traduits.",
"po"=>"As contribuições limitadas em tempo (por exemplo, anúncio para um conferência)</p>
<p><a
href=\"/mistica/castellano/emec/produccion/c3/deseos/\">BÕAS 
FESTAS</a>: clicar aqui para ver as mensagens de bõas festas que havemos 
recebido. Estas mensagens não foram distribuídas na lista; mas, eles são 
colecionados nesta seção especial. Estas são mensagens integrantes que 
no foram traduzidas."),

"C4"=>array("es"=>"<P> La
secci&oacute;n de los correos v&aacute;lidos, es la categor&iacute;a central
que contiene la mayor&iacute;a de los mensajes e 
informaci&oacute;n. </P> <P> Se encuentran los mensajes siguientes, por orden
cronol&oacute;gico:", "en"=>"<p>Here the majority of messages is stored. This
is the &quot;heart&quot; of our community, as it contains the majority of
information. Therefore, we hope that you will access this pages regularly and
that you will find  them useful in you work. </p>        <P> The current
messages are (chronological list):", "fr"=>" <p> Cette section est celle
o&ugrave; la majorit&eacute; des contributions sont archiv&eacute;es. C'est
donc la cat&eacute;gorie \"centrale\" de la comunaut&eacute; virtuelle, celle
contient qui le plus grand nombre de messages, le plus d'informations. </p>
<p> Se trouvent actuellement disponibles (par ordre chronologique)
:","po"=>"<P> Mensagens armazenados:"),

"C5"=>array("es"=>"Los correos sobresalientes están en esta sección para que una memoria institucional de la CV pueda realizarse al paso del tiempo.", "en"=>"Here you can access the messages that 
        VC has judged as particularly important. These messages are significant 
        contributions to the CIT developmental role, to the research on the Social 
        Impact of CIT. These messages are also judged as milestones for the concrete 
        proposals and actions.</font><br>Currently, this section is empty, but 
        will hopefully grow as the discussion gains ground. ", "fr"=>"Dans cette 
      catégorie on va garder les contributions particuli&egrave;rement pertinentes 
      pour la construction progressive de la mémoire institutionnelle de la communauté 
      virtuelle.", "po"=>"Contribuições excelentes de forma que 
      uma memória institucional da CV podem ser progressivamente construída."));

$categorie=$tabcat["$cat"]["$idi"];

include "bibo.php3";
include "head2.php3";

echo "<table width=\"640\" border=\"0\">  <tr> <td> <font face=\"helvetica, verdana, arial,  sans serif
\" size=\"2\"><P> $categorie </font><ul>"; 
if ($cat=="C1") {
echo "</td></tr></table>";
}

if (($cat=='C3') || ($cat=='C4')) {

if ($idi=="es") {
$querymess= pg_exec($conn,"select apellido_miembro, nombre_miembro, titulo_es, fecha, id_mensaje, abrev_es, id_miembro, mensajes.id_tema from mensajes, communidad, tema where mensajes.id_categoria= '$cat' and mensajes.web='1' and communidad.id_miembro = mensajes.id_creador and mensajes.id_tema = tema.id_tema order by fecha desc");
}
elseif ($idi=="en") {
$querymess= pg_exec($conn,"select apellido_miembro, nombre_miembro,titulo_en, fecha, id_mensaje, abrev_en, id_miembro, mensajes.id_tema from mensajes, communidad, tema where  mensajes.id_categoria= '$cat' and mensajes.web='1' and communidad.id_miembro = mensajes.id_creador and mensajes.id_tema = tema.id_tema order by fecha desc"); 
}
elseif($idi=="fr") {
$querymess= pg_exec($conn,"select apellido_miembro, nombre_miembro,titulo_fr, fecha, id_mensaje, abrev_fr, id_miembro, mensajes.id_tema from mensajes, communidad, tema where  mensajes.id_categoria= '$cat' and mensajes.web='1' and communidad.id_miembro =mensajes.id_creador and mensajes.id_tema = tema.id_tema order by fecha desc"); 
}
elseif($idi=="po") {
$querymess= pg_exec($conn,"select apellido_miembro, nombre_miembro,titulo_po, fecha, id_mensaje, abrev_po, id_miembro, mensajes.id_tema from mensajes, communidad, tema where  mensajes.id_categoria= '$cat' and mensajes.web='1' and communidad.id_miembro = mensajes.id_creador and mensajes.id_tema = tema.id_tema order by fecha desc"); 
}

for($n=0; $n<pg_numrows($querymess); $n++) { 
$get = pg_fetch_row($querymess,$n); 
if ($get[6]==1) {
$autor=$coord ["cm"]["$idi"];
$autor=htmlentities($autor);
} 
elseif ($get[6]==2) {
$autor=$coord["ce"]["$idi"];
$autor=htmlentities($autor);
} 
else {
$autor="$get[1] $get[0]";
$autor=stripslashes($autor);
$autortab=explode ("-", $autor);
for ($erx=0; $erx<count($autortab); $erx++) {
$autortab[$erx]=ucwords($autortab[$erx]);
}
$autor=implode ("-", $autortab);
$autor=htmlentities($autor);
}	
$get[2]=stripslashes($get[2]);
$get[2]=htmlentities($get[2]);


if ($get[7] !=1) {
$get[5]=stripslashes($get[5]);
$get[5]=htmlentities($get[5]);
$get[2]="$get[5] : $get[2]";
}



//transfo date

$get[3]= date("d/m/Y", $get[3]);


echo " <li><font face=\"helvetica, verdana, arial,  sans serif\" size=\"2\">$autor:&quot;<a href=\"/mistica/bdd/men.php3/idi/$idi/id/$get[4]\"> $get[2]</a>&quot; ($get[3])</font></li>"; 
}
echo "</ul></td><td bgcolor=\"#41a13f\">&nbsp;</td></tr></table>";

}

elseif ($cat=='C2') {
$qmen=pg_exec($conn, "select id_miembro, apellido_miembro, nombre_miembro, titulo_es, titulo_en, titulo_fr, titulo_po, fecha, id_mensaje from mensajes, communidad where mensajes.id_categoria= '$cat' and mensajes.web='1' and communidad.id_miembro = mensajes.id_creador order by fecha desc");

for ($d=0; $d<pg_numrows($qmen); $d++) {


$getmen=pg_fetch_row($qmen, $d); 
//verif que pas plus de 31 jours
$ahora=time();
$manana=$ahora-$getmen[7];
if ($manana < 2678400) {


//l'auteur
if ($getmen[0]==1) {
$autor=$coord ["cm"]["$idi"];
} 
elseif ($getmen[0]==2) {
$autor=$coord["ce"]["$idi"];
} 
else {
$autor="$getmen[2] $getmen[1]";
$autor=stripslashes($autor);
$autor=htmlentities($autor);
$autor=ucwords($autor);
}
 //la date
$getmen[7]=date("d/m/Y", $getmen[7]);
//le titre
$tites=trim($getmen[3]);
$longtites=strlen($tites);
if ($longtites !=0) {
$titori=$tites;
}
else {
$titen=trim($getmen[4]);
$longtiten=strlen($titen);
if ($lontiten !=0) {
$titori=$titen;
}
else {
$titfr=trim($getmen[5]);
$longtitfr=strlen($titfr);
if ($longtitfr !=0) {
$titori=$titfr;
}
else {
$titpo=trim($getmen[6]);
$longtitpo=strlen($titpo);
if ($longtitpo !=0) {
$titori=$titpo;
}
}
}
}
$titori=stripslashes($titori);
$titori=htmlentities($titori);
echo "<li><font face=\"helvetica, verdana, arial,  sans serif\" size=\"2\">$autor:&quot;<a
href=\"/mistica/bdd/men.php3/idi/$idi/id/$getmen[8]\"> $titori
</a>&quot; ($getmen[7])</font></li>";
}
}
echo "</ul></td><td bgcolor=\"#41a13f\">&nbsp;</td></tr></table>";

}
elseif($cat=='C5') {

if ($idi=="es") {
$querymespe= pg_exec($conn,"select apellido_miembro, nombre_miembro, titulo_es, fecha, id_mensaje, abrev_es, id_miembro, mensajes.id_tema from mensajes, communidad, tema where mensajes.special= 't' and mensajes.web='1' and communidad.id_miembro = mensajes.id_creador and mensajes.id_tema = tema.id_tema order by fecha desc");
}
elseif ($idi=="en") {
$querymespe= pg_exec($conn,"select apellido_miembro, nombre_miembro, titulo_en, fecha, id_mensaje, abrev_en, id_miembro, mensajes.id_tema from mensajes, communidad, tema where  mensajes.special= 't' and mensajes.web='1' and communidad.id_miembro = mensajes.id_creador and mensajes.id_tema = tema.id_tema order by fecha desc"); 
}
elseif($idi=="fr") {
$querymespe= pg_exec($conn,"select apellido_miembro, nombre_miembro,titulo_fr, fecha, id_mensaje, abrev_fr, id_miembro, mensajes.id_tema from mensajes, communidad, tema where  mensajes.special= 't' and mensajes.web='1' and communidad.id_miembro = mensajes.id_creador and mensajes.id_tema = tema.id_tema order by fecha desc"); 
}
elseif($idi=="po") {
$querymespe= pg_exec($conn,"select apellido_miembro, nombre_miembro,titulo_po, fecha, id_mensaje, abrev_po, id_miembro, mensajes.id_tema from mensajes, communidad, tema where  mensajes.special= 't' and mensajes.web='1' and communidad.id_miembro = mensajes.id_creador and mensajes.id_tema = tema.id_tema order by fecha desc"); 
}

for($g=0; $g<pg_numrows($querymespe); $g++) { 
$getspe = pg_fetch_row($querymespe,$g); 
if ($getspe[6]==1) {
$autor=$coord ["cm"]["$idi"];
} 
elseif ($getspe[6]==2) {
$autor=$coord["ce"]["$idi"];
} 
else {
$autor="$getspe[1] $getspe[0]";
$autor=stripslashes($autor);
$autortab=explode ("-", $autor);
for ($erx=0; $erx<count($autortab); $erx++) {
$autortab[$erx]=ucwords($autortab[$erx]);
}
$autor=implode ("-", $autortab);
$autor=htmlentities($autor);
}	
$getspe[2]=stripslashes($getspe[2]);
$getspe[2]=htmlentities($getspe[2]);
if ($getspe[7] !=1) {
$getspe[5]=stripslashes($getspe[5]);
$getspe[5]=htmlentities($getspe[5]);
$getspe[2]="$getspe[5] : $getspe[2]";
}

//transfo date

$getspe[3]= date("d/m/Y", $getspe[3]);


echo " <li><font face=\"helvetica, verdana, arial,  sans serif\" size=\"2\">$autor:&quot;<a href=\"/mistica/bdd/men.php3/idi/$idi/id/$getspe[4]\"> $getspe[2]</a>&quot; ($getspe[3])</font></li>"; 
}
echo "</ul></td><td bgcolor=\"#41a13f\">&nbsp;</td></tr></table>";

}




?>

<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">
<p align="center">
 </p>
</font>
 </td>   
 </tr>
</table>
 </td>   
 </tr>
</table>
<!--pie-->
<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='/mistica/bdd/img/backcolor.gif' " onMouseOut="img7.src='/mistica/bdd/img/backnegro.gif' "><img name="img7" src="/mistica/bdd/img/backnegro.gif" width="18" height="18" border="0" alt="<? echo $prev ?>" onLoad="tempImg=new Image(0,0); tempImg.src='/mistica/bdd/img/backcolor.gif'"></a>
                        
 </td>
  <td align="center">
<a HREF="#top" onMouseOver="if (VersionNavigateur(3.0,4.0))img6.src='/mistica/bdd/img/topcolor.gif' " onMouseOut="img6.src='/mistica/bdd/img/topnegro.gif' "><img name="img6" src="/mistica/bdd/img/topnegro.gif" width="18" height="18" border="0" alt="<? echo $cabeza ?>" onLoad="tempImg=new Image(0,0); tempImg.src='/mistica/bdd/img/topcolor.gif'"></a>
</td>
  <td align="right">
                        
 <a HREF="javascript:history.go(+1)" onMouseOver="if (VersionNavigateur(3.0,4.0))img8.src='/mistica/bdd/img/forwardcolor.gif' " onMouseOut="img8.src='/mistica/bdd/img/forwardnegro.gif' "><img name="img8" src="/mistica/bdd/img/forwardnegro.gif" width="18" height="18" border="0" alt="<? echo $prox ?>" onLoad="tempImg=new Image(0,0); tempImg.src='/mistica/bdd/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">
			<? echo "$credit" ?>
 			<? echo "$mapa" ?> |
<? echo "$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">
			<?
$querult=pg_exec($conn, "select max(fecha_dia) from mensajes where id_categoria='$cat' and web='1'");

$getult=pg_fetch_row($querult, 0);
$ult=$getult[0];
$tabdia=explode ("-", $ult);
$tabdia[3]=$tabdia[0];
$tabdia[0]=$tabdia[1];
$tabdia[1]=$tabdia[3];
$exi=array ($tabdia[0], $tabdia[1], $tabdia[2]);
$ult=implode ("/", $exi);
$ult=str_replace("-","/",$ult);

if (!$ult) {
$ult="30/09/1999";
}
echo"http://www.funredes.org/mistica/bdd/mess.php3$PATH_INFO";
?> 	 	<br>  
    <? echo "$modif : $ult"; ?></font> </td> </tr>
</table>

</body>
</html>
<?
}
?>
        

