示例#1
0
文件: cluster.php 项目: jphcoi/veille
if ($nav=="cooc" or $nav=="soc" or $nav=="socsem") $jsprotovis="TRUE";
include("include/header.php");
include("banner.php");



////////////////////////////
/// MODULE DE NAVIGATION ///
////////////////////////////
$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);
if ($partition_infos[nb_period_covered]>1){
    list($jscriptmp,$linkFilThematique)=FTInfo($jscriptmp,$partition_infos[id_partition],'#ffffff');
    $imagestar=imagestar($partition_infos[id_partition]);
    
};
list($jscriptmp,$linkcluster)=link2clusters($jscriptmp,$partition_infos[id_partition],
        $partition_infos,str_replace('-',' ', $periode));

//////////////



echo '<table width=100% class=tableitems>';
echo '<tr valign=top><td width=2.5%></td><td>';
echo '<table width=100% class=subtitle><tr><td align=left>champ thématique "<i>'.remove_popo($label1_current).'</i><i style="font-weight:normal;"> - '.remove_popo($label2_current).'" ';
if ($lettre_current!="") echo '('.$lettre_current.')';
echo '</i>';
echo '<br/>';
示例#2
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);
}