19,7 → 19,7 |
// | 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 $ |
// CVS : $Id: bbc_statistique.fonct.php,v 1.1 2004/09/10 18:43:31 jpm Exp $ |
/** |
* Fonctions de statistique de Biblio Bota. |
* |
32,7 → 32,7 |
//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 $ |
*@version $Revision: 1.1 $ $Date: 2004/09/10 18:43:31 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
39,12 → 39,13 |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/*Mettre ici les inclusions de fichiers*/ |
|
|
|
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
/*Mettre ici la liste de fonctions.*/ |
|
/** Fonction spy_validated_finder() - Enregistrement des statistiques. |
* |
56,78 → 57,42 |
*/ |
function spy_validated_finder($page_arg, $nbres) |
{ |
global $doc, $REMOTE_ADDR, $TabFinder, $TransTab; |
global $doc; |
global $REMOTE_ADDR; |
global $TabFinder, $TransTab; |
|
if (isset($TransTab)) { |
$TabFinder = FRAG_decoupageChaine($TransTab); |
$TabFinder = UnstoreTransTab($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 (!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'; |
} |
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)); |
$query = "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($query) or die("<B>Erreur de stockage dans BiblioCheck :</B> $query"); |
} |
|
/* +--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. |
* |
* $Log: bbc_statistique.fonct.php,v $ |
* Revision 1.1 2004/09/10 18:43:31 jpm |
* Ajout d'une bibliothèque de gestion de fonction de statistique de Biblio Bota. |
* |