include("login_check.php"); include("library/fonctions_php.php"); include("parametre.php"); //connexion a la base de donnees if (isset($_GET['label1'])) $label1 =intval($_GET['label1']); if (isset($_GET['label2'])) $label2 =intval($_GET['label2']); if (isset($_GET['periode'])) $my_period=$_GET['periode']; else $my_period= '-1'; //echo "label1:".$label1.", label2:".$label2.", periode:".$my_period."(".get_string_periode($my_period).")<br>"; connexion_base($server,$user,$password,$database); create_concept_string(); $titleheader='"'.$dico_termes[$label1]." - ".$dico_termes[$label2].'" ('.get_short_string_periode($my_period).") [desambiguisation]"; include("include/header.php"); include("banner.php"); echo '<p>'; echo '<table width=100% class=tableitems>'; echo '<tr valign=top><td width=2.5%></td><td><h2 class=subtitle>champs thématiques spécifiés par "<i style="font-weight:normal;"><b>'.$dico_termes[$label1].'</b> - '.$dico_termes[$label2].'"</i></h2></td><td width=2.5%></td></tr></table>'; //RECUPERATION DES INFOS LABEL_1, _2, ID_CLUSTER, PERIODE, CONCEPT(s associes) $resultat=mysql_query("SELECT label_1,label_2,id_cluster,periode,concept,lettre,nb_sons,nb_fathers FROM cluster WHERE label_1=".$label1." AND label_2=".$label2." AND periode=\"".derange_periode($my_period)."\" ORDER by periode,concept") or die ("Requête non executée."); $clusters=array(); $periodes=array(); while ($ligne=mysql_fetch_array($resultat)) {
$periode_concepts[$id][] = $per; } } if (!in_array($per, $periode_brute)) { $periode_brute[] = $per; } } } //agrégats $list_of_periods = sort_periods($periode_brute); if (isset($_GET['periode'])) { $my_period = $_GET['periode']; } else { $my_period = arrange_periode(end($list_of_periods)); } $titleheader = 'carte (' . get_short_string_periode($my_period) . ')'; include "include/header.php"; include "banner.php"; //******************************************* //bloc choix du terme //******************************************* $resultat = mysql_query("select id,forme_principale FROM concepts ORDER by forme_principale") or die("Requête non executées."); while ($ligne = mysql_fetch_array($resultat)) { $id = $ligne['id']; $dico_termes[$id] = $ligne['forme_principale']; $add_concept_now = 0; if (array_key_exists($id, $periode_concepts)) { if (in_array($my_period, arrange_periode($periode_concepts[$id]))) { $add_concept_now = 1; } }
$periode_concepts=array(); $periode_brute=array(); $resultat=mysql_query("select periode FROM cluster GROUP by periode") or die ("<b>Requête non exécutée (récupération des périodes pour les concepts)</b>."); while ($ligne=mysql_fetch_array($resultat)) { $per=$ligne['periode']; if ($per!=""){ // exception pour éviter un bug de la BDD avec concept 0 à période "" if (!in_array($per,$periode_brute)) $periode_brute[]=$per; } } $list_of_periods=sort_periods($periode_brute); if(isset( $_GET['periode'])) $my_period=$_GET['periode']; else $my_period=arrange_periode(end($list_of_periods)); // $titleheader="liste des champs (".get_short_string_periode($my_period).")"; include("include/header.php"); include("banner.php"); $resultat=mysql_query("select id_cluster,label_1,label_2,periode, nb_sons,nb_fathers FROM cluster WHERE periode ='".derange_periode($my_period)."' GROUP by id_cluster ORDER by periode, label_1, label_2, id_cluster") or die ("<b>Requête non exécutée</b>."); while ($ligne=mysql_fetch_array($resultat)){ $periode=arrange_periode($ligne['periode']); $liste_termes_brute[] = "<b>".$dico_termes[$ligne['label_1']]."</b> - ".$dico_termes[$ligne['label_2']]; $liste_termes_brute_id[]=array($ligne['label_1'],$ligne['label_2']); $id_termes_brute[] = $ligne['id_cluster']; $fils[] = $ligne['nb_sons'] ; $pere[] = $ligne['nb_fathers'] ; }
function display_cluster_title ($s, $direction) { global $dico_termes,$mainloc,$arraykey,$last_display_periode,$jscriptmp,$my_period,$nav; $label1=$s['label1']; $label2=$s['label2']; $lettre=$s['lettre']; $shref='cluster.php?id_cluster='.$s['id']."&periode=".arrange_periode($s['periode']).'&nav='.$nav; $speriode=get_short_string_periode(arrange_periode($s['periode']),0,1); $stitle='"<b>'.remove_popo($dico_termes[$label1]).'</b> - '.remove_popo($dico_termes[$label2]).'"'; // $periodchange indique si on a un changement de période par rapport au dernier champ thématique affiché $periodchange=($last_display_periode!=$s['periode']); $ecart=floor(abs(compute_periode(derange_periode($my_period))-compute_periode($s['periode']))/7001000); //if ($periodchange && $last_display_periode!="") // echo '<tr style="background:white;"><td></td><td></td><td></td><td><hr class="dashed"></td></tr>'; //else { //if (!$periodchange) echo '<tr style="height:4px;font-size:0pt;'.($ecart>0?' background:white;':'').'"><td> </td><td></td><td></td><td></td></tr>'; } echo '<tr width=100% valign=top'.($ecart>0?' style="background:white;"':'').'>'; echo '<td class=commentitems style="font-size:xx-small;">'; if ($ecart>0 && $periodchange) echo ("<b>...</b> "); echo '</td>'; echo '<td class=commentitems style="font-size:xx-small;">'; if ($last_display_periode!=$s['periode']) echo $speriode." "; if ($ecart>0 && $periodchange) echo "<br/><b> [".($direction=="succ"?"+":"-").($ecart+1)." sem.] </b>"; echo '</td>'; $sbox=selective_column_tt($arraykey,$s['termes'],$s['plus'],$s['minus']); $sid=$s['id']."_".str_replace(" ","_",$s['periode']); if ($direction=="succ") { if (intval($s['fils'])>0) $sarrow='↓ '; } else { if (intval($s['pere'])>0) $sarrow='↑ '; } echo '<td>'; $jscriptmp.=display_helper('(période '.get_string_periode(arrange_periode($s['periode'])).')','<div style="font-variant:small-caps;"><a href='.$shref.'>'.$sarrow.$stitle.'</a></div><br>'.$sbox,$sid,"magnify-wide.png","resizable: true"); echo '</td>'; echo ' <td class=tableitems style="font-variant:small-caps; size:small; font-style:italic;">'; echo ' <span onMouseOver="ShowContent(\'box'.$sid.'\'); ShowContent(\'title'.$sid.'\'); HideContent(\'mainbox\'); HideContent(\'maintitle\');" onMouseOut="HideContent(\'box'.$sid.'\'); HideContent(\'title'.$sid.'\'); ShowContent(\'mainbox\'); ShowContent(\'maintitle\');">'; echo '<a id="'.$sid.'" href="'.$shref.'">'; echo '<span style="font-style:normal;">'.$sarrow.'</span>'.$stitle; if ($lettre!="") echo ' ('.$lettre.')'; echo '</a>'; echo '</span>'; //echo '<a id="'.$sid.'" class="questionMark jTip jTip_element_'.$sid.'S jTip_width_300" name="Détails" href="'.$shref.'">'; //echo '<span id="'.$sid.'S" class="JT_hidden">'; //echo $sbox; //echo '</span>'; echo '</td>'; echo '</tr>'; echo '<tr style="height:4px;font-size:0pt;'.($ecart>0?' background:white;':'').'"><td> </td><td></td><td></td><td></td></tr>'; echo '</td>'; $last_display_periode=$s['periode']; }
$vue = end($urs); if ($vue=="entree_sources.php") $vue_txt='liste des sources'; if ($vue=="entree_clusters.php") $vue_txt='liste des clusters'; if ($vue=="entree_termes.php") $vue_txt='liste des termes'; if ($vue=="phylo.php") $vue_txt='liste des fils thématiques'; if ($vue=="global.php") $vue_txt='carte'; echo '<i>'.$vue_txt.'</i>'; } echo '</td>'; //periode echo "<td width=12%>"; if (strlen($row['periode'])>0) {echo get_short_string_periode($row['periode']);} else {echo 'toute la période';} echo '</td>'; $ccv = explode('?',$_SERVER['REQUEST_URI']); if (count($ccv)>1) {$cc='&';} else {$cc='?';} if ($username==$row['username']) { $suppression='<input type="button" name="refresh" value="X" onclick="location.replace(\''.$_SERVER['REQUEST_URI'].$cc.'suppr='.$row['ID'].'\');">'; } else {$suppression='';} echo '<td width=5%>'.$suppression.'</td>'; echo '</tr>' . "\n" ;
} $resultat=mysql_query("select periode FROM cluster GROUP by periode ORDER by periode") or die ("<b>Requête non exécutée</b>."); while ($ligne=mysql_fetch_array($resultat)){ $periode_termes_brute[]=$ligne['periode'];} echo '<p><table width=100% class=tableitems>'; echo '<tr valign=top><td width=2.5%></td><td><h2 class=subtitle>liste complète des champs thématiques'; $jscriptmp.=display_helper('Champs thématiques', 'Les <a href="aide.php?selectedTab=2"><font color=blue>champs thématiques</font></a> (niveau <i>meso</i>), décrivent le contexte d\'une discussion par un ensemble de termes. Cette liste donne l\'ensemble des champs thématiques sur la période '. get_short_string_periode($my_period).'. Les champs thématiques sont labellisés par leur deux expressions les plus représentatives.</p>',""); echo '</h2></td><td width=2.5%></td></tr></table>'; //agrégats echo '<table width=100% class=tableitems><tr>'; echo '<td width=2.5%></td>'; echo '<td width=95%>'; echo '<table width=100% class=specialsubbanner cellspacing=0><tr>'; echo '<td width=100% style="color:black;font-weight:bold;">période sélectionnée: '; //echo '['.$my_period.']'; //on extrait d'abord la liste totale des périodes: $total_list_periods $commande_sql = "SELECT periode from cluster GROUP BY periode"; $total_periode_sql=mysql_query($commande_sql);
function link2clusters($jscriptmp, $id_partition, $partition_infos, $period) { // génère des petits carrés pour faire un lien vers les //autres clusters de la même période sur le fil thématique global $jscriptmp; $clusters = getClutersFromThisPeriod($id_partition, $period); $nbcluster = ''; for ($i = 0; $i < count($clusters); $i++) { $nbcluster .= '<img src="images/cluster.gif" border="0" >'; } //// préparation des liens vers les clusters de la même période et du même fil thématique $jscriptmp .= "\n\$('#dialoglinkCluster" . $id_partition . "')\n.dialog({ autoOpen: false, stack: true, resizable: false, modal:true, width:600, closeOnEscape:true})\n.click(function () { \$('#dialoglinkCluster" . $id_partition . "').dialog('close'); });\n\n\$('#openerlinkCluster" . $id_partition . "').click(function(e) {\nif (!\$('#dialoglinkCluster" . $id_partition . "').dialog('isOpen'))\n\$('#dialoglinkCluster" . $id_partition . "').dialog('option','position', [\$(this).position().left+25,25]).dialog('open');\nelse\n\$('#dialoglinkCluster" . $id_partition . "').dialog('close');\nreturn false;\n});"; if (count($clusters) == 1) { $clusters = $clusters[0]; $linkcluster = ''; } else { $cluster_Link_html = '<ul>'; for ($i = 0; $i < count($clusters); $i++) { $cluster_Link_html .= '<li><a href="' . $clusters[$i][attribut] . '"><font color=blue>' . str_replace('---', '/', remove_popo($clusters[$i][label])) . '</font></a></li>'; } $cluster_Link_html .= '</ul>'; $linkcluster = '<a href scr=# id="openerlinkCluster' . $id_partition . '">' . $nbcluster . '</a>'; } echo '<span id="dialoglinkCluster' . $id_partition . '" style="display:none;" title="Période du ' . get_short_string_periode(arrange_periode($period)) . '">'; echo 'Autres clusters pour ce fil thématique : ' . $cluster_Link_html; echo '</span>'; return array($jscriptmp, $linkcluster); }