Subversion Repositories Sites.tela-botanica.org

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 david 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | Lesser General Public License for more details.                                                      |
17
// |                                                                                                      |
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                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: ins_wiki.fonct.php,v 1.1 2004/07/06 15:42:17 alex Exp $
23
/**
24
* Fonctions wikini
25
*
26
* Ce fichier propose 3 fonctions pour intervenir sur la table interwikini_users.
27
*
28
*@package inscription
29
*@subpackage fonctions_wikini
30
//Auteur original :
31
*@author        Alexandre Granier <alexandre@tela-botanica.org>
32
//Autres auteurs :
33
*@author        Aucun
34
*@copyright     Tela-Botanica 2000-2004
35
*@version       $Revision: 1.1 $ $Date: 2004/07/06 15:42:17 $
36
// +------------------------------------------------------------------------------------------------------+
37
*/
38
 
39
// +------------------------------------------------------------------------------------------------------+
40
// |                                            ENTETE du PROGRAMME                                       |
41
// +------------------------------------------------------------------------------------------------------+
42
 
43
// +------------------------------------------------------------------------------------------------------+
44
// |                                           LISTE de FONCTIONS                                         |
45
// +------------------------------------------------------------------------------------------------------+
46
 
47
 
48
function inscription_interwikini_users($nom, $valeur) {
375 jpm 49
    $requete = "insert into ".INS_BDD_WIKINI.".interwikini_users set name=\"".$nom.
5 david 50
                "\", password=\"".md5($valeur['mot_de_passe'])."\", email=\"".$valeur['email']."\"" ;
375 jpm 51
    $resultat = $GLOBALS['ins_db']->query ($requete) ;
5 david 52
    if (DB::isError($resultat)) {
399 alex 53
        return ("Echec de la requete dans interwikini_users<br />".$resultat->getMessage()) ;
5 david 54
    }
55
}
56
 
57
function mod_inscription_interwikini_users($nomwiki, $valeur) {
375 jpm 58
    $requete = "update ".INS_BDD_WIKINI.".interwikini_users set password=\"".md5($valeur['mot_de_passe'])."\", email=\"".$valeur['email']."\"".
5 david 59
                " where name=\"$nomwiki\"" ;
375 jpm 60
    $resultat = $GLOBALS['ins_db']->query ($requete) ;
5 david 61
    if (DB::isError($resultat)) {
62
        echo ("Echec de la requete dans interwikini_users<br />".$resultat->getMessage()) ;
63
    }
64
}
65
 
66
function desinscription_interwikini_users($nomwiki) {
375 jpm 67
    $requete = "delete from ".INS_BDD_WIKINI.".interwikini_users where name=\"$nomwiki\"" ;
68
    $resultat = $GLOBALS['ins_db']->query ($requete) ;
5 david 69
    if (DB::isError($resultat)) {
70
        echo ("Echec de la requete dans interwikini_users<br />".$resultat->getMessage()) ;
71
    }
72
}
73
 
74
function verif_doublonNomWiki($nom_wiki) {
375 jpm 75
    $requete = "select name from ".INS_BDD_WIKINI.".interwikini_users where name = \"$nom_wiki\"" ;
76
    $resultat = $GLOBALS['ins_db']->query ($requete) ;
5 david 77
    if (DB::isError ($resultat)) {
78
    	echo ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
79
    }
80
    if ($resultat->numRows() == 0) return true ;
81
    return false ;
82
}
83
 
84
 
85
/* +--Fin du code ----------------------------------------------------------------------------------------+
86
*
87
* $Log: ins_wiki.fonct.php,v $
88
* Revision 1.1  2004/07/06 15:42:17  alex
89
* en cours
90
*
91
* Revision 1.1  2004/06/18 09:20:48  alex
92
* version initiale
93
*
94
*
95
* +-- Fin du code ----------------------------------------------------------------------------------------+
96
*/
97
 
98
 
99
 
100
 
101
?>