X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Fexec%2Fstatistiques_referers.php;fp=www%2Fecrire%2Fexec%2Fstatistiques_referers.php;h=73f03c34aa34c14d4b83972f19963a614ba25bb7;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/ecrire/exec/statistiques_referers.php b/www/ecrire/exec/statistiques_referers.php new file mode 100644 index 0000000..73f03c3 --- /dev/null +++ b/www/ecrire/exec/statistiques_referers.php @@ -0,0 +1,89 @@ +'veille') $jour='jour'; + + $referenceurs = charger_fonction('referenceurs', 'inc'); + $res = $referenceurs (0, "SUM(visites_$jour)", 'spip_referers', "visites_$jour>0", "referer", $limit); + + $n = count($res); + $args = "jour=$jour&limit=" . strval($limit+200); + $plus = generer_url_ecrire('statistiques_referers', $args); + + if ($plus) { + $plus = "
+++
"; + } + + $titre = _T('titre_liens_entrants') + . " ($n " + . ($n <= 1 ? _T('info_site') : _T('info_sites')) + . ")"; + + $commencer_page = charger_fonction('commencer_page', 'inc'); + + echo $commencer_page(_T('titre_page_statistiques_referers'), "statistiques_visites", "referers"); + + echo "


"; + echo gros_titre($titre,'', false); + echo debut_gauche('', true); + echo debut_boite_info(true); + echo "

"; + echo _T('info_gauche_statistiques_referers'); + echo "

"; + echo fin_boite_info(true); + echo debut_droite('', true); + echo barre_onglets("stat_referers", $jour); + + if ($res) { + echo "
"; + echo ""; + echo $plus; + } + echo "

"; + + echo fin_gauche(), fin_page(); + } +} + +// http://doc.spip.org/@barre_onglets_stat_referers +function barre_onglets_stat_referers() { + + $onglets = array(); + $onglets['jour']= + new Bouton(null, 'date_aujourdhui', + generer_url_ecrire("statistiques_referers","")); + $onglets['veille']= + new Bouton(null, 'date_hier', + generer_url_ecrire("statistiques_referers","jour=veille")); + return $onglets; +} + +?>