Ejemplo n.º 1
0
$resultat=mysql_query($sql) or die ("Requête non executée.");
while ($ligne=mysql_fetch_array($resultat)) {$periode_avant_temp = $ligne['periode_2']; if (intval($periode_avant_temp)< intval($periode)){$predecesseur[] = $ligne['id_cluster_2']; $periode_avant =$periode_avant_temp;  } }

$sql="SELECT id_cluster_1,periode_1 FROM phylo WHERE id_cluster_2=\"".$id_cluster."\" AND periode_2=\"".derange_periode($periode)."\"";
$resultat=mysql_query($sql) or die ("Requête non executée.");
while ($ligne=mysql_fetch_array($resultat)) {$periode_apres_temp = $ligne['periode_1'];if (intval($periode_apres_temp)> intval($periode)) {$successeur[] = $ligne['id_cluster_1']; $periode_apres = $ligne['periode_1']; }}


//on ferme l'acces à la base de donnees
mysql_close();

echo '<p><table width=100% class=tableitems>';
echo '<tr valign=top><td width=2.5%></td><td><h2 class=subtitle>champ thématique "<i>'.$dico_termes[$cluster[0]["label_1"]].'</i><i style="font-weight:normal;"> - '.$dico_termes[$cluster[0]["label_2"]].'"</i> <i style="font-size:x-small; font-weight:normal;">(#'.$id_cluster.')</i></h2></td><td width=2.5%></td></tr>';

echo '<table width=100%>';
echo '<tr valign=top><td width=2.5%></td><td><div class=subbanner>période '.get_string_periode($periode).'</div></td><td width=2.5%></td></tr>';
echo '</table>';




//// BLOC COMPOSITION

echo "<table width=100%><tr valign=top><td width=2.5%></td><td width=95%>";

//agrégats

