1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
<?Php
//table (url, titre, description, resume
echo"<table class='tableau1'>";
echo"<tr>";echo"<th class='first1'>"; print "URL";echo"</th>";echo"<td class='first2'>"; print "<a href=$code>$code</a>"; echo"</td>"; echo"</tr>";
echo"<tr>";echo"<th class='first1'>"; print "Titre";echo"</th>";echo"<td class='first2'>"; print "$titre"; echo"</td>"; echo"</tr>";
echo"<tr>";echo"<th class='first1'>"; print "Description";echo"</th>";echo"<td class='first2'>"; print "$description"; echo"</td>"; echo"</tr>";
echo"<tr>";echo"<th class='first1'>"; print "Keywords";echo"</th>";echo"<td class='first2'>"; print "$keyword"; echo"</td>"; echo"</tr>";
echo"</table>";
?>
<?php
//indexer keyword
$TabChampsUnique = array_unique(explode(" ", $champs11));
if($N > 0)
{
foreach($TabChampsUnique as $Value)
{ $calcule=substr_count($champs11,$Value)/$N;
echo"<table class='tableau1'>";
echo"<tr>";echo"<th class='first1'>"; print "$Value";echo"</th>";echo"<td class='first3'>"; print "$calcule"; echo"</td>"; echo"</tr>";
echo "</table>";
//echo '<br>'.$Value.' = '.$calcule;
$sql = "INSERT INTO terme
(terme, poids,code_doc)
VALUES
('" . $Value . "', '".substr_count($champs11,$Value)/$N."','".$aRes[0]."')
";
mysql_query($sql) or die (mysql_error());
}
}
?>
<?php
//indexer titre
$TabChampsUnique1 = array_unique(explode(" ", $champs1_titre));
if($N > 0)
{
foreach($TabChampsUnique1 as $Value1)
{
$calcule1=((substr_count($champs1_titre,$Value1)/$N)+0.75);
echo"<table class='tableau1'>";
echo"<tr>";echo"<th class='first1'>"; print "$Value1";echo"</th>";echo"<td class='first3'>"; print "$calcule1"; echo"</td>"; echo"</tr>";
echo "</table>";
$sql = "INSERT INTO titre
(terme_titre, poids_titre,code_doc)
VALUES
('" . $Value1 . "', '".((substr_count($champs11,$Value1)/$N)+0.75)."','".$aRes[0]."')
";
mysql_query($sql) or die (mysql_error());
}
}
}
?> |
Partager