Exemple #1
0
 	$wherecondition=" AND jours<=".$periodex["to"]." AND jours>=".$periodex["from"];
}
// sinon juste ceux de la période
else $wherecondition="";

$sql = "SELECT id_b,concept from socsem WHERE auteur=".$id_source.$wherecondition;
$resultat=mysql_query($sql);
$list_id_post=array();
$billets_id=array();
$billets_content=array();
$liste_concepts=array();
while ($ligne1=mysql_fetch_array($resultat)) {$list_id_post[]=($ligne1['id_b']);
$liste_concepts[]=($ligne1['concept']);}
if (count($list_id_post)>0) {
	// y-a-t-il des billets associes ?
	$list_billets_sql=extract_permalink($list_id_post);
	if (mysql_num_rows($list_billets_sql)>0) {
		while ($ligne=mysql_fetch_array($list_billets_sql))
			{
			
			$billets_href[]=$ligne['permalink'];
			$billets_site[]=$ligne['site'];
			$billets_date[]=$ligne['date'];
			$billets_title[]=$ligne['title'];
			$billets_id[]=$ligne['id'];
			$billets_content[]=$ligne['content'];
			
			
			}
		}
}
Exemple #2
0
$liste_of_posts = scan_billet($list_of_concepts,$periode);



$temps_fin3 = microtime_float();
/* Affichage du temps d'exécution, arrondi à 4 chiffres après la virgule */
echo '<br>avant denumere les billets : '.round($temps_fin3 - $temps_fin2, 4).'<br><br>';


if (count($liste_of_posts)>0)
{
echo "<br>liste de ".count($liste_of_posts)."billets<br>";
//print_r($liste_of_posts);
$cles = array_keys($liste_of_posts);
$resultat = extract_permalink($cles);
$permaliens=array();
$id_billets=array();
$date=array();
$site=array();
$titre=array();
$nb_termes=array();
while( $row  =  mysql_fetch_array ( $resultat )) 
{
	$temps_fin4 = microtime_float();
	/* Affichage du temps d'exécution, arrondi à 4 chiffres après la virgule */
	echo '<br><br>on evalue chaque post : '.round($temps_fin4 - $temps_fin3, 4).'<br><br>';
	$temps_fin3 = $temps_fin4;
	
	$titre[]=str_replace('popostrophe',"'",$row['title']);
	$date[]=$row['date'];
Exemple #3
0
echo '</select>';
echo '<input type="hidden" value="'.$id_concept.'" name="id_concept">';
echo '<input type="hidden" value="source" name="nav">';
echo '<input type="submit" value="Changer">';
echo '</form>';
echo '</p>';
echo '</div>';

//ici on récupère tous nos billets les plus proches
//print_r($list_of_concepts);
$list_of_concepts=array();
$list_of_concepts[0]=$id_concept;
$liste_of_posts = scan_billet_seuil($list_of_concepts,$periode,0);
$nb_termes_list = $liste_of_posts;
if (count($liste_of_posts)>0)
{$resultat = extract_permalink(array_keys($liste_of_posts));
$i=0;
$info_sources=array();
while( $row = mysql_fetch_array ($resultat))
{
$perma=$row['permalink'];
$site=strip_www($row['site']);
$site =str_replace('***','; ',$site);
$id = $row['id'];
$nb_terme=$nb_termes_list[$id];
$idauteur=$row['auteur_id'];
$content=$row['content'];
$concepts=$row['concepts_id'];
if (!array_key_exists($site,$info_sources)) {
$info_sources[$site]=array('site'=>$site,'idauteur'=>$idauteur,'permaliens'=>array(),'titres'=>array(),'dates'=>array(),'nbtermes'=>array());
}