New file |
0,0 → 1,137 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bbc_statistique.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $ |
/** |
* Fonctions de statistique de Biblio Bota. |
* |
* Contient les fonctions permettant de faire les statistiques de Biblio Bota. |
* |
*@package BiblioBota-Consultation |
*@subpackage Fonctions |
//Auteur original : |
*@author Jean-Charles GRANGER <tela@vecteur.org> |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
|
|
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
|
/** Fonction spy_validated_finder() - Enregistrement des statistiques. |
* |
* Fonction insèrant dans la table biblio_spy des données concernant les requêtes |
* faites par les utilisateurs de Biblio Botanica. |
* |
* @param string les arguments d'appel de la page de Biblio Bota. |
* @return void les données sont enregistrées dans la base de données. |
*/ |
function spy_validated_finder($page_arg, $nbres) |
{ |
global $doc, $REMOTE_ADDR, $TabFinder, $TransTab; |
|
if (isset($TransTab)) { |
$TabFinder = FRAG_decoupageChaine($TransTab); |
} |
|
$moment = time(); |
|
if (!isset($TabFinder['plugin'])) { |
$TabFinder['plugin'] = ''; |
} |
if (!isset($TabFinder['geo'])) { |
$TabFinder['geo'] = ''; |
} |
if (!isset($TabFinder['chaine'])) { |
$TabFinder['chaine'] = ''; |
} |
if (!isset($TabFinder['sort'])) { |
$TabFinder['sort'] = ''; |
} |
if (!isset($TabFinder['auteur'])) { |
$TabFinder['auteur'] = ''; |
} |
if (!isset($TabFinder['categ'])) { |
$TabFinder['categ'] = ''; |
} |
if (!isset($TabFinder['pstart'])) { |
$TabFinder['pstart'] = ''; |
} |
if (!isset($TabFinder['pend'])) { |
$TabFinder['pend'] = ''; |
} |
if (!isset($TabFinder['step'])) { |
$TabFinder['step'] = ''; |
} |
if (!isset($TabFinder['valid'])) { |
$TabFinder['valid'] = ''; |
} |
if (!isset($TabFinder['typque'])) { |
$TabFinder['typque'] = ''; |
} |
if (!isset($TabFinder['categ_2'])) { |
$TabFinder['categ_2'] = ''; |
} |
if (!isset($TabFinder['categ_3'])) { |
$TabFinder['categ_3'] = ''; |
} |
if (!isset($TabFinder['since'])) { |
$TabFinder['since'] = ''; |
} |
|
if ($nbres > 0) { |
$calc_pages = 'De '.$TabFinder['pstart'].' à '.$TabFinder['pend'].' sur '.$nbres; |
} else { |
$calc_pages = 'Pas de résultats'; |
} |
|
$requete = 'INSERT INTO biblio_spy VALUES ("", "'.$doc.'.'.$TabFinder['plugin'].'", '. |
'"'.$page_arg.'", "'.$REMOTE_ADDR.'", "'.$TabFinder['chaine'].'", '. |
'"'.$TabFinder['geo'].'", "'.$TabFinder['auteur'].'", "'.$TabFinder['categ'].'", '. |
'"'.$TabFinder['categ_2'].'", "'.$TabFinder['categ_3'].'", "'.$TabFinder['typque'].'", '. |
'"'.$TabFinder['step'].'", "'.$TabFinder['sort'].'", "'.$TabFinder['since'].'", '. |
'"'.$calc_pages.'", "'.$moment.'")'; |
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
} |
|
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/05/17 10:10:08 jpm |
* Correction des bogues avant mise en ligne du site v4. |
* |
* Revision 1.1 2004/09/10 18:43:31 jpm |
* Ajout d'une bibliothèque de gestion de fonction de statistique de Biblio Bota. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |