Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: bbc_statistique.fonct.php,v 1.1 2005-11-23 10:22:25 jp_milcent Exp $
|
22 |
// CVS : $Id: bbc_statistique.fonct.php,v 1.1 2004/09/10 18:43:31 jpm Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Fonctions de statistique de Biblio Bota.
|
24 |
* Fonctions de statistique de Biblio Bota.
|
25 |
*
|
25 |
*
|
26 |
* Contient les fonctions permettant de faire les statistiques de Biblio Bota.
|
26 |
* Contient les fonctions permettant de faire les statistiques de Biblio Bota.
|
27 |
*
|
27 |
*
|
Line 30... |
Line 30... |
30 |
//Auteur original :
|
30 |
//Auteur original :
|
31 |
*@author Jean-Charles GRANGER <tela@vecteur.org>
|
31 |
*@author Jean-Charles GRANGER <tela@vecteur.org>
|
32 |
//Autres auteurs :
|
32 |
//Autres auteurs :
|
33 |
*@author Jean-Pascal MILCENT <jpm@clapas.org>
|
33 |
*@author Jean-Pascal MILCENT <jpm@clapas.org>
|
34 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:22:25 $
|
35 |
*@version $Revision: 1.1 $ $Date: 2004/09/10 18:43:31 $
|
36 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
*/
|
37 |
*/
|
Line 38... |
Line 38... |
38 |
|
38 |
|
39 |
// +------------------------------------------------------------------------------------------------------+
|
39 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// | ENTETE du PROGRAMME |
|
40 |
// | ENTETE du PROGRAMME |
|
- |
|
41 |
// +------------------------------------------------------------------------------------------------------+
|
Line 41... |
Line -... |
41 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
42 |
|
42 |
/*Mettre ici les inclusions de fichiers*/
|
43 |
|
43 |
|
44 |
|
44 |
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
46 |
// | LISTE de FONCTIONS |
|
Line 46... |
Line 47... |
46 |
// | LISTE de FONCTIONS |
|
47 |
// +------------------------------------------------------------------------------------------------------+
|
47 |
// +------------------------------------------------------------------------------------------------------+
|
48 |
/*Mettre ici la liste de fonctions.*/
|
48 |
|
49 |
|
49 |
/** Fonction spy_validated_finder() - Enregistrement des statistiques.
|
50 |
/** Fonction spy_validated_finder() - Enregistrement des statistiques.
|
Line 54... |
Line 55... |
54 |
* @param string les arguments d'appel de la page de Biblio Bota.
|
55 |
* @param string les arguments d'appel de la page de Biblio Bota.
|
55 |
* @return void les données sont enregistrées dans la base de données.
|
56 |
* @return void les données sont enregistrées dans la base de données.
|
56 |
*/
|
57 |
*/
|
57 |
function spy_validated_finder($page_arg, $nbres)
|
58 |
function spy_validated_finder($page_arg, $nbres)
|
58 |
{
|
59 |
{
|
- |
|
60 |
global $doc;
|
- |
|
61 |
global $REMOTE_ADDR;
|
59 |
global $doc, $REMOTE_ADDR, $TabFinder, $TransTab;
|
62 |
global $TabFinder, $TransTab;
|
Line 60... |
Line 63... |
60 |
|
63 |
|
61 |
if (isset($TransTab)) {
|
64 |
if (isset($TransTab)) {
|
62 |
$TabFinder = FRAG_decoupageChaine($TransTab);
|
65 |
$TabFinder = UnstoreTransTab($TransTab);
|
Line 63... |
Line 66... |
63 |
}
|
66 |
}
|
Line 64... |
Line 67... |
64 |
|
67 |
|
65 |
$moment = time();
|
- |
|
66 |
|
- |
|
67 |
if (!isset($TabFinder['plugin'])) {
|
68 |
$moment = time();
|
68 |
$TabFinder['plugin'] = '';
|
- |
|
69 |
}
|
- |
|
70 |
if (!isset($TabFinder['geo'])) {
|
69 |
|
71 |
$TabFinder['geo'] = '';
|
- |
|
72 |
}
|
- |
|
73 |
if (!isset($TabFinder['chaine'])) {
|
70 |
if (!isset($TabFinder['plugin'])) $TabFinder['plugin'] = "";
|
74 |
$TabFinder['chaine'] = '';
|
- |
|
75 |
}
|
- |
|
76 |
if (!isset($TabFinder['sort'])) {
|
71 |
if (!isset($TabFinder['geo'])) $TabFinder['geo'] = "";
|
77 |
$TabFinder['sort'] = '';
|
- |
|
78 |
}
|
- |
|
79 |
if (!isset($TabFinder['auteur'])) {
|
72 |
if (!isset($TabFinder['chaine'])) $TabFinder['chaine'] = "";
|
80 |
$TabFinder['auteur'] = '';
|
- |
|
81 |
}
|
- |
|
82 |
if (!isset($TabFinder['categ'])) {
|
73 |
if (!isset($TabFinder['sort'])) $TabFinder['sort'] = "";
|
83 |
$TabFinder['categ'] = '';
|
- |
|
84 |
}
|
- |
|
85 |
if (!isset($TabFinder['pstart'])) {
|
74 |
if (!isset($TabFinder['auteur'])) $TabFinder['auteur'] = "";
|
86 |
$TabFinder['pstart'] = '';
|
- |
|
87 |
}
|
- |
|
88 |
if (!isset($TabFinder['pend'])) {
|
75 |
if (!isset($TabFinder['categ'])) $TabFinder['categ'] = "";
|
89 |
$TabFinder['pend'] = '';
|
- |
|
90 |
}
|
- |
|
91 |
if (!isset($TabFinder['step'])) {
|
76 |
if (!isset($TabFinder['pstart'])) $TabFinder['pstart'] = "";
|
92 |
$TabFinder['step'] = '';
|
- |
|
93 |
}
|
- |
|
94 |
if (!isset($TabFinder['valid'])) {
|
77 |
if (!isset($TabFinder['pend'])) $TabFinder['pend'] = "";
|
95 |
$TabFinder['valid'] = '';
|
- |
|
96 |
}
|
- |
|
97 |
if (!isset($TabFinder['typque'])) {
|
78 |
if (!isset($TabFinder['step'])) $TabFinder['step'] = "";
|
98 |
$TabFinder['typque'] = '';
|
- |
|
99 |
}
|
- |
|
100 |
if (!isset($TabFinder['categ_2'])) {
|
79 |
if (!isset($TabFinder['valid'])) $TabFinder['valid'] = "";
|
101 |
$TabFinder['categ_2'] = '';
|
- |
|
102 |
}
|
- |
|
103 |
if (!isset($TabFinder['categ_3'])) {
|
80 |
if (!isset($TabFinder['typque'])) $TabFinder['typque'] = "";
|
104 |
$TabFinder['categ_3'] = '';
|
- |
|
105 |
}
|
- |
|
Line 106... |
Line -... |
106 |
if (!isset($TabFinder['since'])) {
|
- |
|
107 |
$TabFinder['since'] = '';
|
81 |
if (!isset($TabFinder['categ_2'])) $TabFinder['categ_2'] = "";
|
108 |
}
|
- |
|
109 |
|
82 |
if (!isset($TabFinder['categ_3'])) $TabFinder['categ_3'] = "";
|
110 |
if ($nbres > 0) {
|
- |
|
Line 111... |
Line 83... |
111 |
$calc_pages = 'De '.$TabFinder['pstart'].' à '.$TabFinder['pend'].' sur '.$nbres;
|
83 |
if (!isset($TabFinder['since'])) $TabFinder['since'] = "";
|
112 |
} else {
|
- |
|
113 |
$calc_pages = 'Pas de résultats';
|
- |
|
114 |
}
|
- |
|
115 |
|
- |
|
116 |
$requete = 'INSERT INTO biblio_spy VALUES ("", "'.$doc.'.'.$TabFinder['plugin'].'", '.
|
- |
|
- |
|
84 |
|
117 |
'"'.$page_arg.'", "'.$REMOTE_ADDR.'", "'.$TabFinder['chaine'].'", '.
|
85 |
if ($nbres > 0) $calc_pages = "De ".$TabFinder['pstart']." à ".$TabFinder['pend']." sur $nbres";
|
118 |
'"'.$TabFinder['geo'].'", "'.$TabFinder['auteur'].'", "'.$TabFinder['categ'].'", '.
|
86 |
else $calc_pages = "Pas de résultats";
|
Line 119... |
Line 87... |
119 |
'"'.$TabFinder['categ_2'].'", "'.$TabFinder['categ_3'].'", "'.$TabFinder['typque'].'", '.
|
87 |
|
120 |
'"'.$TabFinder['step'].'", "'.$TabFinder['sort'].'", "'.$TabFinder['since'].'", '.
|
88 |
$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')";
|
121 |
'"'.$calc_pages.'", "'.$moment.'")';
|
89 |
|
122 |
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
|
- |
|
123 |
}
|
- |
|
124 |
|
- |
|
125 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
90 |
mysql_query($query) or die("<B>Erreur de stockage dans BiblioCheck :</B> $query");
|
126 |
*
|
91 |
}
|
127 |
* $Log: not supported by cvs2svn $
|
92 |
|
128 |
* Revision 1.2 2005/05/17 10:10:08 jpm
|
93 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
129 |
* Correction des bogues avant mise en ligne du site v4.
|
94 |
*
|