source: spip-zone/_plugins_/honeypot/honeypot_pipeline.php @ 84594

Last change on this file since 84594 was 16389, checked in by brunobergot@…, 12 years ago

validité W3C toujours type="text/css" ...

File size: 2.1 KB
Line 
1<?php
2
3/*
4 *   Plugin HoneyPot
5 *   Copyright (C) 2007 Pierre Andrews
6 *
7 *   This program is free software: you can redistribute it and/or modify
8 *   it under the terms of the GNU General Public License as published by
9 *   the Free Software Foundation, either version 3 of the License, or
10 *   (at your option) any later version.
11 *
12 *   This program is distributed in the hope that it will be useful,
13 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 *   GNU General Public License for more details.
16 *
17 *   You should have received a copy of the GNU General Public License
18 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 */
20
21/*ajoute un style pour cacher les pieges aux visiteurs*/
22function honeypot_insert_head($flux) {
23  $flux .=      '<style type="text/css">
24.pluginhp'.lire_config('honeypot/hpfile').' {
25display: none;
26}
27</style>';
28  return $flux;
29}
30
31
32function honeypot_ajouter_boutons($flux){
33        if ( $GLOBALS['connect_statut'] == "0minirezo" && (lire_config('honeypot/httpbl/stats') == 'on')){
34                $flux['statistiques_visites']->sousmenu['honeypot_statistiques']= new Bouton(find_in_path('honeypot_24.png'),_T('honeypothttpbl:stat_bouton'));
35        }
36   
37        return $flux;
38}
39
40
41/*Les onglets pour les stats, n'afficher que les onglets des filtres utilisés*/
42function honeypot_ajouter_onglets($flux) {
43  if($flux['args']=='honeypot_statistiques') {
44        $flux['data']['general']= new Bouton('', _T('honeypothttpbl:stat_gen'),
45                                                                                 generer_url_ecrire("honeypot_statistiques"));
46        $result = spip_query("SELECT DISTINCT filtre FROM spip_honeypot_stats");
47        while($row = spip_fetch_array($result)) {
48          $flux['data']['filtre'.$row['filtre']]= new Bouton('', _T('honeypothttpbl:stat_filtre'.$row['filtre']),
49                                                                                   generer_url_ecrire("honeypot_statistiques","filtre=".$row['filtre']));
50        }
51  }
52  return $flux;
53}
54
55/*on ajoute la tache au cron*/
56function honeypot_taches_generales_cron($taches) {
57  $taches['httpbl_cron'] = 3600*24*lire_config('honeypot/httpbl/cache',7);
58  return $taches;
59}
60
61?>
Note: See TracBrowser for help on using the repository browser.