source: spip-zone/_plugins_/topsite/topsite_fonctions.php @ 117558

Last change on this file since 117558 was 103864, checked in by spip.franck@…, 3 years ago

En finir une fois pour toutes avec spip-contrib, pour mettre à la place contrib.spip

File size: 1.6 KB
Line 
1<?php
2#------------------------------------------------------------------------#
3#  Plugin  : TOP site - Licence : GPL                                    #
4#  File    : topsite_fonctions - #CLIC_COMPTEUR                          #
5#  Authors : JN, 2008 +                                                  #
6#  based on: https://contrib.spip.net/Compter-les-clics-sur-les-liens #
7#  Contact : JN.jamesnicolas@gmail.com                                   #
8#------------------------------------------------------------------------#
9
10//    This program is free software; you can redistribute it and/or modify
11//    it under the terms of the GNU General Public License as published by
12//    the Free Software Foundation; either version 2 of the License, or any later version.
13//
14//    This program is distributed in the hope that it will be useful,
15//    but WITHOUT ANY WARRANTY; without even the implied warranty of
16//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17//    GNU General Public License for more details.
18//
19//    You should have received a copy of the GNU General Public License
20//    along with this program; if not, write to the Free Software
21//    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
23
24
25function topsite_ajout($flux) {
26        verifier_visiteur(); // securite...
27        $site = $_SERVER['HTTP_REFERER'];
28        preg_split(",\t,", $site, 3);
29        if($row=mysql_fetch_array(spip_query("SELECT url_site, topsite  FROM spip_syndic WHERE url_site='$site' LIMIT 1")))
30        {
31                $topsite=$row['topsite'];
32sql_updateq("spip_syndic", array("topsite" => $topsite), "ulr_site=$site");
33               
34        }
35        return $flux;
36
37       
38}
39?>
Note: See TracBrowser for help on using the repository browser.