$ncolumns=2;
$count=count($cluster);$columns=array();$increment=0;
$percolumn=ceil($count/$ncolumns);$widthcolumn=floor(100/$ncolumns)-3;
for($i=1;$i<$ncolumns;$i++){$columns[$i]=array($increment,$increment+$percolumn-1);$increment+=$percolumn;}
Ejemplo n.º 2
0
$total_periode_sql = mysql_query($commande_sql);
while ($total_periode_sql_i = mysql_fetch_array($total_periode_sql)) {
    $total_periods_raw[] = $total_periode_sql_i['periode'];
}
$total_list_periods = sort_periods($total_periods_raw);
//on affiche les flèches pour se ballader dans les périodes
display_arrow_periodes($my_period, $total_list_periods);
echo '<form action="global.php" method="get" style="display:inline;">';
echo '<select name="periode">';
for ($i = 0; $i < count($list_of_periods); $i++) {
    echo '<option value=' . $list_of_periods[$i];
    if ($list_of_periods[$i] == $my_period) {
        echo " selected";
    }
    echo '>';
    echo get_string_periode($list_of_periods[$i]);
    echo '</option>';
}
echo '</select>';
echo '<input type="submit" value="' . $selecteur_periode . '">';
echo ' </form>';
echo "</td>";
echo '</tr></table>';
echo '</td><td width=2.5%></td>';
echo '</tr>';
echo "<tr valign=top>";
echo "<td width=2.5%></td>";
echo "<td width=95%>";
if (strlen($projection) > 0) {
    //$mapgexf = "http://maps.sciencemapping.com/temporaire.gexf";
} else {
Ejemplo n.º 3
0
//$clusters contient la liste des clusters, par periodes.

echo "<table width=100%><tr valign=top><td width=2.5%></td><td width=95%>";
echo "<table width=100% class=specialsubbanner cellspacing=0>";

echo '<tr style="color:black; font-weight:bold;"><td align=left>';
echo "désambiguïsation";
echo "</td><td align=right>période sélectionnée: ";

		echo '<form action="meta12.php" method="get" style="display:inline";>';
		echo '<select name="periode">';
		foreach ($periodes as $periode) {
			echo '<option value='.arrange_periode($periode);
			if ($periode==arrange_periode($my_period)) echo(" selected");
			echo '>';
			echo get_string_periode(arrange_periode($periode));
			echo '</option>';
			}
		echo '</select>';
		echo '<input type="hidden" value="'.$label1.'" name="label1">';	
		echo '<input type="hidden" value="'.$label2.'" name="label2">';
		echo '<input type="submit" value="Changer">';
		echo '</form>';

echo "</tr></table>";

echo '<td width=2.5%></td></tr></table>';
echo "<p>";


Ejemplo n.º 4
0
		echo '<td>nom du champ auquel participe la source</td>';
		echo '<td width=45pt></td>';
		echo '<td>&uarr;/&darr;</td>';
		echo '<td width=5%></td>';
		echo '<td>numéros des billets';
		//echo '<br>(voir aussi l\'onglet "billets")';
		echo '</td>';
		echo '</tr>';

	foreach ($periode_a_faire as $pp) {
		$pp=derange_periode($pp);
		$c=$clusters[$pp];
		$cstr=array();
		if (count($c)>0){ //y-a-t-il au moins des clusters pour la periode?
			if ($my_period==-1) 
				echo "<tr><td class=small>période ".get_string_periode(arrange_periode($pp))."</td></tr>";
			foreach ($c['clusters'] as $cp) {
				$resultat=mysql_query("SELECT label_1,label_2,lettre,nb_sons,nb_fathers FROM cluster WHERE id_cluster=".$cp['id']." AND periode=\"".$cp['periode']."\" ORDER by periode,concept") or die ("Requête non executée.");
				while ($ligne=mysql_fetch_array($resultat)) $clu_tmp[]=$ligne;
				$clu_tmp=end($clu_tmp);
				$label1=$clu_tmp['label_1'];
				$label2=$clu_tmp['label_2'];
				$lettre=$clu_tmp['lettre'];
				$nbsons=$clu_tmp['nb_sons'];
				$nbfathers=$clu_tmp['nb_fathers'];
				$hrefh='href=cluster.php?id_cluster='.$cp['id'].'&periode='.arrange_periode($cp['periode']).'>';
				$href='<a '.$hrefh;
				$href12='<a href=meta12.php?label1='.$label1.'&label2='.$label2.'&periode='.$my_period.'>';
				$ktmp='<b>'.$dico_termes[$label1].'</b> - '.$dico_termes[$label2];
				//if ($lettre=="") $lettre="-";
				$arrows="";
Ejemplo n.º 5
0
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>&nbsp;</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>&nbsp;");
	echo '</td>';
	echo '<td class=commentitems style="font-size:xx-small;">';
	if ($last_display_periode!=$s['periode']) echo $speriode."&nbsp;";
	if ($ecart>0 && $periodchange) echo "<br/><b>&nbsp;[".($direction=="succ"?"+":"-").($ecart+1)."&nbsp;sem.]&nbsp;</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='&darr;&nbsp;'; }
	else 
		{ if (intval($s['pere'])>0) $sarrow='&uarr;&nbsp;'; }

	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>&nbsp;</td><td></td><td></td><td></td></tr>';
	
	echo '</td>';
	
	$last_display_periode=$s['periode'];
}
Ejemplo n.º 6
0
function FTInfo($jscriptmp, $id_partition, $color_link)
{
    $query = "select * FROM partitions WHERE id_partition=" . $id_partition;
    $resultat = mysql_query($query) or die("<b>Requête non exécutée (récupération de info de partition)</b>.");
    $partition_infos = mysql_fetch_array($resultat);
    // global $imagestar;
    $imagestar = imagestar($id_partition);
    $linkstarString = linkstarString($partition_infos[id_partition], $imagestar);
    // Construit le popup d'info d'un champs thématique
    $last_period_clusters = getPartitionLastPeriodClusters($id_partition);
    //// préparation des liens de fils thématiques
    $jscriptmp .= "\n\$('#dialogfilThematique" . $id_partition . "')\n.dialog({ autoOpen: false, stack: true, resizable: false, modal:true, width:600, closeOnEscape:true})\n.click(function () { \$('#dialogfilThematique" . $id_partition . "').dialog('close'); });\n\n\$('#openerfilThematique" . $id_partition . "').click(function(e) {\nif (!\$('#dialogfilThematique" . $id_partition . "').dialog('isOpen'))\n\$('#dialogfilThematique" . $id_partition . "').dialog('option','position', [\$(this).position().left+25,25]).dialog('open');\nelse\n\$('#dialogfilThematique" . $id_partition . "').dialog('close');\nreturn false;\n});";
    if (strcmp($last_period_clusters[0][periode], $partition_infos[periodWithMaxScore]) == 0) {
        if (count($last_period_clusters) > 1) {
            $cluster_Link_html .= 'Ce fil thématique atteint le maximum de sa popularité sur sa période la plus récente (' . get_string_periode(str_replace(' ', '-', $last_period_clusters[0][periode])) . ') avec les champs suivants :<ul>';
            for ($i = 0; $i < count($last_period_clusters); $i++) {
                $cluster_Link_html .= '<li><a href="' . $last_period_clusters[$i][attribut] . '">
<font color=blue>' . str_replace('---', '/', remove_popo($last_period_clusters[$i][label])) . '</font></a></li>';
            }
            $cluster_Link_html .= '</ul>';
        } else {
            $cluster_Link_html .= 'Ce fil thématique atteint le maximum de sa popularité sur sa période la plus récente avec le champ ' . '<a href="' . $last_period_clusters[0][attribut] . '">
<font color=blue>' . str_replace('---', '/', remove_popo($last_period_clusters[0][label])) . '</font></a> (période ' . get_string_periode(str_replace(' ', '-', $last_period_clusters[0][periode])) . ')';
        }
    } else {
        $cluster_Link_html = '<p>' . $linkstarString . '</p>';
        if (count($last_period_clusters) > 1) {
            $cluster_Link_html .= 'Ce fil thématique comporte plusieurs champs en dernière période (' . get_string_periode(str_replace(' ', '-', $last_period_clusters[0][periode])) . ') :<ul>';
            for ($i = 0; $i < count($last_period_clusters); $i++) {
                $cluster_Link_html .= '<li><a href="' . $last_period_clusters[$i][attribut] . '">
<font color=blue>' . str_replace('---', '/', remove_popo($last_period_clusters[$i][label])) . '</font></a></li>';
            }
            $cluster_Link_html .= '</ul>';
        } else {
            $cluster_Link_html .= 'Le champ le plus récent de ce fil thématique est ' . '<a href="' . $last_period_clusters[0][attribut] . '">
<font color=blue>' . str_replace('---', '/', remove_popo($last_period_clusters[0][label])) . '</font></a> (période ' . get_string_periode(str_replace(' ', '-', $last_period_clusters[0][periode])) . ')';
        }
    }
    $fils_thematique_html = '<a href scr=# id="openerfilThematique' . $id_partition . '">
<font color=' . $color_link . '>' . substr(remove_popo($partition_infos[label]), 0, -1) . '</font></a>';
    echo '<span id="dialogfilThematique' . $id_partition . '" style="display:none;" title="' . str_replace('lpopostrophe ', "l'", $partition_infos[label]) . '">';
    echo '<p>' . $cluster_Link_html . '</p>';
    echo '<br/><b>Caractéristiques de ce fil thématique :</b>';
    echo '<ul>
<li type=circle>Couverture : du <span style="font-size: small;" >' . get_date("2009-12-31", $partition_infos[first_period]) . '</span> au <span style="font-size: small;" >' . get_date("2009-12-31", $partition_infos[last_period]) . '</span>' . '<li type=circle>' . $partition_infos['nb_period_covered'] . ' périodes couvertes,' . '<li type=circle>' . $partition_infos['nb_fields'] . ' champs thématiques au total, ' . '<li type=circle>' . $partition_infos['nb_terms'] . ' termes employés.' . '</ul>';
    echo '</span>';
    return array($jscriptmp, $fils_thematique_html);
}