include ("top-articles.php");
require_once("../connexion/connexion-mysqli-only.inc");
require_once("./lib/date.inc");
require_once("./functions.php");
$asso=$_GET['asso'];
$asso2=$asso;
$asso2=addslashes($asso2);
#echo $asso2;
if(isset($_GET['order'])){
$order=$_GET['order'];
}else{
$order="id DESC";
}
$sql="SELECT * from reporters
WHERE asso = '$asso2'
";
$results = $mysqli->query($sql) or printf("Errormessage: %s\n", $mysqli->error);
$row = $results->fetch_assoc();
$url=$row['url'];
$facebook=$row['facebook'];
$twitter=$row['twitter'];
$description=$row['description'];
$logo=$row['logo'];
$RSS=$row['RSS'];
#echo $description;
$sql2="SELECT id from news
WHERE auteur = '$asso2'
and code=1
";
$results2 = $mysqli->query($sql2) or printf("Errormessage: %s\n", $mysqli->error);
$row = $results2->fetch_assoc();
$total=mysqli_num_rows($results2);
#echo "t:$total";
$asso=stripslashes($asso);
$asso=stripslashes($asso);
?>
Afficher les echo $total; ?> articles de echo $asso; ?> par :
[
date]
[
alpha]
[
hits]
$asso=addslashes($asso);
$sql="SELECT *,UNIX_TIMESTAMP(mise_en_ligne) as madate from news
WHERE code ='1'
AND auteur = '$asso'
ORDER by $order
";
$result = mysqli_query($mysqli,$sql) or printf("Errormessage: %s\n", $mysqli->error);
$total=0;
while ($row7=mysqli_fetch_assoc($result)) {
$total++;
$id=$row7['id'];
$friendly_url=$row7['friendly_url'] . "-".$id;
$date_mise_en_ligne=$row7['mise_en_ligne'];
$date_mise_en_ligne_french=mysql2french($row7['mise_en_ligne']);
$mois=mysql2frenchmonth($row7['mise_en_ligne']);
$langue=$row7['langue'];
$hits=$row7['hits'];
if($langue==" "){
$hits="NI";
}
$partages=$row7['partages'];
$title=$row7['title'];
# $url=$row7['url'];
$title=trim($title);
$title=stripslashes($title);
$title=stripslashes($title);
$title=substr($title,0,120);
echo "\n
$title (
$hits lectures)\n";
echo "
publié le $date_mise_en_ligne_french ";
}
?